Share via


gethostbyaddr

This function retrieves the host data corresponding to a network address.

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.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winsock.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

gethostbyname, gethostname, inet_addr, WSAStartup

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.