diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2024-03-18 23:49:19 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-04-22 15:36:22 +0200 |
commit | 5c3e95d422d487249ee3c6405ac2cddfa69af394 (patch) | |
tree | 50677fa499f78cca631215431b6c564eb9698b60 /lib/yang.h | |
parent | tests: add test for NB RPC callback (diff) | |
download | frr-5c3e95d422d487249ee3c6405ac2cddfa69af394.tar.xz frr-5c3e95d422d487249ee3c6405ac2cddfa69af394.zip |
lib: add native RPC processing to mgmt backend client
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/yang.h')
-rw-r--r-- | lib/yang.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/yang.h b/lib/yang.h index 1903079d1..57131f478 100644 --- a/lib/yang.h +++ b/lib/yang.h @@ -635,6 +635,25 @@ extern LY_ERR yang_parse_notification(const char *xpath, LYD_FORMAT format, const char *data, struct lyd_node **notif); /* + * Parse a YANG RPC. + * + * Args: + * xpath: xpath of an RPC/action. + * format: LYD_FORMAT of input data. + * data: input data. + * reply: true if the data represents a reply to an RPC/action. + * rpc: pointer to the libyang data tree to store the parsed RPC/action. + * If data represents an action, the pointer to the action node is + * still returned, but it's part of the full data tree with all its + * parents. + * + * Returns: + * LY_ERR from underlying calls. + */ +LY_ERR yang_parse_rpc(const char *xpath, LYD_FORMAT format, const char *data, + bool reply, struct lyd_node **rpc); + +/* * "Print" the yang tree in `root` into dynamic sized array. * * Args: |