*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> t_rcvudata (3)              
Title
Content
Arch
Section
 

Contents


 t_rcvudata(3)                                                 t_rcvudata(3)




 NAME    [Toc]    [Back]
      t_rcvudata() - receive a data unit from remote transport provider user

 SYNOPSIS    [Toc]    [Back]
      #include <xti.h>            /* for X/OPEN Transport Interface - XTI */
      /* or */
      #include <tiuser.h>         /* for Transport Layer Interface - TLI  */

      int t_rcvudata (fd, unitdata, flags);
      inf fd;
      struct t_unitdata *unitdata;
      int *flags;

 DESCRIPTION    [Toc]    [Back]
      The t_rcvudata() function is used in connectionless-mode to receive a
      data unit from a remote transport provider user.  The argument fd
      identifies the local transport endpoint through which data will be
      received. unitdata holds information associated with the received data
      unit. flags is set on return to indicate that the complete data unit
      was not received.  The argument unitdata points to a t_unitdata
      structure containing the following members:

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

      The type netbuf structure is defined in the <xti.h> or <tiuser.h>
      header file.  This structure, which is used to define buffer
      parameters, has the following members:

      unsigned int maxlen           maximum byte length of the data buffer

      unsigned int len              actual byte length of data written to
                                    buffer

      char *buf                     points to buffer location

      The maxlen field of addr, opt and udata must be set before calling
      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, t_rcvudata() executes in the synchronous operating mode.
      The t_rcvudata() function waits for data to arrive at the transport
      endpoint specified by fd before returning control to the transport
      user who called this function.  However, when the transport endpoint,
      specified by the fd parameter, has the O_NONBLOCK option set by
      t_open() or fcntl() function, the t_rcvudata() function executes in



 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 t_rcvudata(3)                                                 t_rcvudata(3)




      asynchronous mode.  In asynchronous mode, when a data unit is
      unavailable, control is immediately returned to the caller.

      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 called to retrieve the rest of the data unit.
      Subsequent calls to t_rcvudata() will return zero for the length of
      the address and options until the full data unit has been received.

    Thread-Safeness    [Toc]    [Back]
      The t_rcvudata() function is safe to be called by multithreaded
      applications, and it is thread-safe for both POSIX Threads and DCE
      User Threads.  It has a cancellation point.  It is neither asynccancel
 safe nor async-signal safe.  Finally, it is not fork-safe.

    Valid States    [Toc]    [Back]
      T_IDLE

 RETURN VALUE    [Toc]    [Back]
      Upon successful completion, a value of 0 is returned.  Otherwise, a
      value of -1 is returned and t_errno is set to indicate the error.

 ERRORS    [Toc]    [Back]
      On failure, t_errno is 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 allocated for the incoming
                          protocol address or protocol options is not
                          sufficient to store the information.  The unit
                          data information normally returned in unitdata is
                          discarded.

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

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

      [TOUTSTATE]         (XTI only) The function was issued in the wrong
                          sequence on the transport endpoint referenced by
                          fd.

      [TSYSERR]           A system error occurred during execution of this
                          function.




 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 t_rcvudata(3)                                                 t_rcvudata(3)




      [TPROTO]            (XTI only) This error indicates that a
                          communication problem has been detected between
                          XTI and the transport provider for which there is
                          no other suitable XTI (t_errno).

 SEE ALSO    [Toc]    [Back]
      fcntl(2), t_alloc(3), t_open(3), t_optmgmt(3), t_rcvuderr(3),
      t_sndudata(3).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      t_rcvudata(): SVID2, XPG3, XPG4


 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
t_rcvudata IRIX receive a data unit
t_rcvudata Tru64 Receive a data unit
t_rcvuderr Tru64 Receive a unit data error indication
t_rcvuderr IRIX receive a unit data error indication
t_rcvuderr HP-UX receive a unit data error indication
t_getstate Tru64 Get the current state of the transport provider
t_rcvreldata Tru64 Receive an orderly release indication or confirmation containing user data
rhosts FreeBSD trusted remote host and user name data base
hosts.equiv FreeBSD trusted remote host and user name data base
dlpi HP-UX data link provider interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service