![]() |
FD.io VPP
v17.04.2-2-ga8f93f8
Vector Packet Processing
|
Include dependency graph for pot_util.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | pot_profile_ |
| Usage: More... | |
| struct | pot_main_t |
Macros | |
| #define | debug_ioam debug_ioam_fn |
| #define | PATH_NAME_SIZE 256 |
| #define | MAX_POT_PROFILES 2 |
| #define | MAX_BITS 64 |
Typedefs | |
| typedef struct pot_profile_ | pot_profile |
| Usage: More... | |
Functions | |
| int | pot_util_init (void) |
| void | pot_profile_list_init (u8 *name) |
| pot_profile * | pot_profile_find (u8 id) |
| static u16 | pot_profile_get_id (pot_profile *profile) |
| 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) |
| int | pot_profile_set_bit_mask (pot_profile *profile, u16 bits) |
| u64 | pot_update_cumulative (pot_profile *profile, u64 cumulative, u64 random) |
| u8 | pot_validate (pot_profile *profile, u64 cumulative, u64 random) |
| u64 | pot_generate_random (pot_profile *profile) |
| void | clear_pot_profiles () |
| int | pot_profile_list_is_enabled (u8 *name) |
| static u8 | pot_is_decap (pot_profile *p) |
| static int | pot_profile_set_active (u8 id) |
| static u8 | pot_profile_get_active_id (void) |
| static pot_profile * | pot_profile_get_active (void) |
| static void | pot_profile_reset_usage_stats (pot_profile *pow) |
| static void | pot_profile_incr_usage_stats (pot_profile *pow) |
Variables | |
| pot_main_t | pot_main |
| #define debug_ioam debug_ioam_fn |
Definition at line 22 of file pot_util.h.
| #define MAX_BITS 64 |
Definition at line 121 of file pot_util.h.
| #define MAX_POT_PROFILES 2 |
Definition at line 28 of file pot_util.h.
| #define PATH_NAME_SIZE 256 |
Definition at line 24 of file pot_util.h.
| typedef struct pot_profile_ pot_profile |
Usage:
On any node that participates in Proof of Transit:
Step 1: Initialize this library by calling pot_init() Step 2: Setup a proof of transit profile that contains all the parameters needed to compute cumulative: Call these functions: pot_profile_find pot_profile_create pot_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: pot_set_validator Step 2b: On initial node enable the profile to be used: pot_profile_set_active / pot_profile_get_active will return the profile Step 3a: At the initial node to generate Random number that will be read by all other nodes: pot_generate_random Step 3b: At all nodes including initial and verifier call this to compute cumulative: pot_update_cumulative Step 4: At the verifier: pot_validate
| 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:
|
inlinestatic |
| 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 | ) |
|
inlinestatic |
Definition at line 170 of file pot_util.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void pot_profile_list_init | ( | u8 * | 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:
|
inlinestatic |
|
inlinestatic |
Definition at line 148 of file pot_util.h.
Here is the call graph for this function:
Here is the caller graph for this function:| int pot_profile_set_bit_mask | ( | pot_profile * | profile, |
| u16 | bits | ||
| ) |
| int pot_set_validator | ( | pot_profile * | profile, |
| u64 | key | ||
| ) |
| 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:| 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:| pot_main_t pot_main |
Definition at line 23 of file pot_util.c.