Home
last modified time | relevance | path

Searched refs:addr6 (Results 1 – 11 of 11) sorted by relevance

/foundation/communication/netstack/frameworks/js/napi/socket/socket_exec/src/
Dsocket_exec.cpp100 const sockaddr_in6 *addr6) in SetIsBound() argument
105 context->state_.SetIsBound(ntohs(addr6->sin6_port) != 0); in SetIsBound()
110 const sockaddr_in6 *addr6) in SetIsConnected() argument
115 context->state_.SetIsConnected(ntohs(addr6->sin6_port) != 0); in SetIsConnected()
266 auto *addr6 = reinterpret_cast<sockaddr_in6 *>(addr); in MakeAddressString() local
268 …if (inet_ntop(AF_INET6, &addr6->sin6_addr, str, INET6_ADDRSTRLEN) == nullptr || strlen(str) == 0) { in MakeAddressString()
343 auto *addr6 = reinterpret_cast<sockaddr_in6 *>(addr); in OnRecvMessage() local
344 remoteInfo.SetPort(ntohs(addr6->sin6_port)); in OnRecvMessage()
425 sockaddr_in6 addr6 = {0}; in OnMessage() local
428 ret = getpeername(sock, reinterpret_cast<sockaddr *>(&addr6), &len6); in OnMessage()
[all …]
/foundation/communication/dhcp/test/services/mgr_service/
Ddhcp_func_test.cpp80 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
81 EXPECT_EQ(true, DhcpFunc::Ip6StrConToChar(strIp, addr6, sizeof(struct in6_addr)));
87 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
88 EXPECT_EQ(false, DhcpFunc::Ip6StrConToChar(strIp, addr6, sizeof(struct in6_addr)));
91 EXPECT_EQ(false, DhcpFunc::Ip6StrConToChar(strIp, addr6, sizeof(struct in6_addr)));
96 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
97 EXPECT_STREQ(DhcpFunc::Ip6CharConToStr(addr6, sizeof(struct in6_addr)).c_str(), "");
102 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
103 EXPECT_STREQ(DhcpFunc::Ip6CharConToStr(addr6, 0).c_str(), "");
/foundation/communication/dhcp/test/services/dhcp_client/
Ddhcp_function_test.cpp67 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
68 EXPECT_EQ(true, Ip6StrConToChar(serIp, addr6, sizeof(addr6)));
74 uint8_t addr6[sizeof(struct in6_addr)] = {0}; variable
75 EXPECT_EQ(false, Ip6StrConToChar(serIp, addr6, sizeof(addr6)));
/foundation/communication/dhcp/services/dhcp_client/src/
Ddhcp_function.c105 struct in6_addr addr6; in Ip6StrConToChar() local
106 if (memset_s(&addr6, sizeof(addr6), 0, sizeof(addr6)) != EOK) { in Ip6StrConToChar()
109 int nRet = inet_pton(AF_INET6, strIp, &addr6); in Ip6StrConToChar()
122 LOGI("Ip6StrConToChar addr6.s6_addr: %{private}zu - %{private}02x", i, addr6.s6_addr[i]); in Ip6StrConToChar()
123 chIp[i] = addr6.s6_addr[i]; in Ip6StrConToChar()
/foundation/communication/dhcp/services/mgr_service/src/
Ddhcp_func.cpp93 struct in6_addr addr6; in Ip6StrConToChar() local
94 if (memset_s(&addr6, sizeof(addr6), 0, sizeof(addr6)) != EOK) { in Ip6StrConToChar()
97 int nRet = inet_pton(AF_INET6, strIp.c_str(), &addr6); in Ip6StrConToChar()
109 chIp[i] = addr6.s6_addr[i]; in Ip6StrConToChar()
124 struct in6_addr addr6; in Ip6CharConToStr() local
125 if (memcpy_s(addr6.s6_addr, sizeof(addr6.s6_addr), &chIp, size) != EOK) { in Ip6CharConToStr()
128 if (inet_ntop(AF_INET6, &addr6, bufIp6, INET6_ADDRSTRLEN) == NULL) { in Ip6CharConToStr()
167 uint8_t addr6[sizeof(struct in6_addr)] = {0}; in CheckIpStr() local
168 if (!Ip6StrConToChar(strIp, addr6, sizeof(struct in6_addr))) { in CheckIpStr()
/foundation/communication/netstack/frameworks/native/tls_socket/src/
Dtls_socket.cpp325 auto *addr6 = reinterpret_cast<sockaddr_in6 *>(addr); in MakeAddressString() local
327 …if (inet_ntop(AF_INET6, &addr6->sin6_addr, str, INET6_ADDRSTRLEN) == nullptr || strlen(str) == 0) { in MakeAddressString()
335 void TLSSocket::GetAddr(const Socket::NetAddress &address, sockaddr_in *addr4, sockaddr_in6 *addr6,… in GetAddr() argument
338 if (!addr6 || !addr4 || !len) { in GetAddr()
349 addr6->sin6_family = AF_INET6; in GetAddr()
350 addr6->sin6_port = htons(address.GetPort()); in GetAddr()
351 inet_pton(AF_INET6, address.GetAddress().c_str(), &addr6->sin6_addr); in GetAddr()
352 *addr = reinterpret_cast<sockaddr *>(addr6); in GetAddr()
627 sockaddr_in6 addr6 = {0}; in Bind() local
630 GetAddr(address, &addr4, &addr6, &addr, &len); in Bind()
[all …]
Dtls_socket_server.cpp215 sockaddr_in6 addr6 = {0}; in ExecBind() local
218 GetAddr(address, &addr4, &addr6, &addr, &len); in ExecBind()
237 addr6.sin6_port = 0; /* distribute a random port */ in ExecBind()
645 …LSSocketServer::GetAddr(const Socket::NetAddress &address, sockaddr_in *addr4, sockaddr_in6 *addr6, in GetAddr() argument
648 if (!addr6 || !addr4 || !len) { in GetAddr()
659 addr6->sin6_family = AF_INET6; in GetAddr()
660 addr6->sin6_port = htons(address.GetPort()); in GetAddr()
661 inet_pton(AF_INET6, address.GetAddress().c_str(), &addr6->sin6_addr); in GetAddr()
662 *addr = reinterpret_cast<sockaddr *>(addr6); in GetAddr()
/foundation/communication/netmanager_ext/services/mdnsmanager/src/protocol/
Dmdns_socket_listener.cpp294 inline bool InetAddrV6IsLoopback(const in6_addr *addr6) in InetAddrV6IsLoopback() argument
296 return IN6_IS_ADDR_LOOPBACK(addr6); in InetAddrV6IsLoopback()
/foundation/communication/netstack/interfaces/innerkits/tls_socket/include/
Dtls_socket_server.h418 …void GetAddr(const Socket::NetAddress &address, sockaddr_in *addr4, sockaddr_in6 *addr6, sockaddr …
Dtls_socket.h546 …static void GetAddr(const Socket::NetAddress &address, sockaddr_in *addr4, sockaddr_in6 *addr6, so…
/foundation/communication/netmanager_base/frameworks/js/napi/connection/connection_exec/src/
Dconnection_exec.cpp535 auto addr6 = reinterpret_cast<sockaddr_in6 *>(info->ai_addr); in SetAddressInfo() local
536 address.SetPort(addr6->sin6_port); in SetAddressInfo()