Checks whether an IP address is a multicast address.
is_multicast(x:ip) -> boolDescription
Section titled “Description”The is_multicast function checks whether a given IP address x is a multicast
address.
For IPv4, multicast addresses are in the range 224.0.0.0 to 239.255.255.255 (224.0.0.0/4).
For IPv6, multicast addresses start with the prefix ff00::/8.
Examples
Section titled “Examples”Check if an IP is multicast
Section titled “Check if an IP is multicast”from { ipv4_multicast: 224.0.0.1.is_multicast(), ipv6_multicast: ff02::1.is_multicast(), not_multicast: 8.8.8.8.is_multicast(),}{ ipv4_multicast: true, ipv6_multicast: true, not_multicast: false,}See Also
Section titled “See Also”is_v4,
is_v6,
is_loopback,
is_private,
is_global,
is_link_local,
ip_category