3.4 Opening a Connection Endpoint
If a local-node client requires connection-oriented communication with the TDI transport driver and its remote-node peer, it must first open a connection endpoint to set up the local-node end of the network connection. Figure 10.3 illustrates the request sequence for a connection-endpoint-open operation.
Figure 3.3 Opening a Connection Endpoint
A client calls ZwCreateFile with a connection context the TDI transport driver will use in all future operations. This connection context is passed in the extended attribute (EA) parameter to ZwCreateFile. The TDI driver’s TdiDispatchCreate forwards the client request to the internal transport driver open-connection-endpoint-object function. This internal driver function opens the connection endpoint in an idle state.
With the connection open, the client must associate the connection endpoint with its address object by issuing an associate-address request using TDI_ASSOCIATE_ADDRESS. The request is packaged in an IRP and submitted to the TDI driver. The client can use TdiBuildAssociateAddress to set up such a request. After the internal driver function associates the connection endpoint with the address object, the client can make any requests except associate-address requests.