Lines Matching refs:ipaddr
94 iplookup(ipaddr) in iplookup() argument
95 struct in_addr *ipaddr; in iplookup()
102 for (h = h_table4[iphash(ipaddr->s_addr)]; h; h = h->h4_next) {
103 if (h->h4_addr.s_addr == ipaddr->s_addr)
109 if (ipaddr->s_addr == htonl(INADDR_BROADCAST))
110 return (addhost(AF_INET, ipaddr, "BROADCAST"));
111 if (ipaddr->s_addr == htonl(INADDR_ANY))
112 return (addhost(AF_INET, ipaddr, "OLD-BROADCAST"));
122 hp = getipnodebyaddr((char *)ipaddr, sizeof (struct in_addr),
124 if (hp == NULL && inet_lnaof(*ipaddr) == 0) {
125 np = getnetbyaddr(inet_netof(*ipaddr), AF_INET);
127 return (addhost(AF_INET, ipaddr, np->n_name));
134 return (addhost(AF_INET, ipaddr, hp ? hp->h_name : inet_ntoa(*ipaddr)));
186 addhost(family, ipaddr, name) in addhost() argument
188 void *ipaddr;
205 ((struct hostdata4 *)n)->h4_addr = *(struct in_addr *)ipaddr;
206 hashval = ((struct in_addr *)ipaddr)->s_addr;
219 (void) memcpy(&((struct hostdata6 *)n)->h6_addr, ipaddr,
221 hashval = ((int *)ipaddr)[3];