1N/A#pragma prototyped
1N/A"[+SEE ALSO?\blogname\b(1), \bwho\b(1), \bgetgroups\b(2), \bgetsockname\b(2), \bgetsockopts\b(2)]"
1N/A#if defined(S_IFSOCK) && _sys_socket && _hdr_arpa_inet && _hdr_netinet_in && _lib_getsockname && _lib_getsockopt && _lib_inet_ntoa
1N/A#ifdef AF_APPLETALK
1N/A#ifdef AF_NETBEUI
1N/A#ifdef AF_SECURITY
1N/A#ifdef AF_NETLINK
#ifdef AF_ECONET
#ifdef AF_ATMSVC
#ifdef AF_SNA
#ifdef AF_IRDA
#ifdef AF_PPPOX
#ifdef AF_WANPIPE
#ifdef AF_BLUETOOTH
#ifdef S_IFSOCK
#ifdef INET6_ADDRSTRLEN
details = 0;
for (i = 0; i <= open_max; i++)
if (!details)
case O_RDONLY:
case O_WRONLY:
case O_RDWR:
#ifdef S_IFSOCK
type = 0;
prot = 0;
#ifdef SO_TYPE
#ifdef SO_PROTOTYPE
switch (type)
case SOCK_DGRAM:
case AF_INET:
#ifdef AF_INET6
case AF_INET6:
case SOCK_STREAM:
case AF_INET:
#ifdef AF_INET6
case AF_INET6:
#ifdef IPPROTO_SCTP
#ifdef SOCK_RAW
case SOCK_RAW:
#ifdef SOCK_RDM
case SOCK_RDM:
#ifdef SOCK_SEQPACKET
case SOCK_SEQPACKET:
port = 0;
#ifdef INET6_ADDRSTRLEN
a = fam;
if (port)