I want to develop a packet interceptor module on top of Netfilter.This should
intercept incoming as well as outgoing packets ,set a flag so that i can
check from where the hook has been called.
Unfortunately the code is not working.
I want to know specifically whether while filling up the hook structure the
thing in the quotes are right
static struct nf_hook_ops linuxmag_ops = {{NULL,NULL},
linuxmag_hook,PF_INET, " NF_IP_LOCAL_IN | NF_IP_LOCAL_OUT "
,NF_IP_PRI_FILTER-1};
will do the trick.
I have tried with this but when I ping to some host only the incoming or
outgoing packets are intercepted.
2nd thing is can I have two hooks written in the same module one for incomig
packets and one for outgoing .I have also tried this but when i use rmmod the
system hangs and the also not all the packets are intercepted.
All the suggestions will be greatfully accepted.
Thanx in advance,
Abhinav