1. A method, in a data processing system, for performing an operation on a received data packet, comprising: receiving a data packet; performing a hash operation on a header field value of a header of the data packet to generate a hash value; performing a lookup operation in a hash table associated with a type of the header field value based on the hash value to identify a hash table entry; retrieving a bit string associated with the hash table entry, wherein each bit in the bit string corresponds to a class of rules of a rule set of a firewall; performing a matching operation of the header field value to rules in one or more classes of rules corresponding to bits set in the bit string; and performing an operation based on zero or more rules in the one or more classes of rules being matched by the header field value of the data packet.