t_getstate(3)t_getstate(3)NAMEt_getstate() - get the current state
The function returns the current state of the provider as seen by the
application associated with the transport endpoint specified by fd.
is not fork-safe.
State is returned upon successful completion. Otherwise, a value of −1
it returned and is set to indicate the error. The current state is one
of the following:
T_OUTCON outgoing connection pending
T_INCON incoming connection pending
T_DATAXFER data transfer
T_OUTREL outgoing orderly release (waiting for an orderly
T_INREL incoming orderly release (waiting for an orderly
If the provider is undergoing a state transition when is called, the
function will fail.
On failure, is set to the following:
[TBADF] The specified identifier does not refer to a transport
[TSTATECHNG] The transport provider is undergoing a transient state
[TSYSERR] A system error has occurred during execution of this
[TPROTO] (XTI only) This error indicates that a communication
problem has been detected between XTI and the trans‐
port provider for which there is no suitable XTI (
SEE ALSOt_open(3), thread_safety(5).