When a kernel-mode client makes a TDI_ACCEPT request, it asks the underlying TDI transport driver to accept an incoming connection offer from a remote-node peer and, thereby, to enable network data transfers on the endpoint-to-endpoint connection between that local-node client and its 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_INVALID_CONNECTION
struct _TDI_REQUEST_KERNEL_ACCEPT { PTDI_CONNECTION_INFORMATION RequestConnectionInformation; PTDI_CONNECTION_INFORMATION ReturnConnectionInformation; } TDI_REQUEST_KERNEL_ACCEPT, *PTDI_REQUEST_KERNEL_ACCEPT;
The transport uses the members of this structure as follows:
In normal operation, a client submits an accept request in response to a return from a preceding listen request in which it set the TDI_QUERY_ACCEPT flag. If the client did not set this flag in its TDI_LISTEN request for this connection, the transport should fail this accept request.
The transport can call already registered ClientEvent(Chained)Receive(Expedited) handler(s) with incoming receive(s) from the remote node on this connection before the I/O Manager formally completes its processing of the client's accept IRP.
Most TDI transport drivers have a time-out feature to prevent communication sequences from hanging when a remote node is not responding. Therefore, a TDI client must either accept or reject a connection as soon as possible after completion of its listen request. As a general rule, a transport-determined time-out interval between client notification of an offered connection and the local-node client's connection acceptance or rejection should be less than one second.
TdiBuildAccept is the macro a client uses to fill in this IRP.
ClientEventChainedReceive, ClientEventChainedReceiveExpedited, ClientEventReceive, ClientEventReceiveExpedited, TdiBuildAccept, TDI_CONNECTION_INFORMATION, TdiDispatchInternalDeviceControl, TDI_LISTEN, TDI_RECEIVE