| 85 | DNSLookupFn g_dns_lookup{WrappedGetAddrInfo}; |
| 86 | |
| 87 | enum Network ParseNetwork(const std::string& net_in) { |
| 88 | std::string net = ToLower(net_in); |
| 89 | if (net == "ipv4") return NET_IPV4; |
| 90 | if (net == "ipv6") return NET_IPV6; |
| 91 | if (net == "onion") return NET_ONION; |
| 92 | if (net == "tor") { |
| 93 | LogPrintf("Warning: net name 'tor' is deprecated and will be removed in the future. You should use 'onion' instead.\n"); |
| 94 | return NET_ONION; |
| 95 | } |
| 96 | if (net == "i2p") { |
| 97 | return NET_I2P; |
| 98 | } |
| 99 | if (net == "cjdns") { |
| 100 | return NET_CJDNS; |
| 101 | } |
| 102 | return NET_UNROUTABLE; |
| 103 | } |
| 104 | |
| 105 | std::string GetNetworkName(enum Network net) |
| 106 | { |