/foundation/communication/dsoftbus/tests/core/connection/tcp/ |
H A D | tcp_manager_test.cpp | 135 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...] |
/foundation/communication/netmanager_base/frameworks/native/netconnclient/src/ |
H A D | http_proxy.cpp | 31 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/sdk/transmission/trans_channel/udp/file/src/ |
H A D | file_adapter.c | 48 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/dsoftbus/tests/core/connection/common/unittest/ |
H A D | softbus_conn_common_test.cpp | 93 .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 D | socket_utils.cpp | 32 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 D | socket_utils.h | 29 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);
|
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/include/ |
H A D | utils.h | 52 __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 D | auth_tcp_connection_virtual.c | 35 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 D | TestEffectPipeline.cpp | 124 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 D | trans_tcp_direct_p2p_mock_test.cpp | 120 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 D | trans_tcp_direct_json_test.cpp | 107 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 D | softbus_tcp_socket.c | 161 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 D | stream_manager.cpp | 49 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 D | NetStackCommonUtilsTest.cpp | 304 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 D | NetStackCommonUtilsTest.cpp | 304 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/dsoftbus/tests/core/authentication/unittest/ |
H A D | auth_tcp_connection_mock.cpp | 39 int32_t SocketConnectDevice(const char *ip, int32_t port, bool isBlockMode) in SocketConnectDevice() argument 41 return GetAuthTcpConnetionInterface()->SocketConnectDevice(ip, port, isBlockMode); in SocketConnectDevice()
|
/foundation/arkui/ace_engine_lite/frameworks/include/base/ |
H A D | js_debugger_config.h | 38 const uint16_t DEFAULT_PORT = 5001; // default port 43 uint16_t port; // used for tcp, default is 5001 member 50 port(DEFAULT_PORT), in DebuggerConfig() 64 port(debuggerPort), in DebuggerConfig()
|
/foundation/communication/dsoftbus/tests/sdk/bus_center/fuzztest/joinlnn_fuzzer/ |
H A D | joinlnn_fuzzer.cpp | 36 static const int32_t port = 6007; member 43 addr.info.ip.port = port + size; in GenRandAddr()
|
/foundation/communication/dsoftbus/core/authentication/include/ |
H A D | auth_tcp_connection.h | 49 int32_t SocketConnectDeviceWithAllIp(const char *localIp, const char *remoteIp, int32_t port, bool isBlockMode); 50 int32_t SocketConnectDevice(const char *ip, int32_t port, bool isBlockMode); 51 int32_t NipSocketConnectDevice(ListenerModule module, const char *addr, int32_t port, bool isBlockMode);
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/transport/ |
H A D | transport.h | 51 * @param port rfcomm scn or l2cap psm. 53 virtual void OnConnectIncoming(const RawAddress &addr, uint16_t port) = 0; 157 * @param port rfcomm's scn or l2cap's psm. 160 virtual int AcceptConnection(const RawAddress &addr, uint16_t port) = 0; 166 * @param port rfcomm's scn or l2cap's psm. 169 virtual int RejectConnection(const RawAddress &addr, uint16_t port) = 0;
|
/foundation/CastEngine/castengine_cast_framework/service/src/session/src/channel/src/tcp/ |
H A D | tcp_socket.cpp | 44 int TcpSocket::Bind(const std::string &ip, int port) in Bind() argument 53 if (port == INVALID_PORT) { in Bind() 56 sockaddr.sin_port = htons(port); in Bind() 63 if (port == INVALID_PORT) { in Bind() 66 return port; in Bind() 114 bool TcpSocket::Connect(const std::string & ip, int port) in Connect() argument 119 sockaddr.sin_port = htons(port); in Connect()
|
/foundation/CastEngine/castengine_cast_plus_stream/src/channel/src/tcp/ |
H A D | tcp_socket.cpp | 44 int TcpSocket::Bind(const std::string &ip, int port) in Bind() argument 53 if (port == INVALID_PORT) { in Bind() 56 sockaddr.sin_port = htons(port); in Bind() 63 if (port == INVALID_PORT) { in Bind() 66 return port; in Bind() 114 bool TcpSocket::Connect(const std::string & ip, int port) in Connect() argument 119 sockaddr.sin_port = htons(port); in Connect()
|
/foundation/multimedia/image_effect/frameworks/native/effect/pipeline/core/ |
H A D | port.cpp | 16 #include "port.h" 38 ErrorCode InPort::Connect(const std::shared_ptr<Port> &port) in Connect() argument 40 prevPort_ = port; in Connect() 100 ErrorCode OutPort::Connect(const std::shared_ptr<Port> &port) in Connect() argument 102 if (InSamePipeline(port)) { in Connect() 103 nextPort_ = port; in Connect() 116 bool OutPort::InSamePipeline(const std::shared_ptr<Port> &port) const in InSamePipeline() 120 auto filter2 = port->GetOwnerFilter(); in InSamePipeline()
|
/foundation/communication/dsoftbus/core/authentication/src/ |
H A D | auth_tcp_connection.c | 339 int32_t port = StartBaseListener(info, &listener); in StartSocketListening() local 340 if (port <= 0) { in StartSocketListening() 341 AUTH_LOGE(AUTH_CONN, "StartBaseListener fail. port=%{public}d", port); in StartSocketListening() 344 return port; in StartSocketListening() 369 static int32_t SocketConnectInner(const char *localIp, const char *peerIp, int32_t port, ListenerModule module, in SocketConnectInner() argument 380 .port = port, in SocketConnectInner() 411 int32_t SocketConnectDeviceWithAllIp(const char *localIp, const char *peerIp, int32_t port, bool isBlockMode) in SocketConnectDeviceWithAllIp() argument 413 return SocketConnectInner(localIp, peerIp, port, AUTH_RAW_P2P_CLIEN in SocketConnectDeviceWithAllIp() 416 SocketConnectDevice(const char *ip, int32_t port, bool isBlockMode) SocketConnectDevice() argument 466 NipSocketConnectDevice(ListenerModule module, const char *addr, int32_t port, bool isBlockMode) NipSocketConnectDevice() argument 645 AuthOpenChannelWithAllIp(const char *localIp, const char *remoteIp, int32_t port) AuthOpenChannelWithAllIp() argument 660 AuthOpenChannel(const char *ip, int32_t port) AuthOpenChannel() argument [all...] |
/foundation/multimedia/media_foundation/engine/pipeline/core/ |
H A D | port.cpp | 18 #include "pipeline/core/port.h" 27 std::shared_ptr<InPort> EmptyInPort::port = std::make_shared<EmptyInPort>(); member in OHOS::Media::Pipeline::EmptyInPort 28 std::shared_ptr<OutPort> EmptyOutPort::port = std::make_shared<EmptyOutPort>(); member in OHOS::Media::Pipeline::EmptyOutPort 45 ErrorCode InPort::Connect(const std::shared_ptr<Port>& port) in Connect() argument 47 prevPort = port; in Connect() 107 ErrorCode OutPort::Connect(const std::shared_ptr<Port>& port) in Connect() argument 109 if (InSamePipeline(port)) { in Connect() 110 nextPort = port; in Connect() 123 bool OutPort::InSamePipeline(const std::shared_ptr<Port>& port) const in InSamePipeline() 127 auto filter2 = port in InSamePipeline() [all...] |