Kernel versions

This commit is contained in:
Vadim Vetrov 2024-09-01 23:14:22 +03:00
parent 5eeff9bc0d
commit b20f15086e
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5
3 changed files with 2 additions and 4 deletions

2
Kbuild
View File

@ -1,3 +1,3 @@
obj-m := kyoutubeUnblock.o
kyoutubeUnblock-objs := kytunblock.o mangle.o quic.o utils.o kmod_utils.o
ccflags-y := -std=gnu11 -Wno-unused-variable -DKERNEL_SPACE -DDEBUG
ccflags-y := -std=gnu11 -DKERNEL_SPACE -Wno-error

View File

@ -7,8 +7,6 @@ LD := ld
CFLAGS :=
LDFLAGS :=
IPT_CFLAGS := -Wall -Wpedantic -O2
.PHONY: kmake kload kunload kreload kclean kmclean xclean
kmake: kmod

View File

@ -91,7 +91,7 @@ typedef __u64 uint64_t;
* Use NETBUF_CHECK to check that buffer was properly allocated.
*/
#ifdef KERNEL_SPACE
#include <linux/gfp_types.h>
#include <linux/gfp.h>
#define NETBUF_ALLOC(buf, buf_len) __u8* buf = kmalloc(buf_len, GFP_ATOMIC);
#define NETBUF_CHECK(buf) ((buf) != NULL)
#define NETBUF_FREE(buf) kfree(buf);