__gnu_cxx::__gnu_cxx::hash< IPvXAddress > Struct Template Reference

#include <HashFunc.h>

List of all members.


Detailed Description

template<>
struct __gnu_cxx::__gnu_cxx::hash< IPvXAddress >

defines a hash function for IPvXAddress

Public Member Functions

std::size_t operator() (const IPvXAddress &addr) const
 hash function for IPvXaddress

Member Function Documentation

std::size_t __gnu_cxx::__gnu_cxx::hash< IPvXAddress >::operator() ( const IPvXAddress &  addr  )  const [inline]

hash function for IPvXaddress

Parameters:
addr the IPvXAddress to hash
Returns:
the hashed IPvXAddress
00050     {
00051         if (addr.isIPv6()) {
00052             return bswap_32(addr.get6().words()[0]) ^
00053                    bswap_32(addr.get6().words()[1]) ^
00054                    bswap_32(addr.get6().words()[2]) ^
00055                    bswap_32(addr.get6().words()[3]);
00056         } else {
00057             return bswap_32(addr.get4().getInt());
00058         }
00059     }


The documentation for this struct was generated from the following file:

Generated on Fri Sep 19 13:05:08 2008 for ITM OverSim by  doxygen 1.5.5