The present invention relates to a method for storing a plurality of
multi-field classification rules in a computer system. Each multi-field
classification rule includes a rule specification that itself includes a
plurality of fields and a plurality of field definitions corresponding to
the fields. The method of the present invention includes providing a
virtual rule table, where the table stores a plurality of field
definitions, and for each of the plurality of multi-field classification
rules, compressing the rule specification by replacing at least one field
definition with an associated index into the virtual rule table. The
method also includes storing each of the compressed rule specifications
and the virtual rule table in a shared segment of memory.