Print this page
4213 Missing spaces in man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3nsl/xdr_simple.3nsl
+++ new/usr/src/man/man3nsl/xdr_simple.3nsl
1 1 '\" te
2 2 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" Copyright 1989 AT&T
4 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
6 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 7 .TH XDR_SIMPLE 3NSL "Aug 27, 2001"
8 8 .SH NAME
9 9 xdr_simple, xdr_bool, xdr_char, xdr_double, xdr_enum, xdr_float, xdr_free,
10 10 xdr_hyper, xdr_int, xdr_long, xdr_longlong_t, xdr_quadruple, xdr_short,
11 11 xdr_u_char, xdr_u_hyper, xdr_u_int, xdr_u_long, xdr_u_longlong_t, xdr_u_short,
12 12 xdr_void \- library routines for external data representation
13 13 .SH SYNOPSIS
14 14 .LP
15 15 .nf
16 -#include<rpc/xdr.h>
16 +#include <rpc/xdr.h>
17 17
18 18
19 19
20 20 \fBbool_t\fR \fBxdr_bool\fR(\fBXDR *\fR\fIxdrs\fR, \fBbool_t *\fR\fIbp\fR);
21 21 .fi
22 22
23 23 .LP
24 24 .nf
25 25 \fBbool_t\fR \fBxdr_char\fR(\fBXDR *\fR\fIxdrs\fR, \fBchar *\fR\fIcp\fR);
26 26 .fi
27 27
28 28 .LP
29 29 .nf
30 30 \fBbool_t\fR \fBxdr_double\fR(\fBXDR *\fR\fIxdrs\fR, \fBdouble *\fR\fIdp\fR);
31 31 .fi
32 32
33 33 .LP
34 34 .nf
35 35 \fBbool_t\fR \fBxdr_enum\fR(\fBXDR *\fR\fIxdrs\fR, \fBenum_t *\fR\fIep\fR);
36 36 .fi
37 37
38 38 .LP
39 39 .nf
40 40 \fBbool_t\fR \fBxdr_float\fR(\fBXDR *\fR\fIxdrs\fR, \fBfloat *\fR\fIfp\fR);
41 41 .fi
42 42
43 43 .LP
44 44 .nf
45 45 \fBvoid\fR \fBxdr_free\fR(\fBxdrproc_t\fR \fIproc\fR, \fBchar *\fR\fIobjp\fR);
46 46 .fi
47 47
48 48 .LP
49 49 .nf
50 50 \fBbool_t\fR \fBxdr_hyper\fR(\fBXDR *\fR\fIxdrs\fR, \fBlonglong_t *\fR\fIllp\fR);
51 51 .fi
52 52
53 53 .LP
54 54 .nf
55 55 \fBbool_t\fR \fBxdr_int\fR(\fBXDR *\fR\fIxdrs\fR, \fBint *\fR\fIip\fR);
56 56 .fi
57 57
58 58 .LP
59 59 .nf
60 60 \fBbool_t\fR \fBxdr_long\fR(\fBXDR *\fR\fIxdrs\fR, \fBlongt *\fR\fIlp\fR);
61 61 .fi
62 62
63 63 .LP
64 64 .nf
65 65 \fBbool_t\fR \fBxdr_longlong_t\fR(\fBXDR *\fR\fIxdrs\fR, \fBlonglong_t *\fR\fIllp\fR);
66 66 .fi
67 67
68 68 .LP
69 69 .nf
70 70 \fBbool_t\fR \fBxdr_quadruple\fR(\fBXDR *\fR\fIxdrs\fR, \fBlong double *\fR\fIpq\fR);
71 71 .fi
72 72
73 73 .LP
74 74 .nf
75 75 \fBbool_t\fR \fBxdr_short\fR(\fBXDR *\fR\fIxdrs\fR, \fBshort *\fR\fIsp\fR);
76 76 .fi
77 77
78 78 .LP
79 79 .nf
80 80 \fBbool_t\fR \fBxdr_u_char\fR(\fBXDR *\fR\fIxdrs\fR, \fBunsigned char *\fR\fIucp\fR);
81 81 .fi
82 82
83 83 .LP
84 84 .nf
85 85 \fBbool_t\fR \fBxdr_u_hyper\fR(\fBXDR *\fR\fIxdrs\fR, \fBu_longlong_t *\fR\fIullp\fR);
86 86 .fi
87 87
88 88 .LP
89 89 .nf
90 90 \fBbool_t\fR \fBxdr_u_int\fR(\fBXDR *\fR\fIxdrs\fR, \fBunsigned *\fR\fIup\fR);
91 91 .fi
92 92
93 93 .LP
94 94 .nf
95 95 \fBbool_t\fR \fBxdr_u_long\fR(\fBXDR *\fR\fIxdrs\fR, \fBunsigned long *\fR\fIulp\fR);
96 96 .fi
97 97
98 98 .LP
99 99 .nf
100 100 \fBbool_t\fR \fBxdr_u_longlong_t\fR(\fBXDR *\fR\fIxdrs\fR, \fBu_longlong_t *\fR\fIullp\fR);
101 101 .fi
102 102
103 103 .LP
104 104 .nf
105 105 \fBbool_t\fR \fBxdr_u_short\fR(\fBXDR\fR \fIxdrs\fR, \fBunsigned short *\fR\fIusp\fR);
106 106 .fi
107 107
108 108 .LP
109 109 .nf
110 110 \fBbool_t\fR \fBxdr_void\fR(void)
111 111 .fi
112 112
113 113 .SH DESCRIPTION
114 114 .sp
115 115 .LP
116 116 The \fBXDR\fR library routines allow C programmers to describe simple data
117 117 structures in a machine-independent fashion. Protocols such as remote procedure
118 118 calls (RPC) use these routines to describe the format of the data.
119 119 .sp
120 120 .LP
121 121 These routines require the creation of \fBXDR\fR streams (see
122 122 \fBxdr_create\fR(3NSL)).
123 123 .SS "Routines"
124 124 .sp
125 125 .LP
126 126 See \fBrpc\fR(3NSL) for the definition of the \fBXDR\fR data structure. Note
127 127 that any buffers passed to the \fBXDR\fR routines must be properly aligned. It
128 128 is suggested that \fBmalloc\fR(3C) be used to allocate these buffers or that
129 129 the programmer insure that the buffer address is divisible evenly by four.
130 130 .sp
131 131 .ne 2
132 132 .na
133 133 \fB\fBxdr_bool()\fR\fR
134 134 .ad
135 135 .RS 22n
136 136 \fBxdr_bool()\fR translates between booleans (C integers) and their external
137 137 representations. When encoding data, this filter produces values of either
138 138 \fB1\fR or \fB0\fR. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
139 139 otherwise.
140 140 .RE
141 141
142 142 .sp
143 143 .ne 2
144 144 .na
145 145 \fB\fBxdr_char()\fR\fR
146 146 .ad
147 147 .RS 22n
148 148 \fBxdr_char()\fR translates between C characters and their external
149 149 representations. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
150 150 otherwise. Note: encoded characters are not packed, and occupy 4 bytes each.
151 151 For arrays of characters, it is worthwhile to consider \fBxdr_bytes()\fR,
152 152 \fBxdr_opaque()\fR, or \fBxdr_string()\fR (see \fBxdr_complex\fR(3NSL)).
153 153 .RE
154 154
155 155 .sp
156 156 .ne 2
157 157 .na
158 158 \fB\fBxdr_double()\fR\fR
159 159 .ad
160 160 .RS 22n
161 161 \fBxdr_double()\fR translates between C \fBdouble\fR precision numbers and
162 162 their external representations. This routine returns \fBTRUE\fR if it succeeds,
163 163 \fBFALSE\fR otherwise.
164 164 .RE
165 165
166 166 .sp
167 167 .ne 2
168 168 .na
169 169 \fB\fBxdr_enum()\fR\fR
170 170 .ad
171 171 .RS 22n
172 172 \fBxdr_enum()\fR translates between C \fBenum\fRs (actually integers) and their
173 173 external representations. This routine returns \fBTRUE\fR if it succeeds,
174 174 \fBFALSE\fR otherwise.
175 175 .RE
176 176
177 177 .sp
178 178 .ne 2
179 179 .na
180 180 \fB\fBxdr_float()\fR\fR
181 181 .ad
182 182 .RS 22n
183 183 \fBxdr_float()\fR translates between C \fBfloat\fRs and their external
184 184 representations. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
185 185 otherwise.
186 186 .RE
187 187
188 188 .sp
189 189 .ne 2
190 190 .na
191 191 \fB\fBxdr_free()\fR\fR
192 192 .ad
193 193 .RS 22n
194 194 Generic freeing routine. The first argument is the \fBXDR\fR routine for the
195 195 object being freed. The second argument is a pointer to the object itself.
196 196 Note: the pointer passed to this routine is not freed, but what it points to is
197 197 freed (recursively, depending on the XDR routine).
198 198 .RE
199 199
200 200 .sp
201 201 .ne 2
202 202 .na
203 203 \fB\fBxdr_hyper()\fR\fR
204 204 .ad
205 205 .RS 22n
206 206 \fBxdr_hyper()\fR translates between ANSI C \fBlong\fR \fBlong\fR integers and
207 207 their external representations. This routine returns \fBTRUE\fR if it succeeds,
208 208 \fBFALSE\fR otherwise.
209 209 .RE
210 210
211 211 .sp
212 212 .ne 2
213 213 .na
214 214 \fB\fBxdr_int()\fR\fR
215 215 .ad
216 216 .RS 22n
217 217 \fBxdr_int()\fR translates between C integers and their external
218 218 representations. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
219 219 otherwise.
220 220 .RE
221 221
222 222 .sp
223 223 .ne 2
224 224 .na
225 225 \fB\fBxdr_long()\fR\fR
226 226 .ad
227 227 .RS 22n
228 228 \fBxdr_long()\fR translates between C \fBlong\fR integers and their external
229 229 representations. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
230 230 otherwise.
231 231 .sp
232 232 In a 64-bit environment, this routine returns an error if the value of \fBlp\fR
233 233 is outside the range \fB[INT32_MIN, INT32_MAX]\fR. The \fBxdr_int()\fR routine
234 234 is recommended in place of this routine.
235 235 .RE
236 236
237 237 .sp
238 238 .ne 2
239 239 .na
240 240 \fB\fBxdr_longlong_t()\fR\fR
241 241 .ad
242 242 .RS 22n
243 243 \fBxdr_longlong_t()\fR translates between ANSI C \fBlong\fR \fBlong\fR
244 244 integers and their external representations. This routine returns \fBTRUE\fR if
245 245 it succeeds, \fBFALSE\fR otherwise. This routine is identical to
246 246 \fBxdr_hyper()\fR.
247 247 .RE
248 248
249 249 .sp
250 250 .ne 2
251 251 .na
252 252 \fB\fBxdr_quadruple()\fR\fR
253 253 .ad
254 254 .RS 22n
255 255 \fBxdr_quadruple()\fR translates between IEEE quadruple precision floating
256 256 point numbers and their external representations. This routine returns
257 257 \fBTRUE\fR if it succeeds, \fBFALSE\fR otherwise.
258 258 .RE
259 259
260 260 .sp
261 261 .ne 2
262 262 .na
263 263 \fB\fBxdr_short()\fR\fR
264 264 .ad
265 265 .RS 22n
266 266 \fBxdr_short()\fR translates between C \fBshort\fR integers and their external
267 267 representations. This routine returns \fBTRUE\fR if it succeeds, \fBFALSE\fR
268 268 otherwise.
269 269 .RE
270 270
271 271 .sp
272 272 .ne 2
273 273 .na
274 274 \fB\fBxdr_u_char()\fR\fR
275 275 .ad
276 276 .RS 22n
277 277 \fBxdr_u_char()\fR translates between \fBunsigned\fR C characters and their
278 278 external representations. This routine returns \fBTRUE\fR if it succeeds,
279 279 \fBFALSE\fR otherwise.
280 280 .RE
281 281
282 282 .sp
283 283 .ne 2
284 284 .na
285 285 \fB\fBxdr_u_hyper()\fR\fR
286 286 .ad
287 287 .RS 22n
288 288 \fBxdr_u_hyper()\fR translates between unsigned ANSI C \fBlong\fR \fBlong\fR
289 289 integers and their external representations. This routine returns \fBTRUE\fR if
290 290 it succeeds, \fBFALSE\fR otherwise.
291 291 .RE
292 292
293 293 .sp
294 294 .ne 2
295 295 .na
296 296 \fB\fBxdr_u_int()\fR\fR
297 297 .ad
298 298 .RS 22n
299 299 A filter primitive that translates between a C \fBunsigned\fR integer and its
300 300 external representation. This routine returns \fBTRUE\fR if it succeeds,
301 301 \fBFALSE\fR otherwise.
302 302 .RE
303 303
304 304 .sp
305 305 .ne 2
306 306 .na
307 307 \fB\fBxdr_u_long()\fR\fR
308 308 .ad
309 309 .RS 22n
310 310 \fBxdr_u_long()\fR translates between C \fBunsigned long\fR integers and their
311 311 external representations. This routine returns \fBTRUE\fR if it succeeds,
312 312 \fBFALSE\fR otherwise.
313 313 .sp
314 314 In a 64-bit environment, this routine returns an error if the value of
315 315 \fIulp\fR is outside the range \fB[0, UINT32_MAX]\fR. The \fBxdr_u_int()\fR
316 316 routine is recommended in place of this routine.
317 317 .RE
318 318
319 319 .sp
320 320 .ne 2
321 321 .na
322 322 \fB\fBxdr_u_longlong_t()\fR\fR
323 323 .ad
324 324 .RS 22n
325 325 \fBxdr_u_longlong_t()\fR translates between unsigned ANSI C \fBlong\fR
326 326 \fBlong\fR integers and their external representations. This routine returns
327 327 \fBTRUE\fR if it succeeds, \fBFALSE\fR otherwise. This routine is identical to
328 328 \fBxdr_u_hyper()\fR.
329 329 .RE
330 330
331 331 .sp
332 332 .ne 2
333 333 .na
334 334 \fB\fBxdr_u_short()\fR\fR
335 335 .ad
336 336 .RS 22n
337 337 \fBxdr_u_short()\fR translates between C \fBunsigned short\fR integers and
338 338 their external representations. This routine returns \fBTRUE\fR if it succeeds,
339 339 \fBFALSE\fR otherwise.
340 340 .RE
341 341
342 342 .sp
343 343 .ne 2
344 344 .na
345 345 \fB\fBxdr_void()\fR\fR
346 346 .ad
347 347 .RS 22n
348 348 This routine always returns \fBTRUE\fR. It may be passed to \fBRPC\fR routines
349 349 that require a function parameter, where nothing is to be done.
350 350 .RE
351 351
352 352 .SH ATTRIBUTES
353 353 .sp
354 354 .LP
355 355 See \fBattributes\fR(5) for descriptions of the following attributes:
356 356 .sp
357 357
358 358 .sp
359 359 .TS
360 360 box;
361 361 c | c
362 362 l | l .
363 363 ATTRIBUTE TYPE ATTRIBUTE VALUE
364 364 _
365 365 MT-Level Safe
366 366 .TE
367 367
368 368 .SH SEE ALSO
369 369 .sp
370 370 .LP
371 371 \fBmalloc\fR(3C), \fBrpc\fR(3NSL), \fBxdr_admin\fR(3NSL),
372 372 \fBxdr_complex\fR(3NSL), \fBxdr_create\fR(3NSL), \fBattributes\fR(5)
↓ open down ↓ |
346 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX