Share via


TDI_SET_INFORMATION

When a kernel-mode client makes a TDI_SET_INFORMATION request, it asks the underlying TDI transport driver to set information of a client-specified type on a particular address, connection, or control channel.

IRP

The transport calls IoGetCurrentIrpStackLocation with the given Irpto get a pointer to its own I/O stack location in the IRP, shown in the following list as IrpSp. The pointer to the IRP is shown in the following list as Irp. IRP members relevant to this request include the following:

Irp->IoStatus.Status

Specifies the final status of the set-information request. The transport sets this member before it completes the IRP, possibly to one of the following:

STATUS_SUCCESS

STATUS_INVALID_ADDRESS_COMPONENT

STATUS_INVALID_CONNECTION

STATUS_INVALID_DEVICE_REQUEST

STATUS_INVALID_PARAMETER

STATUS_INSUFFICIENT_RESOURCES

STATUS_NOT_IMPLEMENTED

Irp->IoStatus.Information

Specifies the number of bytes of client-supplied data the driver used from the buffer mapped at Irp->MdlAddress.

IrpSp->MajorFunction

Specifies IRP_MJ_INTERNAL_DEVICE_CONTROL. The transport can ignore this member if it exports a TdiDispatchInternalDeviceControl routine that handles only TDI_XXX requests.

IrpSp->MinorFunction

Specifies TDI_SET_INFORMATION.

IrpSp->FileObject

Pointer to an open file object representing a local-node address, connection endpoint, or control channel. The transport uses the FsContext and, possibly, FsContext2 fields to access the state it maintains about this address, connection, or control channel.

IrpSp->Parameters

Pointer to a TDI_REQUEST_KERNEL_SET_INFORMATION structure, defined as follows:

struct _TDI_REQUEST_KERNEL_SET_INFO {
    LONG SetType;
    PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
} TDI_REQUEST_KERNEL_SET_INFORMATION, *PTDI_REQUEST_KERNEL_SET_INFORMATION;

The transport uses the members of this structure as follows:

  • SetType
    Specifies the type of set operation to carry out (see Comments).

  • RequestConnectionInformation
    Pointer to a TDI_CONNECTION_INFORMATION structure containing input connection information if the given file object represents a connection. Otherwise, this member is NULL.

Irp->MdlAddress

Pointer to an MDL mapping a client-supplied buffer containing the data to be set. The format and contents of this buffer depend on the value of SetType.

Comments

When a client calls TdiBuildSetInformationto set up this IRP, it must specify the type of set operation it wants done and must provide a buffer containing appropriate data. The transport finds this information at IrpSp->Parameters in the SetType member. On input, SetType can be any of the following subset of the system-defined TDI_QUERY_XXX:

  • TDI_QUERY_ADDRESS_INFO
    Set information for an address. The client-supplied buffer mapped at MdlAddress contains data formatted as a TDI_ADDRESS_INFO structure.

  • TDI_QUERY_CONNECTION_INFO
    Set information for a connection endpoint. The client-supplied buffer mapped at MdlAddress contains data formatted as a TDI_CONNECTION_INFO structure.

  • TDI_QUERY_PROVIDER_INFO
    Set information for a control channel. The client-supplied buffer mapped at MdlAddress contains data formatted as a TDI_PROVIDER_INFO structure.

  • TDI_QUERY_PROVIDER_STATISTICS
    Set statistics information for a control channel. The client-supplied buffer mapped at MdlAddress contains data formatted as a TDI_PROVIDER_STATISTICS structure.

A transport can extend this interface at the discretion of the driver writer to support additional set operations for its clients. Such a transport must define TDI_QUERY_XXX codes in which the most significant bit is set.

The transport must fail any set-information request in which the given file object is inappropriate to the specified SetType.

The transport also can fail any set-information request for which the client supplies values that exceed a driver-determined limit. For example, most transports do not allow their clients to reset the MaxDatagramSizeor MaxSendSizewith TDI_QUERY_PROVIDER_INFO-type set-information requests.

TdiBuildSetInformationis the macro a client uses to fill in this IRP.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

See Also

TDI_ADDRESS_INFO, TDI_CONNECTION_INFO, TDI_CONNECTION_INFORMATION, TdiBuildSetInformation, TdiDispatchInternalDeviceControl, TDI_PROVIDER_INFO, TDI_PROVIDER_STATISTICS

Requirements

Header

TdiKrnl.h (include TdiKrnl.h)

 

 

Send comments about this topic to Microsoft