extern int max_pending_packets;
-static const char *default_mode_workers = NULL;
-
const char *RunModeAFPGetDefaultMode(void)
{
- return default_mode_workers;
+ return "workers";
}
void RunModeIdsAFPRegister(void)
"Workers af-packet mode, each thread does all"
" tasks from acquisition to logging",
RunModeIdsAFPWorkers);
- default_mode_workers = "workers";
RunModeRegisterNewRunMode(RUNMODE_AFP_DEV, "autofp",
"Multi socket AF_PACKET mode. Packets from "
"each flow are assigned to a single detect "
#include "util-affinity.h"
#include "util-runmodes.h"
-static const char *default_mode;
-
static int DagConfigGetThreadCount(void *conf)
{
return 1;
const char *RunModeErfDagGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeErfDagRegister(void)
{
- default_mode = "autofp";
-
RunModeRegisterNewRunMode(RUNMODE_DAG, "autofp",
"Multi threaded DAG mode. Packets from "
"each flow are assigned to a single detect "
#include "util-runmodes.h"
-static const char *default_mode;
-
const char *RunModeErfFileGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeErfFileRegister(void)
{
- default_mode = "autofp";
-
RunModeRegisterNewRunMode(RUNMODE_ERF_FILE, "single",
"Single threaded ERF file mode",
RunModeErfFileSingle);
#include "source-ipfw.h"
#include "util-device.h"
-static const char *default_mode;
-
const char *RunModeIpsIPFWGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeIpsIPFWRegister(void)
{
- default_mode = "autofp";
-
RunModeRegisterNewRunMode(RUNMODE_IPFW, "autofp",
"Multi threaded IPFW IPS mode with respect to flow",
RunModeIpsIPFWAutoFp);
#define NT_RUNMODE_AUTOFP 1
#define NT_RUNMODE_WORKERS 2
-static const char *default_mode = "workers";
-
#ifdef HAVE_NAPATECH
#define MAX_STREAMS 256
const char *RunModeNapatechGetDefaultMode(void)
{
- return default_mode;
+ return "workers";
}
void RunModeNapatechRegister(void)
#include "source-nflog.h"
-static const char *default_mode = NULL;
-
const char *RunModeIdsNflogGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeIdsNflogRegister(void)
{
- default_mode = "autofp";
RunModeRegisterNewRunMode(RUNMODE_NFLOG, "autofp",
"Multi threaded nflog mode",
RunModeIdsNflogAutoFp);
#include "util-runmodes.h"
#include "util-device.h"
-static const char *default_mode;
-
const char *RunModeIpsNFQGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeIpsNFQRegister(void)
{
- default_mode = "autofp";
RunModeRegisterNewRunMode(RUNMODE_NFQ, "autofp",
"Multi threaded NFQ IPS mode with respect to flow",
RunModeIpsNFQAutoFp);
#include "util-runmodes.h"
-static const char *default_mode = NULL;
-
const char *RunModeFilePcapGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
void RunModeFilePcapRegister(void)
RunModeRegisterNewRunMode(RUNMODE_PCAP_FILE, "single",
"Single threaded pcap file mode",
RunModeFilePcapSingle);
- default_mode = "autofp";
RunModeRegisterNewRunMode(RUNMODE_PCAP_FILE, "autofp",
"Multi threaded pcap file mode. Packets from "
"each flow are assigned to a single detect thread, "
#include "util-atomic.h"
#include "util-misc.h"
-static const char *default_mode = NULL;
-
const char *RunModeIdsGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
int RunModeIdsPcapWorkers(void);
RunModeRegisterNewRunMode(RUNMODE_PCAP_DEV, "single",
"Single threaded pcap live mode",
RunModeIdsPcapSingle);
- default_mode = "autofp";
RunModeRegisterNewRunMode(RUNMODE_PCAP_DEV, "autofp",
"Multi threaded pcap live mode. Packets from "
"each flow are assigned to a single detect thread, "
#include "conf-yaml-loader.h"
-static const char *default_mode = NULL;
-
int unix_socket_mode_is_running = 0;
typedef struct PcapFiles_ {
const char *RunModeUnixSocketGetDefaultMode(void)
{
- return default_mode;
+ return "autofp";
}
#ifdef BUILD_UNIX_SOCKET
RunModeRegisterNewRunMode(RUNMODE_UNIX_SOCKET, "autofp",
"Unix socket mode",
RunModeUnixSocketMaster);
- default_mode = "autofp";
#endif
}
#include "util-runmodes.h"
#include "util-time.h"
-
-static const char *default_mode;
-
-
-const char *RunModeIpsWinDivertGetDefaultMode(void) { return default_mode; }
+const char *RunModeIpsWinDivertGetDefaultMode(void)
+{
+ return "autofp";
+}
void RunModeIpsWinDivertRegister(void)
{
- default_mode = "autofp";
-
RunModeRegisterNewRunMode(
RUNMODE_WINDIVERT, "autofp",
"Multi-threaded WinDivert IPS mode load-balanced by flow",