DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 
(TLI/XTI)

t_getstate(NET)


t_getstate -- get the current state

Syntax

TLI syntax

cc . . . -lnsl

#include <sys/tiuser.h>

int t_getstate (fd) int fd;

XTI syntax

cc . . . -lxti

#include <xti.h>

int t_getstate (fd) int fd;

Description

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

Return values

t_getstate returns the current state on successful completion and -1 on failure, and t_errno is set to indicate the error. The current state may be one of the following:

T_DATAXFER
data transfer

T_IDLE
idle

T_INCON
incoming connection pending

T_INREL
incoming orderly release (waiting for an orderly release request)

T_OUTCON
outgoing connection pending

T_OUTREL
outgoing orderly release (waiting for an orderly release indication)

T_UNBND
unbound

If the provider is undergoing a state transition when t_getstate is called, the function fails.

Diagnostics

On failure, t_errno may 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.

[TNOTSUPPORT]
This function is not supported by the current implementation of XTI.

See also

Intro(NET), t_open(NET), t_sync(NET)

Standards conformance

t_getstate is conformant with:

AT&T SVID Issue 3 ;
X/Open CAE Specification, Networking Services, Issue 4, 1994. ;
and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2) .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003