Gets the current state.
Transport Layer Interface Library (libtli.a)
#include <tiuser.h>
int t_getstate(fd)
int fd;
The t_getstate subroutine returns the current state of the provider associated with the transport end point specified by the fd parameter.
Item | Description |
---|---|
fd | Specifies the transport end point. |
On successful completion, the t_getstate subroutine returns the current state. Otherwise, it returns a value of -1, and the t_errno variable is set to indicate the error.
If the provider is undergoing a state transition when the t_getstate subroutine is called, the function will fail. The current state is one of the following.
Value | Description |
---|---|
T_DATAXFER | Data transfer. |
T_IDLE | Idle. |
T_INCON | Incoming connection pending. |
T_INREL | Incoming orderly release (waiting to send an orderly release indication). |
T_OUTCON | Outgoing connection pending. |
T_OUTREL | Outgoing orderly release (waiting for an orderly release indication). |
T_UNBND | Unbound. |
If unsuccessful, the t_errno variable is set to one of the following:
Value | Description |
---|---|
TBADF | The specified file descriptor does not refer to a transport end point. |
TSTATECHNG | The transport provider is undergoing a state change. |
TSYSERR | A system error has occurred during execution of this function. |