|
bmv2
Designing your own switch target with bmv2
|

Public Member Functions | |
| void | deparse (Packet *pkt) const |
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... | |
| 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 deparser. Since there are no deparser objects per se in the P4 language yet, the deparser logic is obtained by generating a topological sorting of the parse graph.
| void bm::Deparser::deparse | ( | Packet * | pkt | ) | const |
Deparse all valid headers (including headers in stacks) in the correct order, in front of the packet data; the packet data being everything that was not extracted by the parser. This function also updates checksums. After calling this method, the packet data consists of header data + payload, and you can transmit the packet. You can get the packet data and data size by calling respectively Packet::data() and Packet::get_data_size().
1.8.17