Parsing engines (Parsers) are used to read and decode packet headers and extract the required information for classification or for later packet modification. Parsers can only read from packets and cannot modify them. Parsers only extract the required fields defined by the user/architecture. They can transmit the data as output metadata.
Parsers support a wide variety of header types and sequences. These include:
- Fixed and variable header sequences
- Fixed and variable length fields
- Bit and byte granularity
Parsers support these interfaces:
- Packet data input and output
- Standard metadata out
- Header data out
- Used-defined metadata in/out
Parsers do not support:
- Varbit fields in user metadata
- Greater than 8 KB headers (there is an 8 KB header limit in the Parser)
An example of a simple parsing engine is provided in Sample P416 Program.