[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ulogd saves ipaddr as 32 bit int



On Friday 18 February 2005 20:46, Jimmy B wrote:
> Hi list!
> I just installed ulogd with MySQL support to use with my iptables
> firewall to log traffic. Everything works fine but I have one question
> though: ulogd saves the src and dst ipaddr as an integer in the database
> (a 32 bit unsigned integer according to the docs) and I wonder how can I
> translate that into a normal ip addr? I'm guessing it shouldn't be too
> hard in either bash or php (which is my scripting language of choice.)
> Does anyone have a clue?
In PHP, the long2ip() function 
(http://uk2.php.net/manual/en/function.long2ip.php) does what you're after.

Attachment: pgpCaf320sCM3.pgp
Description: PGP signature


Reply to: