version 1.285, 2016/02/17 05:29:04 |
version 1.286, 2016/03/07 19:02:43 |
|
|
struct connection_info * |
struct connection_info * |
get_connection_info(int populate, int use_dns) |
get_connection_info(int populate, int use_dns) |
{ |
{ |
|
struct ssh *ssh = active_state; /* XXX */ |
static struct connection_info ci; |
static struct connection_info ci; |
|
|
if (!populate) |
if (!populate) |
return &ci; |
return &ci; |
ci.host = get_canonical_hostname(use_dns); |
ci.host = auth_get_canonical_hostname(ssh, use_dns); |
ci.address = get_remote_ipaddr(); |
ci.address = ssh_remote_ipaddr(ssh); |
ci.laddress = get_local_ipaddr(packet_get_connection_in()); |
ci.laddress = ssh_local_ipaddr(ssh); |
ci.lport = get_local_port(); |
ci.lport = ssh_local_port(ssh); |
return &ci; |
return &ci; |
} |
} |
|
|