summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/dslite/dslite.h
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-03-11 12:49:46 +0100
committerFilip Varga <fivarga@cisco.com>2020-03-11 17:41:40 +0100
commitf2833e42c1e3721ce06b0f510447d8a6dd3e5eb4 (patch)
treeb1a6711d4958b9cca4a1ded5b4b94742225e1562 /src/plugins/nat/dslite/dslite.h
parent92a6ac24f36dcc7e22682c0ce448cefc23d58e5e (diff)
nat: dslite plugin separation
Type: refactor Signed-off-by: Filip Varga <fivarga@cisco.com> Change-Id: I81546423200cc7f8a06b527dac8ead191a9e0519
Diffstat (limited to 'src/plugins/nat/dslite/dslite.h')
-rw-r--r--src/plugins/nat/dslite/dslite.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/plugins/nat/dslite/dslite.h b/src/plugins/nat/dslite/dslite.h
index d512cf47c9b..8cb73d88409 100644
--- a/src/plugins/nat/dslite/dslite.h
+++ b/src/plugins/nat/dslite/dslite.h
@@ -15,12 +15,35 @@
#ifndef __included_dslite_h__
#define __included_dslite_h__
+#include <vppinfra/dlist.h>
#include <vppinfra/bihash_8_8.h>
#include <vppinfra/bihash_16_8.h>
#include <vppinfra/bihash_24_8.h>
+
+#include <nat/lib/lib.h>
#include <nat/lib/alloc.h>
-#include <nat/nat.h>
-#include <nat/nat_inlines.h>
+#include <nat/lib/inlines.h>
+
+typedef struct
+{
+ u16 identifier;
+ u16 sequence;
+} echo_header_t;
+
+/* session key (4-tuple) */
+typedef struct
+{
+ union
+ {
+ struct
+ {
+ ip4_address_t addr;
+ u16 port;
+ u16 protocol:3, fib_index:13;
+ };
+ u64 as_u64;
+ };
+} nat_session_key_t;
typedef struct
{
@@ -41,7 +64,7 @@ typedef struct
/* *INDENT-OFF* */
typedef CLIB_PACKED (struct
{
- snat_session_key_t out2in;
+ nat_session_key_t out2in;
dslite_session_key_t in2out;
u32 per_b4_index;
u32 per_b4_list_head_index;