Add skeleton for module and userspace iptables management

Special thanks to https://github.com/drivenets/iptables_extensions
repository with detailed explanations of iptables userspace interaction
with the kernel module.
This commit is contained in:
Vadim Vetrov
2024-07-31 22:13:06 +03:00
parent 79d592a0ca
commit b14abda600
9 changed files with 189 additions and 57 deletions

View File

@@ -16,11 +16,8 @@ typedef __u32 uint32_t;
#include <linux/tcp.h>
#include <asm/byteorder.h>
// #define ntohs(x) __constant_ntohs(x)
// #define ntohl(x) __constant_ntohl(x)
// #define htons(x) __constant_htons(x)
// #define htonl(x) __constant_htonl(x)
/* from <netinet/ip.h> */
#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */