summaryrefslogtreecommitdiff
path: root/lib/yang_wrappers.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yang_wrappers.h')
-rw-r--r--lib/yang_wrappers.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/yang_wrappers.h b/lib/yang_wrappers.h
index 06e05872e3..d3d841995b 100644
--- a/lib/yang_wrappers.h
+++ b/lib/yang_wrappers.h
@@ -7,6 +7,7 @@
#ifndef _FRR_NORTHBOUND_WRAPPERS_H_
#define _FRR_NORTHBOUND_WRAPPERS_H_
+#include <libyang/libyang.h>
#include "prefix.h"
#ifdef __cplusplus
@@ -195,10 +196,24 @@ extern void yang_get_default_ip(struct ipaddr *var, const char *xpath_fmt, ...)
extern struct yang_data *yang_data_new_mac(const char *xpath,
const struct ethaddr *mac);
extern void yang_str2mac(const char *value, struct ethaddr *mac);
+extern void yang_dnode_get_mac(struct ethaddr *mac, const struct lyd_node *dnode,
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
/*data-and-time */
extern struct yang_data *yang_data_new_date_and_time(const char *xpath,
- time_t time);
+ time_t time,
+ bool is_monotime);
+struct timespec yang_dnode_get_date_and_timespec(const struct lyd_node *dnode,
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
+time_t yang_dnode_get_date_and_time(const struct lyd_node *dnode,
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
+
+/* rt-types:bandwidth-ieee-float32 */
+extern float yang_dnode_get_bandwidth_ieee_float32(const struct lyd_node *dnode,
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/* nexthop enum2str */
extern const char *yang_nexthop_type2str(uint32_t ntype);