From c1a53a26536d2635118262f5f719795b2e70e5fa Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 11 Sep 2015 11:45:04 -0700 Subject: ARP cache and responder agent code for use in netcon and iOS. --- node/Hashtable.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'node/Hashtable.hpp') diff --git a/node/Hashtable.hpp b/node/Hashtable.hpp index bcc111e3..d2b85c15 100644 --- a/node/Hashtable.hpp +++ b/node/Hashtable.hpp @@ -380,6 +380,11 @@ private: * hash an integer key index in a hash table. */ return (unsigned long)i; } + static inline unsigned long _hc(const uint32_t i) + { + // In the uint32_t case we use a simple multiplier for hashing to ensure coverage + return ((unsigned long)i * (unsigned long)2654435761); + } inline void _grow() { -- cgit v1.2.3