Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_rcvudata(3N) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fcntl(2)

intro(3)

t_getinfo(3N)

t_open(3N)

t_rcvuderr(3N)

t_sndudata(3N)






       t_rcvudata(3N)                                        t_rcvudata(3N)


       NAME
             t_rcvudata - receive a data unit

       SYNOPSIS
             cc [options] file -lnsl
             #include <xti.h>
             int t_rcvudata(int fd, struct t_unitdata *unitdata, int *flags);

          Parameters
             fd        the file descriptor for the transport endpoint
                       through which the data will be received.

             unitdata  points to the t_unitdata structure associated with
                       the received data unit.

             flags     points to a value set on return if the complete data
                       unit was not received.

       DESCRIPTION
             This function is a TLI/XTI data transfer routine used in
             connectionless mode to receive a data unit from another
             transport user.  Data is received through the transport
             endpoint specified by fd.  On return, unitdata contains the
             information associated with the data unit, and flags points to
             a value that indicates whether the complete data unit was
             received.

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

          Structure Definitions
             The unitdata argument points to a t_unitdata structure
             containing the following members:

                         struct netbuf addr;     /* address        */
                         struct netbuf opt;      /* options        */
                         struct netbuf udata;    /* user data      */

             netbuf is described in intro(3).  The maxlen  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


                           Copyright 1994 Novell, Inc.               Page 1













      t_rcvudata(3N)                                        t_rcvudata(3N)


            the user data that was received.

            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  indicate
            that  another t_rcvudata should be issued to retrieve the rest
            of the data unit.  Subsequent t_rcvudata call(s) will return 0
            for  the length of the address and options until the full data
            unit has been received.

         Return Values
            t_rcvudata 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.

            TNODATA   O_NONBLOCK was set, but no data units are currently
                      available from the transport provider.

            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 information to be returned in unitdata
                      will be discarded.

            TLOOK     An asynchronous event has occurred on the transport
                      endpoint specified by fd and requires immediate
                      attention.

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

            TOUTSTATE The function was issued in the wrong sequence on the
                      transport endpoint referenced by fd.

            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.


                          Copyright 1994 Novell, Inc.               Page 2













       t_rcvudata(3N)                                        t_rcvudata(3N)


          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)

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

       REFERENCES
             fcntl(2), intro(3), t_getinfo(3N), t_open(3N), t_rcvuderr(3N),
             t_sndudata(3N)




























                           Copyright 1994 Novell, Inc.               Page 3








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