+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2018 NetDEF, Inc.
* Renato Westphal
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _FRR_YANG_H_
#endif
#ifdef HAVE_SYSREPO
sr_subscription_ctx_t *sr_subscription;
- struct thread *sr_thread;
+ struct event *sr_thread;
#endif
};
RB_HEAD(yang_modules, yang_module);
void *arg);
/*
- * Iterate over all libyang schema nodes from all loeaded modules of from the
+ * Iterate over all libyang schema nodes from all loaded modules of the
* given YANG module.
*
* module
* Schema name of the libyang data node.
*/
extern const char *yang_dnode_get_schema_name(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Find a libyang data node by its YANG data path.
* The libyang data node if found, or NULL if not found.
*/
extern struct lyd_node *yang_dnode_getf(const struct lyd_node *dnode,
- const char *path_fmt, ...);
+ const char *path_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Check if a libyang data node exists.
* true if a libyang data node was found, false otherwise.
*/
extern bool yang_dnode_existsf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Iterate over all libyang data nodes that satisfy an XPath query.
*/
void yang_dnode_iterate(yang_dnode_iter_cb cb, void *arg,
const struct lyd_node *dnode, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(4, 5);
/*
* Check if the libyang data node contains a default value. Non-presence
* true if the data node contains the default value, false otherwise.
*/
extern bool yang_dnode_is_defaultf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Check if the libyang data node and all of its children contain default
* Pointer to yang_data if found, NULL otherwise.
*/
extern struct yang_data *yang_data_list_find(const struct list *list,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Create and set up a libyang context (for use by the translator)