Patent ID: 7596141

Claim:
A method comprising: parsing a received packet, at a parser, to obtain one or more 128-bit addresses of the received packet; encoding the one or more addresses, at an address compression block, to reduce a size of the one or more addresses; determining, at a classification engine, whether the received packet has a unicast address format or a multicast address format; forming a key, at a key formation block, based on the one or more encoded addresses; and classifying the received packet, at a packet classification block, based on the key, wherein for the unicast address format, the method further comprises determining which one of a first encoding option, a second encoding option, or a third encoding option is utilized to encode the one or more addresses based on one or more classification rules; wherein at least one of the first or second encoding options comprises concatenating an encoding type code, a first identifier to be determined based on a first set of one or more bits of a first address, a second set of one or more bits of the first address, and a second identifier, to be determined based on a third set of one or more bits of the first address, to encode the first address; and wherein the second encoding option comprises: setting the first identifier to an 8-bit identifier for bits 0 through 15 of the first address; setting the second identifier to a 10-bit identifier for bits 64 through 127 of the first address; and concatenating an encoding type code, the first identifier, bits 16 through 63 of the first address, and the second identifier to encode the first address.