sa Points either to a sockaddr_in structure (for IPv4) or to a sockaddr_in6 structure (for IPv6) that holds the IP address and port number. salen Specifies the length of either the sockaddr_in structure or the sockaddr_in6 structure. node Points to a buffer in which to receive the null-terminated network node name or alias corresponding to the address contained in the sa. A NULL pointer instructs getnameinfo() to not return a node name. The node argument and service argument must not both be zero. nodelen Specifies the length of the node buffer. A value of zero instructs getnameinfo() to not return a node name. service Points to a buffer in which to receive the null-terminated network service name associated with the port number contained in sa. A NULL pointer instructs getnameinfo() to not return a service name. The node argument and service argument must not both be 0. servicelen Specifies the length of the service buffer. A value of zero instructs getnameinfo() to not return a service name. flags Specifies changes to the default actions of getnameinfo(). By default, getnameinfo() searches for the fully-qualified domain name of the node in the hosts database and returns it. See Flags for a list of flags and their meanings.