Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 184) sorted by relevance

12345678

/system/libbase/
Dparsenetaddress_test.cpp25 int port = 123; in TEST() local
28 ParseNetAddress("www.google.com", &host, &port, &canonical, &error)); in TEST()
31 EXPECT_EQ(123, port); in TEST()
34 ParseNetAddress("www.google.com:666", &host, &port, &canonical, &error)); in TEST()
37 EXPECT_EQ(666, port); in TEST()
42 int port = 123; in TEST() local
44 EXPECT_TRUE(ParseNetAddress("1.2.3.4", &host, &port, &canonical, &error)); in TEST()
47 EXPECT_EQ(123, port); in TEST()
49 EXPECT_TRUE(ParseNetAddress("1.2.3.4:666", &host, &port, &canonical, &error)); in TEST()
52 EXPECT_EQ(666, port); in TEST()
[all …]
Dparsenetaddress.cpp27 bool ParseNetAddress(const std::string& address, std::string* host, int* port, in ParseNetAddress() argument
65 if (sscanf(port_str.c_str(), "%d", port) != 1 || *port <= 0 || in ParseNetAddress()
66 *port > 65535) { in ParseNetAddress()
75 StringPrintf(ipv6 ? "[%s]:%d" : "%s:%d", host->c_str(), *port); in ParseNetAddress()
Dparsenetaddress_fuzzer.cpp25 int port = 123; in LLVMFuzzerTestOneInput() local
26 android::base::ParseNetAddress(contents, &host, &port, &canonical, &error); in LLVMFuzzerTestOneInput()
/system/bt/stack/rfcomm/
Drfc_utils.cc143 rfc_cb.port.rfc_mcb[i].state); in rfc_alloc_multiplexer_channel()
145 << rfc_cb.port.rfc_mcb[i].bd_addr; in rfc_alloc_multiplexer_channel()
147 if ((rfc_cb.port.rfc_mcb[i].state != RFC_MX_STATE_IDLE) && in rfc_alloc_multiplexer_channel()
148 rfc_cb.port.rfc_mcb[i].bd_addr == bd_addr) { in rfc_alloc_multiplexer_channel()
151 if (rfc_cb.port.rfc_mcb[i].state == RFC_MX_STATE_CONNECTED) in rfc_alloc_multiplexer_channel()
152 rfc_timer_stop(&rfc_cb.port.rfc_mcb[i]); in rfc_alloc_multiplexer_channel()
156 is_initiator, rfc_cb.port.rfc_mcb[i].state, &rfc_cb.port.rfc_mcb[i]); in rfc_alloc_multiplexer_channel()
157 return (&rfc_cb.port.rfc_mcb[i]); in rfc_alloc_multiplexer_channel()
165 p_mcb = &rfc_cb.port.rfc_mcb[j]; in rfc_alloc_multiplexer_channel()
166 if (rfc_cb.port.rfc_mcb[j].state == RFC_MX_STATE_IDLE) { in rfc_alloc_multiplexer_channel()
[all …]
Dport_utils.cc72 tPORT* p_port = &rfc_cb.port.port[port_index]; in port_allocate_port()
285 for (tRFC_MCB& mcb : rfc_cb.port.rfc_mcb) { in port_find_mcb()
329 return &rfc_cb.port.port[handle - 1]; in port_find_mcb_dlci_port()
342 for (tPORT& port : rfc_cb.port.port) { in port_find_dlci_port()
343 if (port.in_use && (port.rfc.p_mcb == nullptr)) { in port_find_dlci_port()
344 if (port.dlci == dlci) { in port_find_dlci_port()
345 return &port; in port_find_dlci_port()
346 } else if ((dlci & 0x01) && (port.dlci == (dlci - 1))) { in port_find_dlci_port()
347 port.dlci++; in port_find_dlci_port()
348 return &port; in port_find_dlci_port()
[all …]
Dport_api.cc269 p_port = &rfc_cb.port.port[handle - 1]; in RFCOMM_RemoveConnection()
298 tPORT* p_port = &rfc_cb.port.port[handle - 1]; in RFCOMM_RemoveServer()
341 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetEventCallback()
371 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_ClearKeepHandleFlag()
401 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetDataCOCallback()
433 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetEventMask()
462 tPORT* p_port = &rfc_cb.port.port[handle - 1]; in PORT_CheckConnection()
498 for (auto& multiplexer_cb : rfc_cb.port.rfc_mcb) { in PORT_IsOpening()
509 for (tPORT& port : rfc_cb.port.port) { in PORT_IsOpening()
510 if (port.rfc.p_mcb == &multiplexer_cb) { in PORT_IsOpening()
[all …]
/system/bt/vendor_libs/test_vendor_lib/desktop/
Droot_canal_main.cc92 int port = atoi(argv[arg]); in main() local
93 LOG_INFO("%d: %s (%d)", arg, argv[arg], port); in main()
94 if (port < 0 || port > 0xffff) { in main()
101 test_port = port; in main()
104 hci_server_port = port; in main()
107 link_server_port = port; in main()
/system/extras/multinetwork/
Dcommon.cpp137 char port[sizeof("65535")]; in inetSockaddrToString() local
140 port, sizeof(port), in inetSockaddrToString()
143 if (port[0] == '0' || port[0] == '\0') { in inetSockaddrToString()
146 return (is_ipv6 ? "[" : "") + std::string(host) + (is_ipv6 ? "]:" : ":") + std::string(port); in inetSockaddrToString()
/system/netd/tests/
Dsock_diag_test.cpp37 uint16_t port = 1024 + arc4random_uniform(0xffff - 1024); in bindAndListen() local
38 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen()
41 return port; in bindAndListen()
75 uint16_t port = bindAndListen(listensocket); in TEST_F() local
76 ASSERT_NE(0, port) << "Can't bind to server port"; in TEST_F()
79 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F()
80 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
99 port, ntohs(client46.sin6_port), ntohs(client6.sin6_port)); in TEST_F()
134 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
135 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
[all …]
/system/media/audio/include/system/
Daudio.h724 const struct audio_port *port, struct audio_port_v7 *portV7) { in audio_populate_audio_port_v7() argument
725 portV7->id = port->id; in audio_populate_audio_port_v7()
726 portV7->role = port->role; in audio_populate_audio_port_v7()
727 portV7->type = port->type; in audio_populate_audio_port_v7()
728 strncpy(portV7->name, port->name, AUDIO_PORT_MAX_NAME_LEN); in audio_populate_audio_port_v7()
731 port->num_formats > AUDIO_PORT_MAX_AUDIO_PROFILES ? in audio_populate_audio_port_v7()
732 AUDIO_PORT_MAX_AUDIO_PROFILES : port->num_formats; in audio_populate_audio_port_v7()
734 portV7->audio_profiles[i].format = port->formats[i]; in audio_populate_audio_port_v7()
735 portV7->audio_profiles[i].num_sample_rates = port->num_sample_rates; in audio_populate_audio_port_v7()
736 memcpy(portV7->audio_profiles[i].sample_rates, port->sample_rates, in audio_populate_audio_port_v7()
[all …]
/system/bt/vendor_libs/test_vendor_lib/scripts/
Dsimple_stack.py114 def __init__(self, port): argument
116 self._socket.connect(("localhost", port))
135 def __init__(self, port): argument
136 self._connection = Connection(port)
220 port = int(argv[1])
225 raw_port = RawPort(port)
Dsimple_link_layer_socket.py80 def __init__(self, port): argument
82 self._socket.connect(('localhost', port))
102 def __init__(self, port): argument
103 self._connection = Connection(port)
179 port = int(argv[1])
184 raw_port = RawPort(port)
Dsend_simple_commands.py94 def __init__(self, port): argument
96 self._socket.connect(('localhost', port))
116 def __init__(self, port): argument
117 self._connection = Connection(port)
202 port = int(argv[1])
207 raw_port = RawPort(port)
Dlink_layer_socket.py80 def __init__(self, port): argument
81 print('port = ' + port)
84 self._socket.connect(('localhost', port))
177 port = int(argv[1])
182 link_layer = LinkLayerSocket(port)
/system/media/camera/docs/
DREADME.md25 sudo port install py27-beautifulsoup4
26 sudo port install py27-mako
27 sudo port install py27-markdown
28 sudo port install tidy
29 sudo port install libxml2 #xmllint
/system/netd/libnetdutils/include/netdutils/
DInternetAddresses.h38 in_port_t port{0U}; // written and read in host-byte order
48 if ((a.family != b.family) || (a.cidrlen != b.cidrlen) || (a.port != b.port) ||
95 if (a.port != b.port) return (a.port < b.port);
176 mData.port = 0U; in IPAddress()
250 static IPSockAddr toIPSockAddr(const std::string& repr, in_port_t port) { in toIPSockAddr() argument
251 return IPSockAddr(IPAddress::forString(repr), port); in toIPSockAddr()
272 IPSockAddr(const IPAddress& ip, in_port_t port) : mData(ip.mData) { mData.port = port; } in IPSockAddr() argument
283 constexpr in_port_t port() const noexcept { return mData.port; } in port() function
292 reinterpret_cast<sockaddr_in*>(&ss)->sin_port = htons(mData.port); in sockaddr_storage()
296 reinterpret_cast<sockaddr_in6*>(&ss)->sin6_port = htons(mData.port); in sockaddr_storage()
/system/bt/test/rootcanal/
Dbluetooth_hci.h78 void SetUpTestChannel(int port);
79 void SetUpHciServer(int port, const std::function<void(int)>& on_connect);
80 void SetUpLinkLayerServer(int port, const std::function<void(int)>& on_connect);
81 int ConnectToRemoteServer(const std::string& server, int port);
113 [this](const std::string& server, int port) {
114 return ConnectToRemoteServer(server, port);
Dbluetooth_hci.cc286 void BluetoothHci::SetUpHciServer(int port, const std::function<void(int)>& connection_callback) { in SetUpHciServer() argument
287 int socket_fd = remote_hci_transport_.SetUp(port); in SetUpHciServer()
294 LOG_ERROR("Remote HCI channel SetUp(%d) failed.", port); in SetUpHciServer()
313 void BluetoothHci::SetUpLinkLayerServer(int port, const std::function<void(int)>& connection_callba… in SetUpLinkLayerServer() argument
314 int socket_fd = remote_link_layer_transport_.SetUp(port); in SetUpLinkLayerServer()
321 LOG_ERROR("Remote LinkLayer channel SetUp(%d) failed.", port); in SetUpLinkLayerServer()
339 int BluetoothHci::ConnectToRemoteServer(const std::string& server, int port) { in ConnectToRemoteServer() argument
358 serv_addr.sin_port = htons(port); in ConnectToRemoteServer()
362 LOG_INFO("connect() failed for %s@%d: %s", server.c_str(), port, in ConnectToRemoteServer()
374 void BluetoothHci::SetUpTestChannel(int port) { in SetUpTestChannel() argument
[all …]
/system/core/libcutils/include/cutils/
Dsockets.h87 cutils_socket_t socket_network_client(const char* host, int port, int type);
88 int socket_network_client_timeout(const char* host, int port, int type,
95 cutils_socket_t socket_inaddr_any_server(int port, int type);
/system/core/libcutils/include_outside_system/cutils/
Dsockets.h87 cutils_socket_t socket_network_client(const char* host, int port, int type);
88 int socket_network_client_timeout(const char* host, int port, int type,
95 cutils_socket_t socket_inaddr_any_server(int port, int type);
/system/bt/internal_include/
Dbte.h103 uint8_t port; /* port number */ member
108 extern void bte_hcisu_userial_oper(tUSERIAL_MSG_CBACK* p_cback, uint8_t port,
112 extern int (*p_bte_hci_send)(uint16_t port, BT_HDR* p_msg);
/system/bt/gd/rust/main/src/
Dlib.rs34 pub async fn set_rootcanal_port(&self, port: Option<u16>) { in set_rootcanal_port()
35 if let Some(port) = port { in set_rootcanal_port()
36 self.registry.inject(RootcanalConfig::new("127.0.0.1", port)).await; in set_rootcanal_port()
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dserver_port_factory.cc30 ServerPortFactory::ServerPortFactory(int port, std::function<void(int fd)>& callback) { in ServerPortFactory() argument
31 port_ = port; in ServerPortFactory()
35 int ServerPortFactory::SetUp(int port) { in SetUp() argument
46 LOG_INFO("port: %d", port); in SetUp()
48 listen_address.sin_port = htons(port); in SetUp()
/system/core/libcutils/
Dsocket_network_client_unix.cpp46 int socket_network_client_timeout(const char* host, int port, int type, int timeout, in socket_network_client_timeout() argument
54 snprintf(port_str, sizeof(port_str), "%d", port); in socket_network_client_timeout()
122 int socket_network_client(const char* host, int port, int type) { in socket_network_client() argument
124 return socket_network_client_timeout(host, port, type, 0, &getaddrinfo_error); in socket_network_client()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp101 const int port = bindAndListen(listensocket); in ipv4_loopback() local
102 if (port == -1) { in ipv4_loopback()
120 sockaddr_in server = { .sin_family = AF_INET, .sin_port = htons(port) }; in ipv4_loopback()
158 const int port = bindAndListen(listensocket); in ipv6_loopback() local
159 if (port == -1) { in ipv6_loopback()
177 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in ipv6_loopback()

12345678