Experimental Linux kernel module that handles a custom Ethernet EtherType for the Flatpack protocol. It parses a compact 10-byte header and exposes per-CPU runtime statistics via debugfs.
Requirements: Linux with kernel headers for your running kernel, make, and a compiler toolchain.
Build the module:
cd kmod
make # in-tree build
# or
make build # out-of-tree build to kmod/build/
# or just simply run script build.sh
sudo chmod +x build.sh
./build.shLoad the module (adjust parameters as needed):
sudo insmod kmod/flatpack_kmod.ko eth_type=0x88B5 ifname=eth0 log_level=1Verify it’s loaded:
dmesg | grep -i flatpackView runtime stats (debugfs):
sudo cat /sys/kernel/debug/flatpack/statsUnload:
sudo rmmod flatpacketh_type(u16): EtherType to handle (default0x88B5)ifname(string): Interface name filter (defaulteth0)log_level(u8): 0=silent, 1=info, 2=debug
kmod/— kernel module source and Makefilekmod/build/— optional out-of-tree build outputbuild.sh— convenience script to build intokmod/build/
GPL-2.0-or-later. See LICENSE for details.