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

  man pages->IRIX man pages -> t_sndudata (3n)              
Title
Content
Arch
Section
 

Contents


t_sndudata(3N)							t_sndudata(3N)


NAME    [Toc]    [Back]

     t_sndudata	- send a data unit

SYNOPSIS    [Toc]    [Back]

     #ifdef _XOPEN_SOURCE
     #include <xti.h>
     #else
     #include <tiuser.h>
     #endif

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

DESCRIPTION    [Toc]    [Back]

     This function is used in connectionless mode to send a data unit to
     another transport user.  fd identifies the	local transport	endpoint
     through which data	will be	sent, and unitdata points to a t_unitdata
     structure containing the following	members:

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

     netbuf is described in intro(3N).	In unitdata, addr specifies the
     protocol address of the destination user, opt identifies protocolspecific
 options that the user wants associated with this request,	and
     udata specifies the user data to be sent.	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.

     If	the len	field of udata is zero,	and the	sending	of zero	bytes is not
     supported by the underlying transport provider, t_sndudata	will return -1
     with t_errno set to TBADDATA.

     By	default, t_sndudata operates in	synchronous mode and may wait if flow
     control restrictions prevent the data from	being accepted by the local
     transport provider	at the time the	call is	made.  However,	if O_NDELAY or
     O_NONBLOCK	is set (via t_open or fcntl), t_sndudata will execute in
     asynchronous mode and will	fail under such	conditions.

     If	t_sndudata is issued from an invalid state, or 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, the provider will generate an
     EPROTO protocol error.  (See TSYSERR below.)  If the state	is invalid,
     this error	may not	occur until a subsequent reference is made to the
     transport endpoint.

     This function resides within both the X/Open compliant libxnet and	the
     SVR4 compliant libnsl Network Services libraries.	Network	Services
     applications which	require	X/Open compliance must link-load with -lxnet.
     Network Services applications which require SVR4 compliance must linkload
 with -lnsl.



									Page 1






t_sndudata(3N)							t_sndudata(3N)



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

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

     TFLOW	       O_NDELAY	or O_NONBLOCK was set, but the flow control
		       mechanism prevented the transport provider from
		       accepting data at this time.

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

     TOUTSTATE	       If _XOPEN_SOURCE	is defined and t_sndudata() is issued
		       in the wrong sequence on	the transport endpoint
		       referenced by fd, the TOUTSTATE error value is returned
		       within the variable t_errno.

     TSYSERR	       A system	error has occurred during execution of this
		       function.

     TBADDATA	       There are multiple conditions which could cause this
		       t_errno to be generated.	 One condition is:  nbytes is
		       zero and	sending	zero bytes is not supported by the
		       transport provider.  Another condition is: if
		       _XOPEN_SOURCE is	defined	and a single send was
		       attempted specifying a TSDU greater than	that specified
		       by the current values of	the TSDU field in the info
		       argument.

SEE ALSO    [Toc]    [Back]

      
      
     intro(3N),	fcntl(2), t_alloc(3N), t_open(3N), t_rcvudata(3N),
     t_rcvuderr(3N)

DIAGNOSTICS    [Toc]    [Back]

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


									PPPPaaaaggggeeee 2222
[ 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