summaryrefslogtreecommitdiff
path: root/lib/yang.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yang.h')
-rw-r--r--lib/yang.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/yang.h b/lib/yang.h
index 431b2eee48..4ed0a39ba4 100644
--- a/lib/yang.h
+++ b/lib/yang.h
@@ -622,6 +622,22 @@ extern void yang_debugging_set(bool enable);
extern uint8_t *yang_print_tree(const struct lyd_node *root, LYD_FORMAT format,
uint32_t options);
+
+/**
+ * yang_convert_lyd_format() - convert one libyang format to darr string.
+ * @data: data to convert.
+ * @data_len: length of the data.
+ * @in_format: format of the data.
+ * @out_format: format to return.
+ * @shrink: true to avoid pretty printing.
+ *
+ * Return:
+ * A darr based string or NULL for error.
+ */
+extern char *yang_convert_lyd_format(const uint8_t *data, size_t msg_len,
+ LYD_FORMAT in_format,
+ LYD_FORMAT out_format, bool shrink);
+
/*
* "Print" the yang tree in `root` into an existing dynamic sized array.
*