Snort mailing list archives

Re: Re: [Snort-users] snort-flood detection preprocessor


From: Chris Green <cmg () sourcefire com>
Date: Tue, 06 Aug 2002 08:25:54 -0400

"Grudge Mason" <grudge_mason () hotmail com> writes:

On Fri, 2 Aug 2002, Cearns Angela wrote:
...

printf("source address is %s destination is
%s\n", inet_ntoa(p->iph->ip_src),
inet_ntoa(p->iph->ip_dst));
...
source address is a.b.c.d destination is a.b.c.d
source address is p.q.r.s destination is p.q.r.s

you must use two printf, one for ip_src only and one for ip_dst
only... when you use both in one printf it is like that... dunno why

inet_ntoa() returns a char ptr to a static buffer.  Tis easy to forget
as I've done in the past :)
-- 
Chris Green <cmg () sourcefire com>
Don't use a big word where a diminutive one will suffice.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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: