| // Copyright (c) 2017, Google Inc. |
| // |
| // P4_16 specification for l3_fwd instance. |
| // Note: This code has not been tested and is expected to contain bugs. |
| |
| #include "l3_fwd.p4" |
| #include "ipv4_checksum.p4" |
| |
| control ingress(inout parsed_packet_t hdr, |
| inout local_metadata_t local_metadata, |
| inout standard_metadata_t standard_metadata) { |
| apply { |
| l3_fwd.apply(hdr, local_metadata, standard_metadata); |
| } |
| } // end ingress |
| |
| control egress(inout parsed_packet_t hdr, |
| inout local_metadata_t local_metadata, |
| inout standard_metadata_t standard_metadata) { |
| apply { } |
| } |
| |
| V1Switch(pkt_parser(), verify_checksum(), ingress(), egress(), |
| compute_checksum(), pkt_deparser()) main; |