Patent attributes
A packet parser performs a multitude of compare and transition operations to parse through all layers of the networking protocol in accordance with which the packet is formed. The packet parser supports a plurality of packet encapsulation formats and uses directed distance graph syntax for graphical representation. At each node, the packet parser isolates and compares a packet header word with either a number of associated masked values or a number of ranges to find a match. Depending on the match, one of the arcs originating from that node, namely a source node, is selected for transitioning to a destination node. A pointer is incremented as transition from the source node to the destination node is made. The packet parser is adapted to make a transition to a destination node from any number of source nodes, one or more of which may be a destination node for others of these source nodes.