Lines Matching refs:server_res
118 struct addrinfo hints, *local_res, *server_res; in netdial() local
132 if (getaddrinfo(server, NULL, &hints, &server_res) != 0) in netdial()
135 s = socket(server_res->ai_family, proto, 0); in netdial()
139 freeaddrinfo(server_res); in netdial()
155 freeaddrinfo(server_res); in netdial()
167 if (server_res->ai_family == AF_INET) { in netdial()
175 else if (server_res->ai_family == AF_INET6) { in netdial()
191 freeaddrinfo(server_res); in netdial()
197 ((struct sockaddr_in *) server_res->ai_addr)->sin_port = htons(port); in netdial()
198 …if (timeout_connect(s, (struct sockaddr *) server_res->ai_addr, server_res->ai_addrlen, timeout) <… in netdial()
201 freeaddrinfo(server_res); in netdial()
206 freeaddrinfo(server_res); in netdial()