Home | History | Annotate | Download | only in openssh

Lines Matching refs:sock

190 	int sock, gaierr;
200 sock = rresvport_af(&p, ai->ai_family);
202 if (sock < 0)
207 return sock;
209 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
210 if (sock < 0) {
214 fcntl(sock, F_SETFD, FD_CLOEXEC);
218 return sock;
229 close(sock);
232 if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) {
234 close(sock);
239 return sock;
343 int sock = -1, attempt;
386 sock = ssh_create_socket(needpriv, ai);
387 if (sock < 0)
391 if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen,
399 close(sock);
400 sock = -1;
403 if (sock != -1)
410 if (sock == -1) {
420 setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
425 packet_set_connection(sock, sock);