tst_is_addr_mc_orglocal - Use IN6_IS_ADDR_MC_ORGLOCAL to test for special IPv6 addresses
To check whether macro IN6_IS_ADDR_MC_ORGLOCAL is works correctly.
./tst_is_addr_mc_orglocal [-tooloption ...] -tooloption : v6api tool option
1. Test for IPv6 organization local address, should return true 2. Test for IPv6 multicast link local address, should return false 3. Test for IPv6 multicast node local address, should return false 4. Test for IPv6 multicast site local address, should return false 5. Test for IPv6 multicast global address, should return false
None
RFC 3493
6.4 Address Testing Macros
The following macros can be used to test for special IPv6 addresses.
#include <netinet/in.h>
int IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *); int IN6_IS_ADDR_LOOPBACK (const struct in6_addr *); int IN6_IS_ADDR_MULTICAST (const struct in6_addr *); int IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *); int IN6_IS_ADDR_SITELOCAL (const struct in6_addr *); int IN6_IS_ADDR_V4MAPPED (const struct in6_addr *); int IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
int IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *); int IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *); int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *); int IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *); int IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
Note that IN6_IS_ADDR_LINKLOCAL and IN6_IS_ADDR_SITELOCAL return true only for the two types of local-use IPv6 unicast addresses (Link- Local and Site-Local) defined in [2], and that by this definition, the IN6_IS_ADDR_LINKLOCAL macro returns false for the IPv6 loopback address (::1). These two macros do not return true for IPv6 multicast addresses of either link-local scope or site-local scope.