The [`iptools` package](https://github.com/hrbrmstr/iptools)—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.
### What’s fixed?
[Tim Smith](https://github.com/tdsmith) fixed [a bug](https://github.com/hrbrmstr/iptools/issues/26) in `ip_in_range()` that occurred when the netmask was `/32` (thanks, Tim!).
### What’s new?
The `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 ##  "126.96.36.199/22" "188.8.131.52/22" "184.108.40.206/23" "220.127.116.11/22" "18.104.22.168/21" "22.214.171.124/21" ##  "126.96.36.199/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 `cached_country_cidrs()`.
### What’s next?
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](https://github.com/hrbrmstr/iptools/issues). 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 `AsioHeaders` package.
If you want some “bad” IP addresses to play around with in `iptools`, check out the [`blocklist`](https://github.com/hrbrmstr/blocklist) package, which provides an interface to a subset of the [blocklist.de](http://www.blocklist.de/en/index.html) API.
Pingback: iptools 0.4.0 released into the wild (i.e. is hitting the CRAN mirrors today) – Mubashir Qasim