How to add kernel module to kernel source?
hello,
I have written a C code that i want to execute at each NF_IP_POST_ROUTING Netfilter hook? How to add that C file to kernel source code? I dont want to load it from user space as code require to start its working with first outgoing packet send by computer. regards, cranium. |
Just look at the way other modules are hooked in and follow that.
|
Other modules are located in /lib/modules/2.4.20-8/kernel/ and they are loaded automatically by kernel. what changes i have to do to add kernel module to /usr/src/linux/net/ipv4/netfilter directory?
|
You'll need to change up the Makefiles, kernel build tree, and many other sections. Config scripts too. Why add it to the kernel tree?
|
Quote:
|
If you are writing kernel-level code, you should have sufficient experience with the kernel to be able to simply add a file. If not, read the kernel documentation. If something seems unclear in the docs, I'd be happy to help clear it up.
|
Quote:
Quote:
I'll keep you in mind, Matir ... :p |
Quote:
But really, adding another file to the kernel source is, I believe, well documented... somewhere. :) |
All times are GMT -5. The time now is 01:09 PM. |