| 1585 | } |
| 1586 | |
| 1587 | inline uint32_t |
| 1588 | IpAddr::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 |
| 1600 | struct UnAddr { |
no test coverage detected