[Coral-dev] dnsstat hash functions

Srinivas Krishnan krishnan at cs.unc.edu
Fri Jul 9 00:26:45 PDT 2010


I was wondering if some one could explain the 2 hash functions used in
crl_dnsstat.c. At first it struck as purely multiplicative hashing way. But
running through the possible math for make_key_flowstats

it seems like the second term in the hash function (f->ip_proto << 16) +
(f->src.s_addr * 59) + (f->dst.s_addr);   could potentially cause overflows
when returning values as the return value is only 32 bits long.

Am I missing something ?

-srinivas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rommie.caida.org/pipermail/coral-dev/attachments/20100709/6faeb091/attachment.htm


More information about the Coral-dev mailing list