Method and apparatus for encoding a plurality of pre-defined codes into a search key and for locating a longest matching pre-defined code
First Claim
1. A method of locating, in a list of pre-defined codes, a longest code matching a given code, the method comprising a) producing a search mask encoding at least one portion of said given code;
- and b) comparing said search mask to a search key having a Prefix Node Bit Array (PNBA) in which a bit is set active in at least one of a plurality of bit positions corresponding to possible bit combinations of bits in a bit string having a length equal to or less than the longest predefined code in said plurality of said pre-defined codes and arranged by the lengths of said possible bit combinations and by numeric values of said bit combinations, to identify a common active bit position in said search key and said search mask corresponding to one of said pre-defined codes having a length greater than all others of said pre-defined codes which correspond to common active bit positions.
6 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for locating in a list of pre-defined codes, a longest code matching a given code. The method and apparatus involve producing a search mask encoding at least one portion of said given code and comparing the search mask to a search key having a Prefix Node Bit Array (PNBA) in which a bit is set active in at least one of a plurality of bit positions corresponding to possible bit combinations of bits in a bit string having a length equal to or less than the longest predefined code in the plurality of pre-defined codes and arranged by the lengths of possible bit combinations and by numeric values of the bit combinations, to identify a common active bit position in the search key and the search mask corresponding to one of the pre-defined codes having a length greater than all others of said pre-defined codes which correspond to common active bit positions.
66 Citations
49 Claims
-
1. A method of locating, in a list of pre-defined codes, a longest code matching a given code, the method comprising
a) producing a search mask encoding at least one portion of said given code; - and
b) comparing said search mask to a search key having a Prefix Node Bit Array (PNBA) in which a bit is set active in at least one of a plurality of bit positions corresponding to possible bit combinations of bits in a bit string having a length equal to or less than the longest predefined code in said plurality of said pre-defined codes and arranged by the lengths of said possible bit combinations and by numeric values of said bit combinations, to identify a common active bit position in said search key and said search mask corresponding to one of said pre-defined codes having a length greater than all others of said pre-defined codes which correspond to common active bit positions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
- and
-
25. An apparatus for locating, in a list of pre-defined codes, a longest code matching a given code, the apparatus comprising:
-
a) means for producing a search mask encoding at least one portion of said given code; and
b) means for comparing said search mask to a search key having a Prefix Node Bit Array (PNBA) in which a bit is set active in at least one of a plurality of bit positions corresponding to possible bit combinations of bits in a bit string having a length equal to or less than the longest predefined code in said plurality of said pre-defined codes and arranged by the lengths of said possible bit combinations and by numeric values of said bit combinations, to identify a common active bit position in said search key and said search mask corresponding to one of said pre-defined codes having a length greater than all others of said pre-defined codes which correspond to common active bit positions.
-
-
26. A apparatus for locating, in a list of pre-defined codes, a longest code matching a given code, the apparatus comprising a processor circuit and memory in communication with the processor circuit, said memory being configured to direct the processor circuit to:
-
a) produce a search mask encoding at least one portion of said given code; and
b) compare said search mask to a search key having a Prefix Node Bit Array (PNBA) in which a bit is set active in at least one of a plurality of bit positions corresponding to possible bit combinations of bits in a bit string having a length equal to or less than the longest predefined code in said plurality of said pre-defined codes and arranged by the lengths of said possible bit combinations and by numeric values of said bit combinations, to identify a common active bit position in said search key and said search mask corresponding to one of said pre-defined codes having a length greater than all others of said pre-defined codes which correspond to common active bit positions. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49)
-
Specification