diff --git a/.gitignore b/.gitignore index e2057c3..fc8386c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ *.symvers *.cache *.o.d +scripts/gen_compile_commands.py diff --git a/Makefile b/Makefile index d63e338..a9fa518 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,17 @@ -obj-m += aes67.o +obj-m := snoip.o +snoip-y := aes67.o rtp.o + +ccflags-y := -I $(src)/include CC=gcc KERN_DIR=/lib/modules/$(shell uname -r)/build/ default: $(MAKE) -C $(KERN_DIR) M=$$PWD modules +autoclean: clean default setup +setup: + ./scripts/gen_compile_commands.sh $(KERN_DIR) clean: - make -C $(KERN_DIR) M=$(PWD) clean + $(MAKE) -C $(KERN_DIR) M=$(PWD) clean help: - make -C $(KERN_DIR) M=$(PWD) help + $(MAKE) -C $(KERN_DIR) M=$(command -v "$1" >/dev/null 2>&1PWD) help diff --git a/aes67.c b/aes67.c index aa23841..c369a00 100644 --- a/aes67.c +++ b/aes67.c @@ -4,18 +4,7 @@ * * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; @@ -34,7 +23,6 @@ static struct platform_device *devices[SNDRV_CARDS]; #define AES67_STREAM_RX 0 #define AES67_STREAM_TX 1 - module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); module_param_array(id, charp, NULL, 0444); @@ -276,6 +264,9 @@ static void aes67_rx_net(struct work_struct *work) } if (msglen > 0) { + //Parsse packet + + //add packet to ring queue snd_printk(KERN_INFO "Received Buffer: %s\n", recv_buf); continue; } diff --git a/compile_commands.json b/compile_commands.json index 23ae18e..7963bdd 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -1,372 +1,17 @@ [ { - "arguments": [ - "/usr/bin/gcc", - "-Wp,-MMD,/home/pbaxter/code/snd-aoip/.aes67.o.d", - "-nostdinc", - "-I./arch/x86/include", - "-I./arch/x86/include/generated", - "-I./include", - "-I./arch/x86/include/uapi", - "-I./arch/x86/include/generated/uapi", - "-I./include/uapi", - "-I./include/generated/uapi", - "-include", - "./include/linux/compiler-version.h", - "-include", - "./include/linux/kconfig.h", - "-include", - "./include/linux/compiler_types.h", - "-D__KERNEL__", - "-fmacro-prefix-map=./=", - "-std=gnu11", - "-fshort-wchar", - "-funsigned-char", - "-fno-common", - "-fno-PIE", - "-fno-strict-aliasing", - "-mno-sse", - "-mno-mmx", - "-mno-sse2", - "-mno-3dnow", - "-mno-avx", - "-fcf-protection=none", - "-m64", - "-falign-jumps=1", - "-falign-loops=1", - "-mno-80387", - "-mno-fp-ret-in-387", - "-mskip-rax-setup", - "-mtune=generic", - "-mno-red-zone", - "-mcmodel=kernel", - "-Wno-sign-compare", - "-fno-asynchronous-unwind-tables", - "-mindirect-branch-cs-prefix", - "-mfunction-return=thunk-extern", - "-fno-jump-tables", - "-fpatchable-function-entry=16,16", - "-fno-delete-null-pointer-checks", - "-O2", - "-fstack-protector-strong", - "-fno-omit-frame-pointer", - "-fno-optimize-sibling-calls", - "-fno-stack-clash-protection", - "-fzero-call-used-regs=used-gpr", - "-pg", - "-mfentry", - "-DCC_USING_FENTRY", - "-falign-functions=16", - "-fno-strict-overflow", - "-fno-stack-check", - "-Wall", - "-Wundef", - "-Werror=implicit-function-declaration", - "-Werror=implicit-int", - "-Werror=return-type", - "-Werror=strict-prototypes", - "-Wno-format-security", - "-Wno-trigraphs", - "-Wno-frame-address", - "-Wno-address-of-packed-member", - "-Wmissing-declarations", - "-Wmissing-prototypes", - "-Wframe-larger-than=1024", - "-Wno-main", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wvla", - "-Wno-pointer-sign", - "-Wcast-function-type", - "-Wno-stringop-overflow", - "-Wno-array-bounds", - "-Wno-alloc-size-larger-than", - "-Wimplicit-fallthrough=5", - "-Werror=date-time", - "-Werror=incompatible-pointer-types", - "-Werror=designated-init", - "-Wenum-conversion", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wno-restrict", - "-Wno-packed-not-aligned", - "-Wno-format-overflow", - "-Wno-format-truncation", - "-Wno-stringop-truncation", - "-Wno-override-init", - "-Wno-missing-field-initializers", - "-Wno-type-limits", - "-Wno-shift-negative-value", - "-Wno-maybe-uninitialized", - "-Wno-sign-compare", - "-g", - "-gdwarf-5", - "-fsanitize=shift", - "-fsanitize=bool", - "-fsanitize=enum", - "-fsanitize=signed-integer-overflow", - "-DMODULE", - "-DKBUILD_BASENAME=\"aes67\"", - "-DKBUILD_MODNAME=\"aes67\"", - "-D__KBUILD_MODNAME=kmod_aes67", - "-c", - "-o", - "/home/pbaxter/code/snd-aoip/aes67.o", - "/home/pbaxter/code/snd-aoip/aes67.c" - ], - "directory": "/usr/src/linux-headers-6.9.0-pbaxter-pbaxter", - "file": "/home/pbaxter/code/snd-aoip/aes67.c", - "output": "/home/pbaxter/code/snd-aoip/aes67.o" + "command": "gcc -Wp,-MMD,/home/pbaxter/code/snd-aoip/.aes67.o.d -nostdinc -I/lib/modules/6.11.0-13-generic/build/arch/x86/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated -I/lib/modules/6.11.0-13-generic/build/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/uapi -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated/uapi -I/lib/modules/6.11.0-13-generic/build/include/uapi -I/lib/modules/6.11.0-13-generic/build/include/generated/uapi -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler-version.h -include /lib/modules/6.11.0-13-generic/build/include/linux/kconfig.h -I/lib/modules/6.11.0-13-generic/build/ubuntu/include -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=/lib/modules/6.11.0-13-generic/build/= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=1024 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5 -I /home/pbaxter/code/snd-aoip/include -fsanitize=bounds-strict -fsanitize=shift -fsanitize=bool -fsanitize=enum -fsanitize=signed-integer-overflow -DMODULE -DKBUILD_BASENAME='\"aes67\"' -DKBUILD_MODNAME='\"snoip\"' -D__KBUILD_MODNAME=kmod_snoip -c -o /home/pbaxter/code/snd-aoip/aes67.o /home/pbaxter/code/snd-aoip/aes67.c", + "directory": "/home/pbaxter/code/snd-aoip", + "file": "/home/pbaxter/code/snd-aoip/aes67.c" }, { - "arguments": [ - "/usr/bin/gcc", - "-fmacro-prefix-map=./=", - "-std=gnu11", - "-fshort-wchar", - "-funsigned-char", - "-fno-common", - "-fno-PIE", - "-fno-strict-aliasing", - "-mno-sse", - "-mno-mmx", - "-mno-sse2", - "-mno-3dnow", - "-mno-avx", - "-fcf-protection=none", - "-m64", - "-falign-jumps=1", - "-falign-loops=1", - "-mno-80387", - "-mno-fp-ret-in-387", - "-mpreferred-stack-boundary=3", - "-mskip-rax-setup", - "-mtune=generic", - "-mno-red-zone", - "-mcmodel=kernel", - "-Wno-sign-compare", - "-fno-asynchronous-unwind-tables", - "-mindirect-branch=thunk-extern", - "-mindirect-branch-register", - "-mindirect-branch-cs-prefix", - "-mfunction-return=thunk-extern", - "-fno-jump-tables", - "-fpatchable-function-entry=16,16", - "-fno-delete-null-pointer-checks", - "-O2", - "-fno-allow-store-data-races", - "-fstack-protector-strong", - "-fno-omit-frame-pointer", - "-fno-optimize-sibling-calls", - "-fno-stack-clash-protection", - "-fzero-call-used-regs=used-gpr", - "-pg", - "-mfentry", - "-falign-functions=16", - "-fno-strict-overflow", - "-fno-stack-check", - "-fconserve-stack", - "-Wall", - "-Wundef", - "-Werror=implicit-function-declaration", - "-Werror=implicit-int", - "-Werror=return-type", - "-Werror=strict-prototypes", - "-Wno-format-security", - "-Wno-trigraphs", - "-Wno-frame-address", - "-Wno-address-of-packed-member", - "-Wmissing-declarations", - "-Wmissing-prototypes", - "-Wframe-larger-than=1024", - "-Wno-main", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wvla", - "-Wno-pointer-sign", - "-Wcast-function-type", - "-Wno-stringop-overflow", - "-Wno-array-bounds", - "-Wno-alloc-size-larger-than", - "-Wimplicit-fallthrough=5", - "-Werror=date-time", - "-Werror=incompatible-pointer-types", - "-Werror=designated-init", - "-Wenum-conversion", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wno-restrict", - "-Wno-packed-not-aligned", - "-Wno-format-overflow", - "-Wno-format-truncation", - "-Wno-stringop-truncation", - "-Wno-override-init", - "-Wno-missing-field-initializers", - "-Wno-type-limits", - "-Wno-shift-negative-value", - "-Wno-maybe-uninitialized", - "-Wno-sign-compare", - "-g", - "-gdwarf-5", - "-fsanitize=bounds-strict", - "-fsanitize=shift", - "-fsanitize=bool", - "-fsanitize=enum", - "-fsanitize=signed-integer-overflow", - "-nostdinc", - "-I./arch/x86/include", - "-I./arch/x86/include/generated", - "-I./include", - "-I./arch/x86/include/uapi", - "-I./arch/x86/include/generated/uapi", - "-I./include/uapi", - "-I./include/generated/uapi", - "-include", - "./include/linux/compiler-version.h", - "-include", - "./include/linux/kconfig.h", - "-include", - "./include/linux/compiler_types.h", - "-D__KERNEL__", - "-DCC_USING_FENTRY", - "-DMODULE", - "-DKBUILD_BASENAME=\"aes67\"", - "-DKBUILD_MODNAME=\"aes67\"", - "-D__KBUILD_MODNAME=kmod_aes67", - "-c", - "-Wp,-MMD,/home/pbaxter/code/snd-aoip/.aes67.o.d", - "-fdiagnostics-color", - "-o", - "/home/pbaxter/code/snd-aoip/aes67.o", - "/home/pbaxter/code/snd-aoip/aes67.c" - ], - "directory": "/usr/src/linux-headers-6.9.0-pbaxter-pbaxter", - "file": "/home/pbaxter/code/snd-aoip/aes67.c", - "output": "/home/pbaxter/code/snd-aoip/aes67.o" + "command": "gcc -Wp,-MMD,/home/pbaxter/code/snd-aoip/.rtp.o.d -nostdinc -I/lib/modules/6.11.0-13-generic/build/arch/x86/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated -I/lib/modules/6.11.0-13-generic/build/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/uapi -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated/uapi -I/lib/modules/6.11.0-13-generic/build/include/uapi -I/lib/modules/6.11.0-13-generic/build/include/generated/uapi -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler-version.h -include /lib/modules/6.11.0-13-generic/build/include/linux/kconfig.h -I/lib/modules/6.11.0-13-generic/build/ubuntu/include -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=/lib/modules/6.11.0-13-generic/build/= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=1024 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5 -I /home/pbaxter/code/snd-aoip/include -fsanitize=bounds-strict -fsanitize=shift -fsanitize=bool -fsanitize=enum -fsanitize=signed-integer-overflow -DMODULE -DKBUILD_BASENAME='\"rtp\"' -DKBUILD_MODNAME='\"snoip\"' -D__KBUILD_MODNAME=kmod_snoip -c -o /home/pbaxter/code/snd-aoip/rtp.o /home/pbaxter/code/snd-aoip/rtp.c", + "directory": "/home/pbaxter/code/snd-aoip", + "file": "/home/pbaxter/code/snd-aoip/rtp.c" }, { - "arguments": [ - "/usr/bin/gcc", - "-Wp,-MMD,/home/pbaxter/code/snd-aoip/.aes67.mod.o.d", - "-nostdinc", - "-I./arch/x86/include", - "-I./arch/x86/include/generated", - "-I./include", - "-I./arch/x86/include/uapi", - "-I./arch/x86/include/generated/uapi", - "-I./include/uapi", - "-I./include/generated/uapi", - "-include", - "./include/linux/compiler-version.h", - "-include", - "./include/linux/kconfig.h", - "-include", - "./include/linux/compiler_types.h", - "-D__KERNEL__", - "-fmacro-prefix-map=./=", - "-std=gnu11", - "-fshort-wchar", - "-funsigned-char", - "-fno-common", - "-fno-PIE", - "-fno-strict-aliasing", - "-mno-sse", - "-mno-mmx", - "-mno-sse2", - "-mno-3dnow", - "-mno-avx", - "-fcf-protection=none", - "-m64", - "-falign-jumps=1", - "-falign-loops=1", - "-mno-80387", - "-mno-fp-ret-in-387", - "-mpreferred-stack-boundary=3", - "-mskip-rax-setup", - "-mtune=generic", - "-mno-red-zone", - "-mcmodel=kernel", - "-Wno-sign-compare", - "-fno-asynchronous-unwind-tables", - "-mindirect-branch=thunk-extern", - "-mindirect-branch-register", - "-mindirect-branch-cs-prefix", - "-mfunction-return=thunk-extern", - "-fno-jump-tables", - "-fpatchable-function-entry=16,16", - "-fno-delete-null-pointer-checks", - "-O2", - "-fno-allow-store-data-races", - "-fstack-protector-strong", - "-fno-omit-frame-pointer", - "-fno-optimize-sibling-calls", - "-fno-stack-clash-protection", - "-fzero-call-used-regs=used-gpr", - "-pg", - "-mfentry", - "-DCC_USING_FENTRY", - "-falign-functions=16", - "-fno-strict-overflow", - "-fno-stack-check", - "-fconserve-stack", - "-Wall", - "-Wundef", - "-Werror=implicit-function-declaration", - "-Werror=implicit-int", - "-Werror=return-type", - "-Werror=strict-prototypes", - "-Wno-format-security", - "-Wno-trigraphs", - "-Wno-frame-address", - "-Wno-address-of-packed-member", - "-Wmissing-declarations", - "-Wmissing-prototypes", - "-Wframe-larger-than=1024", - "-Wno-main", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wvla", - "-Wno-pointer-sign", - "-Wcast-function-type", - "-Wno-stringop-overflow", - "-Wno-array-bounds", - "-Wno-alloc-size-larger-than", - "-Wimplicit-fallthrough=5", - "-Werror=date-time", - "-Werror=incompatible-pointer-types", - "-Werror=designated-init", - "-Wenum-conversion", - "-Wno-unused-but-set-variable", - "-Wno-unused-const-variable", - "-Wno-restrict", - "-Wno-packed-not-aligned", - "-Wno-format-overflow", - "-Wno-format-truncation", - "-Wno-stringop-truncation", - "-Wno-override-init", - "-Wno-missing-field-initializers", - "-Wno-type-limits", - "-Wno-shift-negative-value", - "-Wno-maybe-uninitialized", - "-Wno-sign-compare", - "-g", - "-gdwarf-5", - "-fsanitize=bounds-strict", - "-fsanitize=shift", - "-fsanitize=bool", - "-fsanitize=enum", - "-fsanitize=signed-integer-overflow", - "-DMODULE", - "-DKBUILD_BASENAME=\"aes67.mod\"", - "-DKBUILD_MODNAME=\"aes67\"", - "-D__KBUILD_MODNAME=kmod_aes67", - "-c", - "-o", - "/home/pbaxter/code/snd-aoip/aes67.mod.o", - "/home/pbaxter/code/snd-aoip/aes67.mod.c" - ], - "directory": "/usr/src/linux-headers-6.9.0-pbaxter-pbaxter", - "file": "/home/pbaxter/code/snd-aoip/aes67.mod.c", - "output": "/home/pbaxter/code/snd-aoip/aes67.mod.o" + "command": "gcc-14 -Wp,-MMD,/home/pbaxter/code/snd-aoip/.snoip.mod.o.d -nostdinc -I/lib/modules/6.11.0-13-generic/build/arch/x86/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated -I/lib/modules/6.11.0-13-generic/build/include -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/uapi -I/lib/modules/6.11.0-13-generic/build/arch/x86/include/generated/uapi -I/lib/modules/6.11.0-13-generic/build/include/uapi -I/lib/modules/6.11.0-13-generic/build/include/generated/uapi -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler-version.h -include /lib/modules/6.11.0-13-generic/build/include/linux/kconfig.h -I/lib/modules/6.11.0-13-generic/build/ubuntu/include -include /lib/modules/6.11.0-13-generic/build/include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=/lib/modules/6.11.0-13-generic/build/= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=1024 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5 -fsanitize=bounds-strict -fsanitize=shift -fsanitize=bool -fsanitize=enum -fsanitize=signed-integer-overflow -DMODULE -DKBUILD_BASENAME='\"snoip.mod\"' -DKBUILD_MODNAME='\"snoip\"' -D__KBUILD_MODNAME=kmod_snoip -c -o /home/pbaxter/code/snd-aoip/snoip.mod.o /home/pbaxter/code/snd-aoip/snoip.mod.c", + "directory": "/home/pbaxter/code/snd-aoip", + "file": "/home/pbaxter/code/snd-aoip/snoip.mod.c" } -] +] \ No newline at end of file diff --git a/include/snoip.h b/include/snoip.h new file mode 100644 index 0000000..7aaeccb --- /dev/null +++ b/include/snoip.h @@ -0,0 +1,17 @@ +#ifndef MOD_SNOIP +#define MOD_SNOIP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/rtp.c b/rtp.c new file mode 100644 index 0000000..ce5b163 --- /dev/null +++ b/rtp.c @@ -0,0 +1 @@ +#include diff --git a/scripts/gen_compile_commands.sh b/scripts/gen_compile_commands.sh old mode 100644 new mode 100755 index fa9694c..9eb0f12 --- a/scripts/gen_compile_commands.sh +++ b/scripts/gen_compile_commands.sh @@ -1,9 +1,15 @@ #!/bin/bash -if ! command bear &> /dev/null; then - echo "Please install bear. https://github.com/rizsotto/Bear" - exit 1 +KERN_DIR="$1" + +if [[ ! -f scripts/gen_compile_commands.py ]]; then + curl -L https://raw.githubusercontent.com/torvalds/linux/refs/heads/master/scripts/clang-tools/gen_compile_commands.py -o scripts/gen_compile_commands.py + chmod +x scripts/gen_compile_commands.py fi -bear -- make host +./scripts/gen_compile_commands.py +SCRIPT="s/\.\//$(echo $KERN_DIR | sed -E 's/\//\\\//g')/g" +echo $SCRIPT + +sed -iE $SCRIPT compile_commands.json