18 #ifndef include_vnet_scv_util_h 19 #define include_vnet_scv_util_h 22 #define MAXDEGREE 1024 23 #define MAXTOKENLEN 128 24 #define debug_ioam debug_ioam_fn 25 #define MAX_SERVICE_NODES 10 27 #define PATH_NAME_SIZE 256 31 #define MAX_SERVICE_PROFILES 16 100 return (profile->
id);
173 u8 start_index,
u8 num_profiles);
175 u8 start_index,
u8 num_profiles);
184 int next_id, num_profiles = 0;
194 for (num_profiles = 0; num_profiles < max - 1; num_profiles++)
196 next_id = (next_id + 1) % max;
248 "Renew notification- id start:%d, num %d failed. rc: %d\n",
252 "Renew notification- id start:%d num %d sent. \n",
265 "Refresh notification- id start:%d, num %d failed. rc: %d\n",
269 "Refresh notification- id start:%d num %d sent. \n",
void scv_profile_create(scv_profile *profile, u64 prime, u64 poly2, u64 lpc, u64 secret_share, u64 validity)
u8 chain_path_name[PATH_NAME_SIZE]
u8 scv_validate(scv_profile *profile, u64 cumulative, u64 random)
void clear_ioam_scv_profiles()
scv_profile * scv_profile_find(u16 id)
u64 total_pkts_using_this_profile
void scv_profile_cleanup(scv_profile *profile)
ip6_hop_by_hop_main_t * hm
u64 scv_generate_random(scv_profile *profile)
u16 invalid_profile_start_index
u8 number_of_invalid_profiles
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static u16 scv_get_next_profile_id(vlib_main_t *vm, u16 id)
void scv_init(u8 *path_name, u8 max, u8 indx)
static void scv_notification_reset(u16 start_index_recvd, u8 num_profiles_recvd)
static u8 scv_get_profile_in_use(void)
scv_profile * pow_profile
static u16 scv_profile_get_id(scv_profile *profile)
static void scv_profile_invalidate(vlib_main_t *vm, ip6_hop_by_hop_main_t *hm, u16 id, u8 is_encap)
void scv_profile_set_bit_mask(scv_profile *profile, u16 bits)
u8 scv_get_max_profiles(void)
int scv_profile_renew(u8 *path_name, u8 start_index, u8 num_profiles)
int scv_profile_refresh(u8 *path_name, u8 start_index, u8 num_profiles)
struct scv_profile_ scv_profile
Usage:
int scv_profile_to_str(scv_profile *profile, char *buf, int n)
u64 scv_update_cumulative(scv_profile *profile, u64 cumulative, u64 random)
always_inline f64 vlib_time_now(vlib_main_t *vm)
static u8 scv_is_decap(scv_profile *p)
void scv_set_validator(scv_profile *profile, u64 key)