MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetNetworkName

Function GetNetworkName

src/netbase.cpp:105–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105std::string GetNetworkName(enum Network net)
106{
107 switch (net) {
108 case NET_UNROUTABLE: return "not_publicly_routable";
109 case NET_IPV4: return "ipv4";
110 case NET_IPV6: return "ipv6";
111 case NET_ONION: return "onion";
112 case NET_I2P: return "i2p";
113 case NET_CJDNS: return "cjdns";
114 case NET_INTERNAL: return "internal";
115 case NET_MAX: assert(false);
116 } // no default case, so the compiler can warn about missing cases
117
118 assert(false);
119}
120
121std::vector<std::string> GetNetworkNames(bool append_unroutable)
122{

Callers 4

GetNetworkNamesFunction · 0.85
getpeerinfoFunction · 0.85
GetNetworksInfoFunction · 0.85
getnodeaddressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected