#include <HashFunc.h>
Public Member Functions | |
| std::size_t | operator() (const IPvXAddress &addr) const |
| hash function for IPvXaddress | |
Definition at line 42 of file HashFunc.h.
| std::size_t __gnu_cxx::hash< IPvXAddress >::operator() | ( | const IPvXAddress & | addr | ) | const [inline] |
hash function for IPvXaddress
| addr | the IPvXAddress to hash |
Definition at line 50 of file HashFunc.h.
00051 { 00052 if (addr.isIPv6()) { 00053 return bswap_32(addr.get6().words()[0]) ^ 00054 bswap_32(addr.get6().words()[1]) ^ 00055 bswap_32(addr.get6().words()[2]) ^ 00056 bswap_32(addr.get6().words()[3]); 00057 } else { 00058 return bswap_32(addr.get4().getInt()); 00059 } 00060 }
1.5.8