Sends a data unit to another transport user.
Transport Layer Interface Library (libtli.a)
#include <tiuser.h>
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:
struct netbuf addr; struct netbuf opt; struct netbuf udata; The elements are defined as follows: If the len field of the udata field is 0, no data unit is passed to the transport provider; the t_sndudata subroutine does not send zero-length data units. 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:
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.