master-thesis/p4src/deparser.p4

27 lines
632 B
Plaintext
Raw Normal View History

2019-07-10 20:28:37 +00:00
/* -*- P4_16 -*- */
#ifndef DEPARSERS_P4
#define DEPARSERS_P4
apply {
/* always */
packet.emit(hdr.ethernet);
/* only if information is sent to the controller */
packet.emit(hdr.cpu);
/* either */
packet.emit(hdr.ipv4);
packet.emit(hdr.ipv6);
packet.emit(hdr.arp);
/* either */
packet.emit(hdr.tcp);
packet.emit(hdr.udp);
packet.emit(hdr.icmp);
/* might be more than one subtype */
packet.emit(hdr.icmp6);
packet.emit(hdr.icmp6_na_ns);
packet.emit(hdr.icmp6_option_link_layer_addr);
}
#endif