Re: filtering packtes before OS takes care about them
From: Stephen Hemminger <hidden>
Date: 2005-03-01 17:20:58
From: Stephen Hemminger <hidden>
Date: 2005-03-01 17:20:58
On Mon, 28 Feb 2005 17:16:57 +0100 "Weber Matthias" [off-list ref] wrote:
Hi, i need a possibility to catch IP4 packets (from ethernet devices) before OS' netmodules (IP, UDP, TCP, ICMP, ARP, ROUTE, NETFILTER ...) takes care about them and * to delete them from input buffer such that OS' netmodules can't receive them * to modify packet headers and move packets to interface related output buffers * to keep them in input buffers such that OS' netmodules can take care about them. I would be thankfull for any hint, link or code example. Bye Matthias
If you need this as a "one off" type project, then another possibility is to hook onto netif_rx with jprobe (part of the kprobe) to redirect traffic to a local function first. It wouldn't useable for a real production type protocol.