@@ -631,6 +631,7 @@ static void PrintUsage(const char *progname)
631
631
printf ("\t--pcap-file-continuous : when running in pcap mode with a directory, continue checking directory for pcaps until interrupted\n" );
632
632
printf ("\t--pcap-file-delete : when running in replay mode (-r with directory or file), will delete pcap files that have been processed when done\n" );
633
633
printf ("\t--pcap-file-recursive : will descend into subdirectories when running in replay mode (-r)\n" );
634
+ printf ("\t--pcap-file-buffer-size : set read buffer size (setvbuf)\n" );
634
635
#ifdef HAVE_PCAP_SET_BUFF
635
636
printf ("\t--pcap-buffer-size : size of the pcap buffer value from 0 - %i\n" ,INT_MAX );
636
637
#endif /* HAVE_SET_PCAP_BUFF */
@@ -1351,6 +1352,7 @@ TmEcode SCParseCommandLine(int argc, char **argv)
1351
1352
{"pcap-file-continuous" , 0 , 0 , 0 },
1352
1353
{"pcap-file-delete" , 0 , 0 , 0 },
1353
1354
{"pcap-file-recursive" , 0 , 0 , 0 },
1355
+ {"pcap-file-buffer-size" , required_argument , 0 , 0 },
1354
1356
{"simulate-ips" , 0 , 0 , 0 },
1355
1357
{"no-random" , 0 , & g_disable_randomness , 1 },
1356
1358
{"strict-rule-keywords" , optional_argument , 0 , 0 },
@@ -1755,8 +1757,12 @@ TmEcode SCParseCommandLine(int argc, char **argv)
1755
1757
SCLogError ("failed to set pcap-file.recursive" );
1756
1758
return TM_ECODE_FAILED ;
1757
1759
}
1758
- }
1759
- else if (strcmp ((long_opts [option_index ]).name , "data-dir" ) == 0 ) {
1760
+ } else if (strcmp ((long_opts [option_index ]).name , "pcap-file-buffer-size" ) == 0 ) {
1761
+ if (ConfSetFinal ("pcap-file.buffer-size" , optarg ) != 1 ) {
1762
+ SCLogError ("failed to set pcap-file.buffer-size" );
1763
+ return TM_ECODE_FAILED ;
1764
+ }
1765
+ } else if (strcmp ((long_opts [option_index ]).name , "data-dir" ) == 0 ) {
1760
1766
if (optarg == NULL ) {
1761
1767
SCLogError ("no option argument (optarg) for -d" );
1762
1768
return TM_ECODE_FAILED ;
@@ -1774,7 +1780,7 @@ TmEcode SCParseCommandLine(int argc, char **argv)
1774
1780
return TM_ECODE_FAILED ;
1775
1781
}
1776
1782
suri -> set_datadir = true;
1777
- } else if (strcmp ((long_opts [option_index ]).name , "strict-rule-keywords" ) == 0 ){
1783
+ } else if (strcmp ((long_opts [option_index ]).name , "strict-rule-keywords" ) == 0 ) {
1778
1784
if (optarg == NULL ) {
1779
1785
suri -> strict_rule_parsing_string = SCStrdup ("all" );
1780
1786
} else {
0 commit comments