tst_send_hhopt_setopt - Send Hop-by-Hop options header by specifies it using setsockopt()
To check that send a Hop-by-Hop options header, the application can specifies the header using setsockopt().
./tst_send_hhopt_setopt [-tooloption ...] -tooloption : v6api tool option
1. Create an IPv6 socket 2. Enable socket to receive Hop-by-Hop options 3. Set Hop-by-Hop options header of socket 4. Bind socket to address 5. Send message to itself 6. Receive message on socket 7. Check A: Hop-by-Hop option can be received 8. Check B: the value and length of Hop-by-Hop option is correct
None
RFC 3542
8.2. Sending Hop-by-Hop Options
To send a Hop-by-Hop options header, the application specifies the header either as ancillary data in a call to sendmsg() or using setsockopt().
The application can remove any sticky Hop-by-Hop options header by calling setsockopt() for IPV6_HOPOPTS with a zero option length.
All the Hop-by-Hop options must be specified by a single ancillary data object. The cmsg_level member is set to IPPROTO_IPV6 and the cmsg_type member is set to IPV6_HOPOPTS. The option is normally constructed using the inet6_opt_init(), inet6_opt_append(), inet6_opt_finish(), and inet6_opt_set_val() functions, described in Section 10.
Additional errors may be possible from sendmsg() and setsockopt() if the specified option is in error.