suricata
util-conf.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "conf.h"
#include "runmodes.h"
#include "util-conf.h"
#include "util-debug.h"
#include "util-path.h"
Include dependency graph for util-conf.c:

Go to the source code of this file.

Functions

TmEcode ConfigSetLogDirectory (const char *name)
 
const char * ConfigGetLogDirectory (void)
 
TmEcode ConfigCheckLogDirectoryExists (const char *log_dir)
 
TmEcode ConfigSetDataDirectory (char *name)
 
const char * ConfigGetDataDirectory (void)
 
TmEcode ConfigCheckDataDirectory (const char *data_dir)
 
ConfNodeConfFindDeviceConfig (ConfNode *node, const char *iface)
 Find the configuration node for a specific device. More...
 
int ConfUnixSocketIsEnable (void)
 

Detailed Description

Author
Eric Leblond eric@.nosp@m.regi.nosp@m.t.org

Definition in file util-conf.c.

Function Documentation

◆ ConfFindDeviceConfig()

ConfNode* ConfFindDeviceConfig ( ConfNode node,
const char *  iface 
)

Find the configuration node for a specific device.

Basically hunts through the list of maps for the first one with a key of "interface", and a value of the provided interface.

Parameters
nodeThe node to start looking for the device configuration. Typically this would be something like the af-packet or pf-ring node.
ifaceThe name of the interface to find the config for.

Definition at line 121 of file util-conf.c.

References ConfNode_::name, next, TAILQ_FOREACH, and ConfNode_::val.

Referenced by ConfSetIfaceNode().

Here is the caller graph for this function:

◆ ConfigCheckDataDirectory()

TmEcode ConfigCheckDataDirectory ( const char *  data_dir)

Definition at line 99 of file util-conf.c.

References SCEnter, SCReturnInt, SCStatFn, TM_ECODE_FAILED, and TM_ECODE_OK.

◆ ConfigCheckLogDirectoryExists()

TmEcode ConfigCheckLogDirectoryExists ( const char *  log_dir)

Definition at line 56 of file util-conf.c.

References SCEnter, SCReturnInt, SCStatFn, TM_ECODE_FAILED, and TM_ECODE_OK.

◆ ConfigGetDataDirectory()

const char* ConfigGetDataDirectory ( void  )

Definition at line 80 of file util-conf.c.

References ConfGet(), DEFAULT_DATA_DIR, and SCLogDebug.

Here is the call graph for this function:

◆ ConfigGetLogDirectory()

const char* ConfigGetLogDirectory ( void  )

Definition at line 38 of file util-conf.c.

References ConfGet(), and DEFAULT_LOG_DIR.

Referenced by DumpPatterns(), LogTcpDataLogInitCtx(), RulesDumpMatchArray(), RulesDumpTxMatchArray(), and SCConfLogOpenGeneric().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConfigSetDataDirectory()

TmEcode ConfigSetDataDirectory ( char *  name)

Definition at line 66 of file util-conf.c.

References ConfSetFinal(), strlcpy(), TM_ECODE_FAILED, and TM_ECODE_OK.

Here is the call graph for this function:

◆ ConfigSetLogDirectory()

TmEcode ConfigSetLogDirectory ( const char *  name)

Definition at line 33 of file util-conf.c.

References ConfSetFinal(), TM_ECODE_FAILED, and TM_ECODE_OK.

Referenced by LLVMFuzzerTestOneInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConfUnixSocketIsEnable()

int ConfUnixSocketIsEnable ( void  )

Definition at line 136 of file util-conf.c.

References ConfGet(), ConfValIsTrue(), IsRunModeOffline(), SCLogError, SCLogInfo, and SCRunmodeGet().

Here is the call graph for this function: