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