Home
last modified time | relevance | path

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

/system/netd/resolv/
Dgetaddrinfo.cpp177 #define GET_AI(ai, afd, addr) \ argument
180 (ai) = get_ai(pai, (afd), (addr)); \
181 if ((ai) == NULL) { \
187 #define GET_PORT(ai, serv) \ argument
190 error = get_port((ai), (serv), 0); \
203 void freeaddrinfo(struct addrinfo* ai) { in freeaddrinfo() argument
204 while (ai) { in freeaddrinfo()
205 struct addrinfo* next = ai->ai_next; in freeaddrinfo()
206 if (ai->ai_canonname) free(ai->ai_canonname); in freeaddrinfo()
208 free(ai); in freeaddrinfo()
[all …]
DDnsProxyListener.cpp210 for (const addrinfo* ai = result; ai; ai = ai->ai_next) { in extractGetAddrInfoAnswers() local
211 sockaddr* ai_addr = ai->ai_addr; in extractGetAddrInfoAnswers()
213 addIpAddrWithinLimit(ip_addrs, ai_addr, ai->ai_addrlen); in extractGetAddrInfoAnswers()
330 for (const addrinfo* ai = res; ai; ai = ai->ai_next) in onlyIPv4Answers() local
331 if (ai->ai_family != AF_INET) return false; in onlyIPv4Answers()
367 for (const addrinfo* ai = res; ai; ai = ai->ai_next) { in onlyNonSpecialUseIPv4Addresses() local
368 if (ai->ai_family != AF_INET) return false; in onlyNonSpecialUseIPv4Addresses()
369 if (isSpecialUseIPv4Address(ai->ai_addr)) return false; in onlyNonSpecialUseIPv4Addresses()
395 const addrinfo* ai; in logDnsQueryResult() local
397 for (ai = res, i = 0; ai; ai = ai->ai_next, i++) { in logDnsQueryResult()
[all …]
Dres_cache.cpp1879 struct addrinfo* ai; in _resolv_populate_res_for_net() local
1881 ai = info->nsaddrinfo[nserv]; in _resolv_populate_res_for_net()
1882 if (ai == NULL) { in _resolv_populate_res_for_net()
1886 if ((size_t) ai->ai_addrlen <= sizeof(statp->_u._ext.ext->nsaddrs[0])) { in _resolv_populate_res_for_net()
1888 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], ai->ai_addr, ai->ai_addrlen); in _resolv_populate_res_for_net()
1891 if ((size_t) ai->ai_addrlen <= sizeof(statp->nsaddr_list[0])) { in _resolv_populate_res_for_net()
1892 memcpy(&statp->nsaddr_list[nserv], ai->ai_addr, ai->ai_addrlen); in _resolv_populate_res_for_net()
Dlibnetd_resolv_test.cpp64 static std::string ToString(const addrinfo* ai) { in ToString() argument
65 if (!ai) return "<null>"; in ToString()
66 for (const auto* aip = ai; aip != nullptr; aip = aip->ai_next) { in ToString()
Dresolver_test.cpp151 static std::string ToString(const addrinfo* ai) { in ToString() argument
152 if (!ai) in ToString()
154 for (const auto* aip = ai ; aip != nullptr ; aip = aip->ai_next) { in ToString()
165 static std::string ToString(const ScopedAddrinfo& ai) { return ToString(ai.get()); } in ToString() argument
167 static std::vector<std::string> ToStrings(const addrinfo* ai) { in ToStrings() argument
169 if (!ai) { in ToStrings()
173 for (const auto* aip = ai; aip != nullptr; aip = aip->ai_next) { in ToStrings()
189 static std::vector<std::string> ToStrings(const ScopedAddrinfo& ai) { in ToStrings() argument
190 return ToStrings(ai.get()); in ToStrings()
/system/hardware/interfaces/net/netd/testutils/
DVtsHalNetNetdTestUtils.cpp97 addrinfo *ai, hints = {.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV}; in checkReachability() local
98 int ret = getaddrinfo(addrStr, "53", &hints, &ai); in checkReachability()
103 int sock = socket(ai->ai_family, SOCK_DGRAM, 0); in checkReachability()
106 freeaddrinfo(ai); in checkReachability()
110 ret = connect(sock, ai->ai_addr, ai->ai_addrlen); in checkReachability()
115 freeaddrinfo(ai); in checkReachability()
/system/netd/resolv/dns_responder/
Ddns_tls_frontend.cpp207 for (const addrinfo* ai = frontend_ai_res ; ai ; ai = ai->ai_next) { in startServer() local
208 android::base::unique_fd s(socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)); in startServer()
215 std::string host_str = addr2str(ai->ai_addr, ai->ai_addrlen); in startServer()
216 if (bind(s.get(), ai->ai_addr, ai->ai_addrlen)) { in startServer()
Ddns_responder.cpp606 for (const addrinfo* ai = ai_res ; ai ; ai = ai->ai_next) { in startServer() local
607 socket_.reset(socket(ai->ai_family, ai->ai_socktype | SOCK_NONBLOCK, ai->ai_protocol)); in startServer()
614 std::string host_str = addr2str(ai->ai_addr, ai->ai_addrlen); in startServer()
615 if (bind(socket_.get(), ai->ai_addr, ai->ai_addrlen)) { in startServer()
/system/core/libnetutils/
Difc_utils.c100 struct addrinfo hints, *ai; in string_to_ip() local
112 ret = getaddrinfo(string, NULL, &hints, &ai); in string_to_ip()
114 memcpy(ss, ai->ai_addr, ai->ai_addrlen); in string_to_ip()
115 freeaddrinfo(ai); in string_to_ip()
/system/timezone/input_data/android/
Dcountryzones.txt137 isoCode:"ai"