MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3 / get_connection_info

Method get_connection_info

client/ovpncli.cpp:216–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

connection_infoMethod · 0.80

Calls 1

connected_castMethod · 0.80

Tested by

no test coverage detected