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

◆ DAEMON_WORKING_DIRECTORY

#define DAEMON_WORKING_DIRECTORY   "/"
Todo:
Adjust path

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

Function Documentation

◆ CheckValidDaemonModes()

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.

◆ Daemonize()

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.