1t_getstate(3NSL)     Networking Services Library Functions    t_getstate(3NSL)
2
3
4

NAME

6       t_getstate - get the current state
7

SYNOPSIS

9       #include <xti.h>
10
11
12
13       int t_getstate(int fd);
14
15

DESCRIPTION

17       This  routine  is part of the XTI interfaces which evolved from the TLI
18       interfaces. XTI represents the future evolution  of  these  interfaces.
19       However,  TLI  interfaces are supported for compatibility. When using a
20       TLI routine that has the same name as an  XTI  routine,  the   tiuser.h
21       header  file must be used.  Refer to the  TLI COMPATIBILITY section for
22       a description of differences between the two interfaces.
23
24
25       The t_getstate() function returns the current  state  of  the  provider
26       associated with the transport endpoint specified by fd.
27

RETURN VALUES

29       State  is  returned  upon successful completion.  Otherwise, a value of
30       -1 is returned and t_errno is set to indicate an  error.   The  current
31       state is one of the following:
32
33       T_UNBND        Unbound.
34
35
36       T_IDLE         Idle.
37
38
39       T_OUTCON       Outgoing connection pending.
40
41
42       T_INCON        Incoming connection pending.
43
44
45       T_DATAXFER     Data transfer.
46
47
48       T_OUTREL       Outgoing direction orderly release sent.
49
50
51       T_INREL        Incoming direction orderly release received.
52
53
54
55       If  the  provider is undergoing a state transition when t_getstate() is
56       called, the function will fail.
57

ERRORS

59       On failure, t_errno is set to one of the following:
60
61       TBADF         The specified file descriptor does not refer to a  trans‐
62                     port endpoint.
63
64
65       TPROTO        This  error  indicates  that  a communication problem has
66                     been detected between XTI and the transport provider  for
67                     which there is no other suitable XTI error (t_errno).
68
69
70       TSTATECHNG    The  transport  provider  is undergoing a transient state
71                     change.
72
73
74       TSYSERR       A system error has  occurred  during  execution  of  this
75                     function.
76
77

TLI COMPATIBILITY

79       The XTI and TLI interface definitions have common names but use differ‐
80       ent header files. This, and other semantic differences between the  two
81       interfaces are described in the subsections below.
82
83   Interface Header
84       The  XTI  interfaces  use the header file, xti.h. TLI interfaces should
85       not use this header.  They should use the header:
86
87         #include <tiuser.h>
88
89
90   Error Description Values
91       The t_errno value that can be set by the XTI interface  and  cannot  be
92       set by the TLI interface is:
93
94
95       TPROTO
96

ATTRIBUTES

98       See attributes(5)  for descriptions of the following attributes:
99
100
101
102
103       ┌─────────────────────────────┬─────────────────────────────┐
104       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
105       ├─────────────────────────────┼─────────────────────────────┤
106       │MT Level                     │Safe                         │
107       └─────────────────────────────┴─────────────────────────────┘
108

SEE ALSO

110       t_open(3NSL), attributes(5)
111
112
113
114SunOS 5.11                        7 May 1998                  t_getstate(3NSL)
Impressum