Lines Matching refs:addrinfo
126 static int explore_fqdn(const struct addrinfo*, const char*, const char*, struct addrinfo**,
128 static int explore_null(const struct addrinfo*, const char*, struct addrinfo**);
129 static int explore_numeric(const struct addrinfo*, const char*, const char*, struct addrinfo**,
131 static int explore_numeric_scope(const struct addrinfo*, const char*, const char*,
132 struct addrinfo**);
133 static int get_canonname(const struct addrinfo*, struct addrinfo*, const char*);
134 static struct addrinfo* get_ai(const struct addrinfo*, const struct afd*, const char*);
135 static int get_portmatch(const struct addrinfo*, const char*);
136 static int get_port(const struct addrinfo*, const char*, int);
140 static struct addrinfo* getanswer(const std::vector<uint8_t>&, int, const char*, int,
141 const struct addrinfo*, int* herrno);
142 static int dns_getaddrinfo(const char* name, const addrinfo* pai,
143 const android_net_context* netcontext, addrinfo** rv,
147 static struct addrinfo* _gethtent(FILE**, const char*, const struct addrinfo*);
148 static struct addrinfo* getCustomHosts(const size_t netid, const char*, const struct addrinfo*);
149 static bool files_getaddrinfo(const size_t netid, const char* name, const addrinfo* pai,
150 addrinfo** res);
205 void freeaddrinfo(struct addrinfo* ai) { in freeaddrinfo()
207 struct addrinfo* next = ai->ai_next; in freeaddrinfo()
246 int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, in getaddrinfo_numeric()
247 addrinfo** result) { in getaddrinfo_numeric()
264 int validateHints(const addrinfo* _Nonnull hints) { in validateHints()
308 const addrinfo* hints, const android_net_context* netcontext, in android_getaddrinfofornetcontext()
309 addrinfo** res, NetworkDnsEventReported* event) { in android_getaddrinfofornetcontext()
317 addrinfo sentinel = {}; in android_getaddrinfofornetcontext()
318 addrinfo* cur = &sentinel; in android_getaddrinfofornetcontext()
328 addrinfo ai = hints ? *hints : addrinfo{}; in android_getaddrinfofornetcontext()
334 addrinfo tmp = ai; in android_getaddrinfofornetcontext()
351 addrinfo tmp = ai; in android_getaddrinfofornetcontext()
394 int resolv_getaddrinfo(const char* _Nonnull hostname, const char* servname, const addrinfo* hints, in resolv_getaddrinfo()
395 const android_net_context* _Nonnull netcontext, addrinfo** _Nonnull res, in resolv_getaddrinfo()
412 addrinfo ai = hints ? *hints : addrinfo{}; in resolv_getaddrinfo()
413 addrinfo sentinel = {}; in resolv_getaddrinfo()
414 addrinfo* cur = &sentinel; in resolv_getaddrinfo()
425 addrinfo tmp = ai; in resolv_getaddrinfo()
446 static int explore_fqdn(const addrinfo* pai, const char* hostname, const char* servname, in explore_fqdn()
447 addrinfo** res, const android_net_context* netcontext, in explore_fqdn()
454 addrinfo* result = nullptr; in explore_fqdn()
468 for (addrinfo* cur = result; cur; cur = cur->ai_next) { in explore_fqdn()
484 static int explore_null(const struct addrinfo* pai, const char* servname, struct addrinfo** res) { in explore_null()
487 struct addrinfo* cur; in explore_null()
488 struct addrinfo sentinel; in explore_null()
539 static int explore_numeric(const struct addrinfo* pai, const char* hostname, const char* servname, in explore_numeric()
540 struct addrinfo** res, const char* canonname) { in explore_numeric()
542 struct addrinfo* cur; in explore_numeric()
543 struct addrinfo sentinel; in explore_numeric()
596 static int explore_numeric_scope(const struct addrinfo* pai, const char* hostname, in explore_numeric_scope()
597 const char* servname, struct addrinfo** res) { in explore_numeric_scope()
599 struct addrinfo* cur; in explore_numeric_scope()
654 static int get_canonname(const struct addrinfo* pai, struct addrinfo* ai, const char* str) { in get_canonname()
666 static struct addrinfo* get_ai(const struct addrinfo* pai, const struct afd* afd, in get_ai()
669 struct addrinfo* ai; in get_ai()
675 ai = (struct addrinfo*) calloc(1, sizeof(struct addrinfo) + sizeof(sockaddr_union)); in get_ai()
678 memcpy(ai, pai, sizeof(struct addrinfo)); in get_ai()
687 static int get_portmatch(const struct addrinfo* ai, const char* servname) { in get_portmatch()
694 static int get_port(const struct addrinfo* ai, const char* servname, int matchonly) { in get_port()
816 static struct addrinfo* getanswer(const std::vector<uint8_t>& answer, int anslen, const char* qname, in getanswer()
817 int qtype, const struct addrinfo* pai, int* herrno) { in getanswer()
818 struct addrinfo sentinel = {}; in getanswer()
819 struct addrinfo *cur; in getanswer()
820 struct addrinfo ai; in getanswer()
1003 struct addrinfo* ai;
1335 void resolv_rfc6724_sort(struct addrinfo* list_sentinel, unsigned mark, uid_t uid) { in resolv_rfc6724_sort()
1338 struct addrinfo* cur; in resolv_rfc6724_sort()
1384 static int dns_getaddrinfo(const char* name, const addrinfo* pai, in dns_getaddrinfo()
1385 const android_net_context* netcontext, addrinfo** rv, in dns_getaddrinfo()
1440 addrinfo sentinel = {}; in dns_getaddrinfo()
1441 addrinfo* cur = &sentinel; in dns_getaddrinfo()
1442 addrinfo* ai = getanswer(q.answer, q.n, q.name, q.qtype, pai, &he); in dns_getaddrinfo()
1477 static struct addrinfo* _gethtent(FILE** hostf, const char* name, const struct addrinfo* pai) { in _gethtent()
1480 struct addrinfo *res0, *res; in _gethtent()
1528 static struct addrinfo* getCustomHosts(const size_t netid, const char* _Nonnull name, in getCustomHosts()
1529 const struct addrinfo* _Nonnull pai) { in getCustomHosts()
1530 struct addrinfo sentinel = {}; in getCustomHosts()
1531 struct addrinfo *res0, *res; in getCustomHosts()
1545 static bool files_getaddrinfo(const size_t netid, const char* name, const addrinfo* pai, in files_getaddrinfo()
1546 addrinfo** res) { in files_getaddrinfo()
1547 struct addrinfo sentinel = {}; in files_getaddrinfo()
1548 struct addrinfo *p, *cur; in files_getaddrinfo()