Packet Parsing Engine Protocol Identification Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional packet parsing technologies cannot accurately parse special type packet headers, leading to limitations in supporting new protocol types and flexible parsing.
Innovation Solution
A method and apparatus that utilize a packet parsing engine to determine the protocol type and offset of next-level packet headers by searching tables based on additional fields and next packet header fields, with the option of ternary content addressable memory (TCAM) searching to identify protocol types, enabling flexible and programmable parsing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional packet parsing methods are used, then common protocol types can be parsed, but special type packet headers cannot be accurately parsed
Solution Approach 1:
The packet parsing method dynamically adapts its parsing strategy based on the protocol type identified in the packet header. For special protocol types, the system switches to an additional field-based parsing mode, while for common protocols, it uses traditional next header field-based parsing. This dynamic adaptation enables accurate parsing of both special and common protocol types without compromising parsing precision.
Solution Approach 2:
The invention changes the parsing parameters (field selection criteria) based on the protocol type. When a packet is identified as a special protocol type, the system changes from using the next header field as the primary parsing parameter to using the additional field instead. This parameter change allows the parsing system to accurately handle special protocol types that differ from standard protocols.
2Adaptability or versatility
If flexible parsing is implemented to support new protocol types, then adaptability improves, but parsing complexity increases
Solution Approach 1:
The packet parsing system is segmented into distinct processing paths: one for common protocols using traditional next header field parsing, and another for special protocols using additional field-based parsing. This segmentation allows the system to implement flexible parsing for new protocol types while maintaining simplicity for well-known protocols, thereby managing overall system complexity.
Solution Approach 2:
The invention introduces an intermediary classification mechanism that identifies whether a packet belongs to a common or special protocol type before applying the appropriate parsing method. This intermediary step acts as a mediator that directs packets to the correct parsing pathway, enabling flexibility for new protocols while keeping the parsing system organized and manageable.
3Measurement precision
If multiple table searching methods are used to identify protocol types, then parsing accuracy for special protocols improves, but processing time increases
Solution Approach 1:
The system performs preliminary classification of packets to identify whether they are special or common protocol types before applying the detailed parsing process. This preliminary action allows the system to prepare the appropriate parsing tables and methods in advance, ensuring accurate protocol type identification while minimizing unnecessary processing time for packets that don't require complex parsing.
Data Source
Figure 1~3
Figure 4
Figure 5
AI summary
Embodiments of this application disclose a packet parsing method and apparatus, and relate to the field of electronic information, to resolve a problem in the conventional technology that a special type of packet header cannot be accurately parsed through proper programming during packet parsing. A specific solution is: receiving a packet that includes at least a first packet header and a second packet header; obtaining a configuration of the first packet header, and accordingly obtaining first configuration information from the first packet header, where the first configuration information includes an NHF and an additional field of the first packet header; searching a first table based on the additional field to obtain a protocol type corresponding to the additional field, and searching a second table based on the NHF to obtain a protocol type corresponding to the NHF; when there is the protocol type corresponding to the additional field in the first table, obtaining a protocol type of the second packet header based on the protocol type corresponding to the additional field; and when there is no protocol type corresponding to the additional field in the first table, obtaining the protocol type of the second packet header based on the protocol type corresponding to the NHF.