t_rcvuderr -- receive a unit data error indication


TLI syntax

cc . . . -lnsl

#include <sys/tiuser.h>

int t_rcvuderr (fd, uderr) int fd; struct t_uderr *uderr;

XTI syntax

cc . . . -lxti

#include <xti.h>

int t_rcvuderr (fd, uderr) int fd; struct t_uderr *uderr;


The t_rcvuderr function is used in connectionless mode to receive information concerning an error on a previously sent data unit, and should only be issued following a unit data error indication. It informs the transport user that a data unit with a specific destination address and protocol options produced an error. fd identifies the local transport endpoint through which the error report is received, and uderr points to a t_uderr structure containing the following members:
   struct netbuf addr;
   struct netbuf opt;
   long   error;
netbuf is described in netbuf(FP). The maxlen (see netbuf(FP)) field of addr and opt must be set before issuing this function to indicate the maximum size of the buffer for each.

On return from this call, the addr structure specifies the destination protocol address of the erroneous data unit; the opt structure identifies protocol-specific options that were associated with the data unit; and error specifies a protocol-dependent error code.

If the user does not care to identify the data unit that produced an error, uderr may be set to NULL and t_rcvuderr simply clears the error indication without reporting any information to the user.

Return values

The t_rcvuderr function returns 0 on successful completion and -1 on failure, and t_errno is set to indicate the error.


On failure, t_errno may be set to one of the following:

The specified file descriptor does not refer to a transport endpoint.

The number of bytes allocated for the incoming protocol address or options is not sufficient to store the information. The unit data error information to be returned in uderr is discarded.

This function is not supported by the underlying transport provider.

No unit data error indication currently exists on the specified transport endpoint.

A system error occurred during execution of this function. One possibility is an I/O error where not all of the message was received; when this error occurs, errno is set to EIO. Another is that a protocol error occurred; when this error occurs, errno is set to EPROTO.

See also

Intro(NET), netbuf(FP), t_rcvudata(NET), t_sndudata(NET)

Standards conformance

t_rcvuderr is conformant with:

AT&T SVID Issue 3 ;
X/Open CAE Specification, Networking Services, Issue 4, 1994. ;
and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2) .

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003