ze-filter  (ze-filter-0.8.0-develop-180218)
ze-main.c File Reference
#include <ze-sys.h>
#include "ze-filter.h"
#include <xfilesdef.h>

Go to the source code of this file.

Classes

struct  table2log_T
 
struct  xfilesdef_T
 

Macros

#define USE_SIGACTION   1
 
#define SET_SIG_HANDLER(handler)
 
#define TL_DIM   128
 
#define TL_DT   180
 
#define TL_MAX   5
 
#define MAX_SIG_ERR   64
 
#define FD_SET_FLAG(fd, flag)
 

Typedefs

typedef struct xfilesdef_T xfilesdef_T
 

Functions

void usage (void)
 
void hardcoded_xfiles (void)
 
int j_survey ()
 
int main (int argc, argv)
 
bool setup_supervisor_signal_handler ()
 
int j_set_uid_gid (char *user, char *group)
 
int daemon_init ()
 

Variables

bool core_enabled = FALSE
 
table2log_T tablog []
 
int pipe_filter [2]
 
int fd_pipe = -1
 

Macro Definition Documentation

◆ FD_SET_FLAG

#define FD_SET_FLAG (   fd,
  flag 
)
Value:
do { \
int oflag; \
if ((oflag = fcntl(fd, F_GETFL, 0)) < 0) \
{ \
ZE_LogSysError("fcntl F_GETFL error"); \
} else { \
/* Shall set write pipe to O_NONBLOCK mode ??? */ \
if (fcntl(fd, F_SETFL, oflag | flag) < 0) \
ZE_LogSysError("fcntl F_SETFL error"); \
} \
} while (0)

Definition at line 722 of file ze-main.c.

◆ MAX_SIG_ERR

#define MAX_SIG_ERR   64

Definition at line 720 of file ze-main.c.

◆ SET_SIG_HANDLER

#define SET_SIG_HANDLER (   handler)
Value:
do { \
struct sigaction act; \
\
memset(&act, 0, sizeof (act)); \
act.sa_handler = SIG_IGN; \
sigaction(SIGPIPE, &act, NULL); \
\
act.sa_handler = handler; \
sigaction(SIGTERM, &act, NULL); \
sigaction(SIGUSR1, &act, NULL); \
sigaction(SIGUSR2, &act, NULL); \
sigaction(SIGALRM, &act, NULL); \
sigaction(SIGCHLD, &act, NULL); \
sigaction(SIGHUP, &act, NULL); \
sigaction(SIGCHLD, &act, NULL); \
} while (0);

Definition at line 427 of file ze-main.c.

◆ TL_DIM

#define TL_DIM   128

Definition at line 649 of file ze-main.c.

◆ TL_DT

#define TL_DT   180

Definition at line 650 of file ze-main.c.

◆ TL_MAX

#define TL_MAX   5

Definition at line 651 of file ze-main.c.

◆ USE_SIGACTION

#define USE_SIGACTION   1

Definition at line 29 of file ze-main.c.

Typedef Documentation

◆ xfilesdef_T

typedef struct xfilesdef_T xfilesdef_T

Definition at line 1019 of file ze-main.c.

Function Documentation

◆ daemon_init()

int daemon_init ( )

Definition at line 525 of file ze-main.c.

◆ hardcoded_xfiles()

void hardcoded_xfiles ( void  )

Definition at line 1030 of file ze-main.c.

◆ j_set_uid_gid()

int j_set_uid_gid ( char *  user,
char *  group 
)

Definition at line 470 of file ze-main.c.

◆ j_survey()

int j_survey ( )

Definition at line 736 of file ze-main.c.

◆ main()

int main ( int  argc,
argv   
)

Definition at line 74 of file ze-main.c.

◆ setup_supervisor_signal_handler()

bool setup_supervisor_signal_handler ( )

Definition at line 447 of file ze-main.c.

◆ usage()

void usage ( void  )

Definition at line 972 of file ze-main.c.

Variable Documentation

◆ core_enabled

bool core_enabled = FALSE

Definition at line 31 of file ze-main.c.

◆ fd_pipe

int fd_pipe = -1

Definition at line 360 of file ze-main.c.

◆ pipe_filter

int pipe_filter[2]

Definition at line 359 of file ze-main.c.

◆ tablog

table2log_T tablog[]
Initial value:
= {
{"regex", "Regular expressions used in pattern matching", FALSE,
{"iprbwl", "Real-time IP blacklists", FALSE, dump_iprbwl_table},
{"urlbl", "URLBL", FALSE, dump_urlbl_table},
{"oradata", "Oracle filter data", FALSE, dump_oradata_table},
{"oracle-checks", "Oracle checks", FALSE, dump_oracle_defs},
{"xfiles", "XFILES table", FALSE, dump_xfiles_table},
{NULL, NULL, FALSE, NULL}
}
void dump_regex_table()
Definition: ze-mailregex.c:103
void dump_urlbl_table()
Definition: ze-dns-urlbl.c:396
void dump_iprbwl_table()
#define FALSE
Definition: macros.h:160
void dump_xfiles_table()
Definition: ze-fileexp.c:398
void dump_oradata_table()
Definition: ze-oracle.c:69
void dump_oracle_defs()

Definition at line 62 of file ze-main.c.