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);
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.
libsocket
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().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
inet6_option_alloc(), inet6_option_find(), inet6_option_init(), inet6_option_next(), inet6_option_space()
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.