Go to the documentation of this file.
39 static void NflogDerefConfig(
void *data)
45 static void *ParseNflogConfig(
const char *
group)
68 if (nflog_node == NULL) {
69 SCLogInfo(
"Unable to find nflog config using default value");
77 if (group_root == NULL && group_default == NULL) {
78 SCLogInfo(
"Unable to find nflog config for "
79 "group \"%s\" or \"default\", using default value",
92 "buffer-size", &bufsize);
103 "max-size", &bufsize_max);
115 "than max-size value, adjusting buffer-size");
120 "qthreshold", &qthreshold);
131 "qtimeout", &qtimeout);
144 static int NflogConfigGeThreadsCount(
void *conf)
151 static int RunModeIdsNflogAutoFp(
void)
164 SCLogInfo(
"RunModeIdsNflogAutoFp initialised");
170 static int RunModeIdsNflogSingle(
void)
183 SCLogInfo(
"RunModeIdsNflogSingle initialised");
189 static int RunModeIdsNflogWorkers(
void)
202 SCLogInfo(
"RunModeIdsNflogWorkers initialised");
216 RUNMODE_NFLOG,
"autofp",
"Multi threaded nflog mode", RunModeIdsNflogAutoFp, NULL);
218 RUNMODE_NFLOG,
"single",
"Single threaded nflog mode", RunModeIdsNflogSingle, NULL);
220 RUNMODE_NFLOG,
"workers",
"Workers nflog mode", RunModeIdsNflogWorkers, NULL);
const char * thread_name_workers
int RunModeSetLiveCaptureWorkers(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)
int ParseSizeStringU16(const char *size, uint16_t *res)
ConfNode * ConfGetNode(const char *name)
Get a ConfNode by name.
const char * thread_name_autofp
const char * RunModeIdsNflogGetDefaultMode(void)
ConfNode * ConfNodeLookupKeyValue(const ConfNode *base, const char *key, const char *value)
Lookup for a key value under a specific node.
char numgroup[NFLOG_GROUP_NAME_LENGTH]
int ConfGetChildValueIntWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, intmax_t *val)
const char * thread_name_single
size_t strlcpy(char *dst, const char *src, size_t siz)
int RunModeSetLiveCaptureAutoFp(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void), int(*RunModeIsIPSEnabled)(void))
Registers a new runmode.
void RunModeIdsNflogRegister(void)
#define SCLogWarning(...)
Macro used to log WARNING messages.
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
void TimeModeSetLive(void)
void(* DerefFunc)(void *)
#define SCLogError(...)
Macro used to log ERROR messages.
int RunModeSetLiveCaptureSingle(ConfigIfaceParserFunc ConfigParser, ConfigIfaceThreadsCountFunc ModThreadsCount, const char *recv_mod_name, const char *decode_mod_name, const char *thread_name, const char *live_dev)