Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_rcvudata(3N) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3)

t_rcvuderr(3N)

t_sndudata(3N)



TRCVUDATA(3N-SVR4) RISC/os Reference Manual  TRCVUDATA(3N-SVR4)



NAME
     t_rcvudata - receive a data unit

SYNOPSIS
     #include <tiuser.h>

     int trcvudata (int fd, struct tunitdata *unitdata, int
     *flags);

DESCRIPTION
     This function is used in connectionless mode to receive a
     data unit from another transport user.  fd identifies the
     local transport endpoint through which data will be
     received, unitdata holds information associated with the
     received data unit, and flags is set on return to indicate
     that the complete data unit was not received.  unitdata
     points to a t_unitdata structure containing the following
     members:

          struct netbuf addr;
          struct netbuf opt;
          struct netbuf udata;

     The maxlen [see netbuf in intro(3)] field of addr, opt, and
     udata must be set before issuing this function to indicate
     the maximum size of the buffer for each.

     On return from this call, addr specifies the protocol
     address of the sending user, opt identifies protocol-
     specific options that were associated with this data unit,
     and udata specifies the user data that was received.

     By default, trcvudata operates in synchronous mode and will
     wait for a data unit to arrive if none is currently avail-
     able.  However, if O_NDELAY or O_NONBLOCK is set (via t_open
     or fcntl), trcvudata will execute in asynchronous mode and
     will fail if no data units are available.

     If the buffer defined in the udata field of unitdata is not
     large enough to hold the current data unit, the buffer will
     be filled and T_MORE will be set in flags on return to indi-
     cate that another trcvudata should be issued to retrieve
     the rest of the data unit.  Subsequent trcvudata call(s)
     will return zero for the length of the address and options
     until the full data unit has been received.

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

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

     [TNODATA]           O_NDELAY or O_NONBLOCK was set, but no



                        Printed 11/19/92                   Page 1





TRCVUDATA(3N-SVR4) RISC/os Reference Manual  TRCVUDATA(3N-SVR4)



                         data units are currently available from
                         the transport provider.

     [TBUFOVFLW]         The number of bytes allocated for the
                         incoming protocol address or options is
                         not sufficient to store the information.
                         The unit data information to be returned
                         in unitdata will be discarded.

     [TLOOK]             An asynchronous event has occurred on
                         this transport endpoint and requires
                         immediate attention.

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

     [TSYSERR]           A system error has occurred during exe-
                         cution of this function.

SEE ALSO
     intro(3), t_rcvuderr(3N), t_sndudata(3N).

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






























 Page 2                 Printed 11/19/92



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026