tst_remove_hhopt - Remove any sticky Hop-by-Hop options header
Check whether the application can remove any sticky Hop-by-Hop options header by calling setsockopt() for IPV6_HOPOPTS with a zero option length.
./tst_remove_hhopt [-tooloption ...] -tooloption : v6api tool option
1. Create an IPv6 socket 2. Remove any sticky Hop-by-Hop options header 3. Check A: Remove success since there is no Hop-by-Hop options header has been set. 4. Set Hop-by-Hop options header 5. Get Hop-by-Hop options header which has been set 6. Check B: Hop-by-Hop options header be set correctly 7. Remove any sticky Hop-by-Hop options header 8. Get Hop-by-Hop options header 9. Check C: Hop-by-Hop options header has been removed
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.