diff options
author | jmc <> | 2005-01-06 10:50:40 +0000 |
---|---|---|
committer | jmc <> | 2005-01-06 10:50:40 +0000 |
commit | d6b9d99ff5795be0a1a1073b97e3e4a2a876ca69 (patch) | |
tree | 9211cd28f6b1a5f18853998b7e1a6e84c3468667 /src/lib | |
parent | 5603b5fa6e9c081716146498df798f7ec82f606e (diff) | |
download | openbsd-d6b9d99ff5795be0a1a1073b97e3e4a2a876ca69.tar.gz openbsd-d6b9d99ff5795be0a1a1073b97e3e4a2a876ca69.tar.bz2 openbsd-d6b9d99ff5795be0a1a1073b97e3e4a2a876ca69.zip |
tweaks;
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/inet6_option_space.3 | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/src/lib/libc/net/inet6_option_space.3 b/src/lib/libc/net/inet6_option_space.3 index 9b5cac95e8..d41112167d 100644 --- a/src/lib/libc/net/inet6_option_space.3 +++ b/src/lib/libc/net/inet6_option_space.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: inet6_option_space.3,v 1.15 2005/01/06 03:50:46 itojun Exp $ | 1 | .\" $OpenBSD: inet6_option_space.3,v 1.16 2005/01/06 10:50:40 jmc Exp $ |
2 | .\" $KAME: inet6_option_space.3,v 1.11 2005/01/05 03:00:44 itojun Exp $ | 2 | .\" $KAME: inet6_option_space.3,v 1.11 2005/01/05 03:00:44 itojun Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (C) 2004 WIDE Project. | 4 | .\" Copyright (C) 2004 WIDE Project. |
@@ -41,8 +41,6 @@ | |||
41 | .Nm inet6_option_find | 41 | .Nm inet6_option_find |
42 | .Nd IPv6 Hop-by-Hop and Destination Option Manipulation | 42 | .Nd IPv6 Hop-by-Hop and Destination Option Manipulation |
43 | .\" | 43 | .\" |
44 | .Sh LIBRARY | ||
45 | .Lb libc | ||
46 | .Sh SYNOPSIS | 44 | .Sh SYNOPSIS |
47 | .In sys/types.h | 45 | .In sys/types.h |
48 | .In netinet/in.h | 46 | .In netinet/in.h |
@@ -65,12 +63,12 @@ Manipulating and parsing IPv6's Hop-by-Hop and Destination options is | |||
65 | complicated by the need to properly align and pad data as well as the | 63 | complicated by the need to properly align and pad data as well as the |
66 | need to manipulate ancillary information that is not part of the data | 64 | need to manipulate ancillary information that is not part of the data |
67 | stream. | 65 | stream. |
68 | RFC2292 defines a set of functions, which are implemented as | 66 | RFC 2292 defines a set of functions, which are implemented as |
69 | part of the Kame libraries, to support help developers create, change, | 67 | part of the Kame libraries, to help developers create, change, |
70 | and parse Hop-by-Hope and Destination options. | 68 | and parse Hop-by-Hop and Destination options. |
71 | All of the prototypes | 69 | All of the prototypes |
72 | for the option functions are defined in the | 70 | for the option functions are defined in the |
73 | .In netinet/in.h | 71 | .Aq Pa netinet/in.h |
74 | header file. | 72 | header file. |
75 | .\" | 73 | .\" |
76 | .Ss inet6_option_space | 74 | .Ss inet6_option_space |
@@ -102,7 +100,7 @@ structures, where | |||
102 | is the number of options to be stored in the object. | 100 | is the number of options to be stored in the object. |
103 | Usually this has | 101 | Usually this has |
104 | no impact because it is assumed that most Hop-by-Hop and Destination | 102 | no impact because it is assumed that most Hop-by-Hop and Destination |
105 | option headers carry only one option as indicated in appendix B of RFC2460. | 103 | option headers carry only one option as indicated in appendix B of RFC 2460. |
106 | .\" | 104 | .\" |
107 | .Ss inet6_option_init | 105 | .Ss inet6_option_init |
108 | The | 106 | The |
@@ -112,13 +110,13 @@ a Hop-by-Hop or Destination option. | |||
112 | It returns | 110 | It returns |
113 | .Li 0 | 111 | .Li 0 |
114 | on success and | 112 | on success and |
115 | .Li -1 | 113 | .Li \-1 |
116 | when an error occurs. | 114 | when an error occurs. |
117 | .Pp | 115 | .Pp |
118 | The | 116 | The |
119 | .Fa bp | 117 | .Fa bp |
120 | argument points to a previously allocated area of memory which must be | 118 | argument points to a previously allocated area of memory which must be |
121 | large enough to contain all the arguments that the application indents | 119 | large enough to contain all the arguments that the application intends |
122 | to add later via | 120 | to add later via |
123 | .Fn inet6_option_append | 121 | .Fn inet6_option_append |
124 | and | 122 | and |
@@ -156,10 +154,11 @@ This function appends a Hop-by-Hop option or a Destination option into | |||
156 | an ancillary data object previously initialized by a call to | 154 | an ancillary data object previously initialized by a call to |
157 | .Fn inet6_option_init . | 155 | .Fn inet6_option_init . |
158 | The | 156 | The |
159 | .Fn inet6_option_append function returns | 157 | .Fn inet6_option_append |
158 | function returns | ||
160 | .Li 0 | 159 | .Li 0 |
161 | if it succeeds or | 160 | if it succeeds or |
162 | .Li -1 | 161 | .Li \-1 |
163 | when an error occurs. | 162 | when an error occurs. |
164 | .Pp | 163 | .Pp |
165 | The | 164 | The |
@@ -214,7 +213,7 @@ Alignments may be specified as | |||
214 | .Li 4 , | 213 | .Li 4 , |
215 | or | 214 | or |
216 | .Li 8 | 215 | .Li 8 |
217 | bytes, which is no alignment, 16 bit, 32 bit and 64 bit alignments | 216 | bytes, which is no alignment, 16-bit, 32-bit and 64-bit alignments |
218 | respectively. | 217 | respectively. |
219 | .Pp | 218 | .Pp |
220 | The | 219 | The |
@@ -268,7 +267,7 @@ determine if padding must be appended at the end of the option. | |||
268 | (The | 267 | (The |
269 | .Fn inet6_option_append | 268 | .Fn inet6_option_append |
270 | function does not need a data length argument | 269 | function does not need a data length argument |
271 | since the option data length must already be stored by the caller) | 270 | since the option data length must already be stored by the caller.) |
272 | .Pp | 271 | .Pp |
273 | The | 272 | The |
274 | .Fa multx | 273 | .Fa multx |
@@ -295,13 +294,13 @@ argument points to the 8-bit option type field, which is followed by | |||
295 | the 8-bit option data length, and then the option data. | 294 | the 8-bit option data length, and then the option data. |
296 | When no more | 295 | When no more |
297 | options remain to be processed, the return value is | 296 | options remain to be processed, the return value is |
298 | .Li -1 | 297 | .Li \-1 |
299 | and | 298 | and |
300 | .Fa *tptrp | 299 | .Fa *tptrp |
301 | is | 300 | is |
302 | .Dv NULL | 301 | .Dv NULL |
303 | and when an error occurs, the return value is | 302 | and when an error occurs, the return value is |
304 | .Li -1 | 303 | .Li \-1 |
305 | but the | 304 | but the |
306 | .Fa *tptrp | 305 | .Fa *tptrp |
307 | argument is not | 306 | argument is not |
@@ -310,7 +309,7 @@ This set of return values allows a program to easily loop through all | |||
310 | the options in an ancillary data object, checking for the error and | 309 | the options in an ancillary data object, checking for the error and |
311 | end of stream conditions along the way. | 310 | end of stream conditions along the way. |
312 | .Pp | 311 | .Pp |
313 | When a valid option is returned the | 312 | When a valid option is returned, the |
314 | .Fa cmsg | 313 | .Fa cmsg |
315 | argument points to a | 314 | argument points to a |
316 | .Li cmsghdr | 315 | .Li cmsghdr |
@@ -351,7 +350,7 @@ function allows an application to search for a particular option type | |||
351 | in an ancillary data object. | 350 | in an ancillary data object. |
352 | The | 351 | The |
353 | .Fa cmsg | 352 | .Fa cmsg |
354 | argument is a pointer to | 353 | argument is a pointer to a |
355 | .Li cmsghdr | 354 | .Li cmsghdr |
356 | structure in which the | 355 | structure in which the |
357 | .Li cmsg_level | 356 | .Li cmsg_level |
@@ -369,13 +368,16 @@ The | |||
369 | argument is handled exactly as in the | 368 | argument is handled exactly as in the |
370 | .Fn inet6_option_next | 369 | .Fn inet6_option_next |
371 | function described above. | 370 | function described above. |
372 | .Pa | 371 | .Pp |
373 | The | 372 | The |
374 | .fn inet6_option_find | 373 | .Fn inet6_option_find |
375 | function starts searching for an option of the specified type | 374 | function starts searching for an option of the specified type |
376 | beginning after the value of | 375 | beginning after the value of |
377 | .Fa *tptrp . | 376 | .Fa *tptrp . |
378 | .\" | 377 | .\" |
378 | .Sh EXAMPLES | ||
379 | RFC 2292 gives comprehensive examples in chapter 6. | ||
380 | .\" | ||
379 | .Sh DIAGNOSTICS | 381 | .Sh DIAGNOSTICS |
380 | The | 382 | The |
381 | .Fn inet6_option_init | 383 | .Fn inet6_option_init |
@@ -384,7 +386,7 @@ and | |||
384 | functions return | 386 | functions return |
385 | .Li 0 | 387 | .Li 0 |
386 | on success or | 388 | on success or |
387 | .Li -1 | 389 | .Li \-1 |
388 | on an error. | 390 | on an error. |
389 | .Pp | 391 | .Pp |
390 | The | 392 | The |
@@ -398,37 +400,34 @@ When | |||
398 | or | 400 | or |
399 | .Fn inet6_option_find | 401 | .Fn inet6_option_find |
400 | detect an error they return | 402 | detect an error they return |
401 | .Li -1 | 403 | .Li \-1 |
402 | setting | 404 | setting |
403 | .Fa *tptrp | 405 | .Fa *tptrp |
404 | to non | 406 | to a non |
405 | .Dv NULL | 407 | .Dv NULL |
406 | value. | 408 | value. |
407 | .\" | 409 | .\" |
408 | .Sh EXAMPLES | ||
409 | RFC2292 gives comprehensive examples in chapter 6. | ||
410 | .\" | ||
411 | .Sh SEE ALSO | 410 | .Sh SEE ALSO |
412 | .Rs | 411 | .Rs |
413 | .%A W. Stevens | 412 | .%A W. Stevens |
414 | .%A M. Thomas | 413 | .%A M. Thomas |
415 | .%T "Advanced Sockets API for IPv6" | 414 | .%T "Advanced Sockets API for IPv6" |
416 | .%N RFC2292 | 415 | .%N RFC 2292 |
417 | .%D February 1998 | 416 | .%D February 1998 |
418 | .Re | 417 | .Re |
419 | .Rs | 418 | .Rs |
420 | .%A S. Deering | 419 | .%A S. Deering |
421 | .%A R. Hinden | 420 | .%A R. Hinden |
422 | .%T "Internet Protocol, Version 6 (IPv6) Specification" | 421 | .%T "Internet Protocol, Version 6 (IPv6) Specification" |
423 | .%N RFC2460 | 422 | .%N RFC 2460 |
424 | .%D December 1998 | 423 | .%D December 1998 |
425 | .Re | 424 | .Re |
426 | .\" | 425 | .\" |
427 | .Sh HISTORY | ||
428 | The implementation first appeared in KAME advanced networking kit. | ||
429 | .\" | ||
430 | .Sh STANDARDS | 426 | .Sh STANDARDS |
431 | The functions are documented in | 427 | The functions are documented in |
432 | .Dq Advanced Sockets API for IPv6 | 428 | .Dq Advanced Sockets API for IPv6 |
433 | (RFC2292). | 429 | (RFC 2292). |
430 | .\" | ||
431 | .Sh HISTORY | ||
432 | The implementation first appeared in KAME advanced networking kit. | ||
434 | .\" | 433 | .\" |