Поделиться через


TdiBuildSetInformation macro

TdiBuildSetInformation sets up an internal device control IRP for a TDI_SET_INFORMATION request to the underlying transport in which the local-node client has already opened a file object representing an address, connection endpoint, or control channel.

Syntax

VOID TdiBuildSetInformation(
  [in] PIRP           Irp,
  [in] PDEVICE_OBJECT DevObj,
  [in] PFILE_OBJECT   FileObj,
  [in] PVOID          CompRoutine,
  [in] PVOID          Contxt,
  [in] UINT           SType,
  [in] PMDL           MdlAddr
);

Parameters

  • Irp [in]
    Pointer to a client-supplied IRP, usually one allocated with TdiBuildInternalDeviceControlIrp.

  • DevObj [in]
    Pointer to the device object created by the underlying TDI transport driver.

  • FileObj [in]
    Pointer to a file object representing an address, connection endpoint, or control channel. This file object must be appropriate to the given SType.

  • CompRoutine [in]
    Specifies the entry point of a client-supplied IoCompletion routine or NULL. The I/O manager calls this routine when the given IRP is completed, unless the client sets this parameter to NULL.

  • Contxt [in]
    Pointer to a client-determined context. This client-supplied pointer is passed in to the IoCompletion routine when it is called with the completed IRP. Contxt is NULL if CompRoutine is NULL.

  • SType [in]
    Specifies the type of information the client wants to be set. This parameter can be transport-defined or one of the following system-defined values:

    • TDI_QUERY_ADDRESS_INFO
      Set the supplied information for an address. The buffer mapped at MdlAddr is formatted as a TDI_ADDRESS_INFO structure.

    • TDI_QUERY_CONNECTION_INFO
      Set the supplied information for a connection endpoint. The buffer mapped at MdlAddr is formatted as a TDI_CONNECTION_INFO structure.

    • TDI_QUERY_PROVIDER_INFO
      Set the supplied information for a control channel. The buffer mapped at MdlAddr is formatted as a TDI_PROVIDER_INFO structure. However, a client cannot reset a transport's provider information to anything that is not actually supported by the transport.

    • TDI_QUERY_PROVIDER_STATISTICS
      Set the supplied information for a control channel. The buffer mapped at MdlAddr is formatted as a TDI_PROVIDER_STATISTICS structure. However, a client cannot reset a transport's statistics, which is global state rather than per-client state, to anything that is not actually maintained by the transport.

    The underlying transport can support additional types of set-information requests at the discretion of the driver writer. Such a transport must define TDI_QUERY_XXX codes in which the most significant bit is set.

  • MdlAddr [in]
    Pointer to an MDL mapping the client-supplied buffer containing the data to be set. The format and contents of this buffer depend on the given SType.

Return value

None

Remarks

TdiBuildSetInformation sets IRP_MJ_INTERNAL_DEVICE_CONTROL as the MajorFunction and TDI_SET_INFORMATION as the MinorFunction codes in the transport's I/O stack location of the given IRP.

A client can set information about an address, a connection, or a control channel, depending on the SType it passes to TdiBuildSetInformation. The given file object must be appropriate to the given SType or the transport will fail the request.

The underlying transport also can refuse to reset anything for which the client supplies an inappropriate value in the buffer at MdlAddr. For example, a client cannot force the underlying transport to extend its MaxSendSize or MaxDatagramSize beyond the transport-determined limit by issuing a set-information request that attempts to reset these members of the TDI_PROVIDER_INFO structure returned by the transport in a preceding query-information request.

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

Target platform

Desktop

Header

Tdikrnl.h (include TdiKrnl.h)

See also

TDI_ADDRESS_INFO

TdiBuildInternalDeviceControlIrp

TdiBuildQueryInformation

TDI_CONNECTION_INFO

TDI_PROVIDER_INFO

TDI_PROVIDER_STATISTICS

TDI_SET_INFORMATION

 

 

Send comments about this topic to Microsoft