This commit is contained in:
huoji
2023-05-07 22:49:11 +08:00
parent e8a3b9fa98
commit b00e51fdc7
38 changed files with 860 additions and 954 deletions

14
linux_kernel/client_msg.c Normal file
View File

@@ -0,0 +1,14 @@
#include "client_msg.h"
void dispath_client_msg(struct client_msg_t* msg) {
switch (msg->type) {
case SD_MSG_TYPE_CLIENT_BLOCK_IP:
const size_t target_ip_address = msg->u.ip_address.src_ip;
const size_t block_time = msg->u.ip_address.block_time;
block_ip_address(target_ip_address, block_time);
break;
default:
printk(KERN_INFO "Unknown msg type: %d\n", msg->type);
break;
}
}