This hashing function is designed to get good distribution in the cases * where the server is handling entire "networks" of servers. i.e. a * whack of /24s. This is probably the most common configuration for * ISPs with large virtual servers. * * NOTE: This function is symmetric (i.e. collapses all 4 octets * into one), so machine byte order (big/little endianness) does not matter. * * H
| 350 | * Hash function provided by David Hankins. |
| 351 | */ |
| 352 | static APR_INLINE unsigned hash_inaddr(unsigned key) |
| 353 | { |
| 354 | key ^= (key >> 16); |
| 355 | return ((key >> 8) ^ key) % IPHASH_TABLE_SIZE; |
| 356 | } |
| 357 | |
| 358 | static APR_INLINE unsigned hash_addr(struct apr_sockaddr_t *sa) |
| 359 | { |