I want to implement a hash routine for IP addresses. Basically if f(x) is my
hash formula then i would want an efficient f(x) such that f(x) on most of
the IP addresses gives me unique values so that i dont have collisions. I
can have a limited array size (say 255) and i have to use this. Any clues.
The formula that I have in my mind is simple. I will calculate the hash as
(IP Address value as unsigned int) % HASH_SIZE, where HASH_SIZE is 255.
Anybody aware of any better formula?
Regards,
Sylvia
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
