The gethostbyaddr function returns a pointer to the hostent structure that contains the name and address corresponding to the given network address.
Although gethostbyaddr is deprecated by the getnameinfo function, gethostbyaddr is capable of returning a NetBIOS name; getnameinfo is not. Developers requiring NetBIOS name resolution may need to use gethostbyaddr until their applications are completely independent of NetBIOS names.
Note The capability to perform reverse lookups using the gethostbyaddr function is convenient, but such lookups are considered inherently unreliable, and should be used only as a hint.