[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.5 Install and the Networks table
On Thursday 21 Mar 2002 8:17 am, Hitesh Patel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> I have attached a short perl script that will convert a network number
> (x.x.x.x) into the interger format used for the network field. For
> instance if you the block 10.0.0.0/16 run:
> perl ip2int.pl 10.0.0.0
> (notice you leave off the mask length.. that goes in the masklen field)
> the output of the script is the number '167772160'. Just put this number
> in the network field for that block and your good to go.
Sorry for late response to an oldish post but I thought people working with
NorthStar might be interested to know that if you run with MySQL there are a
couple of handy inbuilt SQL functions that make this easy.
inet_ntoa( ) returns the dotted quad representation of an integer, and
inet_aton( ) does the reverse
Handy if you're looking to use Northstar with other data source.
Regards to all
Nick Talbott, IT Policy and Strategy Manager, Powys County Council
fax: 01597 824781
web: www.powys.gov.uk and www.powysweb.co.uk