Main index | Section 3 | Options |
#include <netinet/in.h>
The type argument is the 8-bit option type.
After inet6_opt_append() has been called, the application can use the buffer pointed to by databufp directly, or use inet6_opt_set_val() to specify the data to be contained in the option.
Option types of 0 and 1 are reserved for the Pad1 and PadN options. All other values from 2 through 255 may be used by applications.
The length of the option data is contained in an 8-bit value and so may contain any value from 0 through 255.
The align parameter must have a value of 1, 2, 4, or 8 and cannot exceed the value of len. The alignment values represent no alignment, 16 bit, 32 bit and 64 bit alignments, respectively.
If the extension header is too small to contain the proper padding then an error of -1 is returned to the caller.
The caller should ensure that each field is aligned on its natural boundaries as described in Appendix B of RFC 2460.
The function returns the offset for the next field which is calculated as offset + vallen and is used when composing options with multiple fields.
It is expected that each field is aligned on its natural boundaries as described in Appendix B of RFC 2460.
The function returns the offset for the next field by calculating offset + vallen which can be used when extracting option content with multiple fields. Robust receivers must verify alignment before calling this function.
KAME also provides examples in the advapitest directory of its kit.
RFC 3542, Advanced Sockets API for IPv6, October 2002.
, , , ,RFC 2460, Internet Protocol, Version 6 (IPv6) Specification, December 1998.
, ,INET6_OPT_INIT (3) | February 25, 2023 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you are angry with someone, you should walk a mile in their shoes - then you'll be a mile away from them, and you'll have their shoes. | ” |