Fix for CRAN checks.
Fix for CRAN checks.
To mark the release of ipaddress 1.0.0, some breaking changes were made to improve the interface for data analysis.
multiple
argument from ip_to_hostname()
and hostname_to_ip()
(#83).
ip_to_hostname()
and hostname_to_ip()
now always return one result per input (stored in a vector).ip_to_hostname_all()
and hostname_to_ip_all()
return all results per input (stored in a list of vectors).subnets()
now takes vector input and outputs a list of vectors (#83).strict
argument of ip_network()
.exploded
argument of format.ip_address()
, format.ip_network()
and format.ip_interface()
.replace
argument of sample_ipv4()
, sample_ipv6()
and sample_network()
.country_networks()
downloads IP networks registered to specific countries (#87).is_ipv6
argument of netmask()
and hostmask()
defaults to NULL
. This option prefers an IPv4 mask, but creates an IPv6 mask as a fallback.vignette("ipaddress-classes")
to vignette("ip-data")
.vignette("ipaddress-examples")
to vignette("recipes")
.iana_ipv4
dataset.Fix for CRAN checks.
Fix for CRAN checks.
Fix for CRAN checks.
Fix for CRAN checks.
base
argument of ip_to_integer()
is removed.
base = "dec"
is still handled by ip_to_integer()
.base = "bin"
is still handled by the existing ip_to_binary()
function.base = "hex"
is now handled by the new ip_to_hex()
function.ip_to_integer()
and integer_to_ip()
now use bignum::biginteger()
vectors to store IP addresses as integers. Previously, these integers were stored in a character vector (because they were beyond the range of base R numeric types).
ip_to_hex()
and hex_to_ip()
functions to encode and decode addresses as hexadecimal strings.ip_to_bytes()
now returns a list of raw vectors instead of a blob
object (#65).
blob::as_blob()
.LinkingTo: ipaddress
without LinkingTo: AsioHeaders
.This 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 length.ip_interface()
: network compared before host address.ip_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 doubles.netmask()
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 networks.vignette("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 networks.netmask()
and hostmask()
are now generics, so they can now accept:
ip_network()
vector (existing behavior).ip_interface()
vector.seq.ip_network()
and hosts()
functions to list all addresses within a network.sample_ipv4()
, sample_ipv6()
and sample_network()
(#11, #19).NA
.
0.0.0.128
.0:80::/32
network.is_subnet()
and is_supernet()
now check the prefix length, to ensure they are a true subnet or supernet.Fix for CRAN checks.
First CRAN release
ip_address()
and ip_network()
classes.
vctrs
package for full tidyverse compatibility.is_within()
and is_within_any()
check if addresses are within networks.is_subnet()
and is_supernet()
check if networks are within other networks.is_ipv4()
and is_ipv6()
classify the address space.prefix_length()
, netmask()
and hostmask()
yield different representations of the network mask.Rcpp
and AsioHeaders
packages) for improved performance.