1
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
typedef enum _msg_type {
|
||||
SD_MSG_TYPE_ERROR = -1,
|
||||
SD_MSG_TYPE_NEW_IP_CONNECT = 0,
|
||||
SD_MSG_TYPE_SYN_ATTACK = 1,
|
||||
SD_MSG_TYPE_CLIENT_BLOCK_IP = 2,
|
||||
SD_MSG_TYPE_SSH_BF_ATTACK = 3,
|
||||
};
|
||||
|
||||
typedef struct kernel_msg_t {
|
||||
@@ -11,8 +14,18 @@ typedef struct kernel_msg_t {
|
||||
int type;
|
||||
union {
|
||||
struct {
|
||||
unsigned int src_ip;
|
||||
} poll_req;
|
||||
unsigned long src_ip;
|
||||
} ip_action;
|
||||
} u;
|
||||
};
|
||||
typedef struct client_msg_t {
|
||||
unsigned long check_sum;
|
||||
int type;
|
||||
union {
|
||||
struct {
|
||||
unsigned long src_ip;
|
||||
unsigned long block_time;
|
||||
} ip_address;
|
||||
} u;
|
||||
};
|
||||
typedef struct msg_list {
|
||||
@@ -25,3 +38,6 @@ extern struct kernel_msg_t *get_msg(void);
|
||||
extern size_t get_msg_list_length(void);
|
||||
extern void cleanup_msg(void);
|
||||
extern void init_msg(void);
|
||||
extern void push_msg_syn_attack(size_t ip_address);
|
||||
extern void push_msg_new_ip_connect(size_t ip_address);
|
||||
extern void push_msg_ssh_bf_attack(size_t ip_address);
|
||||
|
||||
Reference in New Issue
Block a user