Поделиться через


TDI_PNP_CONTEXT structure

The TDI_PNP_CONTEXT structure defines the structure of buffered information passed to transport clients that register themselves with TdiRegisterPnPHandlers to receive notifications of PnP (binding) and power-state changes, as well as dynamic notifications of net address additions and deletions.

Syntax

typedef struct _TDI_PNP_CONTEXT {
  USHORT ContextSize;
  USHORT ContextType;
  UCHAR  ContextData[1];
} TDI_PNP_CONTEXT, *PTDI_PNP_CONTEXT;

Members

  • ContextSize
    Specifies the size in bytes of the buffered data, including the variable-sized array of bytes at ContextData.

  • ContextType
    Specifies the type of information at ContextData as one of the following values:

    • TDI_PNP_CONTEXT_TYPE_IF_NAME
      The buffered data is a protocol-supplied device (or interface) name, such as the name of an underlying device object on which a new network address just arrived or was closed.

    • TDI_PNP_CONTEXT_TYPE_IF_ADDRESS
      The buffered data is a protocol-supplied address, such as a list of net addresses associated with the underlying device to which both the transport and client are bound.

    • TDI_PNP_CONTEXT_TYPE_PDO
      The buffered data is a protocol-supplied pointer to the physical device object representing the underlying NIC to which both the transport and client are bound.

    • TDI_PNP_CONTEXT_TYPE_FIRST_OR_LAST_IF
      The buffered data is any protocol-supplied information for an adapter that supports the transport. In effect, the client is indifferent to the specifics of the transport interface(s), as long as the transport to which the client is bound is supported by at least one underlying NIC.

  • ContextData
    Contains the buffered data for this notification to the client.

Remarks

The information passed in this structure is both context-dependent, as indicated by the ContextType value, and protocol-dependent. For example, when TCP/IP notifies its clients of new net addresses by calling TdiRegisterNetAddress, it passes a pointer to a TDI_PNP_CONTEXT_TYPE_PDO record as the Context argument. However, the registered ClientAddNetAddress functions of clients bound to any other transport stack are not necessarily called with an input Context pointer to the same type of TDI_PNP_CONTEXT record.

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

Header

Tdikrnl.h (include TdiKrnl.h)

See also

ClientPnPAddNetAddress

ClientPnPDelNetAddress

ClientPnPBindingChange

ClientPnPPowerChange

NET_PNP_EVENT

TdiPnPPowerRequest

TdiRegisterNetAddress

 

 

Send comments about this topic to Microsoft