Go to the documentation of this file.
24 #ifndef SURICATA_CONF_H
25 #define SURICATA_CONF_H
50 #define DEFAULT_LOG_DIR "C:\\WINDOWS\\Temp"
51 #define DEFAULT_DATA_DIR "C:\\WINDOWS\\Temp"
53 #define DEFAULT_LOG_DIR "/var/log/suricata"
54 #define DEFAULT_DATA_DIR DATA_DIR
int SCConfNodeIsSequence(const SCConfNode *node)
Check if a node is a sequence or node.
int SCConfSetFromString(const char *input, int final)
Set a configuration parameter from a string.
int SCConfGetDouble(const char *name, double *val)
Retrieve a configuration value as a double.
void SCConfNodeDump(const SCConfNode *node, const char *prefix)
Dump a configuration node and all its children.
struct HtpBodyChunk_ * next
int SCConfSet(const char *name, const char *val)
Set a configuration value.
int SCConfGetChildValueBool(const SCConfNode *base, const char *name, int *val)
int SCConfValIsFalse(const char *val)
Check if a value is false.
const char * SCConfGetValueNode(const SCConfNode *node)
void SCConfNodeRemove(SCConfNode *)
Remove (and SCFree) the provided configuration node.
struct SCConfNode_ * parent
int SCConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
SCConfNode * SCConfGetNode(const char *key)
Get a SCConfNode by name.
SCConfNode * SCConfNodeGetNodeOrCreate(SCConfNode *parent, const char *name, int final)
Helper function to get a node, creating it if it does not exist.
void SCConfRegisterTests(void)
void SCConfNodeFree(SCConfNode *)
Free a SCConfNode and all of its children.
int SCConfGetChildValueWithDefault(const SCConfNode *base, const SCConfNode *dflt, const char *name, const char **vptr)
void SCConfInit(void)
Initialize the configuration system.
SCConfNode * SCConfNodeLookupChild(const SCConfNode *node, const char *key)
Lookup a child configuration node by name.
int SCConfGetChildValueInt(const SCConfNode *base, const char *name, intmax_t *val)
void SCConfDeInit(void)
De-initializes the configuration system.
SCConfNode * SCConfGetNextNode(const SCConfNode *node)
int SCConfGetChildValueIntWithDefault(const SCConfNode *base, const SCConfNode *dflt, const char *name, intmax_t *val)
TAILQ_ENTRY(SCConfNode_) next
SCConfNode * SCConfGetFirstNode(const SCConfNode *parent)
SCConfNode * SCConfGetChildWithDefault(const SCConfNode *base, const SCConfNode *dflt, const char *name)
SCConfNode * SCConfSetIfaceNode(const char *ifaces_node_name, const char *iface)
Finds an interface from the list of interfaces.
TAILQ_HEAD(, SCConfNode_) head
void SCConfCreateContextBackup(void)
Creates a backup of the conf_hash hash_table used by the conf API.
int SCConfNodeChildValueIsTrue(const SCConfNode *node, const char *key)
Test if a configuration node has a true value.
SCConfNode * SCConfNodeNew(void)
Allocate a new configuration node.
int SCConfGetBool(const char *name, int *val)
Retrieve a configuration value as a boolean.
int SCConfRemove(const char *name)
Remove a configuration parameter from the configuration db.
int SCConfGetChildValue(const SCConfNode *base, const char *name, const char **vptr)
bool SCConfNodeHasChildren(const SCConfNode *node)
Check if a node has any children.
int SCConfGetFloat(const char *name, float *val)
Retrieve a configuration value as a float.
void SCConfRestoreContextBackup(void)
Restores the backup of the hash_table present in backup_conf_hash back to conf_hash.
void SCConfDump(void)
Dump configuration to stdout.
const char * SCConfNodeLookupChildValue(const SCConfNode *node, const char *key)
Lookup the value of a child configuration node by name.
int SCConfSetRootAndDefaultNodes(const char *ifaces_node_name, const char *iface, SCConfNode **if_root, SCConfNode **if_default)
Finds and sets root and default node of the interface.
struct SCConfNode_ SCConfNode
int SCConfValIsTrue(const char *val)
Check if a value is true.
void SCConfNodePrune(SCConfNode *node)
Create the path for an include entry.
int SCConfSetFinal(const char *name, const char *val)
Set a final configuration value.
int SCConfGetInt(const char *name, intmax_t *val)
Retrieve a configuration value as an integer.
int SCConfGetChildValueBoolWithDefault(const SCConfNode *base, const SCConfNode *dflt, const char *name, int *val)
SCConfNode * SCConfNodeLookupKeyValue(const SCConfNode *base, const char *key, const char *value)
Lookup for a key value under a specific node.
SCConfNode * SCConfGetRootNode(void)
Get the root configuration node.