FwxGetHostByAddrEvent Structure

The FwxGetHostByAddrEvent structure contains parameters for an event of the fwx_GetHostByAddr type, as defined in the FwxFirewallEventType enumerated type.

An event of this type event is a notification of a Firewall client operation that uses the Winsock gethostbyaddr function, which requests the host information corresponding to a specific network address. Such an event allows the filter to modify or block a name resolution request generated by gethostbyaddr by calling the IFWXGetXByY::SetResult or IFWXGetXByY::Deny method. Two events are generated, one before and one after the actual name resolution.

Syntax

typedef struct _tagFwxGetHostByAddrEvent {
BYTE* Address;
DWORD AddressLength;
INT AddressType;
LPHOSTENT Hostent;
DWORD HostentLength;
BOOL fBeforeAction;
FwxFilterAccess FilterAccess;
IFWXGetXByY* piGetXByY; } FwxGetHostByAddrEvent;

Members

Address

Pointer to the network address passed to the gethostbyaddr function in network byte order.

AddressLength

Length, in bytes, of the data pointed to by the Address member.

AddressType

Type of address, such as the AF_INET address family type (defined as TCP, UDP, and other associated Internet protocols). Address family types and their corresponding values are defined in Winsock2.h.

Hostent

Pointer to a hostent structure. This member points to a valid hostent structure if the fBeforeAction member is FALSE. Otherwise, the value of this member is undefined.

HostentLength

Length, in bytes, of the data pointed to by the hostent member.

fBeforeAction

Before-action flag. The value of this flag is TRUE if the event is generated before name resolution is performed, and FALSE if the event is generated after name resolution is performed.

FilterAccess

Value from the FwxFilterAccess enumerated type that indicates the type of access permission granted for the event. This member is used internally by the Microsoft Firewall service and should not be modified or relied upon by application filters.

piGetXByY

Pointer to an IFWXGetXByY interface that contains methods for controlling the outcome of the name query.

Remarks

The events for which this structure is used are generated only for Firewall clients (sources of type fwxSourceWSP, as defined in the FwxFirewallEventSource enumerated type). They are not generated for SecureNAT clients.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

See Also

Structures
IFWXGetXByY


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.