WPX_FILTER_CONTEXT structure

Applies to: desktop apps only

The WPX_FILTER_CONTEXT structure is used for passing information associated with the current, active HTTP session. This structure extends the HTTP_FILTER_CONTEXT structure by including pointers to additional functions.

Syntax

typedef struct _WPX_FILTER_CONTEXT {
  DWORD          cbSize;
  DWORD          Revision;
  PVOID          ServerContext;
  DWORD          ulReserved;
  BOOL           fIsSecurePort;
  PVOID          pFilterContext;
  BOOL (WINAPI)  *GetServerVariable;
  BOOL (WINAPI)  *AddResponseHeaders;
  BOOL (WINAPI)  *WriteClient;
  VOID* (WINAPI) *AllocMem;
  BOOL (WINAPI)  *ServerSupportFunction;
  BOOL (WINAPI)  *WriteServer;
  VOID* (WINAPI) *AllocMemoryPerRequest;
  BOOL (WINAPI)  *GetAuthSchemeStatus;
  BOOL (WINAPI)  *WPXSupportFunction;
} WPX_FILTER_CONTEXT, *PWPX_FILTER_CONTEXT;

Members

  • cbSize
    The size of this structure, in bytes.

  • Revision
    The revision level of this structure.

  • ServerContext
    Reserved for server use.

  • ulReserved
    Reserved for server use.

  • fIsSecurePort
    A value of TRUE indicates that the event occurred over a secure port. A value of FALSE indicates that the event did not occur over a secure port.

  • pFilterContext
    Pointer to context information that the Web filter associates with the current, active HTTP session. It is initialized to NULL when the Web proxy creates the session, and it is set when the Web filter allocates memory to hold the context information. Any memory allocated for this context information can be safely freed during the SF_NOTIFY_END_OF_NET_SESSION notification.

  • GetServerVariable
    Pointer to the GetServerVariable function that retrieves information about the server and the current connection. For some notifications, some variables may not be defined. For example, notifications that occur before PREPROC_HEADERS, such as the READ_RAW_DATA notification, may have undefined variables.

  • AddResponseHeaders
    Pointer to the AddResponseHeaders function that adds a header to the HTTP response.

  • WriteClient
    Pointer to the WriteClient function that sends raw data back to the client.

  • AllocMem
    Pointer to the AllocMem function used to allocate memory. Any memory allocated with this function will automatically be freed when the session ends.

  • ServerSupportFunction
    Pointer to the ServerSupportFunction function used to extend the Web filter functions. Parameters are specific to the extensions.

  • WriteServer
    Pointer to the WriteServer function that writes a data buffer to the server.

  • AllocMemoryPerRequest
    Pointer to the AllocMemoryPerRequest function that allocates memory per request.

  • GetAuthSchemeStatus
    Pointer to the GetAuthSchemeStatus function that returns the status (enabled or disabled) of an authentication scheme for the listener.

  • WPXSupportFunction
    Pointer to the WPXSupportFunction callback function that extends the Web filter functions. Parameters are specific to the extensions.

Remarks

To get a pointer to the WPX_FILTER_CONTEXT structure from the pointer to the HTTP_FILTER_CONTEXT structure provided in an event notification, use the TO_WPX_FILTER_CONTEXT macro as follows:

WPX_FILTER_CONTEXT* pwfc = TO_WPX_FILTER_CONTEXT(pfc);
if (pwfc != NULL) {
...
}

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

Wpxhttpfilt.h

See also

Notification Structures

 

 

Build date: 7/12/2010