End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Addrinfo#ipv4_multicast?
ipv4_multicast?
ext/socket/raddrinfo.c
View on GitHub ↗
static VALUE
addrinfo_ipv4_multicast_p(VALUE self)
{
uint32_t a;
if (!extract_in_addr(self, &a)) return Qfalse;
if ((a & 0xf0000000) == 0xe0000000) /* 224.0.0.0/4 */
return Qtrue;
return Qfalse;
}
Returns true for IPv4 multicast address (224.0.0.0/4). It returns false otherwise.