Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3nsl/t_sndudata.3nsl.man.txt
+++ new/usr/src/man/man3nsl/t_sndudata.3nsl.man.txt
1 1 T_SNDUDATA(3NSL) Networking Services Library Functions T_SNDUDATA(3NSL)
2 2
3 3
4 4
5 5 NAME
6 6 t_sndudata - send a data unit
7 7
8 8 SYNOPSIS
9 9 #include <xti.h>
10 10
11 11
12 12
13 13
14 14 int t_sndudata(int fd, const struct t_unitdata *unitdata);
15 15
16 16
17 17 DESCRIPTION
18 18 This routine is part of the XTI interfaces which evolved from the TLI
19 19 interfaces. XTI represents the future evolution of these interfaces.
20 20 However, TLI interfaces are supported for compatibility. When using a
21 21 TLI routine that has the same name as an XTI routine, the tiuser.h
22 22 header file must be used. Refer to the TLI COMPATIBILITY section for
23 23 a description of differences between the two interfaces.
24 24
25 25
26 26 This function is used in connectionless-mode to send a data unit to
27 27 another transport user. The argument fd identifies the local transport
28 28 endpoint through which data will be sent, and unitdata points to a
29 29 t_unitdata structure containing the following members:
30 30
31 31 struct netbuf addr;
32 32 struct netbuf opt;
33 33 struct netbuf udata;
34 34
35 35
36 36
37 37 In unitdata, addr specifies the protocol address of the destination
38 38 user, opt identifies options that the user wants associated with this
39 39 request, and udata specifies the user data to be sent. The user may
40 40 choose not to specify what protocol options are associated with the
41 41 transfer by setting the len field of opt to zero. In this case, the
42 42 provider uses the option values currently set for the communications
43 43 endpoint.
44 44
45 45
46 46 If the len field of udata is zero, and sending of zero octets is not
47 47 supported by the underlying transport service, the t_sndudata() will
48 48 return -1 with t_errno set to TBADDATA.
49 49
50 50
51 51 By default, t_sndudata() operates in synchronous mode and may wait if
52 52 flow control restrictions prevent the data from being accepted by the
53 53 local transport provider at the time the call is made. However, if
54 54 O_NONBLOCK is set by means of t_open(3NSL) or fcntl(2), t_sndudata()
55 55 will execute in asynchronous mode and will fail under such conditions.
56 56 The process can arrange to be notified of the clearance of a flow
57 57 control restriction by means of either t_look(3NSL) or the EM
58 58 interface.
↓ open down ↓ |
58 lines elided |
↑ open up ↑ |
59 59
60 60
61 61 If the amount of data specified in udata exceeds the TSDU size as
62 62 returned in the tsdu field of the info argument of t_open(3NSL) or
63 63 t_getinfo(3NSL), a TBADDATA error will be generated. If t_sndudata() is
64 64 called before the destination user has activated its transport endpoint
65 65 (see t_bind(3NSL)), the data unit may be discarded.
66 66
67 67
68 68 If it is not possible for the transport provider to immediately detect
69 - the conditions that cause the errors TBADDADDR and TBADOPT, these
70 - errors will alternatively be returned by t_rcvuderr. Therefore, an
71 - application must be prepared to receive these errors in both of these
72 - ways.
69 + the conditions that cause the errors TBADADDR and TBADOPT, these errors
70 + will alternatively be returned by t_rcvuderr. Therefore, an application
71 + must be prepared to receive these errors in both of these ways.
73 72
74 73
75 74 If the call is interrupted, t_sndudata() will return EINTR and the
76 75 datagram will not be sent.
77 76
78 77 RETURN VALUES
79 78 Upon successful completion, a value of 0 is returned. Otherwise, a
80 79 value of -1 is returned and t_errno is set to indicate an error.
81 80
82 81 VALID STATES
83 82 T_IDLE.
84 83
85 84 ERRORS
86 85 On failure, t_errno is set to one of the following:
87 86
88 87 TBADADDR
89 88 The specified protocol address was in an incorrect
90 89 format or contained illegal information.
91 90
92 91
93 92 TBADDATA
94 93 Illegal amount of data. A single send was attempted
95 94 specifying a TSDU greater than that specified in the
96 95 info argument, or a send of a zero byte TSDU is not
97 96 supported by the provider.
98 97
99 98
100 99 TBADF
101 100 The specified file descriptor does not refer to a
102 101 transport endpoint.
103 102
104 103
105 104 TBADOPT
106 105 The specified options were in an incorrect format or
107 106 contained illegal information.
108 107
109 108
110 109 TFLOW
111 110 O_NONBLOCK was set, but the flow control mechanism
112 111 prevented the transport provider from accepting any data
113 112 at this time.
114 113
115 114
116 115 TLOOK
117 116 An asynchronous event has occurred on this transport
118 117 endpoint.
119 118
120 119
121 120 TNOTSUPPORT
122 121 This function is not supported by the underlying
123 122 transport provider.
124 123
125 124
126 125 TOUTSTATE
127 126 The communications endpoint referenced by fd is not in
128 127 one of the states in which a call to this function is
129 128 valid.
130 129
131 130
132 131 TPROTO
133 132 This error indicates that a communication problem has
134 133 been detected between XTI and the transport provider for
135 134 which there is no other suitable XTI error (t_errno).
136 135
137 136
138 137 TSYSERR
139 138 A system error has occurred during execution of this
140 139 function.
141 140
142 141
143 142 TLI COMPATIBILITY
144 143 The XTI and TLI interface definitions have common names but use
145 144 different header files. This, and other semantic differences between
146 145 the two interfaces are described in the subsections below.
147 146
148 147 Interface Header
149 148 The XTI interfaces use the header file, xti.h. TLI interfaces should
150 149 not use this header. They should use the header:
151 150 #include <tiuser.h>
152 151
153 152 Error Description Values
154 153 The t_errno values that can be set by the XTI interface and cannot be
155 154 set by the TLI interface are:
156 155 TPROTO
157 156 TBADADDR
158 157 TBADOPT
159 158 TLOOK
160 159 TOUTSTATE
161 160
162 161 Notes
163 162 Whenever this function fails with t_error set to TFLOW, O_NONBLOCK must
164 163 have been set.
165 164
166 165 Option Buffers
167 166 The format of the options in an opt buffer is dictated by the transport
168 167 provider. Unlike the XTI interface, the TLI interface does not fix the
169 168 buffer format.
170 169
171 170 ATTRIBUTES
172 171 See attributes(5) for descriptions of the following attributes:
173 172
174 173
175 174
176 175
177 176 +---------------+-----------------+
178 177 |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
179 178 +---------------+-----------------+
180 179 |MT Level | Safe |
181 180 +---------------+-----------------+
182 181
183 182 SEE ALSO
184 183 fcntl(2), t_alloc(3NSL), t_bind(3NSL), t_error(3NSL), t_getinfo(3NSL),
185 184 t_look(3NSL), t_open(3NSL), t_rcvudata(3NSL), t_rcvuderr(3NSL),
186 185 attributes(5)
187 186
188 187
189 188
190 189 May 7, 1998 T_SNDUDATA(3NSL)
↓ open down ↓ |
108 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX