master-thesis/p4src/deparser.p4
2019-07-23 15:02:27 +02:00

27 lines
No EOL
632 B
Text

/* -*- 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