summaryrefslogtreecommitdiff
path: root/isisd/isis_nb_state.c
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2023-01-26 17:47:04 +0100
committerOlivier Dugeon <olivier.dugeon@orange.com>2023-03-21 15:21:47 +0100
commit5d39a8190740b2b54de3b4d7e1527901bcbc2a33 (patch)
tree8e5bd9d07e0b0764a3ff65786005cf2a43de615d /isisd/isis_nb_state.c
parent7f9ab3b0bbd8c4b81b839872b02efbd11f6c67b0 (diff)
isisd: Update to the new printfrr ISO format
This path replaces isisd_format_id, sysid_print, snpa_print, rawlspid_print and isonet_print functions by the new printfrr ISO System ID & Network Address format facilities. It also updates the isisd code to the new iso_address structure defined in lib/iso.h Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'isisd/isis_nb_state.c')
-rw-r--r--isisd/isis_nb_state.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/isisd/isis_nb_state.c b/isisd/isis_nb_state.c
index 13fdddf555..b7c33ed27b 100644
--- a/isisd/isis_nb_state.c
+++ b/isisd/isis_nb_state.c
@@ -132,8 +132,11 @@ lib_interface_state_isis_adjacencies_adjacency_neighbor_sysid_get_elem(
struct nb_cb_get_elem_args *args)
{
const struct isis_adjacency *adj = args->list_entry;
+ char xpath_value[ISO_SYSID_STRLEN];
- return yang_data_new_string(args->xpath, sysid_print(adj->sysid));
+ snprintfrr(xpath_value, ISO_SYSID_STRLEN, "%pSY", adj->sysid);
+
+ return yang_data_new_string(args->xpath, xpath_value);
}
/*
@@ -158,8 +161,11 @@ lib_interface_state_isis_adjacencies_adjacency_neighbor_snpa_get_elem(
struct nb_cb_get_elem_args *args)
{
const struct isis_adjacency *adj = args->list_entry;
+ char xpath_value[ISO_SYSID_STRLEN];
+
+ snprintfrr(xpath_value, ISO_SYSID_STRLEN, "%pSY", adj->snpa);
- return yang_data_new_string(args->xpath, snpa_print(adj->snpa));
+ return yang_data_new_string(args->xpath, xpath_value);
}
/*