[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    t_rcvuderr(3N) manual page Table of Contents

Name

t_rcvuderr - receive a unit data error indication

Synopsis

cc [ flag ... ] file ... -lnsl [ library ... ]

#include <tiuser.h>

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

MT-Level

MT-Safe

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. fildes identifies the local transport endpoint through which the error report will be 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 t_connect(3N) . The maxlen (see netbuf in t_connect(3N) ) 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() will simply clear the error indication without reporting any information to the user.

Return Values

t_rcvuderr() returns 0 on successful completion. On failure t_rcvuderr() returns -1, t_errno is set to indicate the error, and possibly errno is set.

Errors

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

TBADF
The specified file descriptor does not refer to a transport endpoint.
TBUFOVFLW
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 will be discarded.
TNOTSUPPORT
This function is not supported by the underlying transport provider.
TNOUDERR
No unit data error indication currently exists on the specified transport endpoint.
TSYSERR
A system error has occurred during execution of this function, errno will be set to the specific error.

See Also

t_connect(3N) , t_rcvudata(3N) , t_sndudata(3N)

Notes

This interface is safe in multithreaded applications.


Table of Contents