The Fa sa arguement is a pointer to a generic socket address structure of size Fa salen . The arguements Fa host and Fa serv are pointers to buffers to hold the return values. Their sizes are specified by Fa hostlen and Fa servlen repectively. Either Fa host or Fa serv may be NULL if the hostname or service name is not required.
The Fa flags arguement modifies the behaviour of Fn getnameinfo as follows:
If NI_NOFQDN is set only the unqualified hostname is returned for local fully qualified names.
If NI_NUMERICHOST is set then the numeric form of the hostname is returned.
If NI_NAMEREQD is set, then a error is returned if the hostname cannot be looked up.
If NI_NUMERICSERV is set then the service is returned in numeric form.
If NI_DGRAM is set then the service is UDP based rather than TCP based.
R. Gilligan, S. Thomson, J. Bound, and W. Stevens, ``Basic Socket Interface Extensions for IPv6,'' RFC2133, April 1997.