Lines Matching refs:ipaddr
96 iplookup(ipaddr)
97 struct in_addr *ipaddr;
104 for (h = h_table4[iphash(ipaddr->s_addr)]; h; h = h->h4_next) {
105 if (h->h4_addr.s_addr == ipaddr->s_addr)
111 if (ipaddr->s_addr == htonl(INADDR_BROADCAST))
112 return (addhost(AF_INET, ipaddr, "BROADCAST"));
113 if (ipaddr->s_addr == htonl(INADDR_ANY))
114 return (addhost(AF_INET, ipaddr, "OLD-BROADCAST"));
124 hp = getipnodebyaddr((char *)ipaddr, sizeof (struct in_addr),
126 if (hp == NULL && inet_lnaof(*ipaddr) == 0) {
127 np = getnetbyaddr(inet_netof(*ipaddr), AF_INET);
129 return (addhost(AF_INET, ipaddr, np->n_name));
136 return (addhost(AF_INET, ipaddr, hp ? hp->h_name : inet_ntoa(*ipaddr)));
188 addhost(family, ipaddr, name)
190 void *ipaddr;
207 ((struct hostdata4 *)n)->h4_addr = *(struct in_addr *)ipaddr;
208 hashval = ((struct in_addr *)ipaddr)->s_addr;
221 (void) memcpy(&((struct hostdata6 *)n)->h6_addr, ipaddr,
223 hashval = ((int *)ipaddr)[3];