The Windows Sockets gethostbyaddr
function gets host information corresponding to an address.
struct hostent FAR * gethostbyaddr (
| const char FAR * addr,
| int len,
| int type
[in] A pointer to an address in network byte order.
[in] The length of the address.
[in] The type of the address.
gethostbyaddr returns a pointer to the following hostent
structure which contains the name(s) and address which correspond to the
given address. All strings are null terminated.
If no error occurs, gethostbyaddr
returns a pointer to the hostent structure described above. Otherwise, it
returns a NULL pointer and a specific error number can be retrieved by calling WSAGetLastError
||A successful WSAStartup must occur before using this function.
||The network subsystem has failed.
||Authoritative Answer Host not found.
||Non-Authoritative Host not found, or server failed.
||Nonrecoverable error occurred.
||Valid name, no data record of requested type.
||A blocking Windows Sockets 1.1 call is in progress, or the service provider is
still processing a callback function.
||The type specified is not supported by the Windows Sockets implementation.
||The addr argument is not a valid part of the user address space, or the len argument is too small.
||The (blocking) call was canceled through WSACancelBlockingCall.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages