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;
TDI_CONNECTION_INFO defines the structure of the information returned for a TDI_QUERY_INFORMATION request in which the IrpSp->Parameters.QueryType is set to TDI_QUERY_CONNECTION_INFO.
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).
TdiBuildQueryInformation, TdiDispatchInternalDeviceControl, TDI_QUERY_INFORMATION