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_alloc.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_alloc.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_alloc.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_alloc.html on line 8
Append IPv6 hop-by-hop or destination options into ancillary data
object
#include <netinet/in.h>
u_int8_t * inet6_option_alloc(struct cmsghdr *cmsg,
int datalen,
int multx,
int plusy);
- cmsg
- A pointer to the cmsghdr
structure that must have been initialized by inet6_option_init().
- datalen
- The length of the option, in bytes.
This value is required as an argument to allow the function
to determine if padding should be appended at the end of the option,
argument since
the option data length must already be stored by the caller (the
inet6_option_append() function doesn't need a data length).
- multx
- The value x in the alignment term
xn + y.
It must have a value of 1, 2, 4, or 8.
- plusy
- Value y in the alignment term
xn + y.
It must have a value between 0 and 7, inclusive.
libsocket
Use the -l socket option to
qcc
to link against this library.
This inet6_option_alloc() function appends a hop-by-hop option or a destination option
into an ancillary data object that has been initialized by
inet6_option_init().
The difference between this function and inet6_option_append() is
that the latter copies the contents of the previously built option into the
ancillary data object. This function returns a pointer to the
space in the data object where the option's type-length-value or TLV must then be built by the
caller.
A pointer to the 8-bit option type field that starts the option, or NULL if an error has occurred.
RFC 2292
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
inet6_option_append(),
inet6_option_find(),
inet6_option_init(),
inet6_option_next(),
inet6_option_space()
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_alloc.html on line 173
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_alloc.html on line 173