Snort mailing list archives
Re: ip address format of iphdr in mysql
From: Andrew Hutchinson <andrew.hutchinson () vanderbilt edu>
Date: Fri, 22 Mar 2002 12:27:54 -0600
You can use the built in mysql function 'inet_ntoa' to convert: select inet_ntoa(iphdr.ip_src), inet_ntoa(iphdr.ip_dst) from iphdr; You can also use 'inet_aton' to convert the other way. Hope that helps. Andrew On Friday 22 March 2002 10:51 am, Luo, Feng (Exchange) wrote:
I am searching the ip address from mysql. ********************************************************************** mysql> select * from iphdr; +-----+-----+------------+------------+--------+---------+--------+-------- + ---- ---+----------+--------+--------+----------+---------+ | sid | cid | ip_src | ip_dst | ip_ver | ip_hlen | ip_tos | ip_len | | ip_ id | ip_flags | ip_off | ip_ttl | ip_proto | ip_csum | +-----+-----+------------+------------+--------+---------+--------+-------- + ---- ---+----------+--------+--------+----------+---------+ | 1 | 417 | 2473322920 | 2473281217 | 4 | 5 | 0 | 33361 | | 247 46 | 0 | 0 | 28 | 1 | 25793 | | 1 | 416 | 2473322920 | 2473281217 | 4 | 5 | 0 | 33361 | | 244 90 | 0 | 0 | 28 | 1 | 26049 | | 1 | 419 | 2473322920 | 2473281217 | 4 | 5 | 0 | 33361 | | 255 14 | 0 | 0 | 28 | 1 | 25025 | | 1 | 418 | 2473322920 | 2473281217 | 4 | 5 | 0 | 33361 | | 250 02 | 0 | 0 | 28 | 1 | 25537 | +-----+-----+------------+------------+--------+---------+--------+-------- + ---- ---+----------+--------+--------+----------+---------+ 4 rows in set (0.01 sec) ********************************************************************** How can I translate 10 integer 2473322920 and 2473281217 to the regular ip address? Feng **************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. *********************************************************************** _______________________________________________ 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
-- Andrew Hutchinson CNE MCSE Vanderbilt University Medical Center Informatics/NCS/Network Security Voice: (615) 936-2856 andrew.hutchinson () vanderbilt edu There is more to life than increasing its speed. _______________________________________________ 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:
- ip address format of iphdr in mysql Luo, Feng (Exchange) (Mar 22)
- RE: ip address format of iphdr in mysql Mike Arrison (Mar 22)
- Re: ip address format of iphdr in mysql Andrew Hutchinson (Mar 27)
- <Possible follow-ups>
- RE: ip address format of iphdr in mysql Wirth, Jeff (Mar 22)
- Re: ip address format of iphdr in mysql John Sage (Mar 27)
- RE: ip address format of iphdr in mysql Luo, Feng (Exchange) (Mar 22)