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

Chris Green cmg at ...1935...
Tue Aug 6 05:32:07 EDT 2002

"Grudge Mason" <grudge_mason at ...125...> writes:

> On Fri, 2 Aug 2002, Cearns Angela wrote:
> ...
>>printf("source address is %s destination is
>>%s\n", inet_ntoa(p->iph->ip_src),
> ...
>>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 at ...1935...>
Don't use a big word where a diminutive one will suffice.

More information about the Snort-users mailing list