aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-20 14:59:43 -0700
committerDave Barach <openvpp@barachs.net>2020-10-21 10:56:34 +0000
commitb040f98a88954ccf2e63fd7b2676865a2dbe0078 (patch)
tree8dd81604626dbb5cda19540a439e491a197e5491 /src/plugins/nat
parent8aa18562152b0d135a72d27e3dd72a831b68d0ce (diff)
misc: minimize dependencies on udp.h
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id13f33843b230a1d169560742c4f7b2dc17d8718
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/in2out.c2
-rw-r--r--src/plugins/nat/in2out_ed.c2
-rw-r--r--src/plugins/nat/lib/inlines.h2
-rw-r--r--src/plugins/nat/lib/ipfix_logging.c2
-rw-r--r--src/plugins/nat/nat64/nat64_out2in.c2
-rw-r--r--src/plugins/nat/nat_ha.c2
-rw-r--r--src/plugins/nat/out2in.c2
-rw-r--r--src/plugins/nat/out2in_ed.c2
8 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c
index 5f67f9b7ccd..ff463ef928f 100644
--- a/src/plugins/nat/in2out.c
+++ b/src/plugins/nat/in2out.c
@@ -23,7 +23,7 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/ip4_fib.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <nat/nat.h>
#include <nat/lib/ipfix_logging.h>
#include <nat/nat_inlines.h>
diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c
index f52026b1f11..f0bb0f9aae7 100644
--- a/src/plugins/nat/in2out_ed.c
+++ b/src/plugins/nat/in2out_ed.c
@@ -22,7 +22,7 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/ip4_fib.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <vppinfra/error.h>
#include <nat/nat.h>
#include <nat/lib/ipfix_logging.h>
diff --git a/src/plugins/nat/lib/inlines.h b/src/plugins/nat/lib/inlines.h
index 107944915cd..fe1f7dd27bc 100644
--- a/src/plugins/nat/lib/inlines.h
+++ b/src/plugins/nat/lib/inlines.h
@@ -18,6 +18,8 @@
#ifndef included_nat_inlines_h__
#define included_nat_inlines_h__
+#include <vnet/ip/icmp46_packet.h>
+
always_inline nat_protocol_t
ip_proto_to_nat_proto (u8 ip_proto)
{
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c
index e4fc0cedf19..7226fb72086 100644
--- a/src/plugins/nat/lib/ipfix_logging.c
+++ b/src/plugins/nat/lib/ipfix_logging.c
@@ -16,6 +16,8 @@
*/
#include <vnet/ipfix-export/flow_report.h>
+#include <vnet/ip/ip4.h>
+#include <vnet/udp/udp_local.h>
#include <vlibmemory/api.h>
#include <vppinfra/atomics.h>
#include <nat/lib/ipfix_logging.h>
diff --git a/src/plugins/nat/nat64/nat64_out2in.c b/src/plugins/nat/nat64/nat64_out2in.c
index 108edf0bdd1..5c5554ba36e 100644
--- a/src/plugins/nat/nat64/nat64_out2in.c
+++ b/src/plugins/nat/nat64/nat64_out2in.c
@@ -16,7 +16,7 @@
#include <nat/nat64/nat64.h>
#include <vnet/ip/ip4_to_ip6.h>
#include <vnet/fib/ip4_fib.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
typedef struct
{
diff --git a/src/plugins/nat/nat_ha.c b/src/plugins/nat/nat_ha.c
index 11b4ba82a17..ddfa3e49183 100644
--- a/src/plugins/nat/nat_ha.c
+++ b/src/plugins/nat/nat_ha.c
@@ -14,7 +14,7 @@
*/
#include "nat_ha.h"
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <nat/nat.h>
#include <vppinfra/atomics.h>
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index 99a4bb41c3a..dc1d0876d55 100644
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -21,7 +21,7 @@
#include <vnet/vnet.h>
#include <vnet/ip/ip.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/ip4_fib.h>
#include <nat/nat.h>
diff --git a/src/plugins/nat/out2in_ed.c b/src/plugins/nat/out2in_ed.c
index e9fbc595f04..703c854834c 100644
--- a/src/plugins/nat/out2in_ed.c
+++ b/src/plugins/nat/out2in_ed.c
@@ -22,7 +22,7 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/fib/ip4_fib.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <vppinfra/error.h>
#include <nat/nat.h>
#include <nat/lib/ipfix_logging.h>