From 01d9305350cf3d93f883e07185bd7253513dd48a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 27 Mar 2019 13:55:07 +0100 Subject: [PATCH] Move def of nat64_icmp6 prior to use --- p4src/static-mapping.p4 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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();