Netdev List
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: netdev@oss.sgi.com
Subject: [RFC] Extended Generic Packet Classifier
Date: Sun, 27 Jul 2003 00:59:29 +0200	[thread overview]
Message-ID: <20030726225929.GF19908@rei.rakuen> (raw)

Hello

I'd be glad to hear your thoughts about this.

The following is a short summary of:
http://tgr.kaosu.ch/egp/concept.ps

The Extended Generic Packet Classifier (EGP) is something like an
extended U32 classifier.

An EGP filter consists of 1..n keys which can be chained
together using logic AND and OR operators.

A Key can also be a container for 1..n subkeys:
  
  key1 AND ( key2 OR key3 )

A key can match data with the operators: equal, not-equal, bigger-than,
and lesser-than for 8, 16, and 32 bit pieces in a packet.

An offset (offset inside the packet to select the bits to be matched)
consists of multiple offset elements which can be either constant or
dynamic (see below) which are then calculated together with
either { + | - | * }

A dynamic offset element uses bits of the packet such as IHL.

A bitmask and shift operator can be applied to all bits from the
packet used for calculation.


Examples (Using reference implementation)

Matches TCP packets to port 22:
egp match u8 eq 6 at 9 and u16 eq 22 at u8 mask 0xf at 0 * 4 + 2

Matches TCP/UDP packets originating from 192.168.23.3:
egp match u32 eq 0xc0a81703 at 12 and ( u8 eq 6 at 9 or u8 eq 17 at 9 )

Matches TCP packets to 192.168.23.12 or UDP packets to 192.168.23.3:
egp match ( u8 eq 6 at 9 and u32 eq 0xc0a81703 at 16 ) \
    or ( u8 eq 17 at 9 and u32 0xc0a8170c at 16 )


Reference implementation:
Patch against 2.6.0-test1 and iproute2 can be found at:
http://tgr.kaosu.ch/egp/

NOTE: The implementation is done in a straight forward way
and not fully tested.

I did the project on a self-interest motivation but I'm willing
to work further on it if interests are there.

Kind Regards

-- 
Thomas GRAF
http://tgr.kaosu.ch/

             reply	other threads:[~2003-07-26 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-26 22:59 Thomas Graf [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-23 19:48 [RFC] Extended Generic Packet Classifier Thomas Graf
2004-12-23 23:09 ` Thomas Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030726225929.GF19908@rei.rakuen \
    --to=tgraf@suug.ch \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox