Sebastian Nowicki | 22 Aug 12:26 2011

[ANNOUNCE] network-address-0.1.0

Hi All,

I have just released network-address-0.1.0. This is the first version
of the package.

The network-address library provides data structures for IP addresses
as well as subnetworks. The goal is to have a generic library for
representing network addresses in binary or textual form. Currently it
supports IPv4 and IPv6 (partially).

*Data.Network.Address> readAddress "" :: IPv4
IPv4 2130706433
*Data.Network.Address> let ip = readAddress "" :: IPv4
*Data.Network.Address> showAddress ip
*Data.Network.Address> let subnet = readSubnet "" :: IPSubnet IPv4
*Data.Network.Address> subnet
IPSubnet (IPv4 3232235776) (-256)
*Data.Network.Address> showSubnet subnet
*Data.Network.Address> showAddress . base $ subnet
*Data.Network.Address> (readAddress "" :: IPv4) `member` subnet
*Data.Network.Address> (readAddress "" :: IPv4) `member` subnet

I was looking for an IPv4/IPv6 data structure, and found a few
libraries such as network-data, iproute, and nettle-openflow. These
libraries are either written for a specific purpose or bring along
dependencies. I decided to create network-address to consolidate the
data structures and make a lightweight, fast, generic and complete
library for representing these addresses.

This is my first public Haskell library. The API is unstable and
possibly not idiomatic. I'd appreciate any feedback.