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

  man pages->Tru64 Unix man pages -> t_sndudata (3)              



NAME    [Toc]    [Back]

       t_sndudata - Send a data unit

SYNOPSIS    [Toc]    [Back]

       #include <xti.h>

       int t_sndudata(
               int fd,
               struct t_unitdata *unitdata );

LIBRARY    [Toc]    [Back]

       XTI Library (libxti.a)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       t_sndudata():  XNS5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       The  following table summarizes the relevance of input and
       output parameters before and after t_sndudata() is called:

       Parameters               Before Call   After Call
       fd                       y             n
       unitdata->addr.maxlen    n             n
       unitdata->addr.len       y             n
       unitdata->addr.buf       y(y)          n
       unitdata->opt.maxlen     n             n
       unitdata->opt.len        y             n
       unitdata->opt.buf        o(o)          n
       unitdata->udata.maxlen   n             n
       unitdata->udata.len      y             n
       unitdata->udata.buf      y(y)          n

       Notes  to Table: This is a meaningful parameter.  The content
 of the object pointed to by y is meaningful.  This is
       a  meaningful  but optional parameter.  The content of the
       object pointed to by o is meaningful.  This is not a meaningful
 parameter.  Specifies a file descriptor returned by
       the t_open() function that identifies the  transport  endpoint
  through  which  data  is  sent.   Points  to a type
       t_unitdata structure used to specify  a  data  unit  being
       sent  through  the  transport endpoint specified by the fd
       parameter.  The t_unitdata  structure  has  the  following
       members: References a buffer for protocol address information
 of the remote transport user. The type netbuf  structure
  referenced  by  this  member is defined in the xti.h
       include file and has the following  members:  Specifies  a
       maximum  byte  length  of  the data buffer.  Specifies the
       actual byte length of the  data  written  to  the  buffer.
       Points  to  the  buffer location.  Identifies options that
       the user wants associated with this request.  The user may
       choose not to specify what protocol options are associated
       with the transfer by setting the len field of opt to zero.
       In  this  case,  the  provider  may  use  default options.
       Specifies the user data unit that is  being  sent  to  the
       remote transport user.

              The   unitdata->addr.maxlen,  unitdata->opt.maxlen,
              and unitdata->udata.maxlen parameters are not meaningful
 with the t_sndudata() function.

              If  the  udata.len  parameter  is  specified  as  0
              (zero), and the underlying transport  service  does
              not support the sending of 0 (zero) octets, t_errno
              is set to [TBADDATA] and -1 is returned.

              If the amount of data specified  in  udata  exceeds
              the  TSDU size as returned in the tsdu field of the
              info argument of t_open() or t_getinfo(), a  [TBADDATA]
 error is generated. If t_sndudata() is called
              before  the  destination  user  has  activated  its
              transport endpoint, the data unit may be discarded.
              (See t_bind().)

DESCRIPTION    [Toc]    [Back]

       The t_sndudata() function is an XTI connectionless service
       function  that  is  used  to  send a data unit to a remote
       transport user. By default, t_sndudata() executes  in  the
       synchronous  operating  mode.  The  t_sndudata()  function
       waits for the transport provider to accept the data before
       returning control to the calling transport user.

       When  the transport endpoint specified by the fd parameter
       has been previously opened with the O_NONBLOCK option  set
       in  the  t_open()  or  fcntl() functions, the t_sndudata()
       function executes in asynchronous  mode.  In  asynchronous
       mode,  when a data unit is not accepted control is immediately
 returned to the caller. The t_look() function or the
       EM  interface  can  be used to determine when flow control
       restrictions have been lifted.

ERRORS    [Toc]    [Back]

       If the t_sndudata() function fails, t_errno may be set  to
       one  of the following values: Illegal amount of data. Zero
       octets is not supported.  File  descriptor  fd  is  not  a
       valid  transport endpoint.  Asynchronous mode is indicated
       because O_NONBLOCK was set,  but  the  transport  provider
       cannot  accept  the  data because of flow-control restrictions.
  An asynchronous event has occurred on this  transport
  endpoint  and  requires  immediate  attention.  This
       function is not  supported  by  the  underlying  transport
       provider.   The  t_sndudata()  function  was issued in the
       wrong sequence on the transport endpoint referenced by the
       fd parameter.  A system error occurred during execution of
       this function. A protocol error may not cause the  t_sndudata()
 function to fail until a subsequent call is made to
       access the transport endpoint specified by the fd  parameter.
   The  specified protocol address was in an incorrect
       format or contained illegal  information.   The  specified
       options  were  in an incorrect format or contained illegal
       information.  This error indicates  that  a  communication
       problem  has  been  detected between XTI and the transport
       provider  for   which   there   is   no   other   suitable

VALID STATES    [Toc]    [Back]

       The t_sndudata() function can be called only in the T_IDLE
       transport provider state.

RETURN VALUE    [Toc]    [Back]

       Upon  successful  completion,  a  value  of  0  (zero)  is
       returned. Otherwise, a value of -1 is returned and t_errno
       is set to indicate the error.

SEE ALSO    [Toc]    [Back]

       Functions: fcntl(2), t_alloc(3), t_open(3), t_rcvuderr(3),

       Standards: standards(5)

       Network Programmer's Guide

[ Back ]
 Similar pages
Name OS Title
t_sndvudata Tru64 Send a data unit from one or more non-contiguous buffers
t_rcvudata Tru64 Receive a data unit
t_rcvudata IRIX 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_rcvudata HP-UX receive a data unit from remote transport provider user
t_snd Tru64 Send normal data or expedited data over a connection
t_snd IRIX send data or expedited data over a connection
t_snd HP-UX send data or expedited data over a connection
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service