diff options
author | Julian Klaiber <julian@klaiber.me> | 2022-10-18 10:37:14 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2022-11-02 14:31:46 +0000 |
commit | 39d6deca5f71ee4fe772c10d76ed5b65d1ebec44 (patch) | |
tree | faad53b54d4942e2a56004f8cd1c9db5e05e9d1d /src/vnet/srv6/sr_pt.h | |
parent | de0c1af4478d64af92c5d1ac749fa67cc19ec0dd (diff) |
sr: SRv6 Path Tracing Midpoint behaviour
Type: feature
Signed-off-by: Julian Klaiber <julian@klaiber.me>
Change-Id: I866a2d2e06013380309c98a54078c1b3f6ad76fc
Diffstat (limited to 'src/vnet/srv6/sr_pt.h')
-rw-r--r-- | src/vnet/srv6/sr_pt.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vnet/srv6/sr_pt.h b/src/vnet/srv6/sr_pt.h index 87fdb68a36e..cd70cd09ad2 100644 --- a/src/vnet/srv6/sr_pt.h +++ b/src/vnet/srv6/sr_pt.h @@ -11,6 +11,8 @@ #ifndef included_vnet_sr_pt_h #define included_vnet_sr_pt_h +#define IP6_HBH_PT_TYPE 50 + /*SR PT error codes*/ #define SR_PT_ERR_NOENT -1 /* No such entry*/ #define SR_PT_ERR_EXIST -2 /* Entry exists */ @@ -37,6 +39,11 @@ #define SR_PT_TTS_SHIFT_TEMPLATE_2 16 #define SR_PT_TTS_SHIFT_TEMPLATE_3 20 +/*PT node behaviors*/ +#define PT_BEHAVIOR_SRC 0 +#define PT_BEHAVIOR_MID 1 +#define PT_BEHAVIOR_SNK 2 + typedef struct { u32 iface; /**< Interface */ @@ -46,6 +53,17 @@ typedef struct u8 tts_template; /**< Interface TTS Template */ } sr_pt_iface_t; +typedef struct +{ + u16 oif_oil; + u8 tts; +} __clib_packed sr_pt_cmd_t; + +typedef struct +{ + sr_pt_cmd_t cmd_stack[12]; +} __clib_packed ip6_hop_by_hop_option_pt_t; + /** * @brief SR Path Tracing main datastructure */ @@ -60,6 +78,7 @@ typedef struct } sr_pt_main_t; extern sr_pt_main_t sr_pt_main; +extern vlib_node_registration_t sr_pt_node; extern int sr_pt_add_iface (u32 iface, u16 id, u8 ingress_load, u8 egress_load, u8 tts_template); extern int sr_pt_del_iface (u32 iface); |