Home
last modified time | relevance | path

Searched refs:protocol (Results 1 – 25 of 82) sorted by relevance

1234

/system/core/adb/
Dshell_service_test.cpp48 SubprocessProtocol protocol);
64 const char* command, SubprocessType type, SubprocessProtocol protocol) { in StartTestSubprocess() argument
72 subprocess_fd_ = StartSubprocess(command, nullptr, type, protocol); in StartTestSubprocess()
119 ShellProtocol* protocol = new ShellProtocol(fd); in ReadShellProtocol() local
120 while (protocol->Read()) { in ReadShellProtocol()
121 switch (protocol->id()) { in ReadShellProtocol()
123 stdout->append(protocol->data(), protocol->data_length()); in ReadShellProtocol()
126 stderr->append(protocol->data(), protocol->data_length()); in ReadShellProtocol()
130 EXPECT_EQ(1u, protocol->data_length()); in ReadShellProtocol()
131 exit_code = protocol->data()[0]; in ReadShellProtocol()
[all …]
Dshell_service_protocol_test.cpp63 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
92 return (protocol->id() == id && in PacketEquals()
93 protocol->data_length() == data_length && in PacketEquals()
94 !memcmp(data, protocol->data(), data_length)); in PacketEquals()
Dsocket_test.cpp289 for (const std::string& protocol : {"", "tcp:", "udp:"}) { in TEST()
290 VerifySkipHostSerial(protocol, nullptr); in TEST()
291 VerifySkipHostSerial(protocol + "foo", nullptr); in TEST()
293 VerifySkipHostSerial(protocol + "foo:bar", ":bar"); in TEST()
294 VerifySkipHostSerial(protocol + "foo:bar:baz", ":bar:baz"); in TEST()
296 VerifySkipHostSerial(protocol + "foo:123:bar", ":bar"); in TEST()
297 VerifySkipHostSerial(protocol + "foo:123:456", ":456"); in TEST()
298 VerifySkipHostSerial(protocol + "foo:123:bar:baz", ":bar:baz"); in TEST()
301 VerifySkipHostSerial(protocol + "foo:123", ":123"); in TEST()
302 VerifySkipHostSerial(protocol + "foo:123bar:baz", ":123bar:baz"); in TEST()
Dshell_service.cpp153 SubprocessType type, SubprocessProtocol protocol);
204 SubprocessType type, SubprocessProtocol protocol) in Subprocess() argument
208 protocol_(protocol) { in Subprocess()
715 static int ReportError(SubprocessProtocol protocol, const std::string& message) { in ReportError() argument
723 if (protocol == SubprocessProtocol::kShell) { in ReportError()
732 if (protocol == SubprocessProtocol::kShell) { in ReportError()
746 SubprocessType type, SubprocessProtocol protocol) { in StartSubprocess() argument
749 protocol == SubprocessProtocol::kNone ? "none" : "shell", in StartSubprocess()
752 auto subprocess = std::make_unique<Subprocess>(name, terminal_type, type, protocol); in StartSubprocess()
755 return ReportError(protocol, "failed to allocate new subprocess"); in StartSubprocess()
[all …]
/system/bt/bta/pan/
Dbta_pan_ci.c124 void bta_pan_ci_rx_write(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol, in bta_pan_ci_rx_write() argument
134 ((tBTA_PAN_DATA_PARAMS *)p_buf)->protocol = protocol; in bta_pan_ci_rx_write()
161 void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol, in bta_pan_ci_rx_writebuf() argument
168 ((tBTA_PAN_DATA_PARAMS *)p_buf)->protocol = protocol; in bta_pan_ci_rx_writebuf()
202 *p_protocol = ((tBTA_PAN_DATA_PARAMS *)p_buf)->protocol; in bta_pan_ci_readbuf()
264 void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16 protocol, BT_HDR *p_buf… in bta_pan_ci_rx_writebuf() argument
269 UNUSED(protocol); in bta_pan_ci_rx_writebuf()
/system/connectivity/shill/
Darp_packet.cc83 const uint16_t protocol = ntohs(header.ar_pro); in Parse() local
85 if (protocol == ETHERTYPE_IP) { in Parse()
87 } else if (protocol == ETHERTYPE_IPV6) { in Parse()
91 << protocol; in Parse()
143 uint16_t protocol; in FormatRequest() local
146 protocol = ETHERTYPE_IP; in FormatRequest()
148 protocol = ETHERTYPE_IPV6; in FormatRequest()
165 header.ar_pro = htons(protocol); in FormatRequest()
Dconnection_info_reader.cc94 int protocol = 0; in ParseConnectionInfo() local
95 if (!ParseProtocol(tokens[++index], &protocol)) { in ParseConnectionInfo()
98 info->set_protocol(protocol); in ParseConnectionInfo()
106 if (protocol == IPPROTO_TCP) in ParseConnectionInfo()
159 bool ConnectionInfoReader::ParseProtocol(const string& input, int* protocol) { in ParseProtocol() argument
160 if (!base::StringToInt(input, protocol) || in ParseProtocol()
161 *protocol < 0 || *protocol >= IPPROTO_MAX) { in ParseProtocol()
Dconnection_info_reader_unittest.cc84 EXPECT_EQ(info1.protocol(), info2.protocol()); in ExpectConnectionInfoEqual()
178 int protocol = 0; in TEST_F() local
180 EXPECT_FALSE(reader_.ParseProtocol("", &protocol)); in TEST_F()
181 EXPECT_FALSE(reader_.ParseProtocol("a", &protocol)); in TEST_F()
182 EXPECT_FALSE(reader_.ParseProtocol("-1", &protocol)); in TEST_F()
184 &protocol)); in TEST_F()
187 EXPECT_TRUE(reader_.ParseProtocol(StringPrintf("%d", i), &protocol)); in TEST_F()
188 EXPECT_EQ(i, protocol); in TEST_F()
Dhttp_url.cc45 Protocol protocol = kProtocolUnknown; in ParseFromString() local
53 protocol = kProtocolHTTP; in ParseFromString()
58 protocol = kProtocolHTTPS; in ParseFromString()
79 protocol_ = protocol; in ParseFromString()
Dhttp_url_unittest.cc39 protocol(in_protocol), in StringAndResult()
45 HTTPURL::Protocol protocol; member
62 EXPECT_EQ(GetParam().protocol, url_.protocol()); in TEST_P()
Dconnection_info.h29 ConnectionInfo(int protocol,
45 int protocol() const { return protocol_; } in protocol() function
46 void set_protocol(int protocol) { protocol_ = protocol; } in set_protocol() argument
/system/firewalld/
Diptables.cc141 ProtocolEnum protocol) { in PunchHole() argument
159 std::string sprotocol = protocol == kProtocolTcp ? "TCP" : "UDP"; in PunchHole()
162 if (!AddAcceptRules(protocol, port, interface)) { in PunchHole()
177 ProtocolEnum protocol) { in PlugHole() argument
192 std::string sprotocol = protocol == kProtocolTcp ? "TCP" : "UDP"; in PlugHole()
195 if (!DeleteAcceptRules(protocol, port, interface)) { in PlugHole()
227 bool IpTables::AddAcceptRules(ProtocolEnum protocol, in AddAcceptRules() argument
230 if (!AddAcceptRule(kIpTablesPath, protocol, port, interface)) { in AddAcceptRules()
235 if (AddAcceptRule(kIp6TablesPath, protocol, port, interface)) { in AddAcceptRules()
242 DeleteAcceptRule(kIpTablesPath, protocol, port, interface); in AddAcceptRules()
[all …]
Diptables.h67 ProtocolEnum protocol);
71 ProtocolEnum protocol);
73 bool AddAcceptRules(ProtocolEnum protocol,
76 bool DeleteAcceptRules(ProtocolEnum protocol,
81 ProtocolEnum protocol,
85 ProtocolEnum protocol,
/system/core/fastboot/
Dsocket_test.cpp35 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 …]
Dsocket.h58 static std::unique_ptr<Socket> NewClient(Protocol protocol, const std::string& hostname,
65 static std::unique_ptr<Socket> NewServer(Protocol protocol, int port);
/system/bt/btif/co/
Dbta_pan_co.c164 UINT16 protocol; in bta_pan_co_tx_path() local
186 if ((p_buf = bta_pan_ci_readbuf(handle, src, dst, &protocol, in bta_pan_co_tx_path()
202 btpan_tap_send(btpan_cb.tap_fd, src, dst, protocol, in bta_pan_co_tx_path()
244 UINT16 protocol, UINT8 *p_data, in bta_pan_co_tx_write() argument
251 UNUSED(protocol); in bta_pan_co_tx_write()
274 BD_ADDR dst, UINT16 protocol, BT_HDR *p_buf, in bta_pan_co_tx_writebuf() argument
281 UNUSED(protocol); in bta_pan_co_tx_writebuf()
/system/bt/stack/pan/
Dpan_main.c436 UINT16 protocol, in pan_data_ind_cb() argument
482 BNEP_Write (pan_cb.pcb[i].handle, dst, p_data, len, protocol, src, ext); in pan_data_ind_cb()
487 (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, TRUE); in pan_data_ind_cb()
500 BNEP_Write (pan_cb.pcb[i].handle, dst, p_data, len, protocol, src, ext); in pan_data_ind_cb()
513 (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward); in pan_data_ind_cb()
541 UINT16 protocol, in pan_data_buf_ind_cb() argument
572 handle, protocol, len, ext); in pan_data_buf_ind_cb()
592 BNEP_Write (pan_cb.pcb[i].handle, dst, p_data, len, protocol, src, ext); in pan_data_buf_ind_cb()
597 … (*pan_cb.pan_data_buf_ind_cb) (pcb->handle, src, dst, protocol, p_buf, ext, forward); in pan_data_buf_ind_cb()
600 … (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward); in pan_data_buf_ind_cb()
[all …]
/system/extras/tests/net_test/
Dsock_diag.py228 def DumpAllInetSockets(self, protocol, bytecode, sock_id=None, ext=0, argument
241 diag_req = InetDiagReqV2((family, protocol, ext, states, sock_id))
280 protocol = s.getsockopt(net_test.SOL_SOCKET, net_test.SO_PROTOCOL)
299 return InetDiagReqV2((family, protocol, 0, 0xffffffff, sock_id))
317 def DiagReqFromDiagMsg(d, protocol): argument
319 return InetDiagReqV2((d.family, protocol, 0, 1 << d.state, d.id))
327 protocol = s.getsockopt(SOL_SOCKET, net_test.SO_PROTOCOL)
328 req = self.DiagReqFromDiagMsg(diag_msg, protocol)
Dnet_test.py114 def Socket(family, sock_type, protocol): argument
115 s = socket(family, sock_type, protocol)
344 def ReadProcNetSocket(self, protocol): argument
346 filename = "/proc/net/%s" % protocol
350 if protocol in ["icmp6", "raw6", "udp6"]:
355 if protocol.endswith("6"):
360 if protocol.startswith("tcp"):
363 elif re.match("icmp|udp|raw", protocol):
/system/bt/stack/bnep/
Dbnep_api.c359 UINT16 protocol, in BNEP_WriteBuf() argument
383 … if (bnep_is_packet_allowed (p_bcb, p_dest_addr, protocol, fw_ext_present, p_data) != BNEP_SUCCESS) in BNEP_WriteBuf()
412 if (protocol != BNEP_802_1_P_PROTOCOL) in BNEP_WriteBuf()
413 protocol = 0; in BNEP_WriteBuf()
437 bnepu_build_bnep_hdr (p_bcb, p_buf, protocol, p_src_addr, p_dest_addr, fw_ext_present); in BNEP_WriteBuf()
472 UINT16 protocol, in BNEP_Write() argument
492 … if (bnep_is_packet_allowed (p_bcb, p_dest_addr, protocol, fw_ext_present, p_data) != BNEP_SUCCESS) in BNEP_Write()
519 if (protocol != BNEP_802_1_P_PROTOCOL) in BNEP_Write()
520 protocol = 0; in BNEP_Write()
548 bnepu_build_bnep_hdr (p_bcb, p_buf, protocol, p_src_addr, p_dest_addr, fw_ext_present); in BNEP_Write()
Dbnep_int.h218 extern BOOLEAN bnepu_does_dest_support_prot (tBNEP_CONN *p_bcb, UINT16 protocol);
219 extern void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
221 extern void test_bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
238 extern tBNEP_RESULT bnep_is_packet_allowed (tBNEP_CONN *p_bcb, BD_ADDR p_dest_addr, UINT16 protocol,
/system/bt/stack/include/
Dbnep_api.h118 UINT16 protocol,
135 UINT16 protocol,
339 UINT16 protocol,
369 UINT16 protocol,
Dpan_api.h123 UINT16 protocol,
143 UINT16 protocol,
352 UINT16 protocol,
382 UINT16 protocol,
/system/bt/bta/include/
Dbta_pan_co.h139 …_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, UINT8 *p_data,
155 …_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, BT_HDR *p_buf,
/system/bt/btif/include/
Dbtif_pan_internal.h69 UINT16 protocol; member
104 int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst, UINT16 protocol,

1234