1t_getinfo(3NSL) Networking Services Library Functions t_getinfo(3NSL)
2
3
4
6 t_getinfo - get protocol-specific service information
7
9 #include <xti.h>
10
11
12
13 int t_getinfo(int fd, struct t_info *info);
14
15
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 This function returns the current characteristics of the underlying
26 transport protocol and/or transport connection associated with file
27 descriptor fd. The info pointer is used to return the same information
28 returned by t_open(3NSL), although not necessarily precisely the same
29 values. This function enables a transport user to access this informa‐
30 tion during any phase of communication.
31
32
33 This argument points to a t_info structure which contains the following
34 members:
35
36 t_scalar_t addr; /*max size in octets of the transport protocol address*/
37 t_scalar_t options; /*max number of bytes of protocol-specific options */
38 t_scalar_t tsdu; /*max size in octets of a transport service data unit */
39 t_scalar_t etsdu; /*max size in octets of an expedited transport service*/
40 /*data unit (ETSDU) */
41 t_scalar_t connect; /*max number of octets allowed on connection */
42 /*establishment functions */
43 t_scalar_t discon; /*max number of octets of data allowed on t_snddis() */
44 /*and t_rcvdis() functions */
45 t_scalar_t servtype; /*service type supported by the transport provider */
46 t_scalar_t flags; /*other info about the transport provider */
47
48
49
50 The values of the fields have the following meanings:
51
52 addr A value greater than zero indicates the maximum size of a
53 transport protocol address and a value of T_INVALID (-2)
54 specifies that the transport provider does not provide user
55 access to transport protocol addresses.
56
57
58 options A value greater than zero indicates the maximum number of
59 bytes of protocol-specific options supported by the
60 provider, and a value of T_INVALID (-2) specifies that the
61 transport provider does not support user-settable options.
62
63
64 tsdu A value greater than zero specifies the maximum size in
65 octets of a transport service data unit (TSDU); a value of
66 T_NULL (zero) specifies that the transport provider does
67 not support the concept of TSDU, although it does support
68 the sending of a datastream with no logical boundaries pre‐
69 served across a connection; a value of T_INFINITE (-1)
70 specifies that there is no limit on the size in octets of a
71 TSDU; and a value of T_INVALID (-2) specifies that the
72 transfer of normal data is not supported by the transport
73 provider.
74
75
76 etsdu A value greater than zero specifies the maximum size in
77 octets of an expedited transport service data unit (ETSDU);
78 a value of T_NULL (zero) specifies that the transport
79 provider does not support the concept of ETSDU, although it
80 does support the sending of an expedited data stream with
81 no logical boundaries preserved across a connection; a
82 value of T_INFINITE (-1) specifies that there is no limit
83 on the size (in octets) of an ETSDU; and a value of
84 T_INVALID (-2) specifies that the transfer of expedited
85 data is not supported by the transport provider. Note that
86 the semantics of expedited data may be quite different for
87 different transport providers.
88
89
90 connect A value greater than zero specifies the maximum number of
91 octets that may be associated with connection establishment
92 functions and a value of T_INVALID (-2) specifies that
93 the transport provider does not allow data to be sent with
94 connection establishment functions.
95
96
97 discon If the T_ORDRELDATA bit in flags is clear, a value greater
98 than zero specifies the maximum number of octets that may
99 be associated with the t_snddis(3NSL) and t_rcvdis(3NSL)
100 functions, and a value of T_INVALID (-2) specifies that
101 the transport provider does not allow data to be sent with
102 the abortive release functions. If the T_ORDRELDATA bit is
103 set in flags, a value greater than zero specifies the maxi‐
104 mum number of octets that may be associated with the
105 t_sndreldata(), t_rcvreldata(), t_snddis(3NSL) and
106 t_rcvdis(3NSL) functions.
107
108
109 servtype This field specifies the service type supported by the
110 transport provider, as described below.
111
112
113 flags This is a bit field used to specify other information about
114 the communications provider. If the T_ORDRELDATA bit is
115 set, the communications provider supports sending user data
116 with an orderly release. If the T_SENDZERO bit is set in
117 flags, this indicates that the underlying transport
118 provider supports the sending of zero-length TSDUs.
119
120
121
122 If a transport user is concerned with protocol independence, the above
123 sizes may be accessed to determine how large the buffers must be to
124 hold each piece of information. Alternatively, the t_alloc(3NSL) func‐
125 tion may be used to allocate these buffers. An error will result if a
126 transport user exceeds the allowed data size on any function. The value
127 of each field may change as a result of protocol option negotiation
128 during connection establishment (the t_optmgmt(3NSL) call has no effect
129 on the values returned by t_getinfo()). These values will only change
130 from the values presented to t_open(3NSL) after the endpoint enters the
131 T_DATAXFER state.
132
133
134 The servtype field of info specifies one of the following values on
135 return:
136
137 T_COTS The transport provider supports a connection-mode ser‐
138 vice but does not support the optional orderly release
139 facility.
140
141
142 T_COTS_ORD The transport provider supports a connection-mode ser‐
143 vice with the optional orderly release facility.
144
145
146 T_CLTS The transport provider supports a connectionless-mode
147 service. For this service type, t_open(3NSL) will return
148 T_INVALID (-1) for etsdu, connect and discon.
149
150
152 Upon successful completion, a value of 0 is returned. Otherwise, a
153 value of -1 is returned and t_errno is set to indicate an error.
154
156 ALL - apart from T_UNINIT.
157
159 On failure, t_errno is set to one of the following:
160
161 TBADF The specified file descriptor does not refer to a transport
162 endpoint.
163
164
165 TPROTO This error indicates that a communication problem has been
166 detected between XTI and the transport provider for which
167 there is no other suitable XTI error (t_errno).
168
169
170 TSYSERR A system error has occurred during execution of this func‐
171 tion.
172
173
175 The XTI and TLI interface definitions have common names but use differ‐
176 ent header files. This, and other semantic differences between the two
177 interfaces are described in the subsections below.
178
179 Interface Header
180 The XTI interfaces use the header file, xti.h. TLI interfaces should
181 not use this header. They should use the header:
182
183 #include <tiuser.h>
184
185
186 Error Description Values
187 The t_errno value TPROTO can be set by the XTI interface but not by the
188 TLI interface.
189
190 The t_info Structure
191 For TLI , the t_info structure referenced by info lacks the following
192 structure member:
193
194 t_scalar_t flags; /* other info about the transport provider */
195
196
197
198 This member was added to struct t_info in the XTI interfaces.
199
200
201 When a value of -1 is observed as the return value in various t_info
202 structure members, it signifies that the transport provider can handle
203 an infinite length buffer for a corresponding attribute, such as
204 address data, option data, TSDU (octet size), ETSDU (octet size), con‐
205 nection data, and disconnection data. The corresponding structure mem‐
206 bers are addr, options, tsdu, estdu, connect, and discon, respectively.
207
209 See attributes(5) for descriptions of the following attributes:
210
211
212
213
214 ┌─────────────────────────────┬─────────────────────────────┐
215 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
216 ├─────────────────────────────┼─────────────────────────────┤
217 │MT Level │Safe │
218 └─────────────────────────────┴─────────────────────────────┘
219
221 t_alloc(3NSL), t_open(3NSL), t_optmgmt(3NSL), t_rcvdis(3NSL), t_snd‐
222 dis(3NSL), attributes(5)
223
224
225
226SunOS 5.11 7 May 1998 t_getinfo(3NSL)