TdiBuildAction

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.

Parameters

Irp
Points to a client-supplied IRP, either originating in a higher level network component or 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.
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.
MdlAddr
Points to an MDL, possibly the head of an MDL chain, mapping a client-supplied buffer containing the action parameter block set up by the client. This buffer contains a system-defined header, followed by whatever transport-determined information is necessary to carry out the action request.

Comments

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.

See Also

TDI_ACTION, TDI_ACTION_HEADER, TdiBuildInternalDeviceControlIrp