diff options
| author | jmc <> | 2006-12-09 13:29:54 +0000 |
|---|---|---|
| committer | jmc <> | 2006-12-09 13:29:54 +0000 |
| commit | dc480bda7434b3d570830e85fb6e1b39be1c5ee0 (patch) | |
| tree | 7d682ad5be553802db95c14614581e20fa00a268 | |
| parent | 4a3ae6fed825c2b6e0f6f3e8985a59c12fced6fa (diff) | |
| download | openbsd-dc480bda7434b3d570830e85fb6e1b39be1c5ee0.tar.gz openbsd-dc480bda7434b3d570830e85fb6e1b39be1c5ee0.tar.bz2 openbsd-dc480bda7434b3d570830e85fb6e1b39be1c5ee0.zip | |
various tweaks; my apologies to itojun for forgetting to
send him feedback for these
| -rw-r--r-- | src/lib/libc/net/inet6_opt_init.3 | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/lib/libc/net/inet6_opt_init.3 b/src/lib/libc/net/inet6_opt_init.3 index a97eb0f28b..9fad745923 100644 --- a/src/lib/libc/net/inet6_opt_init.3 +++ b/src/lib/libc/net/inet6_opt_init.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: inet6_opt_init.3,v 1.1 2006/12/09 01:12:28 itojun Exp $ | 1 | .\" $OpenBSD: inet6_opt_init.3,v 1.2 2006/12/09 13:29:54 jmc Exp $ |
| 2 | .\" $KAME: inet6_opt_init.3,v 1.7 2004/12/27 05:08:23 itojun Exp $ | 2 | .\" $KAME: inet6_opt_init.3,v 1.7 2004/12/27 05:08:23 itojun Exp $ |
| 3 | .\" | 3 | .\" |
| 4 | .\" Copyright (C) 2004 WIDE Project. | 4 | .\" Copyright (C) 2004 WIDE Project. |
| @@ -63,21 +63,21 @@ | |||
| 63 | Building and parsing the Hop-by-Hop and Destination options is | 63 | Building and parsing the Hop-by-Hop and Destination options is |
| 64 | complicated. | 64 | complicated. |
| 65 | The advanced sockets API defines a set of functions to | 65 | The advanced sockets API defines a set of functions to |
| 66 | help applications create and manipulate Hop-by-Hope and Destination | 66 | help applications create and manipulate Hop-by-Hop and Destination |
| 67 | options. | 67 | options. |
| 68 | .\"This man page describes the functions specified in | 68 | .\"This man page describes the functions specified in |
| 69 | .\"IETF Draft RFC3542 while the | 69 | .\"IETF Draft RFC 3542 while the |
| 70 | .\".Xr inet6_options_space 3 | 70 | .\".Xr inet6_options_space 3 |
| 71 | .\"man page documents the functions defined in RFC 2292. | 71 | .\"man page documents the functions defined in RFC 2292. |
| 72 | .\"It is expected | 72 | .\"It is expected |
| 73 | .\"that this set of functions will supersede those in RFC 2292 but for | 73 | .\"that this set of functions will supersede those in RFC 2292 but for |
| 74 | .\"the time being both APIs are retained. | 74 | .\"the time being both APIs are retained. |
| 75 | These functions use the | 75 | These functions use the |
| 76 | formatting rules specified in Appendix B in RFC2460, i.e., that the | 76 | formatting rules specified in Appendix B in RFC 2460, i.e. that the |
| 77 | largest field is placed last in the option. | 77 | largest field is placed last in the option. |
| 78 | The function prototypes | 78 | The function prototypes |
| 79 | for these functions are all contained in the header file | 79 | for these functions are all contained in the header file |
| 80 | .Aq netinet/in.h . | 80 | .Aq Pa netinet/in.h . |
| 81 | .\" | 81 | .\" |
| 82 | .Ss inet6_opt_init | 82 | .Ss inet6_opt_init |
| 83 | The | 83 | The |
| @@ -92,7 +92,8 @@ then the | |||
| 92 | .Fn inet6_opt_init | 92 | .Fn inet6_opt_init |
| 93 | function also initializes the extension header's length field. | 93 | function also initializes the extension header's length field. |
| 94 | When attempting to initialize an extension buffer passed in the | 94 | When attempting to initialize an extension buffer passed in the |
| 95 | .Va extbuf argument | 95 | .Va extbuf |
| 96 | argument, | ||
| 96 | .Fa extlen | 97 | .Fa extlen |
| 97 | must be a positive multiple of 8 or else the function fails and | 98 | must be a positive multiple of 8 or else the function fails and |
| 98 | returns \-1 to the caller. | 99 | returns \-1 to the caller. |
| @@ -100,7 +101,7 @@ returns \-1 to the caller. | |||
| 100 | .Ss inet6_opt_append | 101 | .Ss inet6_opt_append |
| 101 | The | 102 | The |
| 102 | .Fn inet6_opt_append | 103 | .Fn inet6_opt_append |
| 103 | function can perform to different jobs. | 104 | function can perform different jobs. |
| 104 | When a valid | 105 | When a valid |
| 105 | .Fa extbuf | 106 | .Fa extbuf |
| 106 | argument is supplied it appends an option to the extension buffer and | 107 | argument is supplied it appends an option to the extension buffer and |
| @@ -113,7 +114,8 @@ of | |||
| 113 | is | 114 | is |
| 114 | .Dv NULL | 115 | .Dv NULL |
| 115 | then the | 116 | then the |
| 116 | .Fn inet6_opt_append function only reports what the total length would | 117 | .Fn inet6_opt_append |
| 118 | function only reports what the total length would | ||
| 117 | be if the option were actually appended. | 119 | be if the option were actually appended. |
| 118 | The | 120 | The |
| 119 | .Fa len | 121 | .Fa len |
| @@ -159,7 +161,7 @@ The | |||
| 159 | parameter must have a value of 1, 2, 4, or 8 and cannot exceed the | 161 | parameter must have a value of 1, 2, 4, or 8 and cannot exceed the |
| 160 | value of | 162 | value of |
| 161 | .Fa len . | 163 | .Fa len . |
| 162 | The alignment values represent no alignment, 16 bit, 32 bit and 64 bit | 164 | The alignment values represent no alignment, 16-bit, 32-bit and 64-bit |
| 163 | alignments respectively. | 165 | alignments respectively. |
| 164 | .\" | 166 | .\" |
| 165 | .Ss inet6_opt_finish | 167 | .Ss inet6_opt_finish |
| @@ -195,7 +197,8 @@ The | |||
| 195 | argument is a pointer to memory that was returned by the | 197 | argument is a pointer to memory that was returned by the |
| 196 | .Fn inet6_opt_append | 198 | .Fn inet6_opt_append |
| 197 | call and the | 199 | call and the |
| 198 | .Fa offset argument specifies where the option should be placed in the | 200 | .Fa offset |
| 201 | argument specifies where the option should be placed in the | ||
| 199 | data buffer. | 202 | data buffer. |
| 200 | The | 203 | The |
| 201 | .Fa val | 204 | .Fa val |
| @@ -205,7 +208,7 @@ inserted into the extension header, and the | |||
| 205 | argument indicates how much data to copy. | 208 | argument indicates how much data to copy. |
| 206 | .Pp | 209 | .Pp |
| 207 | The caller should ensure that each field is aligned on its natural | 210 | The caller should ensure that each field is aligned on its natural |
| 208 | boundaries as described in Appendix B of RFC2460. | 211 | boundaries as described in Appendix B of RFC 2460. |
| 209 | .Pp | 212 | .Pp |
| 210 | The function returns the offset for the next field which is calculated as | 213 | The function returns the offset for the next field which is calculated as |
| 211 | .Fa offset | 214 | .Fa offset |
| @@ -236,7 +239,7 @@ The option is returned in the arguments | |||
| 236 | .Fa typep , lenp , | 239 | .Fa typep , lenp , |
| 237 | and | 240 | and |
| 238 | .Fa databufp . | 241 | .Fa databufp . |
| 239 | .Fa typep, lenp, | 242 | .Fa typep , lenp , |
| 240 | and | 243 | and |
| 241 | .Fa databufp | 244 | .Fa databufp |
| 242 | point to the 8-bit option type, the 8-bit option length and the option | 245 | point to the 8-bit option type, the 8-bit option length and the option |
| @@ -280,7 +283,7 @@ or | |||
| 280 | functions. | 283 | functions. |
| 281 | The | 284 | The |
| 282 | .Fa val | 285 | .Fa val |
| 283 | argument points where the data will be extracted. | 286 | argument points to where the data will be extracted. |
| 284 | The | 287 | The |
| 285 | .Fa offset | 288 | .Fa offset |
| 286 | argument specifies from where in the data portion of the option the | 289 | argument specifies from where in the data portion of the option the |
| @@ -288,7 +291,7 @@ value should be extracted; the first byte of option data is specified | |||
| 288 | by an offset of zero. | 291 | by an offset of zero. |
| 289 | .Pp | 292 | .Pp |
| 290 | It is expected that each field is aligned on its natural boundaries as | 293 | It is expected that each field is aligned on its natural boundaries as |
| 291 | described in Appendix B of RFC2460. | 294 | described in Appendix B of RFC 2460. |
| 292 | .Pp | 295 | .Pp |
| 293 | The function returns the offset for the next field | 296 | The function returns the offset for the next field |
| 294 | by calculating | 297 | by calculating |
| @@ -298,18 +301,17 @@ by calculating | |||
| 298 | which can be used when extracting option content with multiple fields. | 301 | which can be used when extracting option content with multiple fields. |
| 299 | Robust receivers must verify alignment before calling this function. | 302 | Robust receivers must verify alignment before calling this function. |
| 300 | .\" | 303 | .\" |
| 301 | .Sh DIAGNOSTICS | ||
| 302 | All the functions return | ||
| 303 | \-1 | ||
| 304 | on an error. | ||
| 305 | .\" | ||
| 306 | .Sh EXAMPLES | 304 | .Sh EXAMPLES |
| 307 | RFC3542 gives comprehensive examples in Section 23. | 305 | RFC 3542 gives comprehensive examples in Section 23. |
| 308 | .Pp | ||
| 309 | KAME also provides examples in the | 306 | KAME also provides examples in the |
| 310 | .Pa advapitest | 307 | .Pa advapitest |
| 311 | directory of its kit. | 308 | directory of its kit. |
| 312 | .\" | 309 | .\" |
| 310 | .Sh DIAGNOSTICS | ||
| 311 | All the functions return | ||
| 312 | \-1 | ||
| 313 | on an error. | ||
| 314 | .\" | ||
| 313 | .Sh SEE ALSO | 315 | .Sh SEE ALSO |
| 314 | .Rs | 316 | .Rs |
| 315 | .%A W. Stevens | 317 | .%A W. Stevens |
| @@ -317,20 +319,20 @@ directory of its kit. | |||
| 317 | .%A E. Nordmark | 319 | .%A E. Nordmark |
| 318 | .%A T. Jinmei | 320 | .%A T. Jinmei |
| 319 | .%T "Advanced Sockets API for IPv6" | 321 | .%T "Advanced Sockets API for IPv6" |
| 320 | .%N RFC3542 | 322 | .%N RFC 3542 |
| 321 | .%D October 2002 | 323 | .%D October 2002 |
| 322 | .Re | 324 | .Re |
| 323 | .Rs | 325 | .Rs |
| 324 | .%A S. Deering | 326 | .%A S. Deering |
| 325 | .%A R. Hinden | 327 | .%A R. Hinden |
| 326 | .%T "Internet Protocol, Version 6 (IPv6) Specification" | 328 | .%T "Internet Protocol, Version 6 (IPv6) Specification" |
| 327 | .%N RFC2460 | 329 | .%N RFC 2460 |
| 328 | .%D December 1998 | 330 | .%D December 1998 |
| 329 | .Re | 331 | .Re |
| 330 | .Sh HISTORY | ||
| 331 | The implementation first appeared in KAME advanced networking kit. | ||
| 332 | .Sh STANDARDS | 332 | .Sh STANDARDS |
| 333 | The functions are documented in | 333 | The functions are documented in |
| 334 | .Dq Advanced Sockets API for IPv6 | 334 | .Dq Advanced Sockets API for IPv6 |
| 335 | .Pq RFC3542 . | 335 | .Pq RFC 3542 . |
| 336 | .Sh HISTORY | ||
| 337 | The implementation first appeared in KAME advanced networking kit. | ||
| 336 | .\" | 338 | .\" |
