Lines Matching refs:nserv
176 int nserv = 0; /* number of nameserver records read from file */ in __res_vinit() local
204 u[nserv].sin.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); in __res_vinit()
206 u[nserv].sin.sin_addr.s_addr = INADDR_ANY; in __res_vinit()
208 u[nserv].sin.sin_family = AF_INET; in __res_vinit()
209 u[nserv].sin.sin_port = htons(NAMESERVER_PORT); in __res_vinit()
211 u[nserv].sin.sin_len = sizeof(struct sockaddr_in); in __res_vinit()
213 nserv++; in __res_vinit()
216 u[nserv].sin6.sin6_addr = in6addr_loopback; in __res_vinit()
218 u[nserv].sin6.sin6_addr = in6addr_any; in __res_vinit()
220 u[nserv].sin6.sin6_family = AF_INET6; in __res_vinit()
221 u[nserv].sin6.sin6_port = htons(NAMESERVER_PORT); in __res_vinit()
223 u[nserv].sin6.sin6_len = sizeof(struct sockaddr_in6); in __res_vinit()
225 nserv++; in __res_vinit()
243 res_setservers(statp, u, nserv); in __res_vinit()
282 if (nserv > 0) in __res_vinit()
283 statp->nscount = nserv; in __res_vinit()
292 nserv = 0; in __res_vinit()
353 if (MATCH(buf, "nameserver") && nserv < MAXNS) { in __res_vinit()
372 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], in __res_vinit()
376 sizeof(statp->nsaddr_list[nserv])) { in __res_vinit()
377 memcpy(&statp->nsaddr_list[nserv], in __res_vinit()
380 statp->nsaddr_list[nserv].sin_family = 0; in __res_vinit()
382 nserv++; in __res_vinit()
434 if (nserv > 0) in __res_vinit()
435 statp->nscount = nserv; in __res_vinit()
445 if(nserv == 0) in __res_vinit()
446 nserv = get_nameservers(statp); in __res_vinit()
485 if (nserv > 0) { in __res_vinit()
486 statp->nscount = nserv; in __res_vinit()
674 int i, nserv; in res_setservers() local
683 nserv = 0; in res_setservers()
684 for (i = 0; i < cnt && nserv < MAXNS; i++) { in res_setservers()
689 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], in res_setservers()
691 if (size <= sizeof(statp->nsaddr_list[nserv])) in res_setservers()
692 memcpy(&statp->nsaddr_list[nserv], in res_setservers()
695 statp->nsaddr_list[nserv].sin_family = 0; in res_setservers()
696 nserv++; in res_setservers()
703 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], in res_setservers()
705 if (size <= sizeof(statp->nsaddr_list[nserv])) in res_setservers()
706 memcpy(&statp->nsaddr_list[nserv], in res_setservers()
709 statp->nsaddr_list[nserv].sin_family = 0; in res_setservers()
710 nserv++; in res_setservers()
719 statp->nscount = nserv; in res_setservers()