On Thu, 2005-03-31 at 18:35, Ben Greear wrote:
> jamal wrote:
> > One thing you probably havent understood is that all the action stuff
> > that happens on ingress happens before dev.c pkt receive.
> Could you point me to where this is, or give me something to
> search for? I'm curious how/where it does the hook, and if I
> understand that better, maybe I can start thinking about how
> to make use of it for future hacks...
search for CONFIG_NET_CLS_ACT
To see how simple an action can look like, take a look at
net/sched/gact.c (which does simple drop/accept etc); I have some
patches i need to submit to Dave that would make it even simpler to use
(and write less code). Attached is an example.
Actually gact may have gotten a little bit complex because it now allows
you to add randomness to accepting, dropping, going to next action etc.
The one thing you have to understand is filters and actions are
separate. So what i am pointing to you is a simple action that is
executed after a packet matches a specified filter. Thomas has been
working on providing what are know as ematches which are very simple
filters that you could program.
You can match a packet and pass it through a series of actions of your
Also note: This stuff can be done at egress (not just restricted to
Description: Text document