Lines Matching refs:ai
460 struct addrinfo *ai;
465 ret = getaddrinfo(name, NULL, NULL, &ai);
472 ret = getaddrinfo(name, NULL, &hint, &ai);
495 if (ai->ai_family != af) {
499 freeaddrinfo(ai);
502 if (len != (unsigned int) ai->ai_addrlen) {
504 (void)inet_ntop(af, ai->ai_addr,
508 (unsigned long)ai->ai_addrlen, len);
510 freeaddrinfo(ai);
514 sin = (struct sockaddr_in *) ai->ai_addr;
522 freeaddrinfo(ai);
527 sin6 = (struct sockaddr_in6 *) ai->ai_addr;
536 freeaddrinfo(ai);
540 freeaddrinfo(ai);