aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/srv6-mobile/mobile.h
diff options
context:
space:
mode:
authorTetsuya Murakami <tetsuya.mrk@gmail.com>2021-12-10 08:11:07 -0800
committerOle Tr�an <otroan@employees.org>2022-01-05 10:52:22 +0000
commitbe872a8ddae5812eb5690841fbc066967d0d9bb3 (patch)
treed753cdc9ab994a5744f45be0ef1fec82831838e6 /src/plugins/srv6-mobile/mobile.h
parentdfc853c0ac2f8f15765a51268a53b023d4cf6c65 (diff)
srv6-mobile: Update GTP4/6.D function
GTP4/6.D behavior is updated as shown below. 1. When receiving GTP-U message or IPv6 linklocal destination in inner IP, GTP packet is tnralated to SRv6. 2. When receiving T-PDU packet, OuterIP/UDP/GTP headers are stripped off and Inner IP is encapsulated into SRv6 based on L3VPN SRv6 manner. Type: feature Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com> Change-Id: I6092c98ea80236d54017f84c5b35cca0b645f034 Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Diffstat (limited to 'src/plugins/srv6-mobile/mobile.h')
-rw-r--r--src/plugins/srv6-mobile/mobile.h47
1 files changed, 42 insertions, 5 deletions
diff --git a/src/plugins/srv6-mobile/mobile.h b/src/plugins/srv6-mobile/mobile.h
index 517e7c8f84c..5f6064ff10b 100644
--- a/src/plugins/srv6-mobile/mobile.h
+++ b/src/plugins/srv6-mobile/mobile.h
@@ -20,6 +20,8 @@
#include <vnet/vnet.h>
#include <vnet/ip/ip.h>
+#include <vnet/fib/ip4_fib.h>
+#include <vnet/fib/ip6_fib.h>
#include <vnet/srv6/sr.h>
#include <vnet/srv6/sr_packet.h>
@@ -174,14 +176,24 @@ typedef struct
#define USER_PLANE_SUB_TLV_IE 0x01
-typedef struct srv6_end_gtp6_param_s
+/* SRv6 mobile Plugin Params */
+
+/* GTP6.D, GTP6.Di */
+typedef struct srv6_end_gtp6_d_param_s
{
u8 nhtype;
ip6_address_t sr_prefix;
u32 sr_prefixlen;
-} srv6_end_gtp6_param_t;
+ bool drop_in;
+
+ u32 fib_table;
+ u32 fib4_index;
+ u32 fib6_index;
+} srv6_end_gtp6_d_param_t;
+
+/* GTP6.DT */
typedef struct srv6_end_gtp6_dt_param_s
{
u8 type;
@@ -191,6 +203,15 @@ typedef struct srv6_end_gtp6_dt_param_s
u32 local_fib_index;
} srv6_end_gtp6_dt_param_t;
+/* GTP6.E */
+typedef struct srv6_end_gtp6_e_param_s
+{
+ u32 fib_table;
+ u32 fib4_index;
+ u32 fib6_index;
+} srv6_end_gtp6_e_param_t;
+
+/* GTP4.DT */
typedef struct srv6_t_gtp4_dt_param_s
{
u8 type;
@@ -200,7 +221,19 @@ typedef struct srv6_t_gtp4_dt_param_s
u32 local_fib_index;
} srv6_t_gtp4_dt_param_t;
-typedef struct srv6_end_gtp4_param_s
+/* GTP4.E */
+typedef struct srv6_end_gtp4_e_param_s
+{
+ u32 v4src_position;
+ ip4_address_t v4src_addr;
+
+ u32 fib_table;
+ u32 fib4_index;
+ u32 fib6_index;
+} srv6_end_gtp4_e_param_t;
+
+/* GTP4.D */
+typedef struct srv6_end_gtp4_d_param_s
{
u8 nhtype;
@@ -210,8 +243,12 @@ typedef struct srv6_end_gtp4_param_s
ip6_address_t v6src_prefix;
u32 v6src_prefixlen;
- u32 v4src_position;
-} srv6_end_gtp4_param_t;
+ bool drop_in;
+
+ u32 fib_table;
+ u32 fib4_index;
+ u32 fib6_index;
+} srv6_end_gtp4_d_param_t;
typedef struct srv6_end_main_v4_s
{