Displaying 1 result from an estimated 1 matches for "addr_6or4_len".
2002 May 20
0
Openssh 3.2.2p1 KRB5 addition
..._ip_options(int, char *);
/*
+ * Return the canonical name of the localhost of the socket. The
+ * caller should free the returned string with xfree.
+ */
+
+ const char *
+ get_local_hostname(int socket)
+ {
+ struct sockaddr_storage addr_6or4;
+ int i;
+ socklen_t addr_6or4_len;
+ char name[NI_MAXHOST], ntop[NI_MAXHOST];
+
+ /* Get local IP address*/
+ addr_6or4_len = sizeof(addr_6or4);
+ memset(&addr_6or4, 0, sizeof(addr_6or4));
+ if (getsockname(socket, (struct sockaddr *) &addr_6or4, &addr_6or4_len) < 0) {
+...