diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-20 00:13:14 +0200 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-28 23:28:39 +0200 |
| commit | 93744dbe883a0211d5b771ce2cbcb4da93b95e1b (patch) | |
| tree | d43e827d70df266fef4235f212b6d1709f9dc389 /lib/yang_wrappers.c | |
| parent | e6332964437a09c3f7d691783e621d62ef2ea340 (diff) | |
zebra: convert interface link-params bandwidth commands to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/yang_wrappers.c')
| -rw-r--r-- | lib/yang_wrappers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/yang_wrappers.c b/lib/yang_wrappers.c index dc049a374a..53f40e89b7 100644 --- a/lib/yang_wrappers.c +++ b/lib/yang_wrappers.c @@ -1046,6 +1046,17 @@ struct yang_data *yang_data_new_date_and_time(const char *xpath, time_t time) return yang_data_new(xpath, timebuf); } +float yang_dnode_get_bandwidth_ieee_float32(const struct lyd_node *dnode, + const char *xpath_fmt, ...) +{ + const char *canon = YANG_DNODE_XPATH_GET_CANON(dnode, xpath_fmt); + float value; + + assert(sscanf(canon, "%a", &value) == 1); + + return value; +} + const char *yang_nexthop_type2str(uint32_t ntype) { switch (ntype) { |
