linux tcp/ip stack as a module...insmod problems

linux tcp/ip stack as a module...insmod problems

Post by Chinm » Sat, 22 Jun 2002 09:09:32

I am trying to implement the whole tcp/ip  stack (below the INET
socket layer) as a module . Do not confuse this with setting the "m"
option during "make xconfig"....
I am attempting to build a custom stack which i can change at will...

My approach:
I thought of using all the code of the linux stack as a starting
point. I copied all .c files from /usr/src/linux/net/ipv4 to a
separate directory
Then i compiled each file (gcc -D__KERNEL__ -c ...) and got the
coresponding object file. I also wrote a dummy .c file which contained
the init_module and cleanup_module functions. Then i linked all these
object files together.

My Problem:
When i try to insmod the resulting .obj file, i get the error
"couldn't find the kernel version the module was compiled for".
This happens even if i turn off kernel versioning while building the
what could be the problem?