|
gethostbyaddr
The Windows Sockets gethostbyaddr function gets host information corresponding to an address.
struct hostent FAR * gethostbyaddr (
const char FAR * addr,
|
| int len,
|
| int type
|
| );
|
|
Parameters
addr
[in] A pointer to an address in network byte order.
len
[in] The length of the address.
type
[in] The type of the address.
Remarks
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.
Return Values
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.
Error Codes
WSANOTINITIALISED
| A successful WSAStartup must occur before using this function.
| WSAENETDOWN
| The network subsystem has failed.
| WSAHOST_NOT_FOUND
| Authoritative Answer Host not found.
| WSATRY_AGAIN
| Non-Authoritative Host not found, or server failed.
| WSANO_RECOVERY
| Nonrecoverable error occurred.
| WSANO_DATA
| Valid name, no data record of requested type.
| WSAEINPROGRESS
| A blocking Windows Sockets 1.1 call is in progress, or the service provider is
still processing a callback function.
| WSAEAFNOSUPPORT
| The type specified is not supported by the Windows Sockets implementation.
| WSAEFAULT
| The addr argument is not a valid part of the user address space, or the len argument is too small.
| WSAEINTR
| The (blocking) call was canceled through WSACancelBlockingCall.
|
See Also
gethostbyname, hostent, WSAAsyncGetHostByAddr
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|