Home
last modified time | relevance | path

Searched refs:sin6 (Results 1 – 10 of 10) sorted by relevance

/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/utils/
DImsMediaNetworkUtil.cpp29 const sockaddr_in6& sin6 = reinterpret_cast<const sockaddr_in6&>(ss); in GetIpPortFromSockAddr() local
30 if (ss.ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sin6.sin6_addr)) in GetIpPortFromSockAddr()
39 sin.sin_port = sin6.sin6_port; in GetIpPortFromSockAddr()
40 memcpy(&sin.sin_addr.s_addr, &sin6.sin6_addr.s6_addr[V4MAPPED_OFFSET], NUM_OF_BYTES_IPV4); in GetIpPortFromSockAddr()
54 inet_ntop(AF_INET6, sin6.sin6_addr.s6_addr, ipAddress, len); in GetIpPortFromSockAddr()
55 port = ntohs(sin6.sin6_port); in GetIpPortFromSockAddr()
139 sockaddr_in6 sin6; in openSocket() local
140 sin6.sin6_family = AF_INET6; in openSocket()
141 sin6.sin6_port = htons(port); in openSocket()
143 if (inet_pton(AF_INET6, pIPAddr, &sin6.sin6_addr) <= 0) in openSocket()
[all …]
/packages/modules/Connectivity/service/native/libs/libclat/
Dclatutils.cpp137 sockaddr_in6 sin6 = {.sin6_family = AF_INET6, .sin6_addr = nat64Prefix}; in generateIpv6Address() local
138 if (connect(s, reinterpret_cast<struct sockaddr*>(&sin6), sizeof(sin6))) { in generateIpv6Address()
143 socklen_t len = sizeof(sin6); in generateIpv6Address()
144 if (getsockname(s, reinterpret_cast<struct sockaddr*>(&sin6), &len)) { in generateIpv6Address()
149 *v6 = sin6.sin6_addr; in generateIpv6Address()
/packages/modules/Connectivity/Tethering/jni/
Dcom_android_networkstack_tethering_util_TetheringUtils.cpp131 const struct sockaddr_in6 sin6 = { in com_android_networkstack_tethering_util_setupRaSocket() local
138 auto sa = reinterpret_cast<const struct sockaddr *>(&sin6); in com_android_networkstack_tethering_util_setupRaSocket()
139 len = sizeof(sin6); in com_android_networkstack_tethering_util_setupRaSocket()
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DInternetAddresses.cpp80 sockaddr_in6* sin6 = (sockaddr_in6*) res[0].ai_addr; in forString() local
81 if (ip) *ip = IPAddress(sin6->sin6_addr, sin6->sin6_scope_id); in forString()
/packages/modules/DnsResolver/
DDnsProxyListener.cpp182 sockaddr_in6 sin6 = {.sin6_family = AF_INET6}; in extractResNsendAnswers() local
183 memcpy(&sin6.sin6_addr, rdata, sizeof(sin6.sin6_addr)); in extractResNsendAnswers()
184 addIpAddrWithinLimit(ip_addrs, (sockaddr*)&sin6, sizeof(sin6)); in extractResNsendAnswers()
222 sockaddr_in6 sin6 = {.sin6_family = AF_INET6, .sin6_addr = *list[i]}; in extractGetHostByNameAnswers() local
223 addIpAddrWithinLimit(ip_addrs, (sockaddr*)&sin6, sizeof(sin6)); in extractGetHostByNameAnswers()
596 sockaddr_in6* sin6 = (sockaddr_in6*)sa->ai_addr; in synthesizeNat64PrefixWithARecord() local
597 sin6->sin6_addr = v6prefix->sin6_addr; in synthesizeNat64PrefixWithARecord()
598 sin6->sin6_addr.s6_addr32[3] = sin4->sin_addr.s_addr; in synthesizeNat64PrefixWithARecord()
599 sin6->sin6_family = AF_INET6; in synthesizeNat64PrefixWithARecord()
600 sin6->sin6_port = sin4->sin_port; in synthesizeNat64PrefixWithARecord()
[all …]
Dgetaddrinfo.cpp229 sockaddr_union addr = {.sin6 = sin6_test}; in have_ipv6()
602 struct sockaddr_in6* sin6; in explore_numeric_scope() local
640 sin6 = (struct sockaddr_in6*) (void*) cur->ai_addr; in explore_numeric_scope()
641 if (ip6_str2scopeid(scope, sin6, &scopeid) == -1) { in explore_numeric_scope()
645 sin6->sin6_scope_id = scopeid; in explore_numeric_scope()
772 static int ip6_str2scopeid(const char* scope, struct sockaddr_in6* sin6, uint32_t* scopeid) { in ip6_str2scopeid() argument
776 assert(sin6 != NULL); in ip6_str2scopeid()
779 a6 = &sin6->sin6_addr; in ip6_str2scopeid()
1240 const struct sockaddr_in6* a1_src = &a1->src_addr.sin6; in _rfc6724_compare()
1242 const struct sockaddr_in6* a2_src = &a2->src_addr.sin6; in _rfc6724_compare()
[all …]
Dresolv_private.h88 struct sockaddr_in6 sin6; member
Dres_send.cpp269 u.sin6.sin6_family = family; in random_bind()
270 slen = sizeof u.sin6; in random_bind()
288 u.sin6.sin6_port = htons(port); in random_bind()
298 u.sin6.sin6_port = 0; in random_bind()
/packages/modules/Connectivity/clatd/
Dtranslate.c474 static struct sockaddr_in6 sin6 = { AF_INET6, 0, 0, { { { 0, 0, 0, 0 } } }, 0 }; in send_rawv6() local
476 .msg_name = &sin6, in send_rawv6()
477 .msg_namelen = sizeof(sin6), in send_rawv6()
481 sin6.sin6_addr = ((struct ip6_hdr *)out[CLAT_POS_IPHDR].iov_base)->ip6_dst; in send_rawv6()
/packages/modules/DnsResolver/tests/
Dresolv_integration_test.cpp3838 struct sockaddr_in6 sin6; in TEST_F() local
3847 memset(&sin6, 0, sizeof(sin6)); in TEST_F()
3848 sin6.sin6_family = AF_INET6; in TEST_F()
3849 inet_pton(AF_INET6, config.addr.c_str(), &sin6.sin6_addr); in TEST_F()
3850 rv = getnameinfo((const struct sockaddr*)&sin6, sizeof(sin6), host, sizeof(host), in TEST_F()
3919 struct sockaddr_in6 sin6; in TEST_F() local
3920 memset(&sin6, 0, sizeof(sin6)); in TEST_F()
3921 sin6.sin6_family = AF_INET6; in TEST_F()
3922 inet_pton(AF_INET6, config.addr.c_str(), &sin6.sin6_addr); in TEST_F()
3923 int rv = getnameinfo((const struct sockaddr*)&sin6, sizeof(sin6), host, sizeof(host), in TEST_F()
[all …]