'\"macro stdmacro
.if n .pH g3n.t_getstate @(#)t_getstate	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} t_getstate 3N "Networking Support Utilities" "\&"
.if \nX=1 .ds x} t_getstate 3N "Networking Support Utilities"
.if \nX=2 .ds x} t_getstate 3N "" "\&"
.if \nX=3 .ds x} t_getstate "" "" "\&"
.if \nX=4 .ds x} t_getstate "NS_LIB" "EXTENSION" " "
.TH \*(x}
.SH NAME
\f4t_getstate\f1 \- get the current state
.SH SYNOPSIS
\f4#include <tiuser.h>\f1
.PP
\f4int t_getstate(fd)\f1
.br
\f4int fd;\f1
.SH DESCRIPTION
The \f4t_getstate\fP
function returns the current state of the provider associated with the transport
endpoint specified by
\f4fd\fP.
.PP
On failure, \f4t_errno\f1 may be set to one of the following:
.TP 18
\f4[TBADF]\fP
The specified file descriptor does not refer to a transport endpoint.
.TP
\f4[TSTATECHNG]\fP
The transport provider is undergoing a state change.
.TP
\f4[TSYSERR]\fP
A system error has occurred during execution of this function.
.SH SEE ALSO
\f4t_open\fP(3N).
.sp .2
\f2UNIX System V Network Programmer's Guide\f1.
.SH DIAGNOSTICS
\f4t_getstate\fP
returns the current state on successful completion and \-1 on failure
and \f4t_errno\f1 is set to indicate the error.
The current state may be one of the following:
.TP 15
\f4T_UNBND\fP
unbound
.TP
\f4T_IDLE\fP
idle
.TP
\f4T_OUTCON\fP
outgoing connection pending
.TP
\f4T_INCON\fP
incoming connection pending
.TP
\f4T_DATAXFER\fP
data transfer
.TP
\f4T_OUTREL\fP
outgoing orderly release (waiting for an orderly release indication)
.TP
\f4T_INREL\fP
incoming orderly release (waiting for an orderly release request)
.PP
If the provider is undergoing a state transition when
\f4t_getstate\fP
is called, the function will fail.
.Ee
