Re: How to insert a hook to intercept TCP packets from a kernel module using IPFilter



In article <1165556806.701524.287830@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"will_u_tellmemore" <will.u.tellmemore@xxxxxxxxx> writes:

Thanks for all ur replies .
As Andrew said i need to use pfil module.Kernel Module IPFilter doesn't
seem to be framework exporting any such interfaces but having a look
at it was worth as i can use same interfaces that it uses to insert its
own hooks.

To Thomas,
I haven't yet looked yet into ifconfig yet but sill do that sooner .

pfil is a STREAMS module which is pushed onto the NIC drivers in a
similar way that Thomas's ifconfig modinsert can do, so for the
ifconfig method, you would effectively be putting your own kernel
module in place of pfil. This may have some advantages as the DLPI
STREAMS interface is a fully supported/documented interface.

Note, to use pfil, you have to edit /etc/ipf/pfil.ap to add/uncomment
your NIC driver(s) so that pfil is autopushed onto a NIC driver when
it is opened. pfil might also work with ifconfig modinsert, but I
haven't tried that.

--
Andrew Gabriel
.