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);
The 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.
Based on:
A pointer to the 8-bit option type field that starts the option, or NULL if an error occurred.
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes |