[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: IP callculation library (ipcalc)
- From: Rob Kendrick <rjek@...>
- Date: Mon, 22 Nov 2010 22:06:26 +0000
On Mon, Nov 22, 2010 at 10:53:47PM +0100, Marcin Jurczuk wrote:
> I'm writing some auth plugin that will have to check if given
> remote-ip belongs to specific network.
> Is there some tool that have similar functions to ipcalc tool ?
> Something similar to:
> Otherwise I have to write my own using bitlib module ..
I've written a small module that uses Mike Pall's bit library and
Roberto's LPEG to parse IP addresses and expressions. It can cope with
etc, parsing them into a single value which can then be easily converted
to other notations, or used to see if another address is within the
It is as yet unfinished; anybody wanting a copy contact should me off list.