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.


typedef struct _tagFwxGetHostByNameEvent {
LPSTR Hostname;
DWORD HostentLength;
BOOL fBeforeAction;
FwxFilterAccess FilterAccess;
IFWXGetXByY* piGetXByY; } FwxGetHostByNameEvent;



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


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.


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


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.


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.


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


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.


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

Declared in Wspfwext.idl.

See Also


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.