[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:
> 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 run:
>  perl ip2int.pl
> (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

Nick Talbott, IT Policy and Strategy Manager, Powys County Council
email:	nickt@powys.gov.uk
fax:	01597 824781
web:	www.powys.gov.uk and www.powysweb.co.uk