| 705 | } |
| 706 | |
| 707 | Network CNetAddr::GetNetClass() const |
| 708 | { |
| 709 | // Make sure that if we return NET_IPV6, then IsIPv6() is true. The callers expect that. |
| 710 | |
| 711 | // Check for "internal" first because such addresses are also !IsRoutable() |
| 712 | // and we don't want to return NET_UNROUTABLE in that case. |
| 713 | if (IsInternal()) { |
| 714 | return NET_INTERNAL; |
| 715 | } |
| 716 | if (!IsRoutable()) { |
| 717 | return NET_UNROUTABLE; |
| 718 | } |
| 719 | if (HasLinkedIPv4()) { |
| 720 | return NET_IPV4; |
| 721 | } |
| 722 | return m_net; |
| 723 | } |
| 724 | |
| 725 | uint32_t CNetAddr::GetMappedAS(const std::vector<bool> &asmap) const { |
| 726 | uint32_t net_class = GetNetClass(); |
no outgoing calls