diff options
author | Christian Hopps <chopps@gmail.com> | 2021-05-04 16:41:58 +0200 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2021-05-13 22:24:48 +0200 |
commit | 3bb513c399c2e7c8dd597b7399dd7c0f064842d0 (patch) | |
tree | 14f3e677c49fce272946788f8a8b8f3f8a3e26b5 /lib/northbound.h | |
parent | Merge pull request #8629 from donaldsharp/parse_rtattr (diff) | |
download | frr-3bb513c399c2e7c8dd597b7399dd7c0f064842d0.tar.xz frr-3bb513c399c2e7c8dd597b7399dd7c0f064842d0.zip |
lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang
staticd init load time of 10k routes now 6s vs ly1 time of 150s
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.h')
-rw-r--r-- | lib/northbound.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index 417ecc81e..7ccab5cad 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -537,7 +537,7 @@ struct nb_dependency_callbacks { */ struct nb_node { /* Back pointer to the libyang schema node. */ - const struct lys_node *snode; + const struct lysc_node *snode; /* Data path of this YANG node. */ char xpath[XPATH_MAXLEN]; @@ -685,7 +685,7 @@ struct nb_transaction { }; /* Callback function used by nb_oper_data_iterate(). */ -typedef int (*nb_oper_data_cb)(const struct lys_node *snode, +typedef int (*nb_oper_data_cb)(const struct lysc_node *snode, struct yang_translator *translator, struct yang_data *data, void *arg); @@ -1114,7 +1114,7 @@ extern int nb_oper_data_iterate(const char *xpath, * true if the operation is valid, false otherwise. */ extern bool nb_operation_is_valid(enum nb_operation operation, - const struct lys_node *snode); + const struct lysc_node *snode); /* * Send a YANG notification. This is a no-op unless the 'nb_notification_send' @@ -1285,15 +1285,6 @@ extern const char *nb_client_name(enum nb_client client); void nb_validate_callbacks(void); /* - * Load a YANG module with its corresponding northbound callbacks. - * - * module_info - * Pointer to structure containing the module name and its northbound - * callbacks. - */ -void nb_load_module(const struct frr_yang_module_info *module_info); - -/* * Initialize the northbound layer. Should be called only once during the * daemon initialization process. * |