aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategies/dpo_rp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/strategies/dpo_rp.c')
-rw-r--r--hicn-plugin/src/strategies/dpo_rp.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/hicn-plugin/src/strategies/dpo_rp.c b/hicn-plugin/src/strategies/dpo_rp.c
index 7f527cdb6..eb32083b9 100644
--- a/hicn-plugin/src/strategies/dpo_rp.c
+++ b/hicn-plugin/src/strategies/dpo_rp.c
@@ -31,7 +31,13 @@ static const hicn_dpo_vft_t hicn_dpo_rp_vft = {
.hicn_dpo_update_type = &hicn_strategy_rp_update_ctx_type,
.hicn_dpo_add_update_nh = &hicn_strategy_rp_ctx_add_nh,
.hicn_dpo_del_nh = &hicn_strategy_rp_ctx_del_nh,
- .hicn_dpo_format = &hicn_strategy_rp_format_ctx
+ .hicn_dpo_format = &hicn_dpo_strategy_rp_format
+};
+
+const static dpo_vft_t dpo_strategy_rp_ctx_vft = {
+ .dv_lock = hicn_strategy_dpo_ctx_lock,
+ .dv_unlock = hicn_strategy_dpo_ctx_unlock,
+ .dv_format = hicn_strategy_dpo_format,
};
int
@@ -60,25 +66,9 @@ hicn_dpo_strategy_rp_get_type (void)
//////////////////////////////////////////////////////////////////////////////////////////////////
u8 *
-hicn_strategy_rp_format_ctx (u8 *s, int n, ...)
-{
- va_list args;
- va_start (args, n);
- s = format_hicn_strategy_rp_ctx (s, &args);
- return s;
-}
-
-u8 *
-format_hicn_strategy_rp_ctx (u8 *s, va_list *ap)
+hicn_dpo_strategy_rp_format (u8 *s, hicn_dpo_ctx_t *dpo_ctx, u32 indent)
{
int i = 0;
- index_t index = va_arg (*ap, index_t);
- hicn_dpo_ctx_t *dpo_ctx = NULL;
- u32 indent = va_arg (*ap, u32);
-
- dpo_ctx = hicn_strategy_dpo_ctx_get (index);
- if (dpo_ctx == NULL)
- return s;
for (i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; i++)
{