Append an IPv6 hop-by-hop or destination option to an ancillary data object
#include <netinet/in.h> int inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, int plusy);
- A pointer to the cmsghdr structure that must have been initialized by inet6_option_init().
- A pointer to the 8-bit option type. It's assumed
that this field is immediately followed by the 8-bit option data length field,
which is then followed by the option data.
You must initialize these three fields (the type-length-value, or TLV)
before calling this function.
The option type must have a value from 2 to 255, inclusive. (0 and 1 are reserved for the Pad1 and PadN options, respectively.)
The option data length must be between 0 and 255, inclusive, and is the length of the option data that follows.
- The value x in the alignment term xn + y. It must have a value of 1, 2, 4, or 8.
- The value y in the alignment term xn + y. It must have a value between 0 and 7, inclusive.
Use the -l socket option to qcc to link against this library.
This inet6_option_append() function appends a hop-by-hop option or a destination option to an ancillary data object that has been initialized by inet6_option_init().
- 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.
- An error has occurred.
Last modified: 2013-09-30