Carmelo Cascone | 9ab4061 | 2017-09-19 16:31:55 +0900 | [diff] [blame] | 1 | // Copyright (c) 2017, Google Inc. |
| 2 | // |
| 3 | // P4_16 specification for punt instance. |
| 4 | // Note: This code has not been tested and is expected to contain bugs. |
| 5 | |
| 6 | #include "punt.p4" |
| 7 | |
| 8 | control ingress(inout parsed_packet_t hdr, |
| 9 | inout local_metadata_t local_metadata, |
| 10 | inout standard_metadata_t standard_metadata) { |
| 11 | apply { |
| 12 | punt.apply(hdr, local_metadata, standard_metadata); |
| 13 | } |
| 14 | } // end ingress |
| 15 | |
| 16 | control egress(inout parsed_packet_t hdr, |
| 17 | inout local_metadata_t local_metadata, |
| 18 | inout standard_metadata_t standard_metadata) { |
| 19 | apply { } |
| 20 | } |
| 21 | |
| 22 | control verify_checksum(in parsed_packet_t hdr, |
| 23 | inout local_metadata_t local_metadata) { |
| 24 | apply { } |
| 25 | } |
| 26 | |
| 27 | control compute_checksum(inout parsed_packet_t hdr, |
| 28 | inout local_metadata_t local_metadata) { |
| 29 | apply { } |
| 30 | } |
| 31 | |
| 32 | V1Switch(pkt_parser(), verify_checksum(), ingress(), egress(), |
| 33 | compute_checksum(), pkt_deparser()) main; |