MCPcopy Create free account
hub / github.com/apache/httpd / hash_addr

Function hash_addr

server/vhost.c:358–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358static APR_INLINE unsigned hash_addr(struct apr_sockaddr_t *sa)
359{
360 unsigned key;
361
362 /* The key is the last four bytes of the IP address.
363 * For IPv4, this is the entire address, as always.
364 * For IPv6, this is usually part of the MAC address.
365 */
366 key = *(unsigned *)((char *)sa->ipaddr_ptr + sa->ipaddr_len - 4);
367 return hash_inaddr(key);
368}
369
370static ipaddr_chain *new_ipaddr_chain(apr_pool_t *p,
371 server_rec *s, server_addr_rec *sar)

Callers 2

find_ipaddrFunction · 0.85
ap_fini_vhost_configFunction · 0.85

Calls 1

hash_inaddrFunction · 0.85

Tested by

no test coverage detected