Home | History | Annotate | Download | only in net

Lines Matching refs:addrinfo

204 	struct addrinfo *aio_ai;
238 static int explore_fqdn(const struct addrinfo *, const char *,
239 const char *, struct addrinfo **, struct servent_data *);
240 static int explore_null(const struct addrinfo *,
241 const char *, struct addrinfo **, struct servent_data *);
242 static int explore_numeric(const struct addrinfo *, const char *,
243 const char *, struct addrinfo **, const char *, struct servent_data *);
244 static int explore_numeric_scope(const struct addrinfo *, const char *,
245 const char *, struct addrinfo **, struct servent_data *);
246 static int get_canonname(const struct addrinfo *,
247 struct addrinfo *, const char *);
248 static struct addrinfo *get_ai(const struct addrinfo *,
250 static int get_portmatch(const struct addrinfo *, const char *,
252 static int get_port(const struct addrinfo *, const char *, int,
264 static int reorder(struct addrinfo *, struct servent_data *);
271 static struct addrinfo *getanswer(res_state, const querybuf *, int,
272 const char *, int, const struct addrinfo *);
273 static void aisort(struct addrinfo *s, res_state res);
274 static struct addrinfo * _dns_query(struct res_target *,
275 const struct addrinfo *, res_state, int);
276 static struct addrinfo * _dns_srv_lookup(const char *, const char *,
277 const struct addrinfo *);
278 static struct addrinfo * _dns_host_lookup(const char *,
279 const struct addrinfo *);
283 static struct addrinfo *_gethtent(FILE **, const char *,
284 const struct addrinfo *);
287 static struct addrinfo *_yphostent(char *, const struct addrinfo *);
366 freeaddrinfo(struct addrinfo *ai)
368 struct addrinfo *next;
417 getport(struct addrinfo *ai) {
455 const struct addrinfo *hints, struct addrinfo **res)
457 struct addrinfo sentinel;
458 struct addrinfo *cur;
460 struct addrinfo ai;
461 struct addrinfo ai0;
462 struct addrinfo *pai;
702 reorder(struct addrinfo *sentinel, struct servent_data *svd)
704 struct addrinfo *ai, **aip;
709 /* count the number of addrinfo elements for sorting. */
742 /* reorder the addrinfo chain. */
879 struct addrinfo ai = *aio->aio_ai;
898 /* XXX: make a dummy addrinfo to call connect() */
1155 explore_fqdn(const struct addrinfo *pai, const char *hostname,
1156 const char *servname, struct addrinfo **res, struct servent_data *svd)
1158 struct addrinfo *result;
1159 struct addrinfo *cur;
1220 explore_null(const struct addrinfo *pai, const char *servname,
1221 struct addrinfo **res, struct servent_data *svd)
1225 struct addrinfo *cur;
1226 struct addrinfo sentinel;
1286 explore_numeric(const struct addrinfo *pai, const char *hostname,
1287 const char *servname, struct addrinfo **res, const char *canonname,
1291 struct addrinfo *cur;
1292 struct addrinfo sentinel;
1387 explore_numeric_scope(const struct addrinfo *pai, const char *hostname,
1388 const char *servname, struct addrinfo **res, struct servent_data *svd)
1394 struct addrinfo *cur;
1458 get_canonname(const struct addrinfo *pai, struct addrinfo *ai, const char *str)
1473 struct addrinfo *
1476 struct addrinfo *ai;
1478 ai = calloc(sizeof(struct addrinfo) + addrlen, 1);
1487 static struct addrinfo *
1488 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr)
1491 struct addrinfo *ai;
1503 memcpy(ai, pai, sizeof(struct addrinfo));
1517 get_portmatch(const struct addrinfo *ai, const char *servname,
1528 get_port(const struct addrinfo *ai, const char *servname, int matchonly,
1701 static struct addrinfo *
1703 int qtype, const struct addrinfo *pai)
1705 struct addrinfo sentinel, *cur;
1706 struct addrinfo ai, *aip;
2000 aisort(struct addrinfo *s, res_state res)
2002 struct addrinfo head, *t, *p;
2027 static struct addrinfo *
2028 _dns_query(struct res_target *q, const struct addrinfo *pai,
2033 struct addrinfo sentinel, *cur, *ai;
2092 static struct addrinfo *
2094 const struct addrinfo *pai)
2099 struct addrinfo sentinel, *cur, *ai;
2168 static struct addrinfo *
2169 _dns_host_lookup(const char *name, const struct addrinfo *pai)
2172 struct addrinfo sentinel, *ai;
2226 struct addrinfo *ai = NULL;
2228 const struct addrinfo *pai;
2231 pai = va_arg(ap, const struct addrinfo *);
2274 *((struct addrinfo **)rv) = ai;
2298 static struct addrinfo *
2299 _gethtent(FILE **hostf, const char *name, const struct addrinfo *pai)
2303 struct addrinfo hints, *res0, *res;
2367 const struct addrinfo *pai;
2368 struct addrinfo sentinel, *cur;
2369 struct addrinfo *p;
2376 pai = va_arg(ap, const struct addrinfo *);
2389 *((struct addrinfo **)rv) = sentinel.ai_next;
2397 static struct addrinfo *
2398 _yphostent(char *line, const struct addrinfo *pai)
2400 struct addrinfo sentinel, *cur;
2401 struct addrinfo hints, *res, *res0;
2480 struct addrinfo sentinel, *cur;
2481 struct addrinfo *ai = NULL;
2485 const struct addrinfo *pai;
2492 pai = va_arg(ap, const struct addrinfo *);
2502 struct addrinfo ai4;
2530 *((struct addrinfo **)rv) = sentinel.ai_next;
2861 struct addrinfo *ai, *sai;