[ANN] net/netmask.rb, initial release


I sat down and wrote an IPv4 address manipulation library last week in
the style of Perl’s Net::Netmask. The documentation and unit tests are
now up to par, so I’m releasing it today. It’s quite a simple bit of
code, but doing netmask arithmetic has to be one of the more tedious
tasks (that and date math :slight_smile: that I have to do, so it has made my life

The intro from the documentation:




A library for performing IPv4 netmask arithmetic.

Class Netmask

This class encapsulates a variety of arithmetic operations
commonly performed on IPv4 addresses and netmasks. Many of those
that are of general, non-instance-specific utility are exposed
at the class-method level. A variety of instance methods are
also implemented that provide iterators, incrementors/decrementors,
overloaded arithmetic operators, and matching.


Available at


Comments are welcome. I’ll try to add IPv6 support before I release
v1.0 later on.


/^Dan Debertin$/
airboss@nodewarrior.org | Did I sleep a little too late,
www.nodewarrior.org | or am I awake? --Byrne