next up previous contents
Next: Barriers Up: Configuration data format Previous: Actions   Contents


Rules

The rules group defines the matching rules for static packet classification. It contains statements with the following syntax:

match field=value $\ldots$ action action

Each rule has zero or more field=value entries. The rule matches if and only if all fields have the requested value. If the rule matches, the corresponding action is executed. Otherwise, matching continues with the next rule.

field
specifies the field to read. A field specification has the following syntax:

offset_group:offset:length

This extracts length bits starting at the position defined by the offset of offset_group, plus offset bits. The first bit in the packet has offset zero. If length is zero, the expression always yields 0, and no actual access should be made. A field can be arbitrarily long, i.e. larger than 32 bits.

value
is the value which the field must contain. The value must be a hexadecimal number, and can be of arbitrary length (i.e. larger than the native word size of the machine).
action
is the index of the action to take if the rule matches.

Matches are processed in the order specified. If a rule contains further matches after a mismatch is found, these entries are ignored, and no access to packet data is performed for them.

Examples:

match 0:72:8=0x11 1:16:16=0x829A action 1


next up previous contents
Next: Barriers Up: Configuration data format Previous: Actions   Contents
Martin A. Brown 2003-11-06