FWPS_CONNECT_REQUEST0 structure (fwpsk.h)
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.
Syntax
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;
Members
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.
localRedirectContext
A callout driver context area that the callout driver allocated by calling the ExAllocatePoolWithTag function.
localRedirectContextSize
The size, in bytes, of the callout-supplied context area.
Remarks
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:
- Make all changes to the FWPS_CONNECT_REQUEST0 structure that was returned by FwpsAcquireWritableLayerDataPointer0. Only the remoteAddressAndPort, portReservationToken, localRedirectTargetPID, localRedirectHandle, localRedirectContext, and localRedirectContextSize members can be modified.
- Call FwpsApplyModifiedLayerData0 with the modifiedLayerData parameter set to the address of the FWPS_CONNECT_REQUEST0 structure, even if the callout driver didn't modify any data. This value must be the same as the modifiedLayerData parameter value returned through FwpsAcquireWritableLayerDataPointer0.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 7. |
Header | fwpsk.h (include Fwpsk.h) |