Microsoft Internet Security and Acceleration Server 2000

IFWXFirewall::GetHostByAddr Method

Retrieves host information corresponding to an address.

HRESULT GetHostByAddr(
  const char *addr,
  int len,
  int type,
  char *buf,
  int *buflen
);

Parameters

addr
[in] Pointer to the network address for the host. Host addresses are stored in network byte order.
len
[in] Length of the address.
type
[in] Type of the address.
buf
[out] Pointer to the data area to receive the hostent data. The data area must be larger than the size of a hostent structure because the supplied data area is used by Windows Sockets to contain a hostent structure and all of the data referenced by members of the hostent structure. A buffer of MAXGETHOSTSTRUCT bytes is recommended.
buflen
[in, out] On input, specifies the size of data area for the buf parameter. If the buffer is too small, the error code ERROR_INSUFFICIENT_BUFFER is returned and the buflen parameter receives the size of the required buffer.

Return Values

S_OK
Success, the buffer was filled with the host information.
HRESULT_FROM_WIN32(WSAENOBUFS)
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND)
Authoritative answer host not found.
HRESULT_FROM_WIN32(WSATRY_AGAIN)
A nonauthoritative host not found, or SERVERFAIL.
HRESULT_FROM_WIN32(WSANO_DATA)
Valid name, no data record of requested type.
HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
The buffer is too small. See the description of the buflen parameter.

Remarks

Unlike the IFWXSession::GetHostByAddr method, this method does not check permissions or site and content rules, does not log the name resolution, and cannot use autodial to dial out for the name resolution.