#include <tiuser.h>
int t_sndudata(fd, unitdata) int fd; struct t_unitdata *unitdata;
t_sndudata() 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 defined in <nettli/tiuser.h> as:
struct t_unitdata { struct netbuf addr; /* address */ struct netbuf opt; /* options */ struct netbuf udata; /* user data */ };
The maxlen, len, and buf members of the netbuf structure are described in t_accept.3n In unitdata, addr specifies the protocol address of the destination user, opt identifies protocol-specific 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 0. In this case, the provider may use default options.
If the len field of udata is 0, no data unit will be passed to the transport provider; t_sndudata() will not send zero-length data units.
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 T_NDELAY is set (using t_open.3n 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 by t_open() or t_getinfo.3n the provider will generate an EPROTO protocol error. See TSYSERR below.
t_sndudata() returns:
[a manual with the abbreviation NETP]
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97