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

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

Contents


t_rcvudata(3N)							t_rcvudata(3N)


NAME    [Toc]    [Back]

     t_rcvudata	- receive a data unit

SYNOPSIS    [Toc]    [Back]

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

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

DESCRIPTION    [Toc]    [Back]

     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(3N)] 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, t_rcvudata operates in	synchronous mode and will wait for a
     data unit to arrive if none is currently available.  However, if O_NDELAY
     or	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.

     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 zero for the length of	the address and	options	until
     the full data unit	has been received.

     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_rcvudata(3N)							t_rcvudata(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.

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

     TBUFOVFLW		 There are two different conditions in which TBUFOVFLW
			 will be returned.  If _XOPEN_SOURCE is	defined	and
			 the number of bytes allocated for incoming data is
			 greater than zero and is not sufficient to store the
			 data.	If _XOPEN_SOURCE is not	defined	and the	number
			 of bytes allocated for	incoming data is not
			 sufficient to store the data.	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.

     TOUTSTATE		 If _XOPEN_SOURCE is defined and t_rcvudata() 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.

SEE ALSO    [Toc]    [Back]

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

DIAGNOSTICS    [Toc]    [Back]

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


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
t_rcvuderr IRIX receive a unit data error indication
t_rcvuderr HP-UX receive a unit data error indication
t_rcvuderr Tru64 Receive a unit data error indication
t_rcvudata HP-UX receive a data unit from remote transport provider user
t_rcv Tru64 Receive normal data or expedited data on a connection
t_sndudata Tru64 Send a data unit
t_sndudata HP-UX send a data unit
t_sndudata IRIX send a data unit
t_sndv Tru64 Receive data or expedited data sent over a connection
t_rcv HP-UX receive data or expedited data sent over a connection
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service