mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
ARP cache and responder agent code for use in netcon and iOS.
This commit is contained in:
parent
9dc2ef5549
commit
c1a53a2653
4 changed files with 301 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -250,6 +250,12 @@ public:
|
|||
_m = m._m;
|
||||
return *this;
|
||||
}
|
||||
inline MAC &operator=(const uint64_t m)
|
||||
throw()
|
||||
{
|
||||
_m = m;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool operator==(const MAC &m) const throw() { return (_m == m._m); }
|
||||
inline bool operator!=(const MAC &m) const throw() { return (_m != m._m); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue