Loading...
Searching...
No Matches
20#include <linux/connector.h>
21#include <linux/cn_proc.h>
32#define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + sizeof(enum proc_cn_mcast_op)))
33#define RECV_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + sizeof(struct proc_event)))
35#define SEND_MESSAGE_SIZE (NLMSG_SPACE(SEND_MESSAGE_LEN))
36#define RECV_MESSAGE_SIZE (NLMSG_SPACE(RECV_MESSAGE_LEN))
38#define BUFF_SIZE (max(max(SEND_MESSAGE_SIZE, RECV_MESSAGE_SIZE), 1024))
39#define MIN_RECV_SIZE (min(SEND_MESSAGE_SIZE, RECV_MESSAGE_SIZE))
41#define PROC_CN_MCAST_LISTEN (1)
42#define PROC_CN_MCAST_IGNORE (2)
51void cgre_usage(FILE *fd,
const char *msg, ...);
61void flog(
int level,
const char *msg, ...);
71int cgre_process_event(
const struct proc_event *ev,
const int type);
81int cgre_handle_message(
struct cn_msg *cn_hdr);
94int cgre_start_daemon(
const char *logp,
const int logf,
const unsigned char daemon,
102void cgre_flash_rules(
int signum);
109void cgre_flash_templates(
int signum);
116void cgre_catch_term(
int signum);