|
|
@ -39,17 +39,13 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define DEFAULT_PIDFILE_PATH "/var/run/f2b.pid" |
|
|
|
#define DEFAULT_PIDFILE_PATH "/var/run/f2b.pid" |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Default path of unix control socket (server endpoint) |
|
|
|
* Default path of unix control socket |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define DEFAULT_CSOCKET_PATH "/var/run/f2b.sock" |
|
|
|
#define DEFAULT_CSOCKET_PATH "/var/run/f2b.sock" |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Default path of directory to store ip states for jails |
|
|
|
* Default path of directory to store ip states for jails |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define DEFAULT_STATEDIR_PATH "/var/db/f2b" |
|
|
|
#define DEFAULT_STATEDIR_PATH "/var/db/f2b" |
|
|
|
/**
|
|
|
|
|
|
|
|
* Template for making path for client side of connection to control socket |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
#define DEFAULT_CSOCKET_CPATH "/tmp/f2bc-sock-XXXXXX" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @def UNUSED |
|
|
|
* @def UNUSED |
|
|
@ -57,16 +53,8 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define UNUSED(x) (void)(x) |
|
|
|
#define UNUSED(x) (void)(x) |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/* default size of buffers */ |
|
|
|
* @def SA_REGISTER |
|
|
|
#define RBUF_SIZE 256 |
|
|
|
* Register signal handler |
|
|
|
#define WBUF_SIZE 32768 /* 32Kb */ |
|
|
|
*/ |
|
|
|
|
|
|
|
#define SA_REGISTER(SIGNUM, HANDLER) \ |
|
|
|
|
|
|
|
memset(&act, 0x0, sizeof(act)); \
|
|
|
|
|
|
|
|
act.sa_handler = HANDLER; \
|
|
|
|
|
|
|
|
if (sigaction(SIGNUM, &act, NULL) != 0) { \
|
|
|
|
|
|
|
|
f2b_log_msg(log_fatal, "can't register handler for " #SIGNUM); \
|
|
|
|
|
|
|
|
return EXIT_FAILURE; \
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* F2B_COMMON_H_ */ |
|
|
|
#endif /* F2B_COMMON_H_ */ |
|
|
|