IP Addresses

Cornelius Diekmann, Julius Michaelis and Lars Hupel

28 June 2016


This entry contains a definition of IP addresses and a library to work with them. Generic IP addresses are modeled as machine words of arbitrary length. Derived from this generic definition, IPv4 addresses are 32bit machine words, IPv6 addresses are 128bit words. Additionally, IPv4 addresses can be represented in dot-decimal notation and IPv6 addresses in (compressed) colon-separated notation. We support toString functions and parsers for both notations. Sets of IP addresses can be represented with a netmask (e.g. or in CIDR notation (e.g. To provide executable code for set operations on IP address ranges, the library includes a datatype to work on arbitrary intervals of machine words.
BSD License

Depends On

Used by