TDI_QUERY_INFORMATION

When a kernel-mode client makes a TDI_QUERY_INFORMATIONrequest, it asks the underlying TDI transport driver to return information of a client-specified type, such as a broadcast address, the transport's capabilities, or its current statistics for I/O on a particular connection.

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 query-information request. The transport sets this member before it completes the IRP, possibly to one of the following:

    • STATUS_SUCCESS
    • STATUS_BUFFER_OVERFLOW
    • STATUS_INSUFFICIENT_RESOURCES
    • STATUS_INVALID_CONNECTION
    • STATUS_INVALID_DEVICE_REQUEST
    • STATUS_NOT_IMPLEMENTED
  • Irp->IoStatus.Information
    Specifies the number of bytes of information the transport is returning to its client.

  • 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_QUERY_INFORMATION.

  • IrpSp->FileObject
    Pointer to an open file object representing an 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 endpoint, or control channel.

  • IrpSp->Parameters
    Pointer to a TDI_REQUEST_KERNEL_QUERY_INFORMATION structure.

    The transport checks the QueryType member of the TDI_REQUEST_KERNEL_QUERY_INFORMATION structure to determine what information the client requested, which also determines the format of the information to be returned and, sometimes the client-supplied contents, of the buffer mapped at Irp->MdlAddress.

    For more information, see TDI_REQUEST_KERNEL_QUERY_INFORMATION.

  • Irp->MdlAddress
    Pointer to an MDL, possibly the initial MDL in a chain of MDLs, mapping a client-supplied buffer containing whatever client-supplied contents are required to carry out the request. The input contents and format of this buffer depend on the value of the QueryType member of the TDI_REQUEST_KERNEL_QUERY_INFORMATION structure.

Remarks

In most cases, TdiBuildQueryInformation is the macro a client uses to fill in this IRP.

Because the TdiBuildQueryInformation macro sets the RequestConnectionInformation member of the TDI_REQUEST_KERNEL_QUERY_INFORMATION structure to NULL, a client of a NetBIOS transport cannot use TdiBuildQueryInformation with query type TDI_QUERY_FIND_NAME. To set up an IRP for a TDI_QUERY_INFORMATION request using TDI_QUERY_FIND_NAME, a client of a NetBIOS transport can use code similar to the code for TdiBuildQueryInformation but must specify a pointer to a TDI_CONNECTION_INFORMATION structure for RequestConnectionInformation.

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).

 

Requirements

Header

TdiKrnl.h (include TdiKrnl.h)

See also

TdiBuildQueryInformation

TdiDispatchInternalDeviceControl

TDI_ADDRESS_INFO

TDI_CONNECTION_INFO

TDI_CONNECTION_INFORMATION

TDI_DATAGRAM_INFO

TDI_MAX_DATAGRAM_INFO

TDI_PROVIDER_INFO

TDI_PROVIDER_STATISTICS

TDI_REQUEST_KERNEL_QUERY_INFORMATION

TRANSPORT_ADDRESS

 

 

Send comments about this topic to Microsoft