VOID
TdiBuildAction (
IN PIRP Irp,
IN PDEVICE_OBJECT DevObj,
IN PFILE_OBJECT FileObj,
IN PVOID CompRoutine,
IN PVOID Contxt,
IN PMDL MdlAddr
);
TdiBuildAction sets up an internal device control IRP for a TDI_ACTION request to the underlying transport in which a local-node client has already opened an address, connection endpoint, or control channel to which the requested action applies.
TdiBuildAction sets IRP_MJ_INTERNAL_DEVICE_CONTROL as the MajorFunction and TDI_ACTION as the MinorFunction codes in the transport's I/O stack location of the given IRP.
A client can make an action request for transport-provided extensions pertaining to an address, a connection, or a control channel. The client supplies a buffer containing all transport-required information concerning such a request in an action parameter block.
Every action parameter block begins with a system-defined TDI_ACTION_HEADER structure containing a transport identifier and an action code. On receipt of such a request, the transport uses the value of TransportId in this header to validate the request. The ActionCode member specifies the transport-defined operation to carry out and determines the transport-required contents for the remainder of the parameter block. The underlying transport defines the set of possible action codes and the required formats of the remaining parameter block for each such action.
The successful completion of any client's action request makes the transport-provided extension applicable to that client but not to any other TDI clients or drivers.
TDI_ACTION, TDI_ACTION_HEADER, TdiBuildInternalDeviceControlIrp