Lines Matching refs:addr

51 httpAddrAny(const http_addr_t *addr)	/* I - Address to check */  in httpAddrAny()  argument
54 if (addr->addr.sa_family == AF_INET6 && in httpAddrAny()
55 IN6_IS_ADDR_UNSPECIFIED(&(addr->ipv6.sin6_addr))) in httpAddrAny()
59 if (addr->addr.sa_family == AF_INET && in httpAddrAny()
60 ntohl(addr->ipv4.sin_addr.s_addr) == 0x00000000) in httpAddrAny()
75 if (addr1->addr.sa_family != addr2->addr.sa_family) in httpAddrEqual()
79 if (addr1->addr.sa_family == AF_INET6) in httpAddrEqual()
95 http_addr_t *addr) /* O - Address to load */ in httpAddrLoad() argument
101 addr->ipv6.sin6_port = htons((u_short)port); in httpAddrLoad()
103 addr->ipv6.sin6_port = htons(port); in httpAddrLoad()
106 memcpy((char *)&(addr->ipv6.sin6_addr), host->h_addr_list[n], in httpAddrLoad()
108 addr->ipv6.sin6_family = AF_INET6; in httpAddrLoad()
115 addr->un.sun_family = AF_LOCAL; in httpAddrLoad()
116 strlcpy(addr->un.sun_path, host->h_addr_list[n], sizeof(addr->un.sun_path)); in httpAddrLoad()
123 addr->ipv4.sin_port = htons((u_short)port); in httpAddrLoad()
125 addr->ipv4.sin_port = htons(port); in httpAddrLoad()
128 memcpy((char *)&(addr->ipv4.sin_addr), host->h_addr_list[n], in httpAddrLoad()
130 addr->ipv4.sin_family = AF_INET; in httpAddrLoad()
140 httpAddrLocalhost(const http_addr_t *addr) in httpAddrLocalhost() argument
144 if (addr->addr.sa_family == AF_INET6 && in httpAddrLocalhost()
145 IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr))) in httpAddrLocalhost()
150 if (addr->addr.sa_family == AF_LOCAL) in httpAddrLocalhost()
154 if (addr->addr.sa_family == AF_INET && in httpAddrLocalhost()
155 ntohl(addr->ipv4.sin_addr.s_addr) == 0x7f000001) in httpAddrLocalhost()
174 httpAddrLookup(const http_addr_t *addr, /* I - Address to lookup */ in httpAddrLookup() argument
182 addr, name, namelen)); in httpAddrLookup()
185 if (addr->addr.sa_family == AF_INET6) in httpAddrLookup()
186 host = gethostbyaddr(ADDR_CAST &(addr->ipv6.sin6_addr), in httpAddrLookup()
191 if (addr->addr.sa_family == AF_LOCAL) in httpAddrLookup()
193 strlcpy(name, addr->un.sun_path, namelen); in httpAddrLookup()
198 if (addr->addr.sa_family == AF_INET) in httpAddrLookup()
199 host = gethostbyaddr(ADDR_CAST &(addr->ipv4.sin_addr), in httpAddrLookup()
206 httpAddrString(addr, name, namelen); in httpAddrLookup()
221 httpAddrString(const http_addr_t *addr, /* I - Address to convert */ in httpAddrString() argument
226 addr, s, slen)); in httpAddrString()
229 if (addr->addr.sa_family == AF_INET6) in httpAddrString()
231 ntohl(addr->ipv6.sin6_addr.s6_addr32[0]), in httpAddrString()
232 ntohl(addr->ipv6.sin6_addr.s6_addr32[1]), in httpAddrString()
233 ntohl(addr->ipv6.sin6_addr.s6_addr32[2]), in httpAddrString()
234 ntohl(addr->ipv6.sin6_addr.s6_addr32[3])); in httpAddrString()
238 if (addr->addr.sa_family == AF_LOCAL) in httpAddrString()
239 strlcpy(s, addr->un.sun_path, slen); in httpAddrString()
242 if (addr->addr.sa_family == AF_INET) in httpAddrString()
247 temp = ntohl(addr->ipv4.sin_addr.s_addr); in httpAddrString()