summaryrefslogtreecommitdiffstats
path: root/src/plugins/ifw/ifw.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/ifw/ifw.h')
-rw-r--r--src/plugins/ifw/ifw.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/plugins/ifw/ifw.h b/src/plugins/ifw/ifw.h
new file mode 100644
index 0000000..f007b0f
--- /dev/null
+++ b/src/plugins/ifw/ifw.h
@@ -0,0 +1,48 @@
+#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 <sys/types.h>
+#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 */