Sends a data unit to another transport user.
Transport Layer Interface Library (libtli.a)
int t_sndudata(fd, unitdata) int fd; struct t_unitdata *unitdata;
The t_sndudata subroutine is used in connectionless mode to send a data unit to another transport user.
By default, the t_sndudata subroutine 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 the O_NDELAY or O_NONBLOCK flag is set (using the t_open subroutine or the fcntl command), the t_sndudata subroutine runs in asynchronous mode and fails under such conditions.
|fd||Identifies the local transport endpoint through which data is sent.|
|unitdata|| Points to a t_unitdata structure containing the following elements:
If the t_sndudata subroutine is issued from an invalid state, or if the amount of data specified in the udata field exceeds the TSDU size as returned by the t_open or t_getinfo subroutine, the provider generates an EPROTO protocol error.
On successful completion, the t_sndudata subroutine returns a value of 0. Otherwise, it returns a value of -1 and sets the t_errno variable to indicate the error.
If unsuccessful, the t_errno variable is set to one of the following:
|TBADDATA||The amount of user data specified was not within the bounds allowed by the transport provider.|
|TBADF||The specified file descriptor does not refer to a transport endpoint.|
|TFLOW||The O_NDELAY or O_NONBLOCK flag was set, but the flow-control mechanism prevented the transport provider from accepting data at this time.|
|TLOOK||An asynchronous event has occurred on this transport end point and requires immediate attention.|
|TNOTSUPPORT||This subroutine is not supported by the underlying transport provider.|
|TOUTSTATE||This subroutine was issued in the wrong sequence.|
|TSYSERR||A system error has occurred during execution of this subroutine.|
This subroutine is part of Base Operating System (BOS) Runtime.
The t_alloc subroutine, t_open subroutine, t_rcvudata subroutine, t_rcvuderr subroutine.
List of Streams Programming References and STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.