/system/core/adb/daemon/ |
D | shell_service_test.cpp | 48 SubprocessProtocol protocol); 51 void StartTestCommandInProcess(std::string name, Command command, SubprocessProtocol protocol); 63 const char* command, SubprocessType type, SubprocessProtocol protocol) { in StartTestSubprocess() argument 64 command_fd_ = StartSubprocess(command, nullptr, type, protocol); in StartTestSubprocess() 72 SubprocessProtocol protocol) { in StartTestCommandInProcess() argument 73 command_fd_ = StartCommandInProcess(std::move(name), std::move(command), protocol); in StartTestCommandInProcess() 101 auto protocol = std::make_unique<ShellProtocol>(fd.get()); in ReadShellProtocol() local 102 while (protocol->Read()) { in ReadShellProtocol() 103 switch (protocol->id()) { in ReadShellProtocol() 105 stdout->append(protocol->data(), protocol->data_length()); in ReadShellProtocol() [all …]
|
D | shell_service.h | 40 SubprocessProtocol protocol); 44 SubprocessProtocol protocol, bool make_pty_raw, 52 unique_fd StartCommandInProcess(std::string name, Command command, SubprocessProtocol protocol); 55 unique_fd ReportError(SubprocessProtocol protocol, const std::string& message);
|
D | abb.cpp | 97 auto protocol = SubprocessProtocol::kShell; in main() local 99 protocol = SubprocessProtocol::kShell; in main() 101 protocol = SubprocessProtocol::kNone; in main() 106 unique_fd result = StartCommandInProcess(std::string(name), &execCmd, protocol); in main()
|
D | shell_service.cpp | 161 SubprocessProtocol protocol, bool make_pty_raw); 217 SubprocessProtocol protocol, bool make_pty_raw) in Subprocess() argument 221 protocol_(protocol), in Subprocess() 798 unique_fd ReportError(SubprocessProtocol protocol, const std::string& message) { in ReportError() argument 806 if (protocol == SubprocessProtocol::kShell) { in ReportError() 815 if (protocol == SubprocessProtocol::kShell) { in ReportError() 828 SubprocessProtocol protocol) { in StartSubprocess() argument 836 if (protocol == SubprocessProtocol::kNone && type == SubprocessType::kRaw) { in StartSubprocess() 844 unique_fd fd = StartSubprocess(std::move(name), terminal_type, type, protocol, make_pty_raw, in StartSubprocess() 845 protocol, &error_fd); in StartSubprocess() [all …]
|
/system/connectivity/wifilogd/tests/ |
D | protocol_unittest.cpp | 37 using protocol::AsciiMessage; in TEST() 47 using protocol::AsciiMessage; in TEST() 58 using protocol::AsciiMessage; in TEST() 74 using protocol::Command; in TEST() 98 EXPECT_GE(protocol::kMaxMessageSize, 4096U); in TEST() 102 using protocol::MessageSeverity; in TEST() 111 using protocol::Opcode; in TEST()
|
D | main_loop_unittest.cpp | 73 EXPECT_CALL(*os_, ReceiveDatagram(_, _, Ge(protocol::kMaxMessageSize))); in TEST_F() 81 Return(std::tuple<size_t, Os::Errno>{sizeof(protocol::Command), 0})); in TEST_F() 83 ProcessCommand(_, sizeof(protocol::Command), _)); in TEST_F() 90 Return(std::tuple<size_t, Os::Errno>{protocol::kMaxMessageSize, 0})); in TEST_F() 92 ProcessCommand(_, protocol::kMaxMessageSize, _)); in TEST_F() 106 std::tuple<size_t, Os::Errno>{protocol::kMaxMessageSize + 1, 0})); in TEST_F() 108 ProcessCommand(_, protocol::kMaxMessageSize, _)); in TEST_F() 113 EXPECT_CALL(*os_, ReceiveDatagram(_, _, protocol::kMaxMessageSize)) in TEST_F() 136 ON_CALL(*os_, ReceiveDatagram(_, _, protocol::kMaxMessageSize)) in TEST_F()
|
D | command_processor_unittest.cpp | 58 using CommandBuffer = ByteBuffer<protocol::kMaxMessageSize * 2>; 60 constexpr size_t kBufferSizeBytes = protocol::kMaxMessageSize * 16; 62 constexpr size_t kMaxAsciiMessagePayloadLen = protocol::kMaxMessageSize - 63 sizeof(protocol::Command) - 64 sizeof(protocol::AsciiMessage); 92 protocol::AsciiMessage() in BuildAsciiMessageCommandWithAdjustments() 95 GetMaxVal<decltype(protocol::AsciiMessage::tag_len)>())) in BuildAsciiMessageCommandWithAdjustments() 98 GetMaxVal<decltype(protocol::AsciiMessage::data_len)>())) in BuildAsciiMessageCommandWithAdjustments() 99 .set_severity(protocol::MessageSeverity::kError); in BuildAsciiMessageCommandWithAdjustments() 107 protocol::Command() in BuildAsciiMessageCommandWithAdjustments() [all …]
|
/system/core/adb/ |
D | socket_test.cpp | 331 for (const std::string& protocol : {"", "tcp:", "udp:"}) { in TEST() 332 VerifyParseHostServiceFailed(protocol); in TEST() 333 VerifyParseHostServiceFailed(protocol + "foo"); in TEST() 336 std::string serial = protocol + "foo"; in TEST() 343 std::string serial = protocol + "foo:123"; in TEST() 350 VerifyParseHostService(protocol + "foo:123", protocol + "foo", "123"); in TEST() 351 VerifyParseHostService(protocol + "foo:123bar:baz", protocol + "foo", "123bar:baz"); in TEST() 355 std::string serial = protocol + address; in TEST() 356 std::string serial_with_port = protocol + address + ":5555"; in TEST() 362 VerifyParseHostService(protocol + "[0123:foo", protocol + "[0123", "foo"); in TEST() [all …]
|
D | shell_service_protocol_test.cpp | 63 for (ShellProtocol* protocol : {read_protocol_, write_protocol_}) { in TearDown() 64 if (protocol) { in TearDown() 65 delete protocol; in TearDown() 90 bool PacketEquals(const ShellProtocol* protocol, ShellProtocol::Id id, in PacketEquals() argument 93 return (protocol->id() == id && in PacketEquals() 94 protocol->data_length() == data_length && in PacketEquals() 95 !memcmp(data, protocol->data(), data_length)); in PacketEquals()
|
/system/connectivity/wifilogd/ |
D | command_processor.cpp | 137 if (n_bytes_read < sizeof(protocol::Command)) { in ProcessCommand() 143 CopyFromBufferOrDie<protocol::Command>(input_buffer, n_bytes_read); in ProcessCommand() 145 using protocol::Opcode; in ProcessCommand() 170 SAFELY_CLAMP(command_len_in, uint16_t, 0, protocol::kMaxMessageSize); in CopyCommandToLog() 175 protocol::kMaxMessageSize, in CopyCommandToLog() 195 ByteBuffer<sizeof(TimestampHeader) + protocol::kMaxMessageSize>() in CopyCommandToLog() 217 buffer_reader.CopyOutOrDie<protocol::Command>(); in Dump() 226 using protocol::Opcode; in Dump() 257 if (buffer_reader.size() < sizeof(protocol::AsciiMessage)) { in FormatAsciiMessage() 263 buffer_reader.CopyOutOrDie<protocol::AsciiMessage>(); in FormatAsciiMessage()
|
D | main_loop.cpp | 52 std::array<uint8_t, protocol::kMaxMessageSize> input_buf; in RunOnce() 62 if (datagram_len > protocol::kMaxMessageSize) { in RunOnce() 64 datagram_len = protocol::kMaxMessageSize; in RunOnce()
|
/system/bt/bta/pan/ |
D | bta_pan_ci.cc | 124 const RawAddress& src, uint16_t protocol, in bta_pan_ci_rx_write() argument 133 ((tBTA_PAN_DATA_PARAMS*)p_buf)->protocol = protocol; in bta_pan_ci_rx_write() 161 const RawAddress& src, uint16_t protocol, in bta_pan_ci_rx_writebuf() argument 166 ((tBTA_PAN_DATA_PARAMS*)p_buf)->protocol = protocol; in bta_pan_ci_rx_writebuf() 195 *p_protocol = ((tBTA_PAN_DATA_PARAMS*)p_buf)->protocol; in bta_pan_ci_readbuf() 244 UNUSED_ATTR uint16_t protocol, in bta_pan_ci_rx_writebuf() argument
|
/system/nfc/src/nfa/rw/ |
D | nfa_rw_act.cc | 221 conn_evt_data.ndef_detect.protocol = p_rw_data->ndef.protocol; in nfa_rw_handle_ndef_detect() 284 conn_evt_data.ndef_detect.protocol = p_rw_data->ndef.protocol; in nfa_rw_handle_ndef_detect() 341 conn_evt_data.tlv_detect.protocol = p_rw_data->tlv.protocol; in nfa_rw_handle_tlv_detect() 393 (nfa_rw_cb.protocol == NFC_PROTOCOL_T2T) && in nfa_rw_handle_sleep_wakeup_rsp() 403 activate_params.protocol = nfa_rw_cb.protocol; in nfa_rw_handle_sleep_wakeup_rsp() 1533 tNFC_PROTOCOL protocol = nfa_rw_cb.protocol; in nfa_rw_start_ndef_detection() local 1536 if (NFC_PROTOCOL_T1T == protocol) { in nfa_rw_start_ndef_detection() 1539 } else if (NFC_PROTOCOL_T2T == protocol) { in nfa_rw_start_ndef_detection() 1544 } else if (NFC_PROTOCOL_T3T == protocol) { in nfa_rw_start_ndef_detection() 1547 } else if (NFC_PROTOCOL_ISO_DEP == protocol) { in nfa_rw_start_ndef_detection() [all …]
|
D | nfa_rw_api.cc | 259 tNFC_PROTOCOL protocol = nfa_rw_cb.protocol; in NFA_RwSetTagReadOnly() local 261 if ((protocol != NFC_PROTOCOL_T1T) && (protocol != NFC_PROTOCOL_T2T) && in NFA_RwSetTagReadOnly() 262 (protocol != NFC_PROTOCOL_T5T) && (protocol != NFC_PROTOCOL_ISO_DEP) && in NFA_RwSetTagReadOnly() 263 (protocol != NFC_PROTOCOL_T3T)) { in NFA_RwSetTagReadOnly() 267 protocol); in NFA_RwSetTagReadOnly() 271 if ((!b_hard_lock && (protocol == NFC_PROTOCOL_T5T)) || in NFA_RwSetTagReadOnly() 272 (b_hard_lock && (protocol == NFC_PROTOCOL_ISO_DEP))) { in NFA_RwSetTagReadOnly() 275 b_hard_lock ? "Hard lock" : "Soft lock", protocol); in NFA_RwSetTagReadOnly() 832 if (nfa_rw_cb.protocol != NFC_PROTOCOL_T5T) { in NFA_RwI93Inventory() 881 if (nfa_rw_cb.protocol != NFC_PROTOCOL_T5T) { in NFA_RwI93StayQuiet() [all …]
|
/system/nfc/src/nfc/tags/ |
D | ce_main.cc | 95 tNFC_PROTOCOL protocol = p_activate_params->protocol; in CE_SetActivatedTagType() local 98 << StringPrintf("CE_SetActivatedTagType protocol:%d", protocol); in CE_SetActivatedTagType() 100 switch (protocol) { in CE_SetActivatedTagType()
|
D | rw_main.cc | 208 p_activate_params->protocol, p_activate_params->rf_tech_param.mode, in RW_SetActivatedTagType() 227 if (NFC_PROTOCOL_T1T == p_activate_params->protocol) { in RW_SetActivatedTagType() 233 } else if (NFC_PROTOCOL_T2T == p_activate_params->protocol) { in RW_SetActivatedTagType() 240 } else if (NFC_PROTOCOL_T3T == p_activate_params->protocol) { in RW_SetActivatedTagType() 248 } else if (NFC_PROTOCOL_ISO_DEP == p_activate_params->protocol) { in RW_SetActivatedTagType() 254 } else if (NFC_PROTOCOL_T5T == p_activate_params->protocol) { in RW_SetActivatedTagType() 259 } else if (NFC_PROTOCOL_MIFARE == p_activate_params->protocol) { in RW_SetActivatedTagType()
|
/system/bt/stack/pan/ |
D | pan_main.cc | 383 const RawAddress& dst, uint16_t protocol, uint8_t* p_data, in pan_data_ind_cb() argument 421 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb() 426 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_ind_cb() 437 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb() 450 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, ext, in pan_data_ind_cb() 477 const RawAddress& dst, uint16_t protocol, in pan_data_buf_ind_cb() argument 505 handle, protocol, len, ext); in pan_data_buf_ind_cb() 522 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, in pan_data_buf_ind_cb() 528 (*pan_cb.pan_data_buf_ind_cb)(pcb->handle, src, dst, protocol, p_buf, in pan_data_buf_ind_cb() 531 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_buf_ind_cb() [all …]
|
/system/core/fastboot/ |
D | socket_test.cpp | 35 bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Socket>* server, in MakeConnectedSockets() argument 38 *server = Socket::NewServer(protocol, 0); in MakeConnectedSockets() 44 *client = Socket::NewClient(protocol, hostname, (*server)->GetLocalPort(), nullptr); in MakeConnectedSockets() 51 if (protocol == Socket::Protocol::kTcp) { in MakeConnectedSockets() 80 for (Socket::Protocol protocol : {Socket::Protocol::kUdp, Socket::Protocol::kTcp}) { in TEST() 81 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST() 95 for (Socket::Protocol protocol : {Socket::Protocol::kUdp, Socket::Protocol::kTcp}) { in TEST() 96 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST() 116 for (Socket::Protocol protocol : {Socket::Protocol::kUdp, Socket::Protocol::kTcp}) { in TEST() 117 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST() [all …]
|
/system/nfc/src/nfa/dm/ |
D | nfa_dm_main.cc | 173 bool nfa_dm_is_protocol_supported(tNFC_PROTOCOL protocol, uint8_t sel_res) { in nfa_dm_is_protocol_supported() argument 174 return ((protocol == NFC_PROTOCOL_T1T) || in nfa_dm_is_protocol_supported() 175 ((protocol == NFC_PROTOCOL_T2T) && in nfa_dm_is_protocol_supported() 177 (protocol == NFC_PROTOCOL_T3T) || in nfa_dm_is_protocol_supported() 178 (protocol == NFC_PROTOCOL_ISO_DEP) || in nfa_dm_is_protocol_supported() 179 (protocol == NFC_PROTOCOL_NFC_DEP) || in nfa_dm_is_protocol_supported() 180 (protocol == NFC_PROTOCOL_T5T) || (protocol == NFC_PROTOCOL_MIFARE)); in nfa_dm_is_protocol_supported()
|
/system/bt/stack/include/ |
D | bnep_api.h | 108 const RawAddress& dst, uint16_t protocol, 122 const RawAddress& dst, uint16_t protocol, 310 uint16_t protocol, 339 uint8_t* p_data, uint16_t len, uint16_t protocol,
|
D | pan_api.h | 122 const RawAddress& dst, uint16_t protocol, 137 const RawAddress& dst, uint16_t protocol, 328 const RawAddress& src, uint16_t protocol, 354 const RawAddress& src, uint16_t protocol,
|
/system/bt/stack/bnep/ |
D | bnep_api.cc | 330 BT_HDR* p_buf, uint16_t protocol, in BNEP_WriteBuf() argument 351 if (bnep_is_packet_allowed(p_bcb, p_dest_addr, protocol, fw_ext_present, in BNEP_WriteBuf() 382 if (protocol != BNEP_802_1_P_PROTOCOL) in BNEP_WriteBuf() 383 protocol = 0; in BNEP_WriteBuf() 404 bnepu_build_bnep_hdr(p_bcb, p_buf, protocol, p_src_addr, &p_dest_addr, in BNEP_WriteBuf() 438 uint8_t* p_data, uint16_t len, uint16_t protocol, in BNEP_Write() argument 455 if (bnep_is_packet_allowed(p_bcb, p_dest_addr, protocol, fw_ext_present, in BNEP_Write() 483 if (protocol != BNEP_802_1_P_PROTOCOL) in BNEP_Write() 484 protocol = 0; in BNEP_Write() 511 bnepu_build_bnep_hdr(p_bcb, p_buf, protocol, p_src_addr, &p_dest_addr, in BNEP_Write()
|
/system/core/libnetutils/ |
D | checksum.c | 92 uint32_t ipv6_pseudo_header_checksum(const struct ip6_hdr* ip6, uint32_t len, uint8_t protocol) { in ipv6_pseudo_header_checksum() argument 94 uint32_t checksum_next = htonl(protocol); in ipv6_pseudo_header_checksum() 114 temp_protocol = htons(ip->protocol); in ipv4_pseudo_header_checksum()
|
/system/bt/btif/co/ |
D | bta_pan_co.cc | 158 uint16_t protocol; in bta_pan_co_tx_path() local 176 p_buf = bta_pan_ci_readbuf(handle, src, dst, &protocol, &ext, &forward); in bta_pan_co_tx_path() 187 btpan_tap_send(btpan_cb.tap_fd, src, dst, protocol, in bta_pan_co_tx_path() 230 UNUSED_ATTR uint16_t protocol, in bta_pan_co_tx_write() argument
|
/system/netd/bpf_progs/ |
D | clatd.c | 50 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_OK; in nat64() 104 .protocol = ip6->nexthdr, // u8 in nat64() 203 if (skb->protocol != htons(ETH_P_IP)) return TC_ACT_OK; in sched_cls_egress_clat_rawip() 231 switch (ip4->protocol) { in sched_cls_egress_clat_rawip() 271 .nexthdr = ip4->protocol, // __u8 in sched_cls_egress_clat_rawip()
|