ip_network()
vectors without using CIDR notation
common_network()
function finds the smallest network containing two addressessummarize_address_range()
function lists the constituent networks of an address rangeprefix_length()
can now infer the prefix length from an ip_address()
vector of netmasks and/or hostmasks. This makes it possible to construct an ip_network()
vector like so:
ip_network(ip_address("192.0.2.0"), prefix_length(ip_address("255.255.255.0")))
ip_network(ip_address("192.0.2.0"), prefix_length(ip_address("0.0.0.255")))
supernet()
and subnets()
functions for traversing the network hierarchyvignette("ipaddress-examples")
to describe some typical usage patternsinteger_to_ip()
now accepts integerish doublesnetmask()
and hostmask()
now raise an error if the prefix_length
and is_ipv6
arguments are not both specifiedis_within_any()
to correctly catch when IPv6 addresses are in zero networksvignette("ipaddress")
as vignette("ipaddress-classes")
as_packed()
and from_packed()
become ip_to_bytes()
and bytes_to_ip()
as_binary()
and from_binary()
become ip_to_binary()
and binary_to_ip()
as_hostname()
and from_hostname()
become ip_to_hostname()
and hostname_to_ip()
ip_to_integer()
and integer_to_ip()
functions to encode and decode addresses as integers. Note that the integers are contained within a character vector. Please see the function documentation for an explanation.vignette("ipaddress")
to introduce the data classes provided by ipaddressip_interface()
class to simultaneously store the address and the network it is onip_address()
vectors now support bitwise operations (!
, &
, |
and ^
)ip_address()
vectors now support addition and subtraction of integersip_network()
constructor that accepts ip_address
and prefix length vectorsas_packed()
and from_packed()
functions to encode and decode addresses as raw bytesas_binary()
and from_binary()
functions to encode and decode addresses as binary stringsas_hostname()
and from_hostname()
functions translate addresses to and from hostnamesmax_prefix_length()
function to get the size of the address space (32-bit for IPv4 and 128-bit for IPv6)is_multicast()
, is_unspecified()
, is_loopback()
, is_link_local()
is_ipv4_mapped()
, is_6to4()
, is_teredo()
extract_ipv4_mapped()
, extract_6to4()
, extract_teredo_server()
, extract_teredo_client()
num_addresses()
, network_address()
and broadcast_address()
overlaps()
function to check for any overlap between networksnetmask()
and hostmask()
are now generics, so they can now accept:
ip_network()
vector (existing behavior)ip_interface()
vectorseq.ip_network()
and hosts()
functions to list all addresses within a networksample_ipv4()
, sample_ipv6()
and sample_network()
NA
0.0.0.128
0:80::/32
networkis_subnet()
and is_supernet()
now check the prefix length, to ensure they are a true subnet or supernet.Hotfix for CRAN errors on Solaris.
First CRAN release
ip_address()
and ip_network()
classes
vctrs
package for full tidyverse compatibilityis_within()
and is_within_any()
check if addresses are within networksis_subnet()
and is_supernet()
check if networks are within other networksis_ipv4()
and is_ipv6()
classify the address spaceprefix_length()
, netmask()
and hostmask()
yield different representations of the network maskRcpp
and AsioHeaders
packages) for improved performance