t_rcvuderr(3xti)


t_rcvuderr -- receive a unit data error indication

Synopsis

cc [options] file -lnsl
#include <xti.h>

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

Description

This function is a TLI/XTI data transfer routine used in connectionless mode to receive information concerning an error on a previously sent data unit. t_rcvuderr should be issued only after 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. The local transport endpoint specified by fd receives the report, and on return, uderr contains information about the error.

This function is a service of connectionless mode transport providers and is supported only if the provider returned service type T_CLTS on t_open or t_getinfo.

Parameters


fd
the file descriptor for the transport endpoint through which the error information will be received.

uderr
points to the t_uderr structure associated with the error indication.

Structure definitions

The uderr argument points to a t_uderr structure containing the following members:
   struct netbuf addr;     /* address      */
   struct netbuf opt;      /* options      */
   long error;             /* error code   */
netbuf is described in intro(3xti). The maxlen member 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 will simply clear the error indication without reporting any information to the user.

State transitions

On entry, T_IDLE; unchanged on exit.

Files


/usr/lib/libxti.so
X/Open® Transport Interface Library (shared object)

/usr/lib/libnsl.so
Network Services Library (shared object)

Return values

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

Errors

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

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

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

TBUFOVFLW
The number of bytes (maxlen) allocated for an incoming argument is greater than zero but not sufficient to store the value of that argument. The unit data error information to be returned in uderr will be discarded.

TNOTSUPPORT
This function is not supported by the underlying transport provider.

TSYSERR
A system error has occurred during execution of this function.

TPROTO
A communication problem has been detected with the transport provider and there is no other value of t_errno to describe the error condition.

References

intro(3xti), t_rcvudata(3xti), t_sndudata(3xti)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004