bmv2
Designing your own switch target with bmv2
Public Member Functions | List of all members
bm::Parser Class Reference

Implements a P4 parser. More...

Inheritance diagram for bm::Parser:
Inheritance graph
[legend]

Public Member Functions

void parse (Packet *pkt) const
 
 Parser (const Parser &other)=delete
 Deleted copy constructor. More...
 
Parseroperator= (const Parser &other)=delete
 Deleted copy assignment operator. More...
 
 Parser (Parser &&other)=delete
 Deleted move constructor (const member variables) More...
 
Parseroperator= (Parser &&other)=delete
 Deleted move assignment operator (const member variables) More...
 
- Public Member Functions inherited from bm::NamedP4Object
const std::string & get_name () const
 Get the name of the P4 instance. More...
 
p4object_id_t get_id () const
 Get the compiler-provided id. More...
 
 NamedP4Object (const NamedP4Object &other)=delete
 Deleted copy constructor. More...
 
NamedP4Objectoperator= (const NamedP4Object &other)=delete
 Deleted copy assignment operator. More...
 
 NamedP4Object (NamedP4Object &&other)=default
 Default move constructor. More...
 
NamedP4Objectoperator= (NamedP4Object &&other)=default
 Default assignment operator. More...
 

Detailed Description

Implements a P4 parser.

Constructor & Destructor Documentation

◆ Parser() [1/2]

bm::Parser::Parser ( const Parser other)
delete

Deleted copy constructor.

◆ Parser() [2/2]

bm::Parser::Parser ( Parser &&  other)
delete

Deleted move constructor (const member variables)

Member Function Documentation

◆ operator=() [1/2]

Parser& bm::Parser::operator= ( const Parser other)
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

Parser& bm::Parser::operator= ( Parser &&  other)
delete

Deleted move assignment operator (const member variables)

◆ parse()

void bm::Parser::parse ( Packet pkt) const

Extracts Packet headers as specified by the parse graph. When the parser extracts a header to the PHV, the header is marked as valid. After parsing a packet, you can send it to the appropriate match-action Pipeline for processing. Depending on how your target is organized, you could also send it to another Parser for deeper parsing.


The documentation for this class was generated from the following file: