Method and apparatus for high-speed parsing of network messages
First Claim
1. A pattern matching engine for use in searching network messages for pre-defined regular expressions and for determining matches thereto, the pattern matching engine comprising;
- a regular expression storage device for storing the pre-defined regular expressions and one or more corresponding actions that are to be applied to network messages matching the respective regular expressions, the storage device including a content-addressable memory (CAM) having a plurality of entries containing at least the pre-defined regular expressions; and
a decoder circuit coupled to the regular expression storage device, the decoder circuit configured to control an input to the CAM that includes a given network message or selected portion thereof for comparison with the regular expressions contained within the CAM, and to receive and decode an output returned from the regular expression storage device, the output identifying the action to be applied to the given network message or portion thereof, whereby the CAM is configured such that each network message, or portion thereof input to the CAM is compared against all CAM entries at the same time, allowing high-speed pattern matching of network messages.
1 Assignment
0 Petitions
Accused Products
Abstract
A programmable pattern matching engine efficiently parses the contents of network messages for regular expressions and executes pre-defined actions or treatments on those messages that match the regular expressions. The pattern matching engine is preferably a logic circuit designed to perform its pattern matching and execution functions at high speed, e.g., at multi-gigabit per second rates. It includes, among other things, a message buffer for storing the message being evaluated, a decoder circuit for decoding and executing corresponding actions or treatments, and one or more content-addressable memories (CAMs) that are programmed to store the regular expressions used to search the message. The CAM may be associated with a second memory device, such as a random access memory (RAM), as necessary, that is programmed to contain the respective actions or treatments to be applied to messages matching the corresponding CAM entries. The RAM provides its output to the decoder circuit, which, in response, decodes and executes the specified action or treatment.
-
Citations
25 Claims
-
1. A pattern matching engine for use in searching network messages for pre-defined regular expressions and for determining matches thereto, the pattern matching engine comprising;
-
a regular expression storage device for storing the pre-defined regular expressions and one or more corresponding actions that are to be applied to network messages matching the respective regular expressions, the storage device including a content-addressable memory (CAM) having a plurality of entries containing at least the pre-defined regular expressions; and
a decoder circuit coupled to the regular expression storage device, the decoder circuit configured to control an input to the CAM that includes a given network message or selected portion thereof for comparison with the regular expressions contained within the CAM, and to receive and decode an output returned from the regular expression storage device, the output identifying the action to be applied to the given network message or portion thereof, whereby the CAM is configured such that each network message, or portion thereof input to the CAM is compared against all CAM entries at the same time, allowing high-speed pattern matching of network messages. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A method for searching network messages for pre-defined regular expressions in order to apply a selected action to network messages matching a given regular expression, the method comprising the steps of:
storing the pre-defined regular expressions in a content-addressable memory (CAM) having a plurality of entries; decoding a given network message, or selected portion thereof, for comparison with the regular expressions contained within the CAM;
inputting a decoded portion of the given network message to the CAM for comparison with all of the regular expressions stored therein;
decoding an output returned from the CAM; and
identifying, in response to the decoded output, the action that corresponds to a first CAM entry matching the inputted network message or selected portion thereof, whereby input to the CAM is compared against all CAM entries at the same time, allowing high-speed pattern matching of network messages. - View Dependent Claims (16, 17, 18)
-
19. An intermediate network device for use in processing and forwarding network messages in a computer network, the intermediate network device comprising:
-
a plurality of line cards, one or more of the line cards capable of being connected to portions of the computer network by respective communications media, each line card configured to receive and forward network messages;
a message processing card; and
a common bus that provides inter-communication between the plurality of line cards and the message processing card, wherein the message processing card comprises;
pattern matching engine far use in searching network messages for pre-defined regular expressions and for determining matches thereto, the pattern matching engine comprising;
a regular expression storage device for storing the pre-defined regular expressions and one or more corresponding actions that are to be applied to network messages matching the respective regular expressions, the storage device including a content-addressable memory (CAM) having a plurality of entries containing at least the pre-defined regular expressions; and
a decoder circuit coupled to the regular expression storage device, the decoder circuit configured to control an input to the CAM that includes a given network message or selected portion thereof for comparison with the regular expressions contained within the CAM, and to receive and decode an output returned from the regular expression storage device, the output identifying the action to be applied to the given network message or portion thereof;
whereby the CAM is configured such that each network message or portion thereof input to the CAM is compared against all CAM entries at the same time, allowing high-speed pattern matching of network messages. - View Dependent Claims (20, 21, 22, 23, 24)
-
-
25. A pattern matching engine for use in searching network messages for pre-defined regular expressions and for determining matches thereto, the pattern matching engine comprising:
-
means for storing the pre-defined regular expressions and one or more corresponding actions that are to be applied to network messages matching the respective regular expressions, the storage means including a content-addressable memory (CAM) having a plurality of entries containing at least the pre-defined regular expressions; and
means, coupled to the storage means, for decoding actions returned from the storage means, the decoding means configured to control an input to the CAM that includes a given network message or selected portion thereof for comparison with the regular expressions contained within the CAM, and to receive and decode an output returned from the storage means, the output identifying the action to be applied to the given network message or portion thereof;
whereby the CAM is configured such that each network message or portion thereof input to the CAM is compared against all CAM entries at the same time, allowing high-speed pattern matching of network messages.
-
Specification