SIO_SET_WFP_CONNECTION_REDIRECT_RECORDS control code

The SIO_SET_WFP_CONNECTION_REDIRECT_RECORDS socket I/O control operation allows a Winsock client to specify the redirect record to the new TCP socket used for connecting to the final destination.

A WFP redirect record is a buffer of opaque data that WFP must set on an outbound proxy connection so that the redirected connection and the original connection are logically related.

For more information about redirection, see Using Bind or Connect Redirection.

To set the redirect record to the new TCP socket used for connecting to the final destination, a Winsock client calls the WskControlSocket function with the following parameters.

ParameterValue

RequestType

WskIoctl

ControlCode

SIO_SET_WFP_CONNECTION_REDIRECT_RECORDS

Level

0

InputSize

The size of the redirect record pointed to by the InputBuffer parameter.

InputBuffer

A pointer to the redirect record associated with the socket.

OutputSize

0

OutputBuffer

NULL

OutputSizeReturned

NULL

Irp

A pointer to an IRP.

 

The Winsock client must allocate a buffer and specify a pointer to the buffer and its size in InputBuffer and InputSize.

A Winsock client must specify a pointer to an IRP and a completion routine when calling the WskControlSocket function for this type of request. The client must not release the buffer till the WSK subsystem has completed the IRP. When it completes the IRP, the subsystem invokes the completion routine. In the completion routine, the client must check the IRP status and release all resources that it had previously allocated for the request.

Note  It is also possible to perform this query in a user-mode application by using SIO_SET_WFP_CONNECTION_REDIRECT_RECORDS (SDK).

For more information about WSK IRP handling, see Using IRPs with Winsock Kernel Functions.

The client can get the status of the IRP by checking Irp->IoStatus.Status. Irp->IoStatus.Status will be set to STATUS_SUCCESS if the request is successful. Otherwise, it will contain STATUS_INTEGER_OVERFLOW, or STATUS_ACCESS_DENIED if the call is not successful.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

Mstcpip.h

IRQL

PASSIVE_LEVEL

See also

Using Bind or Connect Redirection
Using IRPs with Winsock Kernel Functions
SIO_QUERY_WFP_CONNECTION_REDIRECT_RECORDS
SIO_SET_WFP_CONNECTION_REDIRECT_RECORDS (SDK)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft