Lines Matching refs:nsap
130 static int connect_with_timeout(int sock, const struct sockaddr* nsap, socklen_t salen,
525 struct sockaddr* nsap; in res_nsend() local
530 nsap = get_nsaddr(statp, (size_t) ns); in res_nsend()
531 nsaplen = get_salen(nsap); in res_nsend()
557 if (getnameinfo(nsap, (socklen_t)nsaplen, abuf, sizeof(abuf), NULL, 0, niflags) == 0) in res_nsend()
713 struct sockaddr* nsap; in send_vc() local
721 nsap = get_nsaddr(statp, (size_t) ns); in send_vc()
722 nsaplen = get_salen(nsap); in send_vc()
737 !sock_eq((struct sockaddr*) (void*) &peer, nsap) || in send_vc()
748 statp->_vcsock = socket(nsap->sa_family, SOCK_STREAM | SOCK_CLOEXEC, 0); in send_vc()
772 if (random_bind(statp->_vcsock, nsap->sa_family) < 0) { in send_vc()
774 Aerror(statp, "bind/vc", errno, nsap, nsaplen); in send_vc()
778 if (connect_with_timeout(statp->_vcsock, nsap, (socklen_t) nsaplen, in send_vc()
781 Aerror(statp, "connect/vc", errno, nsap, nsaplen); in send_vc()
910 static int connect_with_timeout(int sock, const struct sockaddr* nsap, socklen_t salen, in connect_with_timeout() argument
917 res = connect(sock, nsap, salen); in connect_with_timeout()
980 const struct sockaddr* nsap; in send_dg() local
987 nsap = get_nsaddr(statp, (size_t) ns); in send_dg()
988 nsaplen = get_salen(nsap); in send_dg()
990 statp->_u._ext.nssocks[ns] = socket(nsap->sa_family, SOCK_DGRAM | SOCK_CLOEXEC, 0); in send_dg()
1025 if (random_bind(statp->_u._ext.nssocks[ns], nsap->sa_family) < 0) { in send_dg()
1026 Aerror(statp, "bind(dg)", errno, nsap, nsaplen); in send_dg()
1030 if (connect(statp->_u._ext.nssocks[ns], nsap, (socklen_t) nsaplen) < 0) { in send_dg()
1031 Aerror(statp, "connect(dg)", errno, nsap, nsaplen); in send_dg()
1046 if (sendto(s, (const char*) buf, buflen, 0, nsap, nsaplen) != buflen) { in send_dg()
1047 Aerror(statp, "sendto", errno, nsap, nsaplen); in send_dg()