Get the current state.
X/Open Transport Interface Library (libxti.a)
#include <xti.h>int t_getstate (fd)
int fd;The t_getstate subroutine returns the current state of the provider associated with the transport endpoint specified by the fd parameter.
| Item | Description | 
|---|---|
| fd | Specifies the transport endpoint. | 
ALL - apart from T_UNINIT.
| Item | Description | 
|---|---|
| 0 | Successful completion. | 
| -1 | t_errno is set to indicate an error. The current state
is one of the following: 
 | 
If the provider is undergoing a state transition when the t_getstate subroutine is called, the subroutine will fail.
On failure, t_errno is set to one of the following:
| Value | Description | 
|---|---|
| TBADF | The specified file descriptor does not refer to a transport endpoint. | 
| TSTATECHNG | The transport provider is undergoing a transient state change. | 
| TSYSERR | A system error has occurred during execution of this subroutine. | 
| TPROTO | This error indicates that a communication problem has been detected between the X/Open Transport Interface and the transport provider for which there is no other suitable X/Open Transport Interface (t_errno). |