Partager via


TdiBuildAction macro

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.

Syntax

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

Parameters

  • Irp [in]
    Pointer to a client-supplied IRP, either originating in a higher level network component or 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.

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

  • MdlAddr [in]
    Pointer 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.

Return value

None

Remarks

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.

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_ACTION

TDI_ACTION_HEADER

TdiBuildInternalDeviceControlIrp

 

 

Send comments about this topic to Microsoft