Lines Matching refs:nsap
159 static int connect_with_timeout(int sock, const struct sockaddr *nsap,
500 struct sockaddr *nsap;
505 nsap = get_nsaddr(statp, (size_t)ns);
506 nsaplen = get_salen(nsap);
517 act = (*statp->qhook)(&nsap, &buf, &buflen,
542 getnameinfo(nsap, (socklen_t)nsaplen, abuf, sizeof(abuf),
640 act = (*statp->rhook)(nsap, buf, buflen,
759 struct sockaddr *nsap;
771 nsap = get_nsaddr(statp, (size_t)ns);
772 nsaplen = get_salen(nsap);
788 !sock_eq((struct sockaddr *)(void *)&peer, nsap) ||
800 statp->_vcsock = socket(nsap->sa_family, SOCK_STREAM | SOCK_CLOEXEC, 0);
829 if (random_bind(statp->_vcsock,nsap->sa_family) < 0) {
831 Aerror(statp, stderr, "bind/vc", errno, nsap,
836 if (connect_with_timeout(statp->_vcsock, nsap, (socklen_t)nsaplen,
839 Aerror(statp, stderr, "connect/vc", errno, nsap,
978 connect_with_timeout(int sock, const struct sockaddr *nsap, socklen_t salen, int sec)
987 res = __connect(sock, nsap, salen);
1090 const struct sockaddr *nsap;
1098 nsap = get_nsaddr(statp, (size_t)ns);
1099 nsaplen = get_salen(nsap);
1101 EXT(statp).nssocks[ns] = socket(nsap->sa_family, SOCK_DGRAM | SOCK_CLOEXEC, 0);
1141 if (random_bind(EXT(statp).nssocks[ns], nsap->sa_family) < 0) {
1142 Aerror(statp, stderr, "bind(dg)", errno, nsap,
1147 if (__connect(EXT(statp).nssocks[ns], nsap, (socklen_t)nsaplen) < 0) {
1148 Aerror(statp, stderr, "connect(dg)", errno, nsap,
1166 if (sendto(s, (const char*)buf, buflen, 0, nsap, nsaplen) != buflen)
1168 Aerror(statp, stderr, "sendto", errno, nsap, nsaplen);