suricata
util-daemon.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DAEMON_WORKING_DIRECTORY   "/"
 

Functions

void Daemonize (void)
 Daemonize the process. More...
 
int CheckValidDaemonModes (int, int)
 Check for a valid combination daemon/mode. More...
 

Detailed Description

Author
Gerardo Iglesias Galvan igles.nosp@m.iasg.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition in file util-daemon.h.

Macro Definition Documentation

#define DAEMON_WORKING_DIRECTORY   "/"
Todo:
Adjust path

Definition at line 28 of file util-daemon.h.

Function Documentation

int CheckValidDaemonModes ( int  daemon,
int  mode 
)

Check for a valid combination daemon/mode.

Parameters
daemondaemon on or off
modeselected mode
Return values
1valid combination
0invalid combination

Definition at line 174 of file util-daemon.c.

References RUNMODE_PCAP_FILE, RUNMODE_UNITTEST, SC_ERR_INVALID_RUNMODE, SCLogDebug, and SCLogError.

Referenced by PostRunDeinit().

Here is the caller graph for this function:

void Daemonize ( void  )

Daemonize the process.

Todo:
We should check if wie allow more than 1 instance to run simultaneously. Maybe change the behaviour through conf file

Definition at line 102 of file util-daemon.c.

References ConfGet(), SC_ERR_DAEMON, SCLogDebug, and SCLogError.

Referenced by RegisterAllModules().

Here is the call graph for this function:

Here is the caller graph for this function: