This is a temporary substitute for al Kyua/ATF regression test.
This remains an optional feature that was beyond the scope of IETF's normative references for IPv6
multicast; support has been strictly on a best-effort basis.
Two new commands are added to mtest(8):
u mcast-addr ifname - join IPv4-mapped group on IPv6 socket
v mcast-addr ifname - leave IPv4-mapped group on IPv6 socket
Add an internal helper function in6_v4_to_v4mapped() to perform the
converse of the IN6_IS_ADDR_V4MAPPED() check to support this use case.
Whilst in6_v4_to_v4mapped() returns its first argument as a convenience,
avoid the temptation to dereference a pointer to that which we already hold.
Strictly the use of sockunion_t within mtest(8) more generally is a form
of controlled type punning (aliasing). Use a temporary as we overwrite
contents of su; the resultant write would overlap memory locations.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246