|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|


Go to the source code of this file.
Classes | |
| struct | hicn_dpo_vft_s |
| Definition of the virtual function table for a hICN DPO. More... | |
Typedefs | |
| typedef struct hicn_dpo_vft_s | hicn_dpo_vft_t |
| Definition of the virtual function table for a hICN DPO. More... | |
Functions | |
| dpo_type_t | hicn_dpo_register_new_type (const char *const *const *hicn_nodes, const hicn_dpo_vft_t *hicn_dpo_vft, const hicn_strategy_vft_t *hicn_strategy_vft, const dpo_vft_t *dpo_ctx_vft) |
| Register a new hICN dpo to the manager. More... | |
| u32 | dpo_is_hicn (const dpo_id_t *dpo) |
| Check if the type of the dpo is among the list of hicn dpo types. More... | |
| u8 | hicn_dpo_get_vft_id (const dpo_id_t *dpo) |
| Return the dpo_vtf and strategy_vtf identifier. More... | |
| const hicn_dpo_vft_t * | hicn_dpo_get_vft (dpo_type_t vfts_id) |
| Get the vft to manage the dpo context. More... | |
| const hicn_dpo_vft_t * | hicn_dpo_get_vft_from_id (u8 strategy_id) |
| Get the vft to manage the dpo context from the strategy id. More... | |
| const hicn_strategy_vft_t * | hicn_dpo_get_strategy_vft (dpo_type_t vfts_id) |
| Get the vft with the hICN strategy functions. More... | |
| const hicn_strategy_vft_t * | hicn_dpo_get_strategy_vft_from_id (u8 vfts_id) |
| Get the vft with the hICN strategy functions from the strategy id. More... | |
| void | hicn_dpos_init (void) |
| Initialize all the types hicn dpo registered. More... | |
| u8 * | format_hicn_strategy_list (u8 *s, int n,...) |
| Print the list of the registered hICN DPO. More... | |
| u8 | hicn_dpo_strategy_id_is_valid (int strategy_id) |
| Check if a given id points to a strategy and the corresponding dpo ctx. More... | |
| int | hicn_strategy_get_all_available (void) |
| Return the number of available strategies. This number can be used to as an upperbond for valid vfts_id. More... | |
| void | hicn_dpo_register (const hicn_dpo_vft_t *hicn_dpo) |
| Registers a module at compilation time to be initialized as part of the ctor. | |
Variables | |
| hicn_dpo_vft_t | default_dpo |
This file implements structs and helper functions to manipulate hICN dpo. An hICN DPO is a combination of:
| typedef struct hicn_dpo_vft_s hicn_dpo_vft_t |
Definition of the virtual function table for a hICN DPO.
The following virtual function table template that glues together the fuction to interact with the context and the creating the dpo
| u32 dpo_is_hicn | ( | const dpo_id_t * | dpo | ) |
Check if the type of the dpo is among the list of hicn dpo types.
Iterate through the list of dpo types registered in the hicn dpo manager.
| dpo | The id of the dpo to which check the type |
| u8* format_hicn_strategy_list | ( | u8 * | s, |
| int | n, | ||
| ... | |||
| ) |
Print the list of the registered hICN DPO.
| s | String to which to append the list of hICN DPO (strategies) |
| n | number of parameters to pass |
| const hicn_strategy_vft_t* hicn_dpo_get_strategy_vft | ( | dpo_type_t | vfts_id | ) |
Get the vft with the hICN strategy functions.
| The | id of the hicn_strategy_vft to retrieve. |
| const hicn_strategy_vft_t* hicn_dpo_get_strategy_vft_from_id | ( | u8 | vfts_id | ) |
Get the vft with the hICN strategy functions from the strategy id.
| The | id of the hicn_strategy_vft to retrieve. |
| const hicn_dpo_vft_t* hicn_dpo_get_vft | ( | dpo_type_t | vfts_id | ) |
Get the vft to manage the dpo context.
| The | id of the hicn_dpo_vft to retrieve. |
| const hicn_dpo_vft_t* hicn_dpo_get_vft_from_id | ( | u8 | strategy_id | ) |
Get the vft to manage the dpo context from the strategy id.
| The | strategy id of the hicn_dpo_vft to retrieve. |
| u8 hicn_dpo_get_vft_id | ( | const dpo_id_t * | dpo | ) |
Return the dpo_vtf and strategy_vtf identifier.
Iterate through the list of dpo types registered in the hicn dpo manager and retrieve the corresponding dpo_vtf/strategy_vtf identifier.
| dpo | The id of the dpo to which check the type |
| dpo_type_t hicn_dpo_register_new_type | ( | const char *const *const * | hicn_nodes, |
| const hicn_dpo_vft_t * | hicn_dpo_vft, | ||
| const hicn_strategy_vft_t * | hicn_strategy_vft, | ||
| const dpo_vft_t * | dpo_ctx_vft | ||
| ) |
Register a new hICN dpo to the manager.
Registering a hICN DPO allows the plugin to be aware of the new dpo an be able to apply it to the FIB entries.
| hicn_nodes | A list of vpp to which pass an interest that matches with the FIB entry to which the hICN DPO is applied. This list must contain the name of the strategy node (or nodes in case of differentiation between IPv4 and IPv6). Unless really needed otherwise (i.e., different implementation of iface input), the list of node to use should be one provided in the strategy.h (hicn_nodes_strategy) |
| hicn_dpo_vft | The structure holding the virtual function table to interact with the hICN dpo and its context. |
| hicn_strategy_vft | The structure holding the virtual function table containing the hICN strategy functions. |
| u8 hicn_dpo_strategy_id_is_valid | ( | int | strategy_id | ) |
Check if a given id points to a strategy and the corresponding dpo ctx.
| The | id of the strategy to check. |
| void hicn_dpos_init | ( | void | ) |
Initialize all the types hicn dpo registered.
Call the init functions of all the hicn dpo implemented. This init is called when the plugin bootstrap.
| int hicn_strategy_get_all_available | ( | void | ) |
Return the number of available strategies. This number can be used to as an upperbond for valid vfts_id.
1.8.17