FwxGetHostByNameEvent Structure

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

This event is a notification of a Firewall client operation that uses the Winsock gethostbyname function, which requests the host information corresponding to a specific host name from a host database. Such an event allows the filter to modify or block a name resolution request generated by gethostbyname 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 _tagFwxGetHostByNameEvent {
LPSTR Hostname;
LPHOSTENT Hostent;
DWORD HostentLength;
BOOL fBeforeAction;
FwxFilterAccess FilterAccess;
IFWXGetXByY* piGetXByY; } FwxGetHostByNameEvent;

Members

Hostname

Pointer to a null-terminated string containing the host name passed to the gethostbyname function.

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.