Go to the documentation of this file.
39 const char *log_dir = NULL;
41 if (
ConfGet(
"default-log-dir", &log_dir) != 1) {
43 log_dir = _getcwd(NULL, 0);
44 if (log_dir == NULL) {
60 if (_stat(log_dir, &buf) != 0) {
63 if (stat(log_dir, &buf) != 0) {
72 if (strlen(name) == 0)
75 size_t size = strlen(name) + 1;
78 if (size > 2 && tmp[size - 2] ==
'/')
86 const char *data_dir = NULL;
88 if (
ConfGet(
"default-data-dir", &data_dir) != 1) {
90 data_dir = _getcwd(NULL, 0);
91 if (data_dir == NULL) {
108 if (_stat(data_dir, &buf) != 0) {
111 if (stat(data_dir, &buf) != 0) {
135 if (strcmp(item->
name,
"interface") == 0 &&
136 strcmp(item->
val, iface) == 0) {
149 if (
ConfGet(
"unix-command.enabled", &value) != 1) {
154 SCLogError(
"malformed value for unix-command.enabled: NULL");
158 if (!strcmp(value,
"auto")) {
163 SCLogInfo(
"Running in live mode, activating unix socket");
struct HtpBodyChunk_ * next
#define TAILQ_FOREACH(var, head, field)
int ConfSetFinal(const char *name, const char *val)
Set a final configuration value.
const char * ConfigGetDataDirectory(void)
bool IsRunModeOffline(enum RunModes run_mode_to_check)
int ConfValIsTrue(const char *val)
Check if a value is true.
size_t strlcpy(char *dst, const char *src, size_t siz)
int ConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
ConfNode * ConfFindDeviceConfig(ConfNode *node, const char *iface)
Find the configuration node for a specific device.
TmEcode ConfigSetDataDirectory(char *name)
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
int RunmodeGetCurrent(void)
TmEcode ConfigSetLogDirectory(const char *name)
int ConfUnixSocketIsEnable(void)
const char * ConfigGetLogDirectory(void)
TmEcode ConfigCheckDataDirectory(const char *data_dir)
#define SCLogError(...)
Macro used to log ERROR messages.
TmEcode ConfigCheckLogDirectoryExists(const char *log_dir)