[Serusers] lcr module and column type in DB

Matt Schulte mschulte at netlogic.net
Fri Mar 4 19:10:54 CET 2005


So, just to clear this up. You still have to reverse the ip, so:

example:
209.247.17.5
reverses to:
5.17.247.209

which long format comes to:
85063633

	Thanks .. ??

-----Original Message-----
From: Iqbal [mailto:iqbal at gigo.co.uk] 
Sent: Wednesday, March 02, 2005 2:55 PM
To: jh at lohi.tutpro.com
Cc: serusers at lists.iptel.org
Subject: Re: [Serusers] lcr module and column type in DB



cheers, just what I needed..one thing though I had to reverse the
format...not sure if I was doing it wrong or something else.

Anyhow for all those with the same problem manually calculating it is

IP=A.B.C.D

IPlong= A*16777216 + B*65536 + C*256 + D

but as mentioned above I for some reason had to do

D*16777216 + C*65536 + B*256 + A

Iqbal



On 3/2/2005, "Juha Heinanen" <jh at lohi.tutpro.com> wrote:

>Iqbal writes:
>
> > Any ideas
>
>yes, you have to put in ip_addr field integer representation of ip 
>address. use, for example, php's ip2long function.
>
>-- juha
>
>

_______________________________________________
Serusers mailing list
serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list