Skip to content

Commit

Permalink
napatech: bring back command line argument
Browse files Browse the repository at this point in the history
Re-introduce support for command line argument "--napatech"

Issue: 7165
  • Loading branch information
jlucovsky authored and victorjulien committed Oct 12, 2024
1 parent 792f5e1 commit d32b28c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/suricata.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ static void PrintBuildInfo(void)
#ifdef HAVE_PFRING
strlcat(features, "PF_RING ", sizeof(features));
#endif
#ifdef HAVE_NAPATECH
strlcat(features, "NAPATECH ", sizeof(features));
#endif
#ifdef HAVE_AF_PACKET
strlcat(features, "AF_PACKET ", sizeof(features));
#endif
Expand Down Expand Up @@ -1645,6 +1648,14 @@ TmEcode SCParseCommandLine(int argc, char **argv)
" to receive packets using --dag.");
return TM_ECODE_FAILED;
#endif /* HAVE_DAG */
} else if (strcmp((long_opts[option_index]).name, "napatech") == 0) {
#ifdef HAVE_NAPATECH
suri->run_mode = RUNMODE_PLUGIN;
#else
SCLogError("libntapi and a Napatech adapter are required"
" to capture packets using --napatech.");
return TM_ECODE_FAILED;
#endif /* HAVE_NAPATECH */
} else if (strcmp((long_opts[option_index]).name, "pcap-buffer-size") == 0) {
#ifdef HAVE_PCAP_SET_BUFF
if (ConfSetFinal("pcap.buffer-size", optarg) != 1) {
Expand Down

0 comments on commit d32b28c

Please sign in to comment.