Go to the documentation of this file.
24 #ifndef SURICATA_CONF_H
25 #define SURICATA_CONF_H
51 #define DEFAULT_LOG_DIR "C:\\WINDOWS\\Temp"
52 #define DEFAULT_DATA_DIR "C:\\WINDOWS\\Temp"
54 #define DEFAULT_LOG_DIR "/var/log/suricata"
55 #define DEFAULT_DATA_DIR DATA_DIR
99 const char *ifaces_node_name,
const char *iface,
ConfNode **if_root,
ConfNode **if_default);
int ConfNodeChildValueIsTrue(const ConfNode *node, const char *key)
Test if a configuration node has a true value.
ConfNode * ConfNodeNew(void)
Allocate a new configuration node.
struct HtpBodyChunk_ * next
int ConfGetChildValueWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, const char **vptr)
int ConfSetFinal(const char *name, const char *val)
Set a final configuration value.
ConfNode * ConfGetRootNode(void)
Get the root configuration node.
void ConfInit(void)
Initialize the configuration system.
struct ConfNode_ ConfNode
int ConfGetChildValueIntWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, intmax_t *val)
void ConfDump(void)
Dump configuration to stdout.
ConfNode * ConfNodeLookupKeyValue(const ConfNode *base, const char *key, const char *value)
Lookup for a key value under a specific node.
TAILQ_HEAD(, ConfNode_) head
int ConfRemove(const char *name)
Remove a configuration parameter from the configuration db.
TAILQ_ENTRY(ConfNode_) next
struct ConfNode_ * parent
int ConfGetDouble(const char *name, double *val)
Retrieve a configuration value as a double.
void ConfNodeDump(const ConfNode *node, const char *prefix)
Dump a configuration node and all its children.
bool ConfNodeHasChildren(const ConfNode *node)
Check if a node has any children.
int ConfValIsFalse(const char *val)
Check if a value is false.
int ConfGetFloat(const char *name, float *val)
Retrieve a configuration value as a float.
int ConfSetRootAndDefaultNodes(const char *ifaces_node_name, const char *iface, ConfNode **if_root, ConfNode **if_default)
Finds and sets root and default node of the interface.
void ConfNodeFree(ConfNode *)
Free a ConfNode and all of its children.
int ConfSet(const char *name, const char *val)
Set a configuration value.
const char * ConfNodeLookupChildValue(const ConfNode *node, const char *key)
Lookup the value of a child configuration node by name.
void ConfCreateContextBackup(void)
Creates a backup of the conf_hash hash_table used by the conf API.
int ConfGetChildValueBoolWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name, int *val)
int ConfNodeIsSequence(const ConfNode *node)
Check if a node is a sequence or node.
void ConfRestoreContextBackup(void)
Restores the backup of the hash_table present in backup_conf_hash back to conf_hash.
ConfNode * ConfNodeGetNodeOrCreate(ConfNode *parent, const char *name, int final)
Helper function to get a node, creating it if it does not exist.
void ConfNodeRemove(ConfNode *)
Remove (and SCFree) the provided configuration node.
void ConfRegisterTests(void)
int ConfGetChildValue(const ConfNode *base, const char *name, const char **vptr)
int ConfGetChildValueBool(const ConfNode *base, const char *name, int *val)
int ConfGetBool(const char *name, int *val)
Retrieve a configuration value as a boolean.
int ConfSetFromString(const char *input, int final)
Set a configuration parameter from a string.
int ConfValIsTrue(const char *val)
Check if a value is true.
ConfNode * ConfSetIfaceNode(const char *ifaces_node_name, const char *iface)
Finds an interface from the list of interfaces.
int ConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
int ConfGetInt(const char *name, intmax_t *val)
Retrieve a configuration value as an integer.
void ConfNodePrune(ConfNode *node)
Create the path for an include entry.
void ConfDeInit(void)
De-initializes the configuration system.
ConfNode * ConfNodeLookupChild(const ConfNode *node, const char *key)
Lookup a child configuration node by name.
ConfNode * ConfGetNode(const char *key)
Get a ConfNode by name.
int ConfGetChildValueInt(const ConfNode *base, const char *name, intmax_t *val)
ConfNode * ConfGetChildWithDefault(const ConfNode *base, const ConfNode *dflt, const char *name)