26.9 Setting and Querying Information
A TDI client must be able to query or set driver information, including connection status information, broadcast address, driver statistics, and local and remote network card status. If the kernel-mode client wants to query or set information concerning an address or a connection endpoint, it issues TDI_QUERY_INFORMATION for a query operation, or TDI_SET_INFORMATION for a set.. These messages are usually packaged into IRPs using TdiBuildQueryInformation or TdiBuildSetInformation, if applicable. Then, they are submitted to the driver for processing by an appropriate internal function.
Figure 26.8 Setting and Querying Information
If a client needs to query or set information that does not specifically concern an address or a connection endpoint, it must open a control channel to the TDI driver before submitting a request. For example, a client querying information for braodcast address for connectionless data transmission must use a control channel.
To open a control channel, a user-mode client calls CreateFile with an open control channel object request (no message). The I/O Manager packages the request in an IRP and delivers the IRP to TdiDispatchCreate, which forwards the client request to the internal transport driver function to open a control channel object. When the query or set information operation is complete, the client must close the control channel. The I/O Manager submits an IRP passing the close control channel object request to the driver through TdiDispatchCreate or TdiDispatchCleanup.