TDI_RECEIVE_DATAGRAM

TDI_RECEIVE_DATAGRAM is a request message a client issues to indicate a receive datagram request for a Transport Service Data Unit (TSDU) called a “datagram.”

Note TdiBuildReceiveDatagram is the macro a client uses to fill in the IRP.

Because a datagram is not associated with an established connection, the TDI driver passes the transport address of the remote node client to the receiving client along with the datagram. Note that a client can also receive datagrams by receiving events from the driver at a registered ClientEventReceiveDatagram event handler.

Because TDI does not fragment datagrams, the client makes one receive datagram request to receive one datagram. The internal driver receive datagram function finishes normally when the TDI driver receives a datagram with a destination address matching the transport address of the receiving client, and a source address matching the transport address of the remote node client sending the datagram. If the datagram is too large for the client-supplied buffer, the internal driver receive datagram function truncates it and discards the remaining data.

Along with the request message, the TDI client must provide input and output buffers for the IRP, as well as a status block structure the driver uses to write information about the request. These items are described below. For more information about the members of the IRP related to a receive datagram request, see TdiBuildReceiveDatagram.

Input

TDI_CONNECTION_INFORMATION structure

Output

TDI_CONNECTION_INFORMATION structure

I/O Status Block

The driver fills in the Status member of the IRP with one of the following TDI status codes:

STATUS_INSUFFICIENT_RESOURCES
STATUS_INVALID_CONNECTION
STATUS_PENDING

For more information about status codes, see Part II, Chapter 10.

The Information member of the IRP contains the number of data bytes the internal driver receive datagram function writes for the client.

Comments

A NetBIOS TDI client can receive a broadcast datagram by opening a broadcast transport address object that has a driver-specific format and can be queried through a client query information request. However, a client cannot send a datagram from a broadcast address. Neither can it establish a connection that references the broadcast address object as the local address object.

Windows NT currently specifies the reception of broadcast datagrams only for NetBIOS TDI clients. For other clients, in some cases a client can receive a broadcast datagram the same way it receives a nonbroadcast datagram.

See Also

ClientEventReceiveDatagram, TDI_CONNECTION_INFORMATION, TdiBuildReceiveDatagram