| 234 | } |
| 235 | |
| 236 | enum Network CNetAddr::GetNetwork() const |
| 237 | { |
| 238 | if (IsInternal()) |
| 239 | return NET_INTERNAL; |
| 240 | |
| 241 | if (!IsRoutable()) |
| 242 | return NET_UNROUTABLE; |
| 243 | |
| 244 | if (IsIPv4()) |
| 245 | return NET_IPV4; |
| 246 | |
| 247 | if (IsTor()) |
| 248 | return NET_ONION; |
| 249 | |
| 250 | return NET_IPV6; |
| 251 | } |
| 252 | |
| 253 | std::string CNetAddr::ToStringIP() const |
| 254 | { |
no outgoing calls