| 214 | } |
| 215 | |
| 216 | void get_connection_info(ConnectionInfo& ci) |
| 217 | { |
| 218 | ClientEvent::Base::Ptr connected = last_connected; |
| 219 | if (connected) |
| 220 | { |
| 221 | const ClientEvent::Connected* c = connected->connected_cast(); |
| 222 | if (c) |
| 223 | { |
| 224 | ci.user = c->user; |
| 225 | ci.serverHost = c->server_host; |
| 226 | ci.serverPort = c->server_port; |
| 227 | ci.serverProto = c->server_proto; |
| 228 | ci.serverIp = c->server_ip; |
| 229 | ci.vpnIp4 = c->vpn_ip4; |
| 230 | ci.vpnIp6 = c->vpn_ip6; |
| 231 | ci.gw4 = c->vpn_gw4; |
| 232 | ci.gw6 = c->vpn_gw6; |
| 233 | ci.clientIp = c->client_ip; |
| 234 | ci.tunName = c->tun_name; |
| 235 | ci.defined = true; |
| 236 | return; |
| 237 | } |
| 238 | } |
| 239 | ci.defined = false; |
| 240 | } |
| 241 | |
| 242 | void detach_from_parent() |
| 243 | { |
no test coverage detected