A content matching engine (CME) uses a content addressable memory (CAM)
array that stores a plurality of strings in separate entries. The strings
define one or more rules to be matched. The strings of each rule are
linked, thereby providing a required order. The strings of each rule can
be linked by per-entry counters associated with each string, or by a
state machine. The strings in the CAM array are compared with a packet,
which is shifted one symbol at a time (because the strings can start on
any boundary). When the CAM detects a match, the CAM skips over the
string that resulted in the match, thereby preventing erroneous matches.
The CAM allows parallel matching to be performed for multiple rules. If
the contents of a packet match all of the strings of a rule, in order,
then the CME asserts a match/index signal that identifies the matched
rule.