[Snort-devel] Quiet Mode in 1.7b8

Erek Adams erek at ...105...
Sat Dec 16 16:39:36 EST 2000


After twiddling around for a while, I noticed that the '-q' switch seemed to
be 'broken' on readback mode.

Here's the tiny lil patch to make snort just spit out readback packet dumps.

[...snip...]

[erek at ...106...]/local/build/snort#diff -c snort.c snort.c.orig
*** snort.c     Sat Dec 16 13:27:33 2000
--- snort.c.orig        Sat Dec 16 13:26:17 2000
***************
*** 1395,1404 ****
           */
          snaplen = pcap_snapshot(pds[num]);
  
!       if (!pv.quiet_flag)
!         {
!             printf("snaplen = %d\n", snaplen);
!         }
      }
  
      /* something is wrong with the opened packet socket */
--- 1395,1401 ----
           */
          snaplen = pcap_snapshot(pds[num]);
  
!         printf("snaplen = %d\n", snaplen);
      }
  
      /* something is wrong with the opened packet socket */
***************
*** 2296,2302 ****
       * you will hardly run snort in daemon mode and read from file i that is
       * why no `LogMessage()' here
       */
!     if(pv.readmode_flag && !pv.quiet_flag)
      {

puts("\n\n===============================================================================\n");
  
--- 2293,2299 ----
       * you will hardly run snort in daemon mode and read from file i that is
       * why no `LogMessage()' here
       */
!     if(pv.readmode_flag)
      {

puts("\n\n===============================================================================\n");
  
[...snip...]

Oh, yeah--Since I'm not a coder, #include "standard_disclaimer.h".  :)

-----
Erek Adams
Nifty-Type-Guy
TheAdamsFamily.Net






More information about the Snort-devel mailing list