| 503 | } |
| 504 | |
| 505 | bool CNetAddr::IsAddrV1Compatible() const |
| 506 | { |
| 507 | switch (m_net) { |
| 508 | case NET_IPV4: |
| 509 | case NET_IPV6: |
| 510 | case NET_INTERNAL: |
| 511 | return true; |
| 512 | case NET_ONION: |
| 513 | case NET_I2P: |
| 514 | case NET_CJDNS: |
| 515 | return false; |
| 516 | case NET_UNROUTABLE: // m_net is never and should not be set to NET_UNROUTABLE |
| 517 | case NET_MAX: // m_net is never and should not be set to NET_MAX |
| 518 | assert(false); |
| 519 | } // no default case, so the compiler can warn about missing cases |
| 520 | |
| 521 | assert(false); |
| 522 | } |
| 523 | |
| 524 | enum Network CNetAddr::GetNetwork() const |
| 525 | { |
no outgoing calls