Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 8
Determine how much space an IPv6 hop-by-hop or destination option
requires
#include <netinet/in.h>
int inet6_option_space(int nbytes);
- nbytes
- The size of the structure that defines
the option. It includes any padding bytes at the
beginning (the value y in the alignment term
xn + y, the type byte),
the length byte, and the option data.
libsocket
Use the -l socket option to
qcc
to link against this library.
This inet6_option_space() function returns the number of bytes required to
hold an option when it's stored as ancillary data, including
the cmsghdr structure
at the beginning, and any padding at the end
(to make its size a multiple of 8 bytes).
|
When multiple options are stored in a single ancillary data object,
this function overestimates the amount of space required
by the size of N-1 cmsghdr structures,
where N is the number of options to be stored in the object.
This is of little consequence, since it's assumed that most hop-by-hop
option and destination option headers carry only one option
(see Appendix B of RFC 2460). |
RFC 2292
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
inet6_option_alloc(),
inet6_option_append()
inet6_option_find(),
inet6_option_init(),
inet6_option_next()
Based on:
- W. Stevens and M. Thomas, Advanced Sockets API for IPv6,
RFC 2292, February 1998. Contains examples.
- S. Deering and R. Hinden, Internet Protocol, Version 6
(IPv6) Specification, RFC 2460, December 1998.
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 153
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_space.html on line 153