Initialize an ancillary data object that contains IPv6 hop-by-hop and destination options
int inet6_option_init(void *bp,
struct cmsghdr **cmsgp,
- A pointer to previously allocated space that
contains the ancillary data object. It must be large
enough to contain all the individual options to be added
by later calls to inet6_option_append() and
- A pointer to a cmsghdr structure. The *cmsgp
variable is initialized by this function to point to the
structure that this function constructs in the buffer pointed to by
- The type of option which must be either IPV6_HOPOPTS or IPV6_DSTOPTS.
This type is stored in the cmsg_type member of the
cmsghdr structure pointed to by *cmsgp.
Use the -l socket option to
to link against this library.
Call inet6_option_init() function once per ancillary data object that
contains either hop-by-hop or destination options.
- An error has occurred.
- 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.