aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/srv6-as/as.h
diff options
context:
space:
mode:
authorFrancois Clad <fclad@cisco.com>2018-06-13 15:03:28 +0200
committerDamjan Marion <dmarion@me.com>2018-07-11 13:17:46 +0000
commit151b32249245880fbe4060769b7edc02026fe566 (patch)
treeed14fafea82ffd5f6bedaf5e7df2a34654854e7e /src/plugins/srv6-as/as.h
parentd47da680eb8d55a6eef64becb7459030df3c7241 (diff)
srv6-as: Adding rewrite counters
Change-Id: I57f1db6fabfdb8ddfba514ad754707b24d47c962 Signed-off-by: Francois Clad <fclad@cisco.com>
Diffstat (limited to 'src/plugins/srv6-as/as.h')
-rw-r--r--src/plugins/srv6-as/as.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/plugins/srv6-as/as.h b/src/plugins/srv6-as/as.h
index 8f059187151..5cb3e4cb784 100644
--- a/src/plugins/srv6-as/as.h
+++ b/src/plugins/srv6-as/as.h
@@ -26,21 +26,6 @@
#define DA_IP4 4
#define DA_IP6 6
-typedef struct
-{
- u16 msg_id_base; /**< API message ID base */
-
- vlib_main_t *vlib_main; /**< [convenience] vlib main */
- vnet_main_t *vnet_main; /**< [convenience] vnet main */
-
- dpo_type_t srv6_as_dpo_type; /**< DPO type */
-
- u32 srv6_localsid_behavior_id; /**< SRv6 LocalSID behavior number */
-
- u32 *sw_iface_localsid4; /**< Retrieve local SID from iface */
- u32 *sw_iface_localsid6; /**< Retrieve local SID from iface */
-} srv6_as_main_t;
-
/*
* This is the memory that will be stored per each localsid
* the user instantiates
@@ -57,8 +42,30 @@ typedef struct
ip6_address_t src_addr; /**< Source address to be restored */
ip6_address_t *sid_list; /**< SID list to be restored */
char *sid_list_str;
+
+ u32 index;
} srv6_as_localsid_t;
+typedef struct
+{
+ u16 msg_id_base; /**< API message ID base */
+
+ vlib_main_t *vlib_main; /**< [convenience] vlib main */
+ vnet_main_t *vnet_main; /**< [convenience] vnet main */
+
+ dpo_type_t srv6_as_dpo_type; /**< DPO type */
+
+ u32 srv6_localsid_behavior_id; /**< SRv6 LocalSID behavior number */
+
+ u32 *sw_iface_localsid4; /**< Retrieve local SID from iface */
+ u32 *sw_iface_localsid6; /**< Retrieve local SID from iface */
+
+ srv6_as_localsid_t **sids; /**< Pool of AS SID pointers */
+
+ vlib_combined_counter_main_t valid_counters; /**< Valid rewrite counters */
+ vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */
+} srv6_as_main_t;
+
srv6_as_main_t srv6_as_main;
format_function_t format_srv6_as_localsid;