summaryrefslogtreecommitdiff
path: root/lib/yang.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yang.h')
-rw-r--r--lib/yang.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/yang.h b/lib/yang.h
index cd5597ff8c..b0348e320b 100644
--- a/lib/yang.h
+++ b/lib/yang.h
@@ -44,6 +44,13 @@ DECLARE_MTYPE(YANG_DATA)
/* Maximum string length of an YANG value. */
#define YANG_VALUE_MAXLEN 1024
+struct yang_module_embed {
+ struct yang_module_embed *next;
+ const char *mod_name, *mod_rev;
+ const char *data;
+ LYS_INFORMAT format;
+};
+
struct yang_module {
RB_ENTRY(yang_module) entry;
const char *name;
@@ -133,6 +140,16 @@ extern struct yang_module *yang_module_load(const char *module_name);
extern struct yang_module *yang_module_find(const char *module_name);
/*
+ * Register a YANG module embedded in the binary file. Should be called
+ * from a constructor function.
+ *
+ * embed
+ * YANG module embedding structure to register. (static global provided
+ * by caller.)
+ */
+extern void yang_module_embed(struct yang_module_embed *embed);
+
+/*
* Iterate over all libyang schema nodes from the given YANG module.
*
* module