Patent ID: 7860991

Claim:
A packet classifier for a network, wherein the packet classifier inspects data contents of headers and fields of network packets received from the network, determines processing methods for each type of the network packets, and classifies the network packets based on the data contents of the fields inspected, the packet classifier for the network comprising: at least one content locator, wherein each content locator performs at least one location operation on the network packets and each of the location operations outputs the sum of at least one accumulation item as an output offset, wherein each of the accumulation items is generated according to at least one of the content locator system parameters and/or the data contents of one of the network packets, one of the accumulation items is a base value, the base value is a first offset or an output offset of one of the location operations performed by one of the content locators, and the output offset of the last location operation performed by one of the content locators is the location of a matching field in one of the network packets; at least one matching engine, wherein each of the matching engines receives the output offset of the last location operation performed by one of the content locators, performs a data matching at a location corresponding to the output offset in one of the network packets according to at least one matching engine system parameter, and outputs the result of the data matching operation; at least a memory module configured for storing the data contents of the network packets, the matching engine system parameter and the result of the data matching operation, wherein determining the processing methods for each type of the network packets and classifying of the network packets based on the data contents of the fields inspected are made according to the result of the data matching operation; and wherein, beside the base value, each of the remaining accumulation items is a second offset, a logic item multiplied by the second offset, the logic item multiplied by a field value, or the logic item multiplied by the field value and multiplied by a first constant, wherein, the first offset, the second offset and the first constant are taken from the content locator system parameters, the field value is taken from one of the network packets, the logic item is a logic value or the inverse of the logic value, the logic value is taken from the content locator system parameters or generated according to the field value.