extending netfilter...plz help

Hello friends i'm trying to extend iptables to include a target by which we can change the packet type field of a packet.
For this i created a kernel module and a userspace extension.
Now i face the problem that when i try to invoke iptable with the target i created i get an error message saying that "no match/target/chain by that name" but when i do lsmod to show the modules that are loaded my kernel module is shown (that means it is loaded) i also went through userspace extension in iptables made by me but could not locate any problem.
only thing that i could locate was that the error message was coming from libiptc.c (here strange thing was that in libiptc.c in the function that printed error there was a structure which stored the function name where error originally occured, the error no. and msg. Now in my case the function name was shown as NULL so I can't figure out where the error is actually coming from.)

One more related problem, to debug above, in kernel module i gave some kernel messages (which i obviously thought that would be printed out some where as they will b reached) but i'm not able to figure out where that message is going. I checked system log in /var/log/messages but there i could just find one system message that the module has been loaded but not the customized message that i gave. Can someone help me out with that where is my message going.

Oh sorry! I forgot to tell my system description. I'm running redhat 9.0 (kernel 2.4.20) and using iptables 1.2.7a.

Thanks everyone for viewing and trying to think over it. I got my solution for this strange problem. So that none of u face same problem i'll tell what happened.
I created my kernel module and created a patch (mymodule.patch file) for it. Next I went through the patch-o-matic and learnt how to add ones own new patches to the already existing ones. Now I created all files required to patch makefile, config.in file etc. But to my surprise when I applied this patch last two lines were not included in the C file that resulted from patch. These two lines contained module initialisation and exit code. And so upon calling from user space though the module was loaded but it was loaded as tainted module. Luckily on going through again and again I could find the mistake and then rectified it.
So this way i got rid of problem but still thanks to u all for atleast looking into my problem.