From b4f10fc0f41bfdf1fd724ddff518895c4a7b3d55 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Thu, 20 Feb 2025 11:06:08 +0100 Subject: [PATCH] lib: Add nb handlers for ietf-srv6-types YANG model This commit adds nb handlers necessary for using SRv6 types defined in the ietf-srv6-types YANG model. Signed-off-by: Carmine Scarpitta --- lib/srv6.c | 8 ++++++++ lib/srv6.h | 2 ++ lib/subdir.am | 1 + 3 files changed, 11 insertions(+) diff --git a/lib/srv6.c b/lib/srv6.c index 4d820e2fcc..934ec9d623 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -470,3 +470,11 @@ json_object *srv6_locator_detailed_json(const struct srv6_locator *loc) return jo_root; } + +/* clang-format off */ +const struct frr_yang_module_info ietf_srv6_types_info = { + .name = "ietf-srv6-types", + .ignore_cfg_cbs = true, + .nodes = { { .xpath = NULL } }, +}; +/* clang-format on */ diff --git a/lib/srv6.h b/lib/srv6.h index acc828e456..83c86324da 100644 --- a/lib/srv6.h +++ b/lib/srv6.h @@ -477,6 +477,8 @@ static inline const char *srv6_sid_ctx2str(char *str, size_t size, return str; } +extern const struct frr_yang_module_info ietf_srv6_types_info; + int snprintf_seg6_segs(char *str, size_t size, const struct seg6_segs *segs); diff --git a/lib/subdir.am b/lib/subdir.am index a975eb2fc4..75d1b2ca02 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -161,6 +161,7 @@ nodist_lib_libfrr_la_SOURCES = \ yang/ietf/ietf-interfaces.yang.c \ yang/ietf/ietf-bgp-types.yang.c \ yang/frr-module-translator.yang.c \ + yang/ietf/ietf-srv6-types.yang.c \ # end # Add logic to build mgmt.proto -- 2.39.5