Standards / Extensions | C or C++ | Dependencies |
---|---|---|
RFC3542 |
both | z/OS® V1R7 |
#define _OPEN_SYS_SOCK_IPV6
#include <netinet/in.h>
int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
inet6_opt_finish() returns the updated total length taking into account the final padding of the extension header to make it a multiple of 8 bytes. If extbuf is not NULL the function also initializes the option by inserting a Pad1 or PadN option of the proper length.
If successful, inet6_opt_finish() returns the total length of the extension header including the final padding.
Upon failure, returns -1 and errno is set to one of the following:
EINVAL If one of the following is true:
offset should be the length returned by inet6_opt_init() or inet6_opt_append().