Go to the documentation of this file.
44 "Multi threaded nflog mode",
47 "Single threaded nflog mode",
56 static void NflogDerefConfig(
void *data)
62 static void *ParseNflogConfig(
const char *
group)
85 if (nflog_node == NULL) {
86 SCLogInfo(
"Unable to find nflog config using default value");
94 if (group_root == NULL && group_default == NULL) {
95 SCLogInfo(
"Unable to find nflog config for "
96 "group \"%s\" or \"default\", using default value",
109 "buffer-size", &bufsize);
120 "max-size", &bufsize_max);
132 "than max-size value, adjusting buffer-size");
137 "qthreshold", &qthreshold);
148 "qtimeout", &qtimeout);
161 static int NflogConfigGeThreadsCount(
void *conf)
174 char *live_dev = NULL;
180 NflogConfigGeThreadsCount,
189 SCLogInfo(
"RunModeIdsNflogAutoFp initialised");
201 char *live_dev = NULL;
207 NflogConfigGeThreadsCount,
216 SCLogInfo(
"RunModeIdsNflogSingle initialised");
228 char *live_dev = NULL;
234 NflogConfigGeThreadsCount,
243 SCLogInfo(
"RunModeIdsNflogWorkers initialised");
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.
void RunModeInitialize(void)
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.
int RunModeIdsNflogAutoFp(void)
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)
int RunModeIdsNflogSingle(void)
int RunModeIdsNflogWorkers(void)
void RunModeIdsNflogRegister(void)
@ SC_ERR_INVALID_ARGUMENT
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
void TimeModeSetLive(void)
void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void))
Registers a new runmode.
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
void(* DerefFunc)(void *)
#define FatalError(x,...)
#define SCLogWarning(err_code,...)
Macro used to log WARNING 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)