MCPcopy Create free account
hub / github.com/apache/trafficserver / hash

Method hash

include/tscore/ink_inet.h:1587–1597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585}
1586
1587inline uint32_t
1588IpAddr::hash() const
1589{
1590 uint32_t zret = 0;
1591 if (this->isIp4()) {
1592 zret = ntohl(_addr._ip4);
1593 } else if (this->isIp6()) {
1594 zret = _addr._u32[0] ^ _addr._u32[1] ^ _addr._u32[2] ^ _addr._u32[3];
1595 }
1596 return zret;
1597}
1598
1599/// A separate Addr struct for unix paths
1600struct UnAddr {

Callers 2

operator()Method · 0.45
operator()Method · 0.45

Calls 2

isIp4Method · 0.95
isIp6Method · 0.95

Tested by

no test coverage detected