Method: Addrinfo#ipv4_multicast?
- Defined in:
- raddrinfo.c
#ipv4_multicast? ⇒ Boolean
Returns true for IPv4 multicast address (224.0.0.0/4). It returns false otherwise.
2552 2553 2554 2555 2556 2557 2558 2559 2560 |
# File 'raddrinfo.c', line 2552
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;
}
|