// fwpsk.h
typedef struct _FWPS_CONNECT_REQUEST0 {
SOCKADDR_STORAGE localAddressAndPort;
SOCKADDR_STORAGE remoteAddressAndPort;
UINT64 portReservationToken;
DWORD localRedirectTargetPID;
struct _FWPS_CONNECT_REQUEST0 *previousVersion;
UINT64 modifierFilterId;
HANDLE localRedirectHandle;
void *localRedirectContext;
SIZE_T localRedirectContextSize;
} FWPS_CONNECT_REQUEST0;
View the official Windows Driver Kit DDI reference
No description available.
The FWPS_CONNECT_REQUEST0 structure defines modifiable data for the FWPM_LAYER_ALE_AUTH_CONNECT_REDIRECT_V4 and FWPM_LAYER_ALE_AUTH_CONNECT_REDIRECT_V6 layers. The callout driver uses this data to inspect or modify the connection information.
Note FWPS_CONNECT_REQUEST0 is a specific version of FWPS_CONNECT_REQUEST. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
localAddressAndPort
The local transport address of the connect request. This is an IPV4 or IPV6 address and TCP port formatted as a SOCKADDR_STORAGE structure.
remoteAddressAndPort
The remote transport address of the connect request. This is an IPV4 or IPV6 address and TCP/UDP port formatted as a SOCKADDR_STORAGE structure.
portReservationToken
A token used to reserve the appropriate port. The token is obtained when a port is reserved by calling either CreatePersistentTcpPortReservation or CreatePersistentUdpPortReservation.
localRedirectTargetPID
The process identifier of the local host process that will be handling traffic to the address specified in localAddressAndPort. This value must be set for loopback redirect changes to be accepted by the engine.
previousVersion
The previous version of the connect request data. This read-only field records the modification history of the connect request. If the connect request data has not been previously modified by another WFP filter, previousVersion will be set to NULL.
modifierFilterId
The value of the FilterId member of the classifyFn function's filter parameter. For more information about the FilterId member, see FWPS_FILTER1.
localRedirectHandle
The redirect handle that the callout driver created by calling the FwpsRedirectHandleCreate0 function.
Note Starting with Windows 8, the localRedirectHandle must be populated for redirection to work.
localRedirectContext
A callout driver context area that the callout driver allocated by calling the ExAllocatePoolWithTag function.
Note Starting with Windows 8, memory allocated for localRedirectContext will have its ownership taken by WFP, and will be freed when the proxied flow is removed.
localRedirectContextSize
The size, in bytes, of the callout-supplied context area.
Note Supported starting with Windows 8.
The callout driver obtains this structure by calling the FwpsAcquireWritableLayerDataPointer0 function, which returns a pointer to a FWPS_CONNECT_REQUEST0 structure through the writableLayerData parameter. The classifyFn function can modify the connect request's parameters, such as redirecting the local or remote transport address or port to another address or port. If it modifies the connect request's parameters, the classifyFn function must do the following:
This structure acts as a linked list that contains a record of all the changes made by other callout drivers. There is previous version information if the previousVersion member is not NULL. To examine the complete version history, the callout driver must continue to examine the previousVersion member of each structure in the list until it is set to NULL.
FwpsAcquireWritableLayerDataPointer0
Using Bind or Connect Redirection