Lines Matching refs:ai
22 struct addrinfo info, *ai; in xgetaddrinfo() local
32 rc = getaddrinfo(host, port, &info, &ai); in xgetaddrinfo()
33 if (rc || !ai) in xgetaddrinfo()
37 return ai; in xgetaddrinfo()
42 struct addrinfo *ai; in xconnbind() local
46 for (ai = ai_arg; ai; ai = ai->ai_next) { in xconnbind()
47 fd = (ai->ai_next ? socket : xsocket)(ai->ai_family, ai->ai_socktype, in xconnbind()
48 ai->ai_protocol); in xconnbind()
50 if (!(dobind ? bind : connect)(fd, ai->ai_addr, ai->ai_addrlen)) break; in xconnbind()
51 else if (!ai->ai_next) perror_exit_raw(dobind ? "bind" : "connect"); in xconnbind()
59 int xconnect(struct addrinfo *ai) in xconnect() argument
61 return xconnbind(ai, 0); in xconnect()
65 int xbind(struct addrinfo *ai) in xbind() argument
67 return xconnbind(ai, 1); in xbind()