This library lets you have an abstraction over IP addresses (ipv4 only for now) to manipulate them. It can be found here: https://github.com/ralt/network-addresses Cheers!