TDI_CONNECTION_INFO structure

The TDI_CONNECTION_INFO structure defines the structure of the information returned for a TDI_QUERY_INFORMATION request in which IrpSp->Parameters is cast to a pointer to a TDI_REQUEST_KERNEL_QUERY_INFORMATION structure. The request sets the QueryType member of TDI_REQUEST_KERNEL_QUERY_INFORMATION to the TDI_QUERY_CONNECTION_INFO query type.

Syntax

typedef struct _TDI_CONNECTION_INFO {
  ULONG         State;
  ULONG         Event;
  ULONG         TransmittedTsdus;
  ULONG         ReceivedTsdus;
  ULONG         TransmissionErrors;
  ULONG         ReceiveErrors;
  LARGE_INTEGER Throughput;
  LARGE_INTEGER Delay;
  ULONG         SendBufferSize;
  ULONG         ReceiveBufferSize;
  BOOLEAN       Unreliable;
} TDI_CONNECTION_INFO, *PTDI_CONNECTION_INFO;

Members

  • State
    Specifies the current state of the connection on the network.

  • Event
    Specifies the type of event the TDI driver most recently indicated to the client. The value is expressed as a TDI_EVENT_XXX code.

  • TransmittedTsdus
    Specifies the number of TSDUs transmitted on the connection endpoint.

  • ReceivedTsdus
    Specifies the number of TSDUs received on the connection endpoint.

  • TransmissionErrors
    Specifies the number of TSDUs that have had an error during transmission on the connection endpoint.

  • ReceiveErrors
    Specifies the number of TSDUs that have had an error during reception on the connection endpoint.

  • Throughput
    Specifies the estimated throughput on the connection, expressed in bytes per second, for sends and receives. Zero indicates that the driver cannot calculate the throughput.

  • Delay
    Specifies the estimated delay on the connection, expressed as a negative value. Delay, which is essentially constant regardless of packet size, affects the transmission time of each TSDU sent to the remote node.

  • SendBufferSize
    If the transport buffers sends internally, specifies the size in bytes of its send buffer. Otherwise, this member is zero.

  • ReceiveBufferSize
    If the transport buffers receives internally, specifies the size in bytes of its receive buffer. Otherwise, this member is zero.

  • Unreliable
    Specifies TRUE if the transport determines that the connection has become unreliable. The transport is likely to send a disconnection event to its client if this member is TRUE, and sends or receives on this connection are likely to fail.

Remarks

A kernel-mode client that has opened a file object representing a connection with ZwCreateFile can make a query to determine the current state of its local connection. Such a client sets up an IRP with TdiBuildQueryInformation, passing in the QType TDI_QUERY_CONNECTION_INFO, and submits the IRP to the underlying transport to get this information.

TDI_CONNECTION_INFO defines the format in which the transport returns the requested information for such a query.

Until a client has established an endpoint-to-endpoint connection with a remote-node peer, only a subset of this information is potentially useful to the client, such as the SendBufferSize and ReceiveBufferSize of an underlying transport that supports internal buffering. A TDI transport can simply return its default or initialization values for members that are not yet relevant or even fail the query-information request if an endpoint-to-endpoint connection is not yet established.

Consequently, kernel-mode clients usually submit this request to their transports after making an endpoint-to-endpoint connection with a remote-node peer. For example, the client can estimate the transmission time for sends over the network using the Delay and Throughput values returned for this query, assuming the underlying transport does not return a zero for either. The estimated time to transmit a TSDU of size n bytes can be calculated as SendTime = Delay+ ( n * Throughput).

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

Tdi.h (include Tdi.h or TdiKrnl.h)

See also

TdiBuildQueryInformation

TdiDispatchInternalDeviceControl

TDI_QUERY_INFORMATION

 

 

Send comments about this topic to Microsoft