diff options
Diffstat (limited to 'src/plugins/srv6-ad/ad.h')
-rw-r--r-- | src/plugins/srv6-ad/ad.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/plugins/srv6-ad/ad.h b/src/plugins/srv6-ad/ad.h index 950085f2e13..945e8125235 100644 --- a/src/plugins/srv6-ad/ad.h +++ b/src/plugins/srv6-ad/ad.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_ad_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_ad_main_t; - /* * This is the memory that will be stored per each localsid * the user instantiates @@ -55,8 +40,30 @@ typedef struct u32 sw_if_index_in; /**< Incoming iface from proxied dev. */ u32 rw_len; /**< Number of bits to be rewritten */ u8 *rewrite; /**< Headers to be rewritten */ + + u32 index; } srv6_ad_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_ad_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_ad_localsid_t **sids; /**< Pool of AD SID pointers */ + + vlib_combined_counter_main_t valid_counters; /**< Valid rewrite counters */ + vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */ +} srv6_ad_main_t; + srv6_ad_main_t srv6_ad_main; format_function_t format_srv6_ad_localsid; |