'\"macro stdmacro
.if n .pH g3n.t_rcvuderr @(#)t_rcvuderr	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} t_rcvuderr 3N "Networking Support Utilities" "\&"
.if \nX=1 .ds x} t_rcvuderr 3N "Networking Support Utilities"
.if \nX=2 .ds x} t_rcvuderr 3N "" "\&"
.if \nX=3 .ds x} t_rcvuderr "" "" "\&"
.if \nX=4 .ds x} t_rcvuderr "NS_LIB" "EXTENSION" " "
.TH \*(x}
.SH NAME
\f4t_rcvuderr\f1 \- receive a unit data error indication
.SH SYNOPSIS
\f4#include <tiuser.h>\f1
.PP
\f4int t_rcvuderr (int fd, struct t_uderr \(**uderr);\f1
.SH DESCRIPTION
This function is used in connectionless mode to receive information
concerning an error on a previously sent data unit, and
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.
\f4fd\fP
identifies the local transport endpoint through which the error
report will be received, and
\f4uderr\fP
points to a \f4t_uderr\f1 structure containing the following members:
.PP
.RS
.ft4
struct netbuf addr;
.br
struct netbuf opt;
.br
long error;
.ft1
.RE
.PP
\f4netbuf\f1 is described in \f4intro\fP(3).
The \f4maxlen\fP [see \f4netbuf\f1 in \f4intro\fP(3)] field of
\f4addr\fP and \f4opt\fP
must be set before issuing this function to indicate the maximum
size of the buffer for each.
.PP
On return from this call, the
\f4addr\fP
structure specifies the destination protocol address of the erroneous data
unit, the
\f4opt\fP
structure identifies protocol-specific options that were
associated with the data unit, and \f4error\fP
specifies a protocol-dependent error code.
.PP
If the user does not care to identify the data unit
that produced an error,
\f4uderr\fP
may be set to \s-1NULL\s+1 and 
\f4t_rcvuderr\fP
will simply clear the error indication without reporting any
information to the user.
.P
On failure, \f4t_errno\f1 may be set to one of the following:
.TP 18
\f4[TBADF]\fP
The specified file descriptor does not refer to a transport endpoint.
.TP
\f4[TNOUDERR]\fP
No unit data error indication currently exists on the specified
transport endpoint.
.TP
\f4[TBUFOVFLW]\fP
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 \f4uderr\fP
will be discarded.
.TP
\f4[TNOTSUPPORT]\fP
This function is not supported by the underlying transport
provider.
.TP
\f4[TSYSERR]\fP
A system error has occurred during execution of this function.
.br
.ne 5
.SH SEE ALSO
\f4intro\fP(3), \f4t_rcvudata\fP(3N), \f4t_sndudata\fP(3N).
.sp .2
\f2UNIX System V Network Programmer's Guide\f1.
.SH DIAGNOSTICS
\f4t_rcvuderr\fP returns 0 on successful completion and \-1 on
failure and \f4t_errno\f1 is set to indicate the error.
.Ee
