Standards / Extensions | C or C++ | Dependencies |
---|---|---|
RFC3542 |
both | z/OS® V1R7 |
#define _OPEN_SYS_SOCK_IPV6
#include <netinet/in.h>
int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
uint8_t type, socklen_t len, uint8_t align,
void **databufp);
inet6_opt_append() returns the updated total length after adding an option with length len and alignment align. If extbuf is not NULL, it inserts any necessary padding and sets the type and length fields. A pointer to the location for the option content in databufp is then returned.
offset should be the length returned by inet6_opt_init() or the previous inet6_opt_append(). type is the 8-bit option type and len is the length of the option data (excluding the option type and option length fields).
If successful, inet6_opt_append() returns the updated total length of the extension header.
Upon failure, returns -1 and errno is set to one of the following:
EINVAL If one of the following is true: