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
);
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.
Parameters
Irp
Points to a client-supplied IRP, usually one allocated with TdiBuildInternalDeviceControlIrp.
DevObj
Points to the device object created by the next lower TDI transport driver.
FileObj
Points to a file object representing an address, connection endpoint, or control channel. This file object must be appropriate to the given SType.
CompRoutine
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
Points 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 should be NULL if CompRoutine is NULL.
SType
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.
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.
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
Points 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.
Comments
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 TDI_QUERY_PROVIDER_INFO set-information request.
See Also
TDI_ADDRESS_INFO, TdiBuildInternalDeviceControlIrp, TdiBuildQueryInformation, TDI_CONNECTION_INFO, TDI_PROVIDER_INFO, TDI_PROVIDER_STATISTICS, TDI_SET_INFORMATION