Patent ID: 7769858

Claim:
A method for mapping packets, the method comprising: providing, in a network device, a search facility to which packets received in said network device are to be mapped; identifying an arrival type for each packet received as of one of N types of traffic arriving in said network device to form an identified arrival type; marking each packet received with a respective set of bits representing the identified arrival type, wherein the respective set of bits forms a code comprising a second portion of a key; selecting a set of field values from each packet received to form a first portion of a key; associating the second portion of the key with the first portion of the key to form the key for each packet received; identifying a network address translation type to form an identified network address translation type for each packet received; performing a step calculation using the set of field values and identified network address translation type to form a step input for each packet received; responsive to the step calculation, hashing the step input to form an index value for each packet received; locating an entry in the search facility for each packet received using the index value; and identifying an action associated with the entry using the first portion of the key; wherein performing a step calculation further comprises: determining whether a source address A is greater than a destination address B; responsive to a determination that the source address A is greater than the destination address B, the step calculation, S, is represented as S (A,1,B,2)=(A,1,B,2), wherein a 1 represents a source port and a 2 represents a destination port; and responsive to a determination that the source address A is not greater than the destination address D, the step calculation is represented as S (A,1,B,2)=R (A,1,B,2)=(B,2,A,1), wherein R represents a reflection function.