[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    t_getstate(3N) manual page Table of Contents

Name

t_getstate - get the current state

Synopsis

cc [ flag ... ] file ... -lnsl [ library ... ]

#include <tiuser.h>

int t_getstate(int fildes);

MT-Level

MT-Safe

Description

The t_getstate() function returns the current state of the provider associated with the transport endpoint specified by fildes.

Return Values

t_getstate() returns the current state on successful completion. On failure t_getstate() returns -1, t_errno is set to indicate the error, and possibly errno is set. The current state may be one of the following:
T_UNBND
unbound
T_IDLE
idle
T_OUTCON
outgoing connection pending
T_INCON
incoming connection pending
T_DATAXFER
data transfer
T_OUTREL
outgoing orderly release (waiting for an orderly release indication)
T_INREL
incoming orderly release (waiting for an orderly release request)

If the provider is undergoing a state transition when t_getstate() is called, the function will fail.

Errors

On failure, t_errno will be set to one of the following:

TBADF
The specified file descriptor does not refer to a transport endpoint.
TSTATECHNG
The transport provider is undergoing a state change.
TSYSERR
A system error has occurred during execution of this function, errno will be set to the specific error.

See Also

t_open(3N)

Notes

This interface is safe in multithreaded applications.


Table of Contents