#ifndef IFW_H #define IFW_H #include "plugin.h" #define IFW_DBUS_PATH PLUGIN_ROOT_PATH "/ifw" #define IFW_DBUS_INTERFACE PLUGIN_ROOT_INTF ".ifw" #include #include "libnl_ifw.h" #define IFW_SYSCONF_ROOT "/etc/ifw/" #define IFW_BLACKLIST_FILENAME IFW_SYSCONF_ROOT "blacklist" #define IFW_WHITELIST_FILENAME IFW_SYSCONF_ROOT "whitelist" typedef enum { IFW_MODE_AUTO, IFW_MODE_INTERACTIVE } ifw_mode_t; typedef struct { long timestamp_sec; /* date */ char indev_name[IFNAMSIZ]; /* input interface */ char prefix[PREFSIZ]; /* summary of attack */ int sensor; /* sensor the alert come from */ int protocol; /* Protocol */ u_int32_t s_addr; /* source address */ u_int16_t d_port; /* destination port UDP/TCP */ u_int8_t icmp_type; /* icmp type */ } msg_usr_t; typedef struct popup_verdict { int seq; int bl; } popup_verdict_t; #include "black_list.h" #include "white_list.h" #include "report_list.h" typedef struct { ifw_mode_t mode; black_list_t blacklist; report_list_t reports; white_list_t whitelist; } ifw_t; #endif /* IFW_H */