| 475 | } |
| 476 | |
| 477 | bool CNetAddr::IsAddrV1Compatible() const |
| 478 | { |
| 479 | switch (m_net) { |
| 480 | case NET_IPV4: |
| 481 | case NET_IPV6: |
| 482 | case NET_INTERNAL: |
| 483 | return true; |
| 484 | case NET_ONION: |
| 485 | case NET_I2P: |
| 486 | case NET_CJDNS: |
| 487 | return false; |
| 488 | case NET_UNROUTABLE: // m_net is never and should not be set to NET_UNROUTABLE |
| 489 | case NET_MAX: // m_net is never and should not be set to NET_MAX |
| 490 | assert(false); |
| 491 | } // no default case, so the compiler can warn about missing cases |
| 492 | |
| 493 | assert(false); |
| 494 | } |
| 495 | |
| 496 | enum Network CNetAddr::GetNetwork() const |
| 497 | { |
no outgoing calls