| 120 | } |
| 121 | |
| 122 | std::string GetNetworkName(enum Network net) { |
| 123 | switch (net) { |
| 124 | case NET_UNROUTABLE: |
| 125 | return "not_publicly_routable"; |
| 126 | case NET_IPV4: |
| 127 | return "ipv4"; |
| 128 | case NET_IPV6: |
| 129 | return "ipv6"; |
| 130 | case NET_ONION: |
| 131 | return "onion"; |
| 132 | case NET_I2P: |
| 133 | return "i2p"; |
| 134 | case NET_CJDNS: |
| 135 | return "cjdns"; |
| 136 | case NET_INTERNAL: |
| 137 | return "internal"; |
| 138 | case NET_MAX: |
| 139 | assert(false); |
| 140 | } // no default case, so the compiler can warn about missing cases |
| 141 | |
| 142 | assert(false); |
| 143 | } |
| 144 | |
| 145 | std::vector<std::string> GetNetworkNames(bool append_unroutable) { |
| 146 | std::vector<std::string> names; |
no outgoing calls
no test coverage detected