diff options
Diffstat (limited to 'hicn-plugin/src/strategy_dpo_manager.h')
-rw-r--r-- | hicn-plugin/src/strategy_dpo_manager.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/hicn-plugin/src/strategy_dpo_manager.h b/hicn-plugin/src/strategy_dpo_manager.h index 7a2ce3fee..0163cd679 100644 --- a/hicn-plugin/src/strategy_dpo_manager.h +++ b/hicn-plugin/src/strategy_dpo_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -53,11 +53,13 @@ typedef struct hicn_dpo_vft_s void (*hicn_dpo_create) ( fib_protocol_t proto, const hicn_face_id_t *nh, int nh_len, index_t *dpo_idx); /**< Create the context of the hICN dpo */ + void (*hicn_dpo_update_type) ( + hicn_dpo_ctx_t *hicn_strategy_ctx); /**change dpo type */ int (*hicn_dpo_add_update_nh) ( hicn_face_id_t nh, index_t dpo_idx); /**< Add a next hop to the hICN dpo context */ int (*hicn_dpo_del_nh) (hicn_face_id_t face_id, index_t dpo_idx); - u8 *(*hicn_dpo_format) (u8 *s, int, ...); + u8 *(*hicn_dpo_format) (u8 *s, hicn_dpo_ctx_t *dpo_ctx, u32 indent); /**< Format an hICN dpo*/ } hicn_dpo_vft_t; @@ -171,7 +173,7 @@ u8 *format_hicn_strategy_list (u8 *s, int n, ...); * * @result HICN_ERROR_NONE is the id is valid, otherwise EINVAL */ -u8 hicn_dpo_strategy_id_is_valid (int strategy_id); +int hicn_dpo_strategy_id_is_valid (int strategy_id); /** * @brief Return the number of available strategies. This number can be used to @@ -187,6 +189,11 @@ int hicn_strategy_get_all_available (void); */ void hicn_dpo_register (const hicn_dpo_vft_t *hicn_dpo); +/** + * @brief Format strategy DPO. + */ +u8 *hicn_strategy_dpo_format (u8 *s, va_list *ap); + #endif /* // __HICN_STRATEGY_DPO_MANAGER_H__ */ /* |