HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)

t
t_snd(3) t_snd(3)
Thread-Safeness
The t_snd() function is safe to be called by multithreaded applications, and it is thread-safe for both
POSIX Threads and DCE User Threads. It has a cancellation point. It is neither async-cancel safe nor
async-signal safe. Finally, it is not fork-safe.
Caveats
It is important to remember that 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 ETSDU size may not be discovered by XTI. In this
case, an implementation-dependent error will result (generated by the transport provider) perhaps on a
subsequent XTI call. This error may take the form of a connection abort, [TSYSERR], [TBADDATA], or a
[TPROTO].
If multiple sends which exceed the maximum TSDU or ETSDU size are detected by XTI,
t_snd() fails
with [TBADDATA].
RETURN VALUE
On successful completion,
t_snd() returns the number of bytes accepted by the transport provider. Oth-
erwise, 1 is returned on failure and
t_errno is set to indicate the error.
ERRORS
On failure,
t_errno is set to one of the following:
[TBADF] The specified identifier does not refer to a transport endpoint.
[TBADDATA] Illegal amount of data:
A single send was attempted specifying a TSDU (ETSDU) or fragment TSDU
(ETSDU) greater than that specified by the current values of the TSDU or ETSDU
fields in the info argument.
A send of zero byte TSDU (ETSDU) or zero byte fragment of TSDU (ETSDU) is not
supported by the provider.
Multiple sends were attempted resulting in a TSDU (ETSDU) larger than that
specified by the current value of the TSDU or ETSDU fields in the info argument.
The ability of XTI to catch such an error case is implementation-dependent.
[TBADFLAG] An invalid flag was specified.
[TFLOW]
O_NONBLOCK was set, but the flow control mechanism prevented the transport pro-
vider from accepting all or part of the data at this time.
[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] The function was issued in the wrong sequence on the endpoint referenced by fd.
[TSYSERR] A system error has occurred during execution of this function.
[TPROTO] (XTI only) This error indicates that a communication problem has been detected
between XTI and the transport provider for which there is no other suitable XTI
(
t_errno).
SEE ALSO
t_getinfo(3), t_open(3), t_rcv(3).
STANDARDS CONFORMANCE
t_snd(): SVID2, XPG3, XPG4
Section 31088 Hewlett-Packard Company 2 HP-UX 11i Version 2: August 2003