| 672 | } |
| 673 | |
| 674 | Network CNetAddr::GetNetClass() const |
| 675 | { |
| 676 | // Make sure that if we return NET_IPV6, then IsIPv6() is true. The callers expect that. |
| 677 | |
| 678 | // Check for "internal" first because such addresses are also !IsRoutable() |
| 679 | // and we don't want to return NET_UNROUTABLE in that case. |
| 680 | if (IsInternal()) { |
| 681 | return NET_INTERNAL; |
| 682 | } |
| 683 | if (!IsRoutable()) { |
| 684 | return NET_UNROUTABLE; |
| 685 | } |
| 686 | if (HasLinkedIPv4()) { |
| 687 | return NET_IPV4; |
| 688 | } |
| 689 | return m_net; |
| 690 | } |
| 691 | |
| 692 | std::vector<unsigned char> CNetAddr::GetAddrBytes() const |
| 693 | { |
no outgoing calls