This function retrieves the host data corresponding to a network address.
At a Glance
Header file: | Winsock.h |
Windows CE versions: | 1.0 and later |
Syntax
struct hostent * gethostbyaddr(const char *addr, int len, int type);
Parameters
addr
[in] Pointer to an address in network byte order.
len
[in] Address length.
type
[in] Address type.
Return Values
A pointer to the HOSTENT structure indicates no error occurred. A NULL pointer indicates failure. To get a specific error value, call the WSAGetLastError function.
Remarks
The gethostbyaddr function returns a pointer to the HOSTENT structure that contains the name and address corresponding to the given network address. All strings are null-terminated.
See Also