Home
last modified time | relevance | path

Searched refs:port (Results 1 - 25 of 412) sorted by relevance

12345678910>>...17

/foundation/communication/dsoftbus/tests/core/connection/tcp/
H A Dtcp_manager_test.cpp135 unsigned int port = SERVERPORT; in CreateServer() local
146 servaddr.sin_port = htons(port); in CreateServer()
188 int32_t port = CLIENTPORT; in HWTEST_F() local
192 option.socketOption.port = port; in HWTEST_F()
237 int32_t port = CLIENTPORT; in HWTEST_F() local
240 info.socketOption.port = port; in HWTEST_F()
251 EXPECT_EQ(port, TcpStartListening(&info)); in HWTEST_F()
264 int32_t port in HWTEST_F() local
347 int32_t port = CLIENTPORT; HWTEST_F() local
389 int32_t port = CLIENTPORT; HWTEST_F() local
439 int32_t port = CLIENTPORT; HWTEST_F() local
483 int32_t port = CLIENTPORT; HWTEST_F() local
526 int32_t port = CLIENTPORT; HWTEST_F() local
570 int32_t port = CLIENTPORT; HWTEST_F() local
613 int32_t port = CLIENTPORT; HWTEST_F() local
641 int32_t port = CLIENTPORT; HWTEST_F() local
670 int32_t port = CLIENTPORT; HWTEST_F() local
698 int32_t port = CLIENTPORT; HWTEST_F() local
726 int32_t port = CLIENTPORT; HWTEST_F() local
754 int32_t port = CLIENTPORT; HWTEST_F() local
783 int32_t port = CLIENTPORT; HWTEST_F() local
811 int32_t port = CLIENTPORT; HWTEST_F() local
843 int32_t port = tcp->GetSockPort(fd); HWTEST_F() local
1048 int32_t port = CLIENTPORT; HWTEST_F() local
1076 int32_t port = CLIENTPORT; HWTEST_F() local
1104 int32_t port = CLIENTPORT; HWTEST_F() local
1132 int32_t port = CLIENTPORT; HWTEST_F() local
1161 int32_t port = CLIENTPORT; HWTEST_F() local
1189 int32_t port = CLIENTPORT; HWTEST_F() local
1218 int32_t port = CLIENTPORT; HWTEST_F() local
1246 int32_t port = CLIENTPORT; HWTEST_F() local
1274 int32_t port = CLIENTPORT; HWTEST_F() local
1305 int32_t port = CLIENTPORT; HWTEST_F() local
1331 int32_t port = SERVERPORT; HWTEST_F() local
1394 int32_t port = CLIENTPORT; HWTEST_F() local
1420 int32_t port = CLIENTPORT; HWTEST_F() local
1473 int32_t port = CLIENTPORT; HWTEST_F() local
1527 int32_t port = CLIENTPORT; HWTEST_F() local
1549 int32_t port = CLIENTPORT; HWTEST_F() local
1573 int32_t port = CLIENTPORT; HWTEST_F() local
1632 int32_t port = CLIENTPORT; HWTEST_F() local
1658 int32_t port = CLIENTPORT; HWTEST_F() local
1695 int32_t port = tcp->GetSockPort(fd); HWTEST_F() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/samart_environmental_monitoring_system_demo/udpserver_env/
H A Dnet_demo.h19 void NetDemoTest(unsigned short port, const char* host);
31 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
34 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
35 testFunc(host, port); \ in CLIENT_TEST_DEMO()
42 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
45 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
46 testFunc(port); \ in SERVER_TEST_DEMO()
/vendor/hisilicon/hispark_pegasus/demo/smart_night_light_demo/udpserver_light/
H A Dnet_demo.h19 void NetDemoTest(unsigned short port, const char* host);
30 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
33 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
34 testFunc(host, port); \ in CLIENT_TEST_DEMO()
41 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
44 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
45 testFunc(port); \ in SERVER_TEST_DEMO()
/vendor/hisilicon/hispark_pegasus/demo/tcpclient_demo/
H A Dnet_demo.h20 void NetDemoTest(unsigned short port, const char* host);
32 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
35 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
36 testFunc(host, port); \ in CLIENT_TEST_DEMO()
43 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
46 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
47 testFunc(port); \ in SERVER_TEST_DEMO()
/vendor/hisilicon/hispark_pegasus/demo/tcpserver_demo/
H A Dnet_demo.h19 void NetDemoTest(unsigned short port, const char* host);
31 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
34 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
35 testFunc(host, port); \ in CLIENT_TEST_DEMO()
42 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
45 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
46 testFunc(port); \ in SERVER_TEST_DEMO()
H A Ddemo_entry_posix.c21 printf("Usage: %s [port] [host]\n", argv[0]); in main()
23 short port = argc > 1 ? atoi(argv[1]) : PARAM_SERVER_PORT; in main() local
26 NetDemoTest(port, host); in main()
/vendor/hisilicon/hispark_pegasus/demo/udpclient_demo/
H A Dnet_demo.h19 void NetDemoTest(unsigned short port, const char* host);
31 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
34 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
35 testFunc(host, port); \ in CLIENT_TEST_DEMO()
42 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
45 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
46 testFunc(port); \ in SERVER_TEST_DEMO()
H A Ddemo_entry_posix.c20 printf("Usage: %s [port] [host]\n", argv[0]); in main()
22 short port = argc > 1 ? atoi(argv[1]) : PARAM_SERVER_PORT; in main() local
25 NetDemoTest(port, host); in main()
/vendor/hisilicon/hispark_pegasus/demo/udpserver_demo/
H A Dnet_demo.h19 void NetDemoTest(unsigned short port, const char* host);
31 void NetDemoTest(unsigned short port, const char* host) { \ in CLIENT_TEST_DEMO() argument
34 printf("I will connect to %s:%d\r\n", host, port); \ in CLIENT_TEST_DEMO()
35 testFunc(host, port); \ in CLIENT_TEST_DEMO()
42 void NetDemoTest(unsigned short port, const char* host) { \ in SERVER_TEST_DEMO() argument
45 printf("I will listen on :%d\r\n", port); \ in SERVER_TEST_DEMO()
46 testFunc(port); \ in SERVER_TEST_DEMO()
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/src/
H A Dfile_adapter.c48 static int CreateServerSocketByIpv4(const char *ip, int port) in CreateServerSocketByIpv4() argument
51 int32_t ret = Ipv4AddrToAddrIn(&addr, ip, port); in CreateServerSocketByIpv4()
75 TRANS_LOGE(TRANS_FILE, "reuse port error, ret=%{public}d.", ret); in CreateServerSocketByIpv4()
90 static int CreateServerSocketByIpv6(const char *ip, int port) in CreateServerSocketByIpv6() argument
93 int32_t ret = Ipv6AddrToAddrIn(&addr, ip, port); in CreateServerSocketByIpv6()
116 TRANS_LOGE(TRANS_FILE, "reuse port error, ret=%{public}d.", ret); in CreateServerSocketByIpv6()
122 TRANS_LOGI(TRANS_FILE, "bind addr port=%{public}#x", addr.sin6Port); in CreateServerSocketByIpv6()
131 static int32_t CreateServerSocket(const char *ip, int32_t *fd, int32_t *port) in CreateServerSocket() argument
133 if (ip == NULL || fd == NULL || port == NULL) { in CreateServerSocket()
146 TRANS_LOGE(TRANS_FILE, "failed to start tcp server for getting port"); in CreateServerSocket()
167 InitSockAddrInByIpPort(const char *ip, int32_t port, struct sockaddr_in *addr) InitSockAddrInByIpPort() argument
179 InitSockAddrIn6ByIpPort(const char *ip, int32_t port, struct sockaddr_in6 *addr) InitSockAddrIn6ByIpPort() argument
210 int32_t port = -1; StartNStackXDFileServer() local
[all...]
/foundation/communication/netmanager_base/frameworks/native/netconnclient/src/
H A Dhttp_proxy.cpp31 HttpProxy::HttpProxy(std::string host, uint16_t port, const std::list<std::string> &exclusionList) : port_(0) in HttpProxy() argument
35 port_ = port; in HttpProxy()
125 uint16_t port = 0; in Unmarshalling() local
126 if (!parcel.ReadUint16(port)) { in Unmarshalling()
136 httpProxy = {host, port, {}}; in Unmarshalling()
155 httpProxy = {host, port, exclusionList}; in Unmarshalling()
182 auto port = std::strtol(portStr.c_str(), &strEnd, BASE_DEC); in ParsePort() local
183 if (strEnd == portStr.c_str() || port < 0 || port > std::numeric_limits<uint16_t>::max()) { in ParsePort()
186 return static_cast<uint16_t>(port); in ParsePort()
220 auto port = ParsePort(std::string(begin, portEnd)); GetPort() local
245 auto port = parser.GetPort(); FromString() local
[all...]
/foundation/communication/dsoftbus/tests/core/connection/common/unittest/
H A Dsoftbus_conn_common_test.cpp93 .port = g_port,
105 int32_t port = 6666; in HWTEST_F() local
115 .port = port, in HWTEST_F()
120 EXPECT_EQ(port, StartBaseListener(&info, setListener)); in HWTEST_F()
122 ++port; in HWTEST_F()
184 int32_t port = 6666; in HWTEST_F() local
195 .port = port, in HWTEST_F()
199 EXPECT_EQ(port, StartBaseListene in HWTEST_F()
224 int32_t port = 6666; HWTEST_F() local
395 int32_t port = tcp->GetSockPort(fd); HWTEST_F() local
459 int32_t port = tcp->GetSockPort(invalidFd); HWTEST_F() local
507 int32_t port = tcp->GetSockPort(fd); HWTEST_F() local
[all...]
/foundation/CastEngine/castengine_wifi_display/services/network/socket/
H A Dsocket_utils.cpp32 bool SocketUtils::CreateTcpServer(const char *ip, unsigned port, int32_t &fd) in CreateTcpServer() argument
37 BindSocket(fd, ip, port) && ListenSocket(fd); in CreateTcpServer()
45 SHARING_LOGD("current udp port: %{public}d.", gAvailablePort); in GetAvailableUdpPortPair()
50 uint16_t port = GetAvailableUdpPortPair(gAvailablePort, maxPort_); in GetAvailableUdpPortPair() local
51 if (port != 0) { in GetAvailableUdpPortPair()
52 gAvailablePort = port + 2; // 2: pair port in GetAvailableUdpPortPair()
53 return port; in GetAvailableUdpPortPair()
56 port = GetAvailableUdpPortPair(minPort_, gAvailablePort); in GetAvailableUdpPortPair()
57 if (port ! in GetAvailableUdpPortPair()
71 uint16_t port = minPort; GetAvailableUdpPortPair() local
87 IsUdpPortAvailable(uint16_t port) IsUdpPortAvailable() argument
99 CreateTcpClient(const char *ip, unsigned port, int32_t &fd, int32_t &ret) CreateTcpClient() argument
106 CreateUdpSession(unsigned port, int32_t &fd) CreateUdpSession() argument
129 BindSocket(int32_t fd, const std::string &host, uint16_t port) BindSocket() argument
162 ConnectSocket(int32_t fd, bool isAsync, const std::string &ip, uint16_t port, int32_t &ret) ConnectSocket() argument
[all...]
H A Dsocket_utils.h29 static bool CreateUdpSession(unsigned port, int32_t &fd);
31 static bool CreateTcpServer(const char *ip, unsigned port, int32_t &fd);
32 static bool CreateTcpClient(const char *ip, unsigned port, int32_t &fd, int32_t &ret);
36 static bool BindSocket(int32_t fd, const std::string &host, uint16_t port);
37 static bool ConnectSocket(int32_t fd, bool isAsync, const std::string &ip, uint16_t port, int32_t &ret);
54 static bool IsUdpPortAvailable(uint16_t port);
/vendor/hisilicon/hispark_pegasus/demo/lwip_demo/
H A Dlwip_tcp_client.c23 void TcpClientTest(const char* host, unsigned short port) in TcpClientTest() argument
29 serverAddr.sin_port = htons(port); // 端口号,从主机字节序转为网络字节序 in TcpClientTest()
60 void NetDemoTest(unsigned short port, const char* host) in NetDemoTest() argument
65 TcpClientTest(host, port); in NetDemoTest()
H A Dlwip_tcp_server.c24 void TcpServerTest(unsigned short port) in TcpServerTest() argument
33 serverAddr.sin_port = htons(port); // 端口号,从主机字节序转为网络字节序 in TcpServerTest()
42 printf("bind to port success!\r\n"); in TcpServerTest()
64 printf("client addr info: host = %s, port = %d\r\n", inet_ntoa(clientAddr.sin_addr), ntohs(clientAddr.sin_port)); in TcpServerTest()
88 void NetDemoTest(unsigned short port, const char* host) in NetDemoTest() argument
93 TcpServerTest(port); in NetDemoTest()
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/include/
H A Dutils.h52 __inline static FILLP_UINT32 UtilsIpv4AddrPortKey(FILLP_UINT16 port, struct sockaddr_in *remoteAddr) in UtilsIpv4AddrPortKey() argument
54 return (port ^ (remoteAddr)->sin_addr.s_addr); in UtilsIpv4AddrPortKey()
57 __inline static FILLP_UINT32 UtilsIpv6AddrPortKey(FILLP_UINT16 port, struct sockaddr_in6 *remoteAddr) in UtilsIpv6AddrPortKey() argument
61 port ^= ((remoteAddr)->sin6_addr.s6_addr[i]); in UtilsIpv6AddrPortKey()
63 return (FILLP_UINT32)port; in UtilsIpv6AddrPortKey()
68 FILLP_INT port = UTILS_GET_ADDRPORT(addr); in UtilsAddrHashKey() local
76 return UtilsIpv4AddrPortKey((FILLP_UINT16)port, addr); in UtilsAddrHashKey()
78 return UtilsIpv6AddrPortKey((FILLP_UINT16)port, (struct sockaddr_in6 *)addr); in UtilsAddrHashKey()
/foundation/communication/dsoftbus/core/authentication/src/virtual/
H A Dauth_tcp_connection_virtual.c35 int32_t AuthOpenChannel(const char *ip, int32_t port) in AuthOpenChannel() argument
38 (void)port; in AuthOpenChannel()
68 int32_t SocketConnectDevice(const char *ip, int32_t port, bool isBlockMode) in SocketConnectDevice() argument
71 (void)port; in SocketConnectDevice()
/foundation/multimedia/image_effect/test/unittest/
H A DTestEffectPipeline.cpp124 OutPort port(filterPtr); in HWTEST_F()
125 auto outPort = std::make_shared<OutPort>(port); in HWTEST_F()
135 InPort port(filterPtr); in HWTEST_F()
136 auto inPort = std::make_shared<InPort>(port); in HWTEST_F()
155 InPort port(filterPtr); in HWTEST_F()
156 auto inPort = std::make_shared<InPort>(port); in HWTEST_F()
168 InPort port(eFilter.get()); in HWTEST_F()
169 auto inPort = std::make_shared<InPort>(port); in HWTEST_F()
171 std::shared_ptr<InPort> prevPort = std::make_shared<InPort>(port); in HWTEST_F()
/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/tcp_direct/unittest/
H A Dtrans_tcp_direct_p2p_mock_test.cpp120 testConn->appInfo.peerData.port = TEST_PORT; in TestSetSessionConn()
156 std::cout << "add P2p port failed" << std::endl; in TestTransCreateJson()
161 std::cout << "add P2p port failed" << std::endl; in TestTransCreateJson()
176 int32_t port = TEST_PORT; in HWTEST_F() local
178 EXPECT_CALL(TcpP2pDirectMock, TransTdcStartSessionListener).WillOnce(Return(port)); in HWTEST_F()
179 int32_t ret = StartNewP2pListener(IP, &port); in HWTEST_F()
183 EXPECT_CALL(TcpP2pDirectMock, TransTdcStartSessionListener).WillOnce(Return(port)); in HWTEST_F()
184 ret = StartNewP2pListener(IP, &port); in HWTEST_F()
199 int32_t port = TEST_PORT; in HWTEST_F() local
201 EXPECT_CALL(TcpP2pDirectMock, TransTdcStartSessionListener).WillOnce(Return(port)); in HWTEST_F()
215 int32_t port = TEST_PORT; HWTEST_F() local
237 int32_t port = TEST_PORT; HWTEST_F() local
258 int32_t port = TEST_PORT; HWTEST_F() local
307 int32_t port = TEST_PORT; HWTEST_F() local
426 int32_t port = TEST_PORT; HWTEST_F() local
462 int32_t port = TEST_PORT; HWTEST_F() local
541 int32_t port = TEST_PORT; HWTEST_F() local
922 int32_t port = TEST_PORT; HWTEST_F() local
[all...]
H A Dtrans_tcp_direct_json_test.cpp107 int32_t port = MY_PORT; in HWTEST_F() local
110 int32_t ret = VerifyP2pUnPack(nullptr, ip, ipLen, &port); in HWTEST_F()
116 ret = VerifyP2pUnPack(json, nullptr, ipLen, &port); in HWTEST_F()
119 ret = VerifyP2pUnPack(json, ip, ipLen, &port); in HWTEST_F()
/foundation/communication/dsoftbus/core/connection/common/src/
H A Dsoftbus_tcp_socket.c161 static int BindLocalIP(int32_t domain, int fd, const char *localIP, uint16_t port) in BindLocalIP() argument
166 rc = Ipv6AddrToAddrIn(&addrIn6, localIP, port); in BindLocalIP()
175 rc = Ipv4AddrToAddrIn(&addrIn, localIP, port); in BindLocalIP()
204 if (option->socketOption.port < 0) { in OpenTcpServerSocket()
205 CONN_LOGE(CONN_COMMON, "bad port! port=%{public}d", option->socketOption.port); in OpenTcpServerSocket()
223 ret = BindLocalIP(domain, fd, option->socketOption.addr, (uint16_t)option->socketOption.port); in OpenTcpServerSocket()
260 rc = Ipv6AddrToAddrIn(&addrIn6, option->socketOption.addr, (uint16_t)option->socketOption.port); in SocketConnect()
269 rc = Ipv4AddrToAddrIn(&addrIn, option->socketOption.addr, (uint16_t)option->socketOption.port); in SocketConnect()
[all...]
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/
H A Dstream_manager.cpp49 local.port, remote.port, protocol); in CreateStreamClientChannel()
68 TRANS_LOGI(TRANS_STREAM, "streamSocket CreateClient success, localPort=%{public}d", local.port); in CreateStreamClientChannel()
69 return local.port; in CreateStreamClientChannel()
79 "Start to create server channel, localPort=%{public}d, protocol=%{public}d", local.port, protocol); in CreateStreamServerChannel()
103 return local.port; in CreateStreamServerChannel()
/foundation/communication/netstack/test/unittest/utils/common_utils/
H A DNetStackCommonUtilsTest.cpp304 std::string port = GetPortFromURL("https://www.example.com?data_string"); in HWTEST_F() local
305 EXPECT_STREQ(port.c_str(), ""); in HWTEST_F()
310 std::string port = GetPortFromURL("http://www.example.com?data_string"); in HWTEST_F() local
311 EXPECT_STREQ(port.c_str(), ""); in HWTEST_F()
316 std::string port = GetPortFromURL("https://www.example.com:9984?data_string"); in HWTEST_F() local
317 EXPECT_STREQ(port.c_str(), "9984"); in HWTEST_F()
322 std::string port = GetPortFromURL("www.example.com:9984?data_string"); in HWTEST_F() local
323 EXPECT_STREQ(port.c_str(), "9984"); in HWTEST_F()
328 std::string port = GetPortFromURL("www.example.com?data_string"); in HWTEST_F() local
329 EXPECT_STREQ(port in HWTEST_F()
334 std::string port = GetPortFromURL("https://www.example.com?k_string=data_string:234"); HWTEST_F() local
340 std::string port = GetPortFromURL("https://www.example.com/path:data_string:234"); HWTEST_F() local
346 std::string port = GetPortFromURL("https://www.example.com:8989/path:path2?k_string=data_string:234"); HWTEST_F() local
352 std::string port = GetPortFromURL("https://www.example.com/path:path2?k_string=data_string:234"); HWTEST_F() local
358 std::string port = GetPortFromURL("https://www.example.com:"); HWTEST_F() local
364 std::string port = GetPortFromURL("https://www.example.com:/path?k_string_data_string"); HWTEST_F() local
370 std::string port = GetPortFromURL("https://www.example.com:?k_string_data_string:43:data_string"); HWTEST_F() local
[all...]
/foundation/communication/netstack/test/unittest/websocket_test/
H A DNetStackCommonUtilsTest.cpp304 std::string port = GetPortFromURL("https://www.example.com?data_string"); in HWTEST_F() local
305 EXPECT_STREQ(port.c_str(), ""); in HWTEST_F()
310 std::string port = GetPortFromURL("http://www.example.com?data_string"); in HWTEST_F() local
311 EXPECT_STREQ(port.c_str(), ""); in HWTEST_F()
316 std::string port = GetPortFromURL("https://www.example.com:9984?data_string"); in HWTEST_F() local
317 EXPECT_STREQ(port.c_str(), "9984"); in HWTEST_F()
322 std::string port = GetPortFromURL("www.example.com:9984?data_string"); in HWTEST_F() local
323 EXPECT_STREQ(port.c_str(), "9984"); in HWTEST_F()
328 std::string port = GetPortFromURL("www.example.com?data_string"); in HWTEST_F() local
329 EXPECT_STREQ(port in HWTEST_F()
334 std::string port = GetPortFromURL("https://www.example.com?k_string=data_string:234"); HWTEST_F() local
340 std::string port = GetPortFromURL("https://www.example.com/path:data_string:234"); HWTEST_F() local
346 std::string port = GetPortFromURL("https://www.example.com:8989/path:path2?k_string=data_string:234"); HWTEST_F() local
352 std::string port = GetPortFromURL("https://www.example.com/path:path2?k_string=data_string:234"); HWTEST_F() local
358 std::string port = GetPortFromURL("https://www.example.com:"); HWTEST_F() local
364 std::string port = GetPortFromURL("https://www.example.com:/path?k_string_data_string"); HWTEST_F() local
370 std::string port = GetPortFromURL("https://www.example.com:?k_string_data_string:43:data_string"); HWTEST_F() local
[all...]

Completed in 15 milliseconds

12345678910>>...17