Simple Kernel Module

53 Views Asked by At

I'm writing a simple Kernel module that filter packets. I'm using Ubuntu.

I have in my code

#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>

Yet I still get error when using the Makefile:

error: ‘nf_hook_ops’ undeclared
error: ‘NF_IP_FORWARD’ undeclared
error: ‘NF_IP_LOCAL_IN’ undeclared
error: ‘NF_IP_LOCAL_OUT’ undeclared

Which seems weird to me because I belive they all should be in

#include <linux/netfilter_ipv4.h>

I'm new to this so if this is not the right forum let me know. If needed more details about my code/ machine let me know.

I cheacked the CONFIG_NETFILTER and they are ok.

0

There are 0 best solutions below