iptools package—a toolkit for manipulating, validating and testing IP addresses and ranges, along with datasets relating to IP addresses—is flying through the internets and hitting a CRAN mirror near you, soon.
range_boundaries() function now returns the three new fields that are pretty obvious once you see it in action:
range_boundaries("172.18.0.0/28") ## minimum_ip maximum_ip min_numeric max_numeric range ## 1 172.18.0.0 172.18.0.15 2886860800 2886860815 172.18.0.0/28
They are tacked on the end, so if you were using positional or named columns previously, you’re still good to go.
We’ve added a new
country_ranges() function to return all “assigned” CIDR blocks in a country. You just give it character vector of one or more ISO 3166-1 alpha-2 codes and you get back the CIDRs:
country_ranges("TO") ## $TO ##  "184.108.40.206/22" "220.127.116.11/22" "18.104.22.168/23" "22.214.171.124/22" "126.96.36.199/21" "188.8.131.52/21" ##  "184.108.40.206/21"
This data is updated daily and there’s some session caching built-into the function to speed up subsequent calls if you forgot to save the output. You can flush the session cache with
flush_country_cidrs() and query it with
We’re waiting until the R 3.3.0 Windows toolchain is stable to add in MaxMind ASN lookups. If there are any IP-related functions you need added, drop us an issue. We’re at nearly 1,700 downloads from the RStudio mirror, which (IMO) is kinda cool for such a niche package. Many thanks to all our users and one more thank you to Dirk for the