From be872a8ddae5812eb5690841fbc066967d0d9bb3 Mon Sep 17 00:00:00 2001 From: Tetsuya Murakami Date: Fri, 10 Dec 2021 08:11:07 -0800 Subject: 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 Change-Id: I6092c98ea80236d54017f84c5b35cca0b645f034 Signed-off-by: Tetsuya Murakami --- src/plugins/srv6-mobile/mobile.h | 47 +++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) (limited to 'src/plugins/srv6-mobile/mobile.h') 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 #include +#include +#include #include #include @@ -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 { -- cgit 1.2.3-korg