Go to the source code of this file.
|
void | scv_init (u8 *path_name, u8 max, u8 indx) |
|
u8 | scv_get_max_profiles (void) |
|
scv_profile * | scv_profile_find (u16 id) |
|
static u16 | scv_profile_get_id (scv_profile *profile) |
|
void | scv_profile_create (scv_profile *profile, u64 prime, u64 poly2, u64 lpc, u64 secret_share, u64 validity) |
|
void | scv_set_validator (scv_profile *profile, u64 key) |
|
void | scv_profile_cleanup (scv_profile *profile) |
|
void | scv_profile_set_bit_mask (scv_profile *profile, u16 bits) |
|
u64 | scv_update_cumulative (scv_profile *profile, u64 cumulative, u64 random) |
|
u8 | scv_validate (scv_profile *profile, u64 cumulative, u64 random) |
|
u64 | scv_generate_random (scv_profile *profile) |
|
int | scv_profile_to_str (scv_profile *profile, char *buf, int n) |
|
void | clear_ioam_scv_profiles () |
|
static u8 | scv_get_profile_in_use (void) |
|
static void | scv_notification_reset (u16 start_index_recvd, u8 num_profiles_recvd) |
|
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) |
|
static u8 | scv_is_decap (scv_profile *p) |
|
static u16 | scv_get_next_profile_id (vlib_main_t *vm, u16 id) |
|
static void | scv_profile_invalidate (vlib_main_t *vm, ip6_hop_by_hop_main_t *hm, u16 id, u8 is_encap) |
|
#define debug_ioam debug_ioam_fn |
#define MAX_SERVICE_NODES 10 |
#define MAX_SERVICE_PROFILES 16 |
#define PATH_NAME_SIZE 256 |
Usage:
On any [service] node that participates in Service / Path verfication:
Step 1: Initialize this library by calling scv_init() Step 2: Setup a Service chain validation profile that contains all the parameters needed to compute cumulative: Call these functions: scv_profile_find scv_profile_create scv_profile_set_bit_mask - To setup how large we want the numbers used in the computation and random number <= 64 bits Step 2a: For validator do this: scv_set_validator Step 3a: At the initial Service node to generate Random number that will be read by all other nodes: scv_generate_random Step 3b: At all service nodes including initial and verifier call this to compute cumulative: scv_update_cumulative Step 4: At the verifier: scv_validate
void clear_ioam_scv_profiles |
( |
| ) |
|
u8 scv_get_max_profiles |
( |
void |
| ) |
|
static u8 scv_get_profile_in_use |
( |
void |
| ) |
|
|
inlinestatic |
static void scv_notification_reset |
( |
u16 |
start_index_recvd, |
|
|
u8 |
num_profiles_recvd |
|
) |
| |
|
inlinestatic |
int scv_profile_refresh |
( |
u8 * |
path_name, |
|
|
u8 |
start_index, |
|
|
u8 |
num_profiles |
|
) |
| |
int scv_profile_renew |
( |
u8 * |
path_name, |
|
|
u8 |
start_index, |
|
|
u8 |
num_profiles |
|
) |
| |
int scv_profile_to_str |
( |
scv_profile * |
profile, |
|
|
char * |
buf, |
|
|
int |
n |
|
) |
| |
u16 invalid_profile_start_index |
u8 number_of_invalid_profiles |
u64 total_pkts_using_this_profile |