Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_reserved

Reserved addresses


Description

Most of these functions check if an address or network is reserved for special use. The exception is is_global(), which checks if it is not reserved.

A network is considered reserved if both the network_address() and broadcast_address() are reserved.

Usage

is_private(x)

is_global(x)

is_multicast(x)

is_unspecified(x)

is_reserved(x)

is_loopback(x)

is_link_local(x)

is_site_local(x)

Arguments

x

An ip_address or ip_network vector

Details

Here are hyperlinks to the IANA registries of allocated address space:

Value

A logical vector

See Also

Addresses reserved by IPv6 transition mechanisms can be identified by functions described in ipv6-transition.

Examples

is_private(ip_network(c("192.168.0.0/16", "2001:db8::/32")))

is_global(ip_network(c("1.0.0.0/8", "2002::/32")))

is_multicast(ip_network(c("224.0.0.0/4", "ff00::/8")))

is_unspecified(ip_network(c("0.0.0.0/32", "::/128")))

is_reserved(ip_network(c("240.0.0.0/4", "f000::/5")))

is_loopback(ip_network(c("127.0.0.0/8", "::1/128")))

is_link_local(ip_network(c("169.254.0.0/16", "fe80::/10")))

is_site_local(ip_network("fec0::/10"))

ipaddress

Tidy IP Addresses

v0.5.1
MIT + file LICENSE
Authors
David Hall [aut, cre] (<https://orcid.org/0000-0002-2193-0480>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.