Snort mailing list archives

Re: IP address format in database


From: Adam Pointon <adamp () sentinelsecurity net>
Date: Thu, 5 May 2005 18:32:22 +1000

easiest way is use built-in sql funcs to convert it, thus returning in dotted 
quad format.

inet_ntoa(ip_src) / inet_ntoa(ip_dst)

The snort database stores ip_src and ip_dst in iphdr table as a 10 digit
integer. I want to diplay the ip address in my application in regular
format e.g, 255.255.255.255. How to do that? I mean for example I have ip
address in database like this 1157992819 and how should I convert it to
regular format.

+---------- -- -
Adam Pointon
7283 C23A 7710 1F45 44AE
15E6 F3D9 7949 F744 2AA6
+------------- --- --  -


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: