Patent ID: 8576841

Claim:
A method comprising: generating, by a computing device, an encoded value that represents a specified port range comprising: a first element storing an identifier that identifies a frequently occurring port range stored in an associative data structure of most frequently occurring port ranges, a second element storing an index that represents a dynamically-learned port range specifying at least a part of the specified port range, the dynamically-learned port range represented in a tree-structure of dynamically-learned port ranges and identified by the index; receiving, by the computing device, a packet that indicates a port value; generating, by the computing device, a query value based at least on the port value; selecting, by the computing device, one or more filters using a content-addressable data structure that indicates an association between the encoded value and the one or more filters, wherein the encoded value matches the query value; and applying, by a forwarding plane of the computing device, the one or more filters associated with the encoded value to the packet that indicates the port.