Network Interface Guide

Datagram Errors

If the transport provider cannot process a datagram sent by t_sndudata(3NSL), it returns a unit data error event, T_UDERR, to the user. This event includes the destination address and options of the datagram, and a protocol-specific error value that identifies the error. Datagram errors are protocol specific.

Note -

A unit data error event does not always indicate success or failure in delivering the datagram to the specified destination. Remember, connectionless service does not guarantee reliable delivery of data.

The transaction server is notified of an error when it tries to receive another datagram. In this case, t_rcvudata(3NSL) fails, setting t_errno to TLOOK. If TLOOK is set, the only possible event is T_UDERR, so the server calls t_rcvudata(3NSL) to retrieve the event. The second argument of t_rcvuderr(3NSL) is the t_uderr structure that was allocated earlier. This structure is filled in by t_rcvuderr(3NSL) and has the following format:

struct t_uderr {
 	struct netbuf addr;
 	struct netbuf opt;
 	t_scalar_t error;

where addr and opt identify the destination address and protocol options specified in the bad datagram, and error is a protocol-specific error code. The transaction server prints the error code, then continues.