TDI_ACTION

When a kernel-mode client makes a TDI_ACTION request, it asks the underlying TDI transport driver to make transport-specific extensions available to that client.

IRP

The transport calls IoGetCurrentIrpStackLocation with the given Irp to get a pointer to its own stack location in the IRP, shown in the following list as IrpSp. IRP members relevant to this request include the following:

IoStatus.Status

Specifies the final status of the action request. The transport sets this member before it completes the IRP, possibly to one of the following:

STATUS_SUCCESS
STATUS_PENDING
STATUS_INVALID_CONNECTION
STATUS_INSUFFICIENT_RESOURCES
STATUS_NOT_IMPLEMENTED

IoStatus.Information

Specifies how many bytes of data were transferred for this request. The transport sets this member of the I/O status block before it completes the IRP.

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

IrpSp->FileObject

Points 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, or control channel.

MdlAddress

Points to an MDL, possibly the initial MDL in a chain, mapping a buffer containing the client-supplied action parameter block. The initial part of this buffer always contains a system-defined TDI_ACTION_HEADER structure, followed by whatever transport-defined contents are required to carry out the action request.

Comments

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. The set of possible actions is defined by the transport at the discretion of the TDI transport driver writer.

Such a client makes an action request for transport-defined extensions related to an address, a connection, or a control channel. The client supplies a buffer containing all information concerning the requested action in the parameter block mapped at MdlAddress.

Every action parameter block begins with a TDI_ACTION_HEADER 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.

TdiBuildAction is the macro a client uses to fill in this IRP.

See Also

TDI_ACTION_HEADER, TdiBuildAction, TdiDispatchInternalDeviceControl