Share via


FwxGetHostByNameEvent structure

Applies to: desktop apps only

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 Forefront TMG Client or 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 Forefront TMG Client and Firewall Client computers (sources of type fwxSourceWSP, as defined in the FwxFirewallEventSource enumerated type). They are not generated for SecureNAT clients.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

Header

Wspfwext.idl

See also

Structures

IFWXGetXByY

 

 

Build date: 7/12/2010