Man page of t_snd
Section: C Library Functions (3)
Return to Main Contents
t_snd - Sends normal data or expedited data over a connection
XTI Library (libxti.a)
int flags) ;
Interfaces documented on this reference page conform to industry
standards as follows:
Refer to the standards(5) reference page for more information
about industry standards and associated tags.
The following table summarizes the relevance of input and output
parameters before and after t_snd() is called:
Notes to Table:
|Parameters||Before Call||After Call|
y This is a meaningful parameter.
n This is not a meaningful parameter.
(y) The content of the object pointed to by y is meaningful.
a file descriptor returned by the
identifies the local transport endpoint where an active connection exists.
Points to the data buffer from which data is to be sent.
Specifies the length in bytes of the send data buffer
contents pointed to by the
Points to an integer whose bits specify certain optional information.
Corresponding values and symbolic names for these flag bits are
defined in the
include file. Flags specified by this
- Symbolic Name
When set, this bit notifies the transport provider that sent data is a
fragment of a Transport Service Data Unit (TSDU) or Expedited Transport Service
Data Unit (ETSDU), and that more data will be sent on the same TSDU or
ETSDU via the
The rest of the TSDU or
ETSDU can be sent
time the T_MORE flag is set, another
call follows so
that additional parts of the TSDUs or ETSDUs can be sent. When the
final piece is
sent, this flag bit is set to a value of 0 (zero). When the transport
provider does not support TSDU or ETSDU data exchanges (refer to the
functions) the state of this flag bit is meaningless.
Sending a zero-length fragment of a TSDU or ETSDU is only permitted where this
is used to indicate the end of a TSDU or ETSDU, that is, when the T_MORE flag
is not set. Some transport providers also forbid zero-length TSDUs and ETSDUs.
When set, this bit notifies the transport provider that expedited
data is sent. When the value of ETSDU data exceeds the value specified
parameter, this flag bit and the T_MORE flag bit should be
prior to the initial
calls used to send pieces of ETSDU must have both these flag bits set.
When the final ETSDU is sent, the T_MORE flag bit is set to a
value of 0 (zero).
The t_snd() function can be called only in the T_DATAXFER and
T_INREL transport provider states.
t_snd() function is an XTI connection-oriented service function
that is used to
send normal or expedited data. The transport endpoint through which
normal Transport Service Data Unit (TSDU) data or special
Expedited TSDU (ETSDU) data is sent is specified by a file
previously returned by the
The size of each TSDU or ETSDU must not exceed the size limits
specified by info->tsdu
returned by the
Failure to comply with specified size constraints results in return of
a [TSYSERR] protocol error. By
function executes in the synchronous
the synchronous operating mode
waits for data to be
accepted by the transport provider, before returning control to the
calling transport user.
When the transport endpoint specified by the file
descriptor has been opened with the O_NONBLOCK flag set in the
in asynchronous mode. When data cannot be immediately
accepted because flow control restrictions apply, control is immediately
returned to the caller.
function executes successfully, the number of
by the transport provider is returned. It is possible that only
part of the data may be accepted by a transport provider. When only
partial data is accepted, the returned value is less than the
number of bytes sent. If the
parameter is specified as
0 (zero), and the underlying transport service does not support the
sending of 0 octets,
is set to [TBADDATA] and -1
In asynchronous mode, when the number of bytes accepted by the
transport provider is less than the number of bytes sent, the
transport provider may be blocked because of flow-control restrictions.
The transport provider treats all users of a transport endpoint as a single user.
Therefore, if several processes issue concurrent t_snd() calls, then the
different data may be intermixed.
Multiple sends which exceed the maximum TSDU or ERSDU size may not be discovered by
XTI. In this case, an implementation-dependent error will result, which may take
the form of a connection abort, or a [TSYSERR], [TBADDATA], or a [TPROTO] error.
If XTI detects multiple sends that exceed the maximum TSDU or ETSDU size,
t_snd() fails with the error [TBADDATA].
successful completion, the
function returns the
number of bytes
of data accepted by the transport provider. Otherwise,
-1 is returned and
is set to indicate the
t_snd(|) function fails,
may be set to one of
the following values:
does not refer to a valid transport endpoint.
Illegal amount of data:
A single send was attempted specifying a TSDU or ETSDU, or a fragment
TSDU or ETSDU, greater than that specified by the current values of the
TSDU or ETSDU fields in the info argument.
A send of a zero-byte TSDU or ETSDU, or a zero-byte fragment of a TSDU or ETSDU,
is not supported by the provider.
Multiple sends were attempted, which resulted in a TSDU or ETSDU larger than
that specified by the current values of the TSDU or ETSDU fields in the
info argument. The ability to detect this error is implementation dependent.
value was specified.
Asynchronous mode is indicated because O_NONBLOCK was set, but no data
can currently be accepted by the transport provider because of
An asynchronous event occurred on this transport endpoint.
function was issued in the wrong sequence on the
transport endpoint referenced by the
system error occurred during execution of the
error may not cause
to fail until a subsequent
access of the transport endpoint is made.
This function is not supported by the underlying transport provider.
This error indicates that a communication problem has been detected
between XTI and the transport provider for which there is no other
- VALID STATES
- RETURN VALUES
- RELATED INFORMATION
This document was created by
using the manual pages.
Time: 02:41:26 GMT, October 02, 2010