Go to the documentation of this file.
40 const char *log_dir = NULL;
42 if (
ConfGet(
"default-log-dir", &log_dir) != 1) {
44 log_dir = _getcwd(NULL, 0);
45 if (log_dir == NULL) {
68 if (strlen(name) == 0)
71 size_t size = strlen(name) + 1;
74 if (size > 2 && tmp[size - 2] ==
'/')
82 const char *data_dir = NULL;
84 if (
ConfGet(
"default-data-dir", &data_dir) != 1) {
86 data_dir = _getcwd(NULL, 0);
87 if (data_dir == NULL) {
103 if (
SCStatFn(data_dir, &buf) != 0) {
126 if (strcmp(item->
name,
"interface") == 0 &&
127 strcmp(item->
val, iface) == 0) {
140 if (
ConfGet(
"unix-command.enabled", &value) != 1) {
145 SCLogError(
"malformed value for unix-command.enabled: NULL");
149 if (!strcmp(value,
"auto")) {
154 SCLogInfo(
"Running in live mode, activating unix socket");
int SCRunmodeGet(void)
Get the current run mode.
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.
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)
#define SCStatFn(pathname, statbuf)