Check whether an IP address is valid with is_valid, IPv4 with is_ipv4, IPv6 with is_ipv6, or multicast (intended to point to multiple machines) with is_multicast

is_multicast(ip_addresses)

is_ipv4(ip_addresses)

is_ipv6(ip_addresses)

is_valid(ip_addresses)

Arguments

ip_addresses
a vector of IP addresses

Value

a vector of TRUE or FALSE values, indicating whether an IP is multicast or not, or NA values if the IP addresses are NAs.

See also

ip_classify for character rather than logical classification.

Examples

# This is multicast is_multicast("224.0.0.2")
#> [1] TRUE #>
# It's also IPv4 is_ipv4("224.0.0.2")
#> [1] TRUE #>
# It's not IPv6 is_ipv6("224.0.0.2")
#> [1] FALSE #>