From e1cc8753605a40b24f132a99e915a2650ce7df51 Mon Sep 17 00:00:00 2001 From: Alexander Chernavin Date: Mon, 26 Jun 2023 15:57:57 +0000 Subject: ip-neighbor: add api for getting neighbor db config There is an API call to change neighbor database configuration (i.e. limit on peer number, aging, and recycling). With this change, make getting current values of these settings available via the API. Type: improvement Change-Id: Ie9394e086b68cf9b28ad98dea162f203f8043cbb Signed-off-by: Alexander Chernavin --- src/vnet/ip-neighbor/ip_neighbor.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/vnet/ip-neighbor/ip_neighbor.c') diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c index 8e997e4920e..d7450f9cd3e 100644 --- a/src/vnet/ip-neighbor/ip_neighbor.c +++ b/src/vnet/ip-neighbor/ip_neighbor.c @@ -1759,6 +1759,17 @@ ip_neighbor_config (ip_address_family_t af, u32 limit, u32 age, bool recycle) return (0); } +int +ip_neighbor_get_config (ip_address_family_t af, u32 *limit, u32 *age, + bool *recycle) +{ + *limit = ip_neighbor_db[af].ipndb_limit; + *age = ip_neighbor_db[af].ipndb_age; + *recycle = ip_neighbor_db[af].ipndb_recycle; + + return (0); +} + static clib_error_t * ip_neighbor_config_show (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) -- cgit 1.2.3-korg