t_unbind() — Disable a transport endpoint
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <xti.h>
int t_unbind(int fd);
General description
Disables the transport endpoint specified by fd which was previously bound by t_bind() . On completion of this call, no further data or events destined for this transport endpoint will be accepted by the transport provider. An endpoint which is disabled by using t_unbind() can be enabled by a subsequent call to t_bind() .
Due to implementation-imposed restrictions, t_unbind does not affect descriptors in processes other than the caller which were derived from fd by normal descriptor inheritance. Processes cooperating on an endpoint in this way must explicitly provide their own synchronization for endpoint takedown.
Valid states: T_IDLE
Returned value
If successful, t_unbind() returns 0.
If unsuccessful, t_unbind() returns -1 and sets errno to one of
the following values:
- Error Code
- Description
- TBADF
- The specified file descriptor does not refer to a transport endpoint.
- TLOOK
- An asynchronous event has occurred on this transport endpoint.
- TOUTSTATE
- The function was issued in the wrong sequence.
- TPROTO
- 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).
- TSYSERR
- A system error has occurred during execution of this function.