suricata
conf-yaml-loader.h File Reference
#include "conf.h"
Include dependency graph for conf-yaml-loader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ConfYamlLoadFile (const char *)
 Load configuration from a YAML file. More...
 
int ConfYamlLoadString (const char *, size_t)
 Load configuration from a YAML string. More...
 
int ConfYamlLoadFileWithPrefix (const char *filename, const char *prefix)
 Load configuration from a YAML file, insert in tree at 'prefix'. More...
 
int ConfYamlHandleInclude (ConfNode *parent, const char *filename)
 Include a file in the configuration. More...
 
void ConfYamlRegisterTests (void)
 

Detailed Description

Author
Endace Technology Limited - Jason Ish jason.nosp@m..ish.nosp@m.@enda.nosp@m.ce.c.nosp@m.om

Definition in file conf-yaml-loader.h.

Function Documentation

◆ ConfYamlHandleInclude()

int ConfYamlHandleInclude ( ConfNode parent,
const char *  filename 
)

Include a file in the configuration.

Parameters
parentThe configuration node the included configuration will be placed at.
filenameThe filename to include.
Return values
0on success, -1 on failure.

Definition at line 114 of file conf-yaml-loader.c.

References PathIsAbsolute(), SCLogError, and strlcpy().

Referenced by SCLoadYamlConfig().

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

◆ ConfYamlLoadFile()

int ConfYamlLoadFile ( const char *  filename)

Load configuration from a YAML file.

This function will load a configuration file. On failure -1 will be returned and it is suggested that the program then exit. Any errors while loading the configuration file will have already been logged.

Parameters
filenameFilename of configuration file to load.
Return values
0on success, -1 on failure.

Definition at line 476 of file conf-yaml-loader.c.

Referenced by ListAppLayerProtocols(), and SCLoadYamlConfig().

Here is the caller graph for this function:

◆ ConfYamlLoadFileWithPrefix()

int ConfYamlLoadFileWithPrefix ( const char *  filename,
const char *  prefix 
)

Load configuration from a YAML file, insert in tree at 'prefix'.

This function will load a configuration file and insert it into the config tree at 'prefix'. This means that if this is called with prefix "abc" and the file contains a parameter "def", it will be loaded as "abc.def".

Parameters
filenameFilename of configuration file to load.
prefixName prefix to use.
Return values
0on success, -1 on failure.

Definition at line 554 of file conf-yaml-loader.c.

◆ ConfYamlLoadString()

int ConfYamlLoadString ( const char *  ,
size_t   
)

Load configuration from a YAML string.

Definition at line 523 of file conf-yaml-loader.c.

Referenced by LLVMFuzzerTestOneInput().

Here is the caller graph for this function:

◆ ConfYamlRegisterTests()

void ConfYamlRegisterTests ( void  )

Definition at line 1057 of file conf-yaml-loader.c.

References UtRegisterTest().

Here is the call graph for this function: