FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
pot_util.c File Reference
+ Include dependency graph for pot_util.c:

Go to the source code of this file.

Functions

static void pot_profile_cleanup (pot_profile *profile)
 
static void pot_main_profiles_reset (void)
 
int pot_util_init (void)
 
static void pot_profile_init (pot_profile *new, u8 id)
 
pot_profilepot_profile_find (u8 id)
 
static int pot_profile_name_equal (u8 *name0, u8 *name1)
 
int pot_profile_list_is_enabled (u8 *name)
 
void pot_profile_list_init (u8 *profile_list_name)
 
int pot_profile_create (pot_profile *profile, u64 prime, u64 poly2, u64 lpc, u64 secret_share)
 
int pot_set_validator (pot_profile *profile, u64 key)
 
static u64 pot_update_cumulative_inline (u64 cumulative, u64 random, u64 secret_share, u64 prime, u64 lpc, u64 pre_split, double prime_inv)
 
u64 pot_update_cumulative (pot_profile *profile, u64 cumulative, u64 random)
 
static u8 pot_validate_inline (u64 secret, u64 prime, double prime_inv, u64 cumulative, u64 random)
 
u8 pot_validate (pot_profile *profile, u64 cumulative, u64 random)
 
u64 pot_generate_random (pot_profile *profile)
 
int pot_profile_set_bit_mask (pot_profile *profile, u16 bits)
 
clib_error_tclear_pot_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void clear_pot_profiles ()
 
static clib_error_tset_pot_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_pot_profile_activate_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_pot_profile_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

pot_main_t pot_main
 
vlib_cli_command_t clear_pot_profile_command
 (constructor) VLIB_CLI_COMMAND (clear_pot_profile_command) More...
 
vlib_cli_command_t set_pot_profile_command
 (constructor) VLIB_CLI_COMMAND (set_pot_profile_command) More...
 
vlib_cli_command_t set_pot_profile_activate_command
 (constructor) VLIB_CLI_COMMAND (set_pot_profile_activate_command) More...
 
vlib_cli_command_t show_pot_profile_command
 (constructor) VLIB_CLI_COMMAND (show_pot_profile_command) More...
 

Function Documentation

clib_error_t* clear_pot_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)

Definition at line 255 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void clear_pot_profiles ( )

Definition at line 264 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u64 pot_generate_random ( pot_profile profile)

Definition at line 210 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pot_main_profiles_reset ( void  )
static

Definition at line 27 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pot_profile_cleanup ( pot_profile profile)
static

Definition at line 109 of file pot_util.c.

+ Here is the caller graph for this function:

int pot_profile_create ( pot_profile profile,
u64  prime,
u64  poly2,
u64  lpc,
u64  secret_share 
)

Definition at line 117 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pot_profile* pot_profile_find ( u8  id)

Definition at line 58 of file pot_util.c.

+ Here is the caller graph for this function:

static void pot_profile_init ( pot_profile new,
u8  id 
)
static

Definition at line 49 of file pot_util.c.

+ Here is the caller graph for this function:

void pot_profile_list_init ( u8 profile_list_name)

Definition at line 85 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int pot_profile_list_is_enabled ( u8 name)

Definition at line 79 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int pot_profile_name_equal ( u8 name0,
u8 name1 
)
static

Definition at line 68 of file pot_util.c.

+ Here is the caller graph for this function:

int pot_profile_set_bit_mask ( pot_profile profile,
u16  bits 
)

Definition at line 240 of file pot_util.c.

+ Here is the caller graph for this function:

int pot_set_validator ( pot_profile profile,
u64  key 
)

Definition at line 136 of file pot_util.c.

+ Here is the caller graph for this function:

u64 pot_update_cumulative ( pot_profile profile,
u64  cumulative,
u64  random 
)

Definition at line 169 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 pot_update_cumulative_inline ( u64  cumulative,
u64  random,
u64  secret_share,
u64  prime,
u64  lpc,
u64  pre_split,
double  prime_inv 
)
inlinestatic

Definition at line 147 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int pot_util_init ( void  )

Definition at line 42 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 pot_validate ( pot_profile profile,
u64  cumulative,
u64  random 
)

Definition at line 197 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 pot_validate_inline ( u64  secret,
u64  prime,
double  prime_inv,
u64  cumulative,
u64  random 
)
inlinestatic

Definition at line 180 of file pot_util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* set_pot_profile_activate_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 342 of file pot_util.c.

+ Here is the call graph for this function:

static clib_error_t* set_pot_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 276 of file pot_util.c.

+ Here is the call graph for this function:

static clib_error_t* show_pot_profile_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 383 of file pot_util.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t clear_pot_profile_command
Initial value:
=
{
.path = "clear pot profile",
.short_help = "clear pot profile [<index>|all]",
}
clib_error_t * clear_pot_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pot_util.c:255

(constructor) VLIB_CLI_COMMAND (clear_pot_profile_command)

Definition at line 269 of file pot_util.c.

pot_main_t pot_main

Definition at line 23 of file pot_util.c.

vlib_cli_command_t set_pot_profile_activate_command
Initial value:
=
{
.path = "set pot profile-active",
.short_help = "set pot profile-active name <string> id [0-1]",
}
static clib_error_t * set_pot_profile_activate_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pot_util.c:342

(constructor) VLIB_CLI_COMMAND (set_pot_profile_activate_command)

Definition at line 376 of file pot_util.c.

vlib_cli_command_t set_pot_profile_command
Initial value:
=
{
.path = "set pot profile",
.short_help = "set pot profile name <string> id [0-1] [validator-key 0xu64] \
prime-number 0xu64 secret_share 0xu64 lpc 0xu64 \
polynomial2 0xu64 bits-in-random [0-64] ",
}
static clib_error_t * set_pot_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pot_util.c:276

(constructor) VLIB_CLI_COMMAND (set_pot_profile_command)

Definition at line 333 of file pot_util.c.

vlib_cli_command_t show_pot_profile_command
Initial value:
=
{
.path = "show pot profile",
.short_help = "show pot profile",
}
static clib_error_t * show_pot_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: pot_util.c:383

(constructor) VLIB_CLI_COMMAND (show_pot_profile_command)

Definition at line 440 of file pot_util.c.