Lines Matching refs:addrinfo
224 struct addrinfo *aio_ai;
252 static int explore_copy(const struct addrinfo *, const struct addrinfo *,
253 struct addrinfo **);
254 static int explore_null(const struct addrinfo *,
255 const char *, struct addrinfo **);
256 static int explore_numeric(const struct addrinfo *, const char *,
257 const char *, struct addrinfo **, const char *);
258 static int explore_numeric_scope(const struct addrinfo *, const char *,
259 const char *, struct addrinfo **);
260 static int get_canonname(const struct addrinfo *,
261 struct addrinfo *, const char *);
262 static struct addrinfo *get_ai(const struct addrinfo *,
264 static struct addrinfo *copy_ai(const struct addrinfo *);
265 static int get_portmatch(const struct addrinfo *, const char *);
266 static int get_port(struct addrinfo *, const char *, int);
268 static int addrconfig(struct addrinfo *);
279 static int explore_fqdn(const struct addrinfo *, const char *,
280 const char *, struct addrinfo **);
282 static int reorder(struct addrinfo *);
289 static struct addrinfo *getanswer(const querybuf *, int, const char *, int,
290 const struct addrinfo *, res_state);
292 static int addr4sort(struct addrinfo *, res_state);
297 static struct addrinfo *_gethtent(FILE **, const char *,
298 const struct addrinfo *);
301 static struct addrinfo *_yphostent(char *, const struct addrinfo *);
357 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo()
359 struct addrinfo *next; in freeaddrinfo()
390 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo()
392 struct addrinfo sentinel; in getaddrinfo()
393 struct addrinfo *cur; in getaddrinfo()
395 struct addrinfo ai, ai0, *afai; in getaddrinfo()
396 struct addrinfo *pai; in getaddrinfo()
399 struct addrinfo *afailist[nitems(afdl)]; in getaddrinfo()
400 struct addrinfo *afai_unspec; in getaddrinfo()
674 reorder(struct addrinfo *sentinel) in reorder()
676 struct addrinfo *ai, **aip; in reorder()
848 struct addrinfo ai = *aio->aio_ai; in set_source()
1151 explore_copy(const struct addrinfo *pai, const struct addrinfo *src0, in explore_copy()
1152 struct addrinfo **res) in explore_copy()
1155 struct addrinfo sentinel, *cur; in explore_copy()
1156 const struct addrinfo *src; in explore_copy()
1191 explore_null(const struct addrinfo *pai, const char *servname, in explore_null()
1192 struct addrinfo **res) in explore_null()
1196 struct addrinfo *ai; in explore_null()
1241 explore_numeric(const struct addrinfo *pai, const char *hostname, in explore_numeric()
1242 const char *servname, struct addrinfo **res, const char *canonname) in explore_numeric()
1245 struct addrinfo *ai, ai0; in explore_numeric()
1332 explore_numeric_scope(const struct addrinfo *pai, const char *hostname, in explore_numeric_scope()
1333 const char *servname, struct addrinfo **res) in explore_numeric_scope()
1339 struct addrinfo *cur; in explore_numeric_scope()
1395 get_canonname(const struct addrinfo *pai, struct addrinfo *ai, const char *str) in get_canonname()
1405 static struct addrinfo *
1406 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr) in get_ai()
1409 struct addrinfo *ai; in get_ai()
1420 ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) in get_ai()
1425 memcpy(ai, pai, sizeof(struct addrinfo)); in get_ai()
1443 static struct addrinfo *
1444 copy_ai(const struct addrinfo *pai) in copy_ai()
1446 struct addrinfo *ai; in copy_ai()
1474 get_portmatch(const struct addrinfo *ai, const char *servname) in get_portmatch()
1479 return get_port((struct addrinfo *)ai, servname, 1); in get_portmatch()
1483 get_port(struct addrinfo *ai, const char *servname, int matchonly) in get_port()
1607 addrconfig(struct addrinfo *pai) in addrconfig()
1741 struct addrinfo *hints; in addrinfo_id_func()
1752 hints = va_arg(ap, struct addrinfo *); in addrinfo_id_func()
1805 struct addrinfo *ai, *cai; in addrinfo_marshal_func()
1809 ai = *((struct addrinfo **)retval); in addrinfo_marshal_func()
1814 desired_size += sizeof(struct addrinfo) + cai->ai_addrlen; in addrinfo_marshal_func()
1834 memcpy(p, cai, sizeof(struct addrinfo)); in addrinfo_marshal_func()
1835 p += sizeof(struct addrinfo); in addrinfo_marshal_func()
1857 struct addrinfo new_ai, *result, *sentinel, *lasts; in addrinfo_unmarshal_func()
1869 memcpy(&new_ai, p, sizeof(struct addrinfo)); in addrinfo_unmarshal_func()
1870 p += sizeof(struct addrinfo); in addrinfo_unmarshal_func()
1871 size = new_ai.ai_addrlen + sizeof(struct addrinfo) + in addrinfo_unmarshal_func()
1876 memcpy(sentinel, &new_ai, sizeof(struct addrinfo)); in addrinfo_unmarshal_func()
1878 sizeof(struct addrinfo)); in addrinfo_unmarshal_func()
1902 *((struct addrinfo **)retval) = result; in addrinfo_unmarshal_func()
1911 explore_fqdn(const struct addrinfo *pai, const char *hostname, in explore_fqdn()
1912 const char *servname, struct addrinfo **res) in explore_fqdn()
1914 struct addrinfo *result; in explore_fqdn()
1915 struct addrinfo *cur; in explore_fqdn()
1980 static struct addrinfo *
1982 const struct addrinfo *pai, res_state res) in getanswer()
1984 struct addrinfo sentinel, *cur; in getanswer()
1985 struct addrinfo ai; in getanswer()
2193 struct addrinfo *ai;
2198 addr4sort(struct addrinfo *sentinel, res_state res) in addr4sort()
2200 struct addrinfo *ai; in addr4sort()
2261 struct addrinfo *ai, ai0; in _dns_getaddrinfo()
2264 const struct addrinfo *pai; in _dns_getaddrinfo()
2265 struct addrinfo sentinel, *cur; in _dns_getaddrinfo()
2272 pai = va_arg(ap, const struct addrinfo *); in _dns_getaddrinfo()
2376 *((struct addrinfo **)rv) = sentinel.ai_next; in _dns_getaddrinfo()
2398 static struct addrinfo *
2399 _gethtent(FILE **hostf, const char *name, const struct addrinfo *pai) in _gethtent()
2403 struct addrinfo hints, *res0, *res; in _gethtent()
2476 static struct addrinfo *
2477 _getht(FILE **hostf, const char *name, const struct addrinfo *pai, in _getht()
2478 struct addrinfo *cur) in _getht()
2480 struct addrinfo *p; in _getht()
2495 const struct addrinfo *pai; in _files_getaddrinfo()
2496 struct addrinfo sentinel, *cur; in _files_getaddrinfo()
2500 pai = va_arg(ap, struct addrinfo *); in _files_getaddrinfo()
2508 struct addrinfo ai0 = *pai; in _files_getaddrinfo()
2521 *((struct addrinfo **)rv) = sentinel.ai_next; in _files_getaddrinfo()
2529 static struct addrinfo *
2530 _yphostent(char *line, const struct addrinfo *pai) in _yphostent()
2532 struct addrinfo sentinel, *cur; in _yphostent()
2533 struct addrinfo hints, *res, *res0; in _yphostent()
2611 struct addrinfo sentinel, *cur; in _yp_getaddrinfo()
2612 struct addrinfo *ai = NULL; in _yp_getaddrinfo()
2616 const struct addrinfo *pai; in _yp_getaddrinfo()
2623 pai = va_arg(ap, const struct addrinfo *); in _yp_getaddrinfo()
2663 struct addrinfo ai4; in _yp_getaddrinfo()
2683 *((struct addrinfo **)rv) = sentinel.ai_next; in _yp_getaddrinfo()