diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 0c52d42..a3e5cda 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -48,6 +48,16 @@ control MyIngress(inout headers hdr, /********************** NAT64 / NAT46 ACTIONS ***********************************/ + /* changes for icmp6 -> icmp + - first echo request/reply + - later maybe other + */ + action nat64_icmp6() + { + hdr.ipv4.protocol = PROTO_ICMP; // overwrite generic same protocol assumption + } + + /* NAT64 protocol unspecific changes */ action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) { hdr.ipv4.setValid(); @@ -83,13 +93,6 @@ control MyIngress(inout headers hdr, hdr.ipv6.setInvalid(); } - action nat64_icmp6() - { - - hdr.ipv4.protocol = PROTO_ICMP; // overwrite generic same protocol assumption - - } - /* NAT46: protocol unspecific changes */ action nat46_generic(ipv6_addr_t src, ipv6_addr_t dst) { hdr.ipv6.setValid();