Changeset View
Changeset View
Standalone View
Standalone View
src/netbase.cpp
Show All 38 Lines | |||||
enum Network ParseNetwork(std::string net) { | enum Network ParseNetwork(std::string net) { | ||||
boost::to_lower(net); | boost::to_lower(net); | ||||
if (net == "ipv4") { | if (net == "ipv4") { | ||||
return NET_IPV4; | return NET_IPV4; | ||||
} | } | ||||
if (net == "ipv6") { | if (net == "ipv6") { | ||||
return NET_IPV6; | return NET_IPV6; | ||||
} | } | ||||
if (net == "tor" || net == "onion") { | if (net == "onion") { | ||||
return NET_TOR; | |||||
} | |||||
if (net == "tor") { | |||||
LogPrintf("Warning: net name 'tor' is deprecated and will be removed " | |||||
"in the future. You should use 'onion' instead.\n"); | |||||
return NET_TOR; | return NET_TOR; | ||||
} | } | ||||
return NET_UNROUTABLE; | return NET_UNROUTABLE; | ||||
} | } | ||||
std::string GetNetworkName(enum Network net) { | std::string GetNetworkName(enum Network net) { | ||||
switch (net) { | switch (net) { | ||||
case NET_IPV4: | case NET_IPV4: | ||||
▲ Show 20 Lines • Show All 723 Lines • Show Last 20 Lines |