ip_to_bytes() now returns a list of raw vectors instead of a blob object (#65)
blob::as_blob()LinkingTo: ipaddress without LinkingTo: AsioHeadersThis release achieves feature parity with the Python ipaddress module (#46).
is_private(), is_reserved(), is_site_local() (#49)is_global() checks if addresses or networks are not reserved (#49)collapse_networks() collapses contiguous and overlapping networks (#54)exclude_networks() removes networks from others (#59)reverse_pointer() returns the record used by reverse DNS (#57)iana_ipv4 and iana_ipv6 contain registries of allocated blocks (#55)%<<% and %>>% (#52)IpAddressVector and IpNetworkVector classes to other packages (use LinkingTo: AsioHeaders, ipaddress, Rcpp). This does not affect the public R interface. (#51)format.ip_address(), format.ip_network() and format.ip_interface() gain an exploded parameter to display leading zeros for IPv6 addresses (#56)ip_to_integer() gains a base parameter to select between decimal, hexadecimal and binary outputs (#47)vignette("ipaddress-examples") to use the fuzzyjoin package (#61)vignette("ipaddress-examples") with how to randomly generate public IP addresses (#62)ip_address() vectors to account for machine endianness (#53)ip_network() and ip_interface() vectors is now consistent with the Python ipaddress module
ip_network(): network address compared before prefix lengthip_interface(): network compared before host addressip_network() vectors without using CIDR notation
common_network() function finds the smallest network containing two addresses (#39)summarize_address_range() function lists the constituent networks of an address range (#41)prefix_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: (#36)
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 hierarchy (#42)vignette("ipaddress-examples") to describe some typical usage patterns (#43)integer_to_ip() now accepts integerish doublesnetmask() and hostmask() now raise an error if the prefix_length and is_ipv6 arguments are not both specified (#38)is_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. (#30)vignette("ipaddress") to introduce the data classes provided by ipaddress (#24)ip_interface() class to simultaneously store the address and the network it is on (#15)ip_address() vectors now support bitwise operations (!, &, | and ^)ip_address() vectors now support addition and subtraction of integers (#14)ip_network() constructor that accepts ip_address and prefix length vectors (#9)as_packed() and from_packed() functions to encode and decode addresses as raw bytes (#13)as_binary() and from_binary() functions to encode and decode addresses as binary strings (#18)as_hostname() and from_hostname() functions translate addresses to and from hostnames (#22)max_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() (#11, #19)NA
0.0.0.1280: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