Re: grabbing all IP packets

Andi Kleen (ak@muc.de)
11 Jan 2000 04:27:26 +0100


chris@oskar.dev.nanoteq.co.za (Chris Bohme) writes:

> Hi,
>
> I am trying to find a way to catch all IP packets (OUTGOING, HOST,
> OTHERHOST etc.) before the rest of the stack processes them.
>
> It is important that this is done from a module and involves no patching of the
> kernel source.
>
> Doing a dev_add_pack() with type ETH_P_IP only gets incoming packets and
> ETH_P_ALL clones the sk_buff's. It is important that the packet is not
> duplicated as this is intended to be used for a firewall type of
> application.

See register_firewall() and friends.

And note that you have to be very careful with the include files in
your proprietary module -- some have inline functions which are GPLed.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/