In one embodiment of the invention, the lookup tables and equivalence sets are built into hardware such as a flash memory, a content-addressable memory (CAM) or an ASIC, that is accessible to the hardware that is involved in the classifying of a network packet such as, the processor 320.