| 158 | } |
| 159 | |
| 160 | int net_addr_comp(const NETADDR *a, const NETADDR *b) |
| 161 | { |
| 162 | int diff = a->type - b->type; |
| 163 | if(diff != 0) |
| 164 | { |
| 165 | return diff; |
| 166 | } |
| 167 | diff = mem_comp(a->ip, b->ip, sizeof(a->ip)); |
| 168 | if(diff != 0) |
| 169 | { |
| 170 | return diff; |
| 171 | } |
| 172 | return a->port - b->port; |
| 173 | } |
| 174 | |
| 175 | bool NETADDR::operator==(const NETADDR &other) const |
| 176 | { |