When a kernel-mode client makes a TDI_CONNECT request, it asks the underlying TDI transport driver to offer a connection on a particular local-node connection endpoint to a remote-node peer.
The transport calls IoGetCurrentIrpStackLocation with the given Irp to get a pointer to its own I/O stack location in the IRP, shown in the following list as IrpSp. IRP members relevant to this request include the following:
STATUS_SUCCESS
STATUS_PENDING
STATUS_BAD_NETWORK_PATH
STATUS_INVALID_CONNECTION
STATUS_REMOTE_NOT_LISTENING
STATUS_INSUFFICIENT_RESOURCES
STATUS_REQUEST_TIMED_OUT
The RequestFlags member is irrelevant for connect requests. The
transport uses the client-supplied information, such as the remote-node
address to which the connection should be offered, in the buffer at RequestConnectionInformation.
The transport returns information to the client-supplied buffer at ReturnConnectionInformation.
Each of these buffers is formatted as a TDI_CONNECTION_INFORMATION structure.
For a local-node client to establish an endpoint-to-endpoint connection with a remote-node peer, it must associate an idle local connection endpoint with an open transport address before making a TDI_CONNECT request. If the specified local endpoint is active or nonexistent, the transport fails the connect request.
For a TDI_CONNECT request to succeed, the remote-node client must have an open TDI_LISTEN request or have registered its ClientEventConnect handler to receive connection offers indicated by the underlying transport on the remote node.
TdiBuildConnect is the macro a client uses to fill in the IRP.
ClientEventConnect, TdiBuildConnect, TDI_CONNECTION_INFORMATION, TdiDispatchInternalDeviceControl, TDI_LISTEN, TDI_REQUEST_KERNEL