Displaying 1 result from an estimated 1 matches for "get_local_ipaddr2".
Did you mean:
get_local_ipaddr
2001 Oct 13
0
local IP in environment
...H_LOCAL.
-Eric
-------------- next part --------------
*** openssh-2.9.9p2/canohost.c.bak Sun Jun 24 22:01:24 2001
--- openssh-2.9.9p2/canohost.c Fri Oct 12 16:52:09 2001
***************
*** 255,260 ****
--- 255,281 ----
return get_socket_address(socket, 0, NI_NAMEREQD);
}
+ const char *
+ get_local_ipaddr2(void)
+ {
+ static char *canonical_host_ip = NULL;
+
+ /* Check whether we have cached the ipaddr. */
+ if (canonical_host_ip == NULL) {
+ if (packet_connection_is_on_socket()) {
+ canonical_host_ip =
+ get_local_ipaddr(packet_get_connection_out());
+ if (canonical_host_ip == NUL...