t_getstate - get the current state
#include <xti.h> int t_getstate( int fd)
Parameters Before call After call fd x /
The t_getstate() function returns the current state of the provider associated with the transport endpoint specified by fd.
ALL - apart from T_UNINIT
On failure, t_errno is set to one of the following:
- The specified file descriptor does not refer to a transport endpoint.
- This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI error (t_errno).
- The transport provider is undergoing a transient state change.
- A system error has occurred during execution of this function.
State is returned upon successful completion. Otherwise, a value of -1 is returned and t_errno is set to indicate an error. The current state is one of the following:
- Outgoing connection pending.
- Incoming connection pending.
- Data transfer.
- Outgoing direction orderly release sent.
- Incoming direction orderly release received.
If the provider is undergoing a state transition when t_getstate() is called, the function will fail.