bmv2
Designing your own switch target with bmv2
|
Implements a P4 parser. More...
Public Member Functions | |
void | parse (Packet *pkt) const |
Parser (const Parser &other)=delete | |
Deleted copy constructor. More... | |
Parser & | operator= (const Parser &other)=delete |
Deleted copy assignment operator. More... | |
Parser (Parser &&other)=delete | |
Deleted move constructor (const member variables) More... | |
Parser & | operator= (Parser &&other)=delete |
Deleted move assignment operator (const member variables) More... | |
![]() | |
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... | |
NamedP4Object & | operator= (const NamedP4Object &other)=delete |
Deleted copy assignment operator. More... | |
NamedP4Object (NamedP4Object &&other)=default | |
Default move constructor. More... | |
NamedP4Object & | operator= (NamedP4Object &&other)=default |
Default assignment operator. More... | |
Implements a P4 parser.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor (const member variables)
Deleted move assignment operator (const member variables)
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.