diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-09-28 12:52:36 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-09-28 12:52:36 +0000 |
commit | 36c0bad1fa4d61860a9cb4688759a49fa22cde67 (patch) | |
tree | 44f4c1dcb29c5fa37a46aa2eb76bdeadedf06647 /src/plugins/ifw/ifw.h | |
parent | 1ed8ad88617b996a1dc37deddd2f44dd36adf4af (diff) | |
download | mandi-36c0bad1fa4d61860a9cb4688759a49fa22cde67.tar mandi-36c0bad1fa4d61860a9cb4688759a49fa22cde67.tar.gz mandi-36c0bad1fa4d61860a9cb4688759a49fa22cde67.tar.bz2 mandi-36c0bad1fa4d61860a9cb4688759a49fa22cde67.tar.xz mandi-36c0bad1fa4d61860a9cb4688759a49fa22cde67.zip |
Diffstat (limited to 'src/plugins/ifw/ifw.h')
-rw-r--r-- | src/plugins/ifw/ifw.h | 48 |
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 */ |