The rules group defines the matching rules for static packet classification. It contains statements with the following syntax:
match field=value 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.
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.
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