libyang  1.0.130
YANG data modeling language library
tree_schema.h
Go to the documentation of this file.
1 
15 #ifndef LY_TREE_SCHEMA_H_
16 #define LY_TREE_SCHEMA_H_
17 
18 #ifdef __APPLE__
19  #include <machine/endian.h>
20 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
21  #include <sys/endian.h>
22 #else
23  #include <endian.h>
24 #endif
25 
26 #include <limits.h>
27 #include <stddef.h>
28 #include <stdint.h>
29 #include <stdio.h>
30 #include <sys/types.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
48 #define LY_TREE_FOR(START, ELEM) \
49  for ((ELEM) = (START); \
50  (ELEM); \
51  (ELEM) = (ELEM)->next)
52 
66 #define LY_TREE_FOR_SAFE(START, NEXT, ELEM) \
67  for ((ELEM) = (START); \
68  (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
69  (ELEM) = (NEXT))
70 
98 #define LY_TREE_DFS_BEGIN(START, NEXT, ELEM) \
99  for ((ELEM) = (NEXT) = (START); \
100  (ELEM); \
101  (ELEM) = (NEXT))
102 
122 #ifdef __cplusplus
123 #define TYPES_COMPATIBLE(type1, type2) typeid(*(type1)) == typeid(type2)
124 #elif defined(__GNUC__) || defined(__clang__)
125 #define TYPES_COMPATIBLE(type1, type2) __builtin_types_compatible_p(__typeof__(*(type1)), type2)
126 #else
127 #define TYPES_COMPATIBLE(type1, type2) _Generic(*(type1), type2: 1, default: 0)
128 #endif
129 
130 #define LY_TREE_DFS_END(START, NEXT, ELEM) \
131  /* select element for the next run - children first */ \
132  if (TYPES_COMPATIBLE(ELEM, struct lyd_node)) { \
133  /* child exception for leafs, leaflists and anyxml without children */\
134  if (((struct lyd_node *)(ELEM))->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)) { \
135  (NEXT) = NULL; \
136  } else { \
137  (NEXT) = (ELEM)->child; \
138  } \
139  } else if (TYPES_COMPATIBLE(ELEM, struct lys_node)) { \
140  /* child exception for leafs, leaflists and anyxml without children */\
141  if (((struct lys_node *)(ELEM))->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)) { \
142  (NEXT) = NULL; \
143  } else { \
144  (NEXT) = (ELEM)->child; \
145  } \
146  } else { \
147  (NEXT) = (ELEM)->child; \
148  } \
149  \
150  if (!(NEXT)) { \
151  /* no children */ \
152  if ((ELEM) == (START)) { \
153  /* we are done, (START) has no children */ \
154  break; \
155  } \
156  /* try siblings */ \
157  (NEXT) = (ELEM)->next; \
158  } \
159  while (!(NEXT)) { \
160  /* parent is already processed, go to its sibling */ \
161  if (TYPES_COMPATIBLE(ELEM, struct lys_node) \
162  && (((struct lys_node *)(ELEM)->parent)->nodetype == LYS_AUGMENT)) { \
163  (ELEM) = (ELEM)->parent->prev; \
164  } else { \
165  (ELEM) = (ELEM)->parent; \
166  } \
167  /* no siblings, go back through parents */ \
168  if (TYPES_COMPATIBLE(ELEM, struct lys_node)) { \
169  /* due to possible augments */ \
170  if (lys_parent((struct lys_node *)(ELEM)) == lys_parent((struct lys_node *)(START))) { \
171  /* we are done, no next element to process */ \
172  break; \
173  } \
174  } else if ((ELEM)->parent == (START)->parent) { \
175  /* we are done, no next element to process */ \
176  break; \
177  } \
178  (NEXT) = (ELEM)->next; \
179  }
180 
188 #define LY_ARRAY_MAX(var) (sizeof(var) == 8 ? ULLONG_MAX : ((1ULL << (sizeof(var) * 8)) - 1))
190 #define LY_REV_SIZE 11
195 typedef enum {
199 } LYS_INFORMAT;
200 
204 typedef enum {
211 } LYS_OUTFORMAT;
212 
219 #define LYS_OUTOPT_TREE_RFC 0x01
220 #define LYS_OUTOPT_TREE_GROUPING 0x02
221 #define LYS_OUTOPT_TREE_USES 0x04
222 #define LYS_OUTOPT_TREE_NO_LEAFREF 0x08
228 /* shortcuts for common in and out formats */
229 #define LYS_YANG 1
230 #define LYS_YIN 2
237 typedef enum lys_nodetype {
238  LYS_UNKNOWN = 0x0000,
239  LYS_CONTAINER = 0x0001,
240  LYS_CHOICE = 0x0002,
241  LYS_LEAF = 0x0004,
242  LYS_LEAFLIST = 0x0008,
243  LYS_LIST = 0x0010,
244  LYS_ANYXML = 0x0020,
245  LYS_CASE = 0x0040,
246  LYS_NOTIF = 0x0080,
247  LYS_RPC = 0x0100,
248  LYS_INPUT = 0x0200,
249  LYS_OUTPUT = 0x0400,
250  LYS_GROUPING = 0x0800,
251  LYS_USES = 0x1000,
252  LYS_AUGMENT = 0x2000,
253  LYS_ACTION = 0x4000,
254  LYS_ANYDATA = 0x8020,
255  LYS_EXT = 0x10000
256 } LYS_NODE;
257 
258 /* all nodes sharing the node namespace except RPCs and notifications */
259 #define LYS_NO_RPC_NOTIF_NODE 0x807F
260 
261 #define LYS_ANY 0xFFFF
262 
290 typedef enum {
375 } LY_STMT;
376 
382 typedef enum {
383  LY_STMT_CARD_OPT, /* 0..1 */
385  LY_STMT_CARD_SOME, /* 1..n */
386  LY_STMT_CARD_ANY /* 0..n */
387 } LY_STMT_CARD;
388 
392 typedef enum {
393  LYEXT_ERR = -1,
402 } LYEXT_TYPE;
403 
412 #define LYEXT_OPT_INHERIT 0x01
418 #define LYEXT_OPT_YANG 0x02
419 #define LYEXT_OPT_CONTENT 0x04
421 #define LYEXT_OPT_VALID 0x08
422 #define LYEXT_OPT_VALID_SUBTREE 0x10
426 #define LYEXT_OPT_PLUGIN1 0x0100
427 #define LYEXT_OPT_PLUGIN2 0x0200
428 #define LYEXT_OPT_PLUGIN3 0x0400
429 #define LYEXT_OPT_PLUGIN4 0x0800
430 #define LYEXT_OPT_PLUGIN5 0x1000
431 #define LYEXT_OPT_PLUGIN6 0x2000
432 #define LYEXT_OPT_PLUGIN7 0x4000
433 #define LYEXT_OPT_PLUGIN8 0x8000
443 struct lyext_substmt {
445  size_t offset;
447 };
448 
452 struct lys_ext {
453  const char *name;
454  const char *dsc;
455  const char *ref;
456  uint16_t flags;
457  uint8_t ext_size;
458  uint8_t padding[5];
460  const char *argument;
461  struct lys_module *module;
463 };
464 
473  struct lys_ext *def;
476  void *parent;
478  const char *arg_value;
479  uint16_t flags;
480  uint8_t ext_size;
481  uint8_t insubstmt_index;
488  uint8_t insubstmt;
491  uint8_t parent_type;
492  uint8_t ext_type;
493  uint8_t padding;
495  void *priv;
496  struct lys_module *module;
498 };
499 
507  struct lys_ext *def;
508  void *parent;
510  const char *arg_value;
511  uint16_t flags;
512  uint8_t ext_size;
513  uint8_t insubstmt_index;
520  uint8_t insubstmt;
523  uint8_t parent_type;
524  uint8_t ext_type;
525  uint8_t padding;
527  void *priv;
528  struct lys_module *module;
531  /* to this point the structure is compatible with the generic ::lys_ext_instance structure */
533  char content[1];
534 };
535 
582 const void *lys_ext_instance_substmt(const struct lys_ext_instance *ext);
583 
592 int lys_ext_instance_presence(struct lys_ext *def, struct lys_ext_instance **ext, uint8_t ext_size);
593 
605 
611 const char * const *ly_get_loaded_plugins(void);
612 
620 void ly_load_plugins(void);
621 
622 /* don't need the contents of these types, just forward-declare them for the next 2 functions. */
623 struct lyext_plugin_list;
624 struct lytype_plugin_list;
625 
634 int ly_register_exts(struct lyext_plugin_list *plugin, const char *log_name);
635 
641 int ly_register_types(struct lytype_plugin_list *plugin, const char *log_name);
642 
652 int ly_clean_plugins(void);
653 
661 typedef enum LYS_VERSION {
665 } LYS_VERSION;
666 
674 struct lys_module {
675  struct ly_ctx *ctx;
676  const char *name;
677  const char *prefix;
678  const char *dsc;
679  const char *ref;
680  const char *org;
681  const char *contact;
682  const char *filepath;
683  uint8_t type:1;
684  uint8_t version:3;
688  uint8_t deviated:2;
692  uint8_t disabled:1;
693  uint8_t implemented:1;
694  uint8_t latest_revision:1;
696  uint8_t padding1:7;
697  uint8_t padding2[2];
698 
699  /* array sizes */
700  uint8_t rev_size;
701  uint8_t imp_size;
702  uint8_t inc_size;
704  uint16_t ident_size;
705  uint16_t tpdf_size;
707  uint8_t features_size;
708  uint8_t augment_size;
709  uint8_t deviation_size;
710  uint8_t extensions_size;
711  uint8_t ext_size;
713  struct lys_revision *rev;
715  struct lys_import *imp;
716  struct lys_include *inc;
717  struct lys_tpdf *tpdf;
718  struct lys_ident *ident;
722  struct lys_ext *extensions;
725  /* specific module's items in comparison to submodules */
726  struct lys_node *data;
727  const char *ns;
728 };
729 
738  struct ly_ctx *ctx;
739  const char *name;
740  const char *prefix;
741  const char *dsc;
742  const char *ref;
743  const char *org;
744  const char *contact;
745  const char *filepath;
746  uint8_t type:1;
747  uint8_t version:3;
751  uint8_t deviated:2;
755  uint8_t disabled:1;
756  uint8_t implemented:1;
757  uint8_t padding[3];
759  /* array sizes */
760  uint8_t rev_size;
761  uint8_t imp_size;
762  uint8_t inc_size;
764  uint16_t ident_size;
765  uint16_t tpdf_size;
767  uint8_t features_size;
768  uint8_t augment_size;
769  uint8_t deviation_size;
770  uint8_t extensions_size;
771  uint8_t ext_size;
773  struct lys_revision *rev;
775  struct lys_import *imp;
776  struct lys_include *inc;
777  struct lys_tpdf *tpdf;
778  struct lys_ident *ident;
782  struct lys_ext *extensions;
785  /* specific submodule's items in comparison to modules */
787 };
788 
792 typedef enum {
814 } LY_DATA_TYPE;
815 #define LY_DATA_TYPE_COUNT 20
820 struct lys_type_info_binary {
821  struct lys_restr *length;
823 };
824 
828 struct lys_type_bit {
829  const char *name;
830  const char *dsc;
831  const char *ref;
832  uint16_t flags;
834  uint8_t ext_size;
835  uint8_t iffeature_size;
837  /* 32b padding for compatibility with ::lys_node */
838  uint32_t pos;
842 };
843 
848  struct lys_type_bit *bit;
849  unsigned int count;
850 };
851 
856  struct lys_restr *range;
858  uint8_t dig;
862  uint64_t div;
863 };
864 
869  const char *name;
870  const char *dsc;
871  const char *ref;
872  uint16_t flags;
874  uint8_t ext_size;
875  uint8_t iffeature_size;
877  /* 32b padding for compatibility with ::lys_node */
878  int32_t value;
882 };
883 
889  unsigned int count;
890 };
891 
896  struct lys_ident **ref;
897  unsigned int count;
898 };
899 
904  int8_t req;
909 };
910 
915  struct lys_restr *range;
917 };
918 
923  const char *path;
926  int8_t req;
930 };
931 
936  struct lys_restr *length;
938  struct lys_restr *patterns;
944  unsigned int pat_count;
945 #ifdef LY_ENABLED_CACHE
946  void **patterns_pcre;
949 #endif
950 };
951 
956  struct lys_type *types;
957  unsigned int count;
960 };
961 
976 };
977 
981 struct lys_type {
983  uint8_t value_flags;
984  uint8_t ext_size;
986  struct lys_tpdf *der;
988  struct lys_tpdf *parent;
991  /*
992  * here is an overview of the info union:
993  * LY_TYPE_BINARY (binary)
994  * struct lys_restr *binary.length; length restriction (optional), see
995  * [RFC 6020 sec. 9.4.4](http://tools.ietf.org/html/rfc6020#section-9.4.4)
996  * -----------------------------------------------------------------------------------------------------------------
997  * LY_TYPE_BITS (bits)
998  * struct lys_type_bit *bits.bit; array of bit definitions
999  * const char *bits.bit[i].name; bit's name (mandatory)
1000  * const char *bits.bit[i].dsc; bit's description (optional)
1001  * const char *bits.bit[i].ref; bit's reference (optional)
1002  * uint8_t bits.bit[i].flags; bit's flags, whether the position was auto-assigned
1003  * and the status(one of LYS_NODE_STATUS_* values or 0 for default)
1004  * uint8_t bits.bit[i].iffeature_size; number of elements in the bit's #iffeature array
1005  * uint8_t bits.bit[i].ext_size; number of elements in the bit's #ext array
1006  * uint32_t bits.bit[i].pos; bit's position (mandatory)
1007  * struct lys_iffeature *bits.bit[i].iffeature; array of bit's if-feature expressions
1008  * struct lys_ext_instance **bits.bit[i].ext; array of pointers to the bit's extension instances (optional)
1009  * unsigned int bits.count; number of bit definitions in the bit array
1010  * -----------------------------------------------------------------------------------------------------------------
1011  * LY_TYPE_DEC64 (dec64)
1012  * struct lys_restr *dec64.range; range restriction (optional), see
1013  * [RFC 6020 sec. 9.2.4](http://tools.ietf.org/html/rfc6020#section-9.2.4)
1014  * struct lys_ext_instance **dec64.ext; array of pointers to the bit's extension instances (optional)
1015  * uint8_t dec64.ext_size; number of elements in the bit's #ext array
1016  * uint8_t dec64.dig; fraction-digits restriction (mandatory)
1017  * uint64_t dec64.div; auxiliary value for moving decimal point (dividing the stored value to get
1018  * the real value) (mandatory, corresponds to the fraction-digits)
1019  * -----------------------------------------------------------------------------------------------------------------
1020  * LY_TYPE_ENUM (enums)
1021  * struct lys_type_enum *enums.enm; array of enum definitions
1022  * const char *enums.enm[i].name; enum's name (mandatory)
1023  * const char *enums.enm[i].dsc; enum's description (optional)
1024  * const char *enums.enm[i].ref; enum's reference (optional)
1025  * uint8_t enums.enm[i].flags; enum's flags, whether the value was auto-assigned
1026  * and the status(one of LYS_NODE_STATUS_* values or 0 for default)
1027  * uint8_t enums.enum[i].iffeature_size; number of elements in the bit's #iffeature array
1028  * uint8_t enums.enum[i].ext_size; number of elements in the bit's #ext array
1029  * int32_t enums.enm[i].value; enum's value (mandatory)
1030  * struct lys_iffeature *enums.enum[i].iffeature; array of bit's if-feature expressions
1031  * struct lys_ext_instance **enums.enum[i].ext; array of pointers to the bit's extension instances (optional)
1032  * unsigned int enums.count; number of enum definitions in the enm array
1033  * -----------------------------------------------------------------------------------------------------------------
1034  * LY_TYPE_IDENT (ident)
1035  * struct lys_ident **ident.ref; array of pointers (reference) to the identity definition (mandatory)
1036  * unsigned int ident.count; number of base identity references
1037  * -----------------------------------------------------------------------------------------------------------------
1038  * LY_TYPE_INST (inst)
1039  * int8_t inst.req; require-identifier restriction, see
1040  * [RFC 6020 sec. 9.13.2](http://tools.ietf.org/html/rfc6020#section-9.13.2):
1041  * - -1 = false,
1042  * - 0 not defined,
1043  * - 1 = true
1044  * -----------------------------------------------------------------------------------------------------------------
1045  * LY_TYPE_*INT* (num)
1046  * struct lys_restr *num.range; range restriction (optional), see
1047  * [RFC 6020 sec. 9.2.4](http://tools.ietf.org/html/rfc6020#section-9.2.4)
1048  * -----------------------------------------------------------------------------------------------------------------
1049  * LY_TYPE_LEAFREF (lref)
1050  * const char *lref.path; path to the referred leaf or leaf-list node (mandatory), see
1051  * [RFC 6020 sec. 9.9.2](http://tools.ietf.org/html/rfc6020#section-9.9.2)
1052  * struct lys_node_leaf *lref.target; target schema node according to path
1053  * int8_t lref.req; require-instance restriction: -1 = false; 0 not defined (true); 1 = true
1054  * -----------------------------------------------------------------------------------------------------------------
1055  * LY_TYPE_STRING (str)
1056  * struct lys_restr *str.length; length restriction (optional), see
1057  * [RFC 6020 sec. 9.4.4](http://tools.ietf.org/html/rfc6020#section-9.4.4)
1058  * struct lys_restr *str.patterns; array of pattern restrictions (optional), see
1059  * [RFC 6020 sec. 9.4.6](http://tools.ietf.org/html/rfc6020#section-9.4.6)
1060  * unsigned int str.pat_count; number of pattern definitions in the patterns array
1061  * -----------------------------------------------------------------------------------------------------------------
1062  * LY_TYPE_UNION (uni)
1063  * struct lys_type *uni.types; array of union's subtypes
1064  * unsigned int uni.count; number of subtype definitions in types array
1065  * int uni.has_ptr_type; types recursively include an instance-identifier or leafref (union must always
1066  * be resolved after it is parsed)
1067  */
1068 };
1069 
1070 #define LYS_IFF_NOT 0x00
1071 #define LYS_IFF_AND 0x01
1072 #define LYS_IFF_OR 0x02
1073 #define LYS_IFF_F 0x03
1074 
1079  uint8_t *expr;
1080  uint8_t ext_size;
1083 };
1084 
1143 #define LYS_CONFIG_W 0x01
1144 #define LYS_CONFIG_R 0x02
1145 #define LYS_CONFIG_SET 0x04
1146 #define LYS_CONFIG_MASK 0x03
1147 #define LYS_STATUS_CURR 0x08
1148 #define LYS_STATUS_DEPRC 0x10
1149 #define LYS_STATUS_OBSLT 0x20
1150 #define LYS_STATUS_MASK 0x38
1151 #define LYS_RFN_MAXSET 0x08
1152 #define LYS_RFN_MINSET 0x10
1153 #define LYS_MAND_TRUE 0x40
1155 #define LYS_MAND_FALSE 0x80
1157 #define LYS_INCL_STATUS 0x80
1159 #define LYS_MAND_MASK 0xc0
1160 #define LYS_USERORDERED 0x100
1162 #define LYS_FENABLED 0x100
1163 #define LYS_UNIQUE 0x100
1164 #define LYS_AUTOASSIGNED 0x01
1166 #define LYS_USESGRP 0x01
1167 #define LYS_IMPLICIT 0x40
1168 #define LYS_XPCONF_DEP 0x200
1171 #define LYS_XPSTATE_DEP 0x400
1174 #define LYS_LEAFREF_DEP 0x800
1177 #define LYS_DFLTJSON 0x1000
1181 #define LYS_NOTAPPLIED 0x01
1182 #define LYS_YINELEM 0x01
1183 #define LYS_VALID_EXT 0x2000
1184 #define LYS_VALID_EXT_SUBTREE 0x4000
1191 #ifdef LY_ENABLED_CACHE
1192 
1196 #define LYS_NODE_HASH_COUNT 4
1197 
1198 #endif
1199 
1217 struct lys_node {
1218  const char *name;
1219  const char *dsc;
1220  const char *ref;
1221  uint16_t flags;
1222  uint8_t ext_size;
1223  uint8_t iffeature_size;
1225  uint8_t padding[4];
1233  struct lys_module *module;
1236  struct lys_node *parent;
1237  struct lys_node *child;
1241  struct lys_node *next;
1242  struct lys_node *prev;
1247  void *priv;
1249 #ifdef LY_ENABLED_CACHE
1250  uint8_t hash[LYS_NODE_HASH_COUNT];
1251 #endif
1252 };
1253 
1264  const char *name;
1265  const char *dsc;
1266  const char *ref;
1267  uint16_t flags;
1268  uint8_t ext_size;
1269  uint8_t iffeature_size;
1271  /* non compatible 32b with ::lys_node */
1272  uint8_t padding[1];
1273  uint8_t must_size;
1274  uint16_t tpdf_size;
1278  struct lys_module *module;
1281  struct lys_node *parent;
1282  struct lys_node *child;
1283  struct lys_node *next;
1284  struct lys_node *prev;
1289  void *priv;
1291 #ifdef LY_ENABLED_CACHE
1292  uint8_t hash[LYS_NODE_HASH_COUNT];
1293 #endif
1294 
1295  /* specific container's data */
1296  struct lys_when *when;
1297  struct lys_restr *must;
1298  struct lys_tpdf *tpdf;
1299  const char *presence;
1300 };
1301 
1312  const char *name;
1313  const char *dsc;
1314  const char *ref;
1315  uint16_t flags;
1316  uint8_t ext_size;
1317  uint8_t iffeature_size;
1319  /* non compatible 32b with ::lys_node */
1320  uint8_t padding[4];
1324  struct lys_module *module;
1327  struct lys_node *parent;
1328  struct lys_node *child;
1329  struct lys_node *next;
1330  struct lys_node *prev;
1335  void *priv;
1337  /* specific choice's data */
1338  struct lys_when *when;
1339  struct lys_node *dflt;
1340 };
1341 
1354  const char *name;
1355  const char *dsc;
1356  const char *ref;
1357  uint16_t flags;
1358  uint8_t ext_size;
1359  uint8_t iffeature_size;
1361  /* non compatible 32b with ::lys_node */
1362  uint8_t padding[3];
1363  uint8_t must_size;
1367  struct lys_module *module;
1370  struct lys_node *parent;
1371  void *child;
1372  struct lys_node *next;
1373  struct lys_node *prev;
1378  void *priv;
1380 #ifdef LY_ENABLED_CACHE
1381  uint8_t hash[LYS_NODE_HASH_COUNT];
1382 #endif
1383 
1384  /* specific leaf's data */
1385  struct lys_when *when;
1386  struct lys_restr *must;
1387  struct lys_type type;
1388  const char *units;
1390  /* to this point, struct lys_node_leaf is compatible with struct lys_node_leaflist */
1391  const char *dflt;
1392 };
1393 
1405  const char *name;
1406  const char *dsc;
1407  const char *ref;
1408  uint16_t flags;
1409  uint8_t ext_size;
1410  uint8_t iffeature_size;
1412  /* non compatible 32b with ::lys_node */
1413  uint8_t padding[2];
1414  uint8_t dflt_size;
1415  uint8_t must_size;
1419  struct lys_module *module;
1422  struct lys_node *parent;
1423  struct ly_set *backlinks;
1426  struct lys_node *next;
1427  struct lys_node *prev;
1432  void *priv;
1434 #ifdef LY_ENABLED_CACHE
1435  uint8_t hash[LYS_NODE_HASH_COUNT];
1436 #endif
1437 
1438  /* specific leaf-list's data */
1439  struct lys_when *when;
1440  struct lys_restr *must;
1441  struct lys_type type;
1442  const char *units;
1444  /* to this point, struct lys_node_leaflist is compatible with struct lys_node_leaf
1445  * on the other hand, the min and max are compatible with struct lys_node_list */
1446  const char **dflt;
1447  uint32_t min;
1448  uint32_t max;
1449 };
1450 
1461  const char *name;
1462  const char *dsc;
1463  const char *ref;
1464  uint16_t flags;
1465  uint8_t ext_size;
1466  uint8_t iffeature_size;
1468  /* non compatible 32b with ::lys_node */
1469  uint8_t must_size;
1470  uint8_t tpdf_size;
1471  uint8_t keys_size;
1472  uint8_t unique_size;
1476  struct lys_module *module;
1479  struct lys_node *parent;
1480  struct lys_node *child;
1481  struct lys_node *next;
1482  struct lys_node *prev;
1487  void *priv;
1489 #ifdef LY_ENABLED_CACHE
1490  uint8_t hash[LYS_NODE_HASH_COUNT];
1491 #endif
1492 
1493  /* specific list's data */
1494  struct lys_when *when;
1495  struct lys_restr *must;
1496  struct lys_tpdf *tpdf;
1497  struct lys_node_leaf **keys;
1498  struct lys_unique *unique;
1500  uint32_t min;
1501  uint32_t max;
1503  const char *keys_str;
1506 };
1507 
1520  const char *name;
1521  const char *dsc;
1522  const char *ref;
1523  uint16_t flags;
1524  uint8_t ext_size;
1525  uint8_t iffeature_size;
1527  /* non compatible 32b with ::lys_node */
1528  uint8_t padding[3];
1529  uint8_t must_size;
1533  struct lys_module *module;
1536  struct lys_node *parent;
1537  struct lys_node *child;
1538  struct lys_node *next;
1539  struct lys_node *prev;
1544  void *priv;
1546 #ifdef LY_ENABLED_CACHE
1547  uint8_t hash[LYS_NODE_HASH_COUNT];
1548 #endif
1549 
1550  /* specific anyxml's data */
1551  struct lys_when *when;
1552  struct lys_restr *must;
1553 };
1554 
1568  const char *name;
1569  const char *dsc;
1570  const char *ref;
1571  uint16_t flags;
1573  uint8_t ext_size;
1574  uint8_t iffeature_size;
1576  /* non compatible 32b with ::lys_node */
1577  uint8_t padding[2];
1578  uint8_t refine_size;
1579  uint8_t augment_size;
1583  struct lys_module *module;
1586  struct lys_node *parent;
1587  struct lys_node *child;
1588  struct lys_node *next;
1589  struct lys_node *prev;
1594  void *priv;
1596  /* specific uses's data */
1597  struct lys_when *when;
1598  struct lys_refine *refine;
1600  struct lys_node_grp *grp;
1601 };
1602 
1615  const char *name;
1616  const char *dsc;
1617  const char *ref;
1618  uint16_t flags;
1619  uint8_t ext_size;
1622  /* non compatible 32b with ::lys_node */
1623  uint16_t unres_count;
1624  uint16_t tpdf_size;
1627  void *padding_iff;
1628  struct lys_module *module;
1631  struct lys_node *parent;
1632  struct lys_node *child;
1633  struct lys_node *next;
1634  struct lys_node *prev;
1639  void *priv;
1641  /* specific grouping's data */
1642  struct lys_tpdf *tpdf;
1643 };
1644 
1654  const char *name;
1655  const char *dsc;
1656  const char *ref;
1657  uint16_t flags;
1658  uint8_t ext_size;
1659  uint8_t iffeature_size;
1661  /* non compatible 32b with ::lys_node */
1662  uint8_t padding[4];
1666  struct lys_module *module;
1669  struct lys_node *parent;
1670  struct lys_node *child;
1671  struct lys_node *next;
1672  struct lys_node *prev;
1677  void *priv;
1679  /* specific case's data */
1680  struct lys_when *when;
1681 };
1682 
1699  const char *name;
1700  void *fill1[2];
1701  uint16_t flags;
1702  uint8_t ext_size;
1705  /* non compatible 32b with ::lys_node */
1706  uint8_t padding[1];
1707  uint8_t must_size;
1708  uint16_t tpdf_size;
1711  void *padding_iff;
1712  struct lys_module *module;
1715  struct lys_node *parent;
1716  struct lys_node *child;
1717  struct lys_node *next;
1718  struct lys_node *prev;
1723  void *priv;
1725  /* specific inout's data */
1726  struct lys_tpdf *tpdf;
1727  struct lys_restr *must;
1728 };
1729 
1737  const char *name;
1738  const char *dsc;
1739  const char *ref;
1740  uint16_t flags;
1741  uint8_t ext_size;
1742  uint8_t iffeature_size;
1744  /* non compatible 32b with ::lys_node */
1745  uint8_t padding[1];
1746  uint8_t must_size;
1747  uint16_t tpdf_size;
1751  struct lys_module *module;
1754  struct lys_node *parent;
1755  struct lys_node *child;
1756  struct lys_node *next;
1757  struct lys_node *prev;
1762  void *priv;
1764 #ifdef LY_ENABLED_CACHE
1765  uint8_t hash[LYS_NODE_HASH_COUNT];
1766 #endif
1767 
1768  /* specific rpc's data */
1769  struct lys_tpdf *tpdf;
1770  struct lys_restr *must;
1771 };
1772 
1784  const char *name;
1785  const char *dsc;
1786  const char *ref;
1787  uint16_t flags;
1788  uint8_t ext_size;
1789  uint8_t iffeature_size;
1791  /* non compatible 32b with ::lys_node */
1792  uint8_t padding[2];
1793  uint16_t tpdf_size;
1797  struct lys_module *module;
1800  struct lys_node *parent;
1801  struct lys_node *child;
1802  struct lys_node *next;
1803  struct lys_node *prev;
1808  void *priv;
1810 #ifdef LY_ENABLED_CACHE
1811  uint8_t hash[LYS_NODE_HASH_COUNT];
1812 #endif
1813 
1814  /* specific rpc's data */
1815  struct lys_tpdf *tpdf;
1816 };
1817 
1832  const char *target_name;
1834  const char *dsc;
1835  const char *ref;
1836  uint16_t flags;
1837  uint8_t ext_size;
1838  uint8_t iffeature_size;
1840  /* non compatible 32b with ::lys_node */
1841  uint8_t padding[4];
1845  struct lys_module *module;
1848  struct lys_node *parent;
1849  struct lys_node *child;
1855  /* replaces #next and #prev members of ::lys_node */
1856  struct lys_when *when;
1857  struct lys_node *target;
1859  /* again compatible members with ::lys_node */
1860  void *priv;
1861 };
1862 
1867  uint32_t min;
1868  uint32_t max;
1869 };
1870 
1875  const char *presence;
1878 };
1879 
1883 struct lys_refine {
1884  const char *target_name;
1885  const char *dsc;
1886  const char *ref;
1887  uint16_t flags;
1888  uint8_t ext_size;
1889  uint8_t iffeature_size;
1891  /* 32b padding for compatibility with ::lys_node */
1892  uint16_t target_type;
1895  uint8_t must_size;
1896  uint8_t dflt_size;
1900  struct lys_module *module;
1902  struct lys_restr *must;
1903  const char **dflt;
1908 };
1909 
1910 
1914 typedef enum lys_deviate_type {
1920 
1924 struct lys_deviate {
1927  uint8_t flags;
1928  uint8_t dflt_size;
1929  uint8_t ext_size;
1931  uint8_t min_set;
1932  uint8_t max_set;
1933  uint8_t must_size;
1934  uint8_t unique_size;
1936  uint32_t min;
1937  uint32_t max;
1939  struct lys_restr *must;
1940  struct lys_unique *unique;
1941  struct lys_type *type;
1942  const char *units;
1943  const char **dflt;
1946 };
1947 
1952  const char *target_name;
1954  const char *dsc;
1955  const char *ref;
1958  uint8_t deviate_size;
1959  uint8_t ext_size;
1962 };
1963 
1967 struct lys_import {
1968  struct lys_module *module;
1969  const char *prefix;
1971  uint8_t ext_size;
1973  const char *dsc;
1974  const char *ref;
1975 };
1976 
1980 struct lys_include {
1983  uint8_t ext_size;
1985  const char *dsc;
1986  const char *ref;
1987 };
1988 
1994  uint8_t ext_size;
1996  const char *dsc;
1997  const char *ref;
1998 };
1999 
2003 struct lys_tpdf {
2004  const char *name;
2005  const char *dsc;
2006  const char *ref;
2007  uint16_t flags;
2008  uint8_t ext_size;
2012  /* 24b padding for compatibility with ::lys_node */
2013  uint8_t padding[3];
2016  const char *units;
2017  struct lys_module *module;
2020  struct lys_type type;
2022  const char *dflt;
2023 };
2024 
2028 struct lys_unique {
2029  const char **expr;
2030  uint8_t expr_size;
2031  uint8_t trg_type;
2032 };
2033 
2037 struct lys_feature {
2038  const char *name;
2039  const char *dsc;
2040  const char *ref;
2041  uint16_t flags;
2043  uint8_t ext_size;
2044  uint8_t iffeature_size;
2046  /* 32b padding for compatibility with ::lys_node */
2047  uint8_t padding[4];
2051  struct lys_module *module;
2053 };
2054 
2058 struct lys_restr {
2059  const char *expr;
2062  const char *dsc;
2063  const char *ref;
2064  const char *eapptag;
2065  const char *emsg;
2067  uint8_t ext_size;
2068  uint16_t flags;
2069 };
2070 
2074 struct lys_when {
2075  const char *cond;
2076  const char *dsc;
2077  const char *ref;
2079  uint8_t ext_size;
2080  uint16_t flags;
2081 };
2082 
2088 struct lys_ident {
2089  const char *name;
2090  const char *dsc;
2091  const char *ref;
2092  uint16_t flags;
2093  uint8_t ext_size;
2094  uint8_t iffeature_size;
2096  /* 32b padding for compatibility with ::lys_node */
2097  uint8_t padding[3];
2098  uint8_t base_size;
2102  struct lys_module *module;
2104  struct lys_ident **base;
2105  struct ly_set *der;
2106 };
2107 
2117 const struct lys_module *lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format);
2118 
2130 const struct lys_module *lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format);
2131 
2140 const struct lys_module *lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format);
2141 
2157 int lys_search_localfile(const char * const *searchpaths, int cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format);
2158 
2172 const char **lys_features_list(const struct lys_module *module, uint8_t **states);
2173 
2183 int lys_features_enable(const struct lys_module *module, const char *feature);
2184 
2194 int lys_features_disable(const struct lys_module *module, const char *feature);
2195 
2206 int lys_features_state(const struct lys_module *module, const char *feature);
2207 
2219 const struct lys_node *lys_is_disabled(const struct lys_node *node, int recursive);
2220 
2227 int lys_iffeature_value(const struct lys_iffeature *iff);
2228 
2236 const struct lys_node_list *lys_is_key(const struct lys_node_leaf *node, uint8_t *index);
2237 
2259 const struct lys_node *lys_getnext(const struct lys_node *last, const struct lys_node *parent,
2260  const struct lys_module *module, int options);
2261 
2262 #define LYS_GETNEXT_WITHCHOICE 0x01
2263 #define LYS_GETNEXT_WITHCASE 0x02
2264 #define LYS_GETNEXT_WITHGROUPING 0x04
2265 #define LYS_GETNEXT_WITHINOUT 0x08
2267 #define LYS_GETNEXT_WITHUSES 0x10
2268 #define LYS_GETNEXT_INTOUSES 0x20
2270 #define LYS_GETNEXT_INTONPCONT 0x40
2271 #define LYS_GETNEXT_PARENTUSES 0x80
2273 #define LYS_GETNEXT_NOSTATECHECK 0x100
2283 const struct lys_type *lys_getnext_union_type(const struct lys_type *last, const struct lys_type *type);
2284 
2296 struct ly_set *lys_find_path(const struct lys_module *cur_module, const struct lys_node *cur_node, const char *path);
2297 
2302  /* XML document roots */
2303  LYXP_NODE_ROOT, /* access to all the data (node value first top-level node) */
2304  LYXP_NODE_ROOT_CONFIG, /* <running> data context, no state data (node value first top-level node) */
2305 
2306  /* XML elements */
2307  LYXP_NODE_ELEM, /* XML element (most common) */
2308  LYXP_NODE_TEXT, /* XML text element (extremely specific use, unlikely to be ever needed) */
2309  LYXP_NODE_ATTR, /* XML attribute (in YANG cannot happen, do not use for the context node) */
2310 
2311  LYXP_NODE_NONE /* invalid node type, do not use */
2312 };
2313 
2327 struct ly_set *lys_xpath_atomize(const struct lys_node *ctx_node, enum lyxp_node_type ctx_node_type,
2328  const char *expr, int options);
2329 
2330 #define LYXP_MUST 0x01
2331 #define LYXP_WHEN 0x02
2340 struct ly_set *lys_node_xpath_atomize(const struct lys_node *node, int options);
2341 
2342 #define LYXP_RECURSIVE 0x01
2343 #define LYXP_NO_LOCAL 0x02
2356 char *lys_path(const struct lys_node *node, int options);
2357 
2358 #define LYS_PATH_FIRST_PREFIX 0x01
2368 char *lys_data_path(const struct lys_node *node);
2369 
2380 struct lys_node *lys_parent(const struct lys_node *node);
2381 
2391 struct lys_module *lys_node_module(const struct lys_node *node);
2392 
2402 struct lys_module *lys_main_module(const struct lys_module *module);
2403 
2419 struct lys_module *lys_implemented_module(const struct lys_module *mod);
2420 
2440 int lys_set_implemented(const struct lys_module *module);
2441 
2458 int lys_set_disabled(const struct lys_module *module);
2459 
2474 int lys_set_enabled(const struct lys_module *module);
2475 
2485 void *lys_set_private(const struct lys_node *node, void *priv);
2486 
2500 int lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2501  int line_length, int options);
2502 
2515 int lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2516  int line_length, int options);
2517 
2530 int lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2531  int line_length, int options);
2532 
2545 int lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2546  int line_length, int options);
2547 
2561 int lys_print_clb(ssize_t (*writeclb)(void *arg, const void *buf, size_t count), void *arg,
2562  const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options);
2563 
2566 #ifdef __cplusplus
2567 }
2568 #endif
2569 
2570 #endif /* LY_TREE_SCHEMA_H_ */
lys_module::rev_size
uint8_t rev_size
Definition: tree_schema.h:700
LYS_OUTFORMAT
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition: tree_schema.h:204
lys_module::padding1
uint8_t padding1
Definition: tree_schema.h:696
lys_node::child
struct lys_node * child
Definition: tree_schema.h:1237
LY_STMT_PREFIX
@ LY_STMT_PREFIX
Definition: tree_schema.h:310
lys_type_info::bits
struct lys_type_info_bits bits
Definition: tree_schema.h:967
LY_TYPE_BINARY
@ LY_TYPE_BINARY
Definition: tree_schema.h:794
LY_STMT_ERRMSG
@ LY_STMT_ERRMSG
Definition: tree_schema.h:305
LY_STMT_USES
@ LY_STMT_USES
Definition: tree_schema.h:351
LYS_CHOICE
@ LYS_CHOICE
Definition: tree_schema.h:240
LY_STMT_DESCRIPTION
@ LY_STMT_DESCRIPTION
Definition: tree_schema.h:303
LYS_INFORMAT
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition: tree_schema.h:195
_PACKED
#define _PACKED
Compiler flag for packed data types.
Definition: libyang.h:38
LY_STMT_VALUE
@ LY_STMT_VALUE
Definition: tree_schema.h:315
LY_STMT_CARD_ANY
@ LY_STMT_CARD_ANY
Definition: tree_schema.h:386
LYXP_NODE_ELEM
@ LYXP_NODE_ELEM
Definition: tree_schema.h:2307
LY_STMT_MODIFIER
@ LY_STMT_MODIFIER
Definition: tree_schema.h:317
lys_node_list::unique_size
uint8_t unique_size
Definition: tree_schema.h:1472
lys_restr::emsg
const char * emsg
Definition: tree_schema.h:2065
lys_tpdf::has_union_leafref
uint8_t has_union_leafref
Definition: tree_schema.h:2010
lys_type_info_bits::bit
struct lys_type_bit * bit
Definition: tree_schema.h:848
lys_type_info_enums
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Definition: tree_schema.h:887
lys_ident::base_size
uint8_t base_size
Definition: tree_schema.h:2098
lys_type
YANG type structure providing information from the schema.
Definition: tree_schema.h:981
LYEXT_COMPLEX
@ LYEXT_COMPLEX
Definition: tree_schema.h:397
lys_features_disable
int lys_features_disable(const struct lys_module *module, const char *feature)
Disable specified feature in the module.
lys_deviate_type
lys_deviate_type
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1914
lys_module::imp
struct lys_import * imp
Definition: tree_schema.h:715
LY_STMT_BIT
@ LY_STMT_BIT
Definition: tree_schema.h:364
lys_node_augment::target_name
const char * target_name
Definition: tree_schema.h:1832
lys_submodule::belongsto
struct lys_module * belongsto
Definition: tree_schema.h:786
lys_deviate
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1924
LYS_UNKNOWN
@ LYS_UNKNOWN
Definition: tree_schema.h:238
lys_ext_instance::nodetype
LYS_NODE nodetype
Definition: tree_schema.h:497
LY_TYPE_INST
@ LY_TYPE_INST
Definition: tree_schema.h:801
LYS_LIST
@ LYS_LIST
Definition: tree_schema.h:243
lys_node_inout::fill1
void * fill1[2]
Definition: tree_schema.h:1700
lys_type::der
struct lys_tpdf * der
Definition: tree_schema.h:986
LY_STMT_NOTIFICATION
@ LY_STMT_NOTIFICATION
Definition: tree_schema.h:349
lys_module::disabled
uint8_t disabled
Definition: tree_schema.h:692
lys_node_container::padding
uint8_t padding[1]
Definition: tree_schema.h:1272
lys_deviation::deviate
struct lys_deviate * deviate
Definition: tree_schema.h:1960
lys_restr
YANG validity restriction (must, length, etc.) structure providing information from the schema.
Definition: tree_schema.h:2058
lys_ext_instance_complex
Complex extension instance structure.
Definition: tree_schema.h:506
lys_node_choice::dflt
struct lys_node * dflt
Definition: tree_schema.h:1339
LY_STMT_UNKNOWN
@ LY_STMT_UNKNOWN
Definition: tree_schema.h:292
LY_TYPE_UINT64
@ LY_TYPE_UINT64
Definition: tree_schema.h:812
LY_STMT_LENGTH
@ LY_STMT_LENGTH
Definition: tree_schema.h:355
LY_STMT_LIST
@ LY_STMT_LIST
Definition: tree_schema.h:348
LYS_CASE
@ LYS_CASE
Definition: tree_schema.h:245
lys_node_list::unique
struct lys_unique * unique
Definition: tree_schema.h:1498
LY_REV_SIZE
#define LY_REV_SIZE
Definition: tree_schema.h:190
lys_node_leaflist::padding
uint8_t padding[2]
Definition: tree_schema.h:1413
LYS_VERSION_1
@ LYS_VERSION_1
Definition: tree_schema.h:663
lys_module::contact
const char * contact
Definition: tree_schema.h:681
lys_ext::module
struct lys_module * module
Definition: tree_schema.h:461
LY_STMT_VERSION
@ LY_STMT_VERSION
Definition: tree_schema.h:316
lys_module::ext
struct lys_ext_instance ** ext
Definition: tree_schema.h:723
lys_ext_instance::insubstmt_index
uint8_t insubstmt_index
Definition: tree_schema.h:481
lys_module::type
uint8_t type
Definition: tree_schema.h:683
lys_node::padding
uint8_t padding[4]
Definition: tree_schema.h:1225
lys_deviation
YANG deviation statement structure, see RFC 6020 sec. 7.18.3
Definition: tree_schema.h:1951
lys_node_rpc_action
Schema rpc/action node structure.
Definition: tree_schema.h:1783
lys_type_info_ident::ref
struct lys_ident ** ref
Definition: tree_schema.h:896
LY_TYPE_INT8
@ LY_TYPE_INT8
Definition: tree_schema.h:805
lys_ext::argument
const char * argument
Definition: tree_schema.h:460
lys_type::base
LY_DATA_TYPE _PACKED base
Definition: tree_schema.h:982
lys_set_implemented
int lys_set_implemented(const struct lys_module *module)
Mark imported module as "implemented".
ly_get_loaded_plugins
const char *const * ly_get_loaded_plugins(void)
Get list of all the loaded plugins, both extension and user type ones.
LY_STMT_CARD_SOME
@ LY_STMT_CARD_SOME
Definition: tree_schema.h:385
lys_module::imp_size
uint8_t imp_size
Definition: tree_schema.h:701
ly_load_plugins
void ly_load_plugins(void)
Load the available YANG extension and type plugins from the plugin directory (LIBDIR/libyang/).
lys_refine::target_type
uint16_t target_type
Definition: tree_schema.h:1892
lys_ext::ext_size
uint8_t ext_size
Definition: tree_schema.h:457
LYS_VERSION_1_1
@ LYS_VERSION_1_1
Definition: tree_schema.h:664
LYS_CONTAINER
@ LYS_CONTAINER
Definition: tree_schema.h:239
lys_refine::mod
union lys_refine_mod mod
Definition: tree_schema.h:1907
LY_STMT_BELONGSTO
@ LY_STMT_BELONGSTO
Definition: tree_schema.h:298
lys_module
Main schema node structure representing YANG module.
Definition: tree_schema.h:674
LYS_NODE
enum lys_nodetype LYS_NODE
YANG schema node types.
LY_STMT_DIGITS
@ LY_STMT_DIGITS
Definition: tree_schema.h:332
LYEXT_ERR
@ LYEXT_ERR
Definition: tree_schema.h:393
lys_module::name
const char * name
Definition: tree_schema.h:676
LYEXT_FLAG
@ LYEXT_FLAG
Definition: tree_schema.h:394
LY_STMT_DEFAULT
@ LY_STMT_DEFAULT
Definition: tree_schema.h:302
LY_STMT_BASE
@ LY_STMT_BASE
Definition: tree_schema.h:297
lys_type_info::uni
struct lys_type_info_union uni
Definition: tree_schema.h:975
lys_type_bit
Single bit value specification for lys_type_info_bits.
Definition: tree_schema.h:828
lys_module::inc
struct lys_include * inc
Definition: tree_schema.h:716
lys_node_leaflist::dflt
const char ** dflt
Definition: tree_schema.h:1446
lys_include
YANG include structure used to reference submodules.
Definition: tree_schema.h:1980
lys_when
YANG when restriction, see RFC 6020 sec. 7.19.5
Definition: tree_schema.h:2074
lyxp_node_type
lyxp_node_type
Types of context nodes, LYXP_NODE_ROOT_CONFIG used only in when or must conditions.
Definition: tree_schema.h:2301
lys_ext::name
const char * name
Definition: tree_schema.h:453
lyext_substmt::cardinality
LY_STMT_CARD cardinality
Definition: tree_schema.h:446
LY_STMT_KEY
@ LY_STMT_KEY
Definition: tree_schema.h:306
lys_module::version
uint8_t version
Definition: tree_schema.h:684
LY_STMT_FEATURE
@ LY_STMT_FEATURE
Definition: tree_schema.h:371
LY_TYPE_UINT8
@ LY_TYPE_UINT8
Definition: tree_schema.h:806
LY_TYPE_DER
@ LY_TYPE_DER
Definition: tree_schema.h:793
lys_type_info_bits
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Definition: tree_schema.h:847
lys_module::ctx
struct ly_ctx * ctx
Definition: tree_schema.h:675
lyext_substmt
Description of the extension instance substatement.
Definition: tree_schema.h:443
ly_register_types
int ly_register_types(struct lytype_plugin_list *plugin, const char *log_name)
Directly register a YANG type by pointer.
lys_node_module
struct lys_module * lys_node_module(const struct lys_node *node)
Return main module of the schema tree node.
lys_iffeature_value
int lys_iffeature_value(const struct lys_iffeature *iff)
Learn how the if-feature statement currently evaluates.
lys_type_info_binary
Definition: tree_schema.h:820
lys_revision::date
char date[11]
Definition: tree_schema.h:1993
LY_STMT_ORGANIZATION
@ LY_STMT_ORGANIZATION
Definition: tree_schema.h:308
lys_type_info_inst::req
int8_t req
Definition: tree_schema.h:904
LY_STMT_DEVIATE
@ LY_STMT_DEVIATE
Definition: tree_schema.h:368
LY_TYPE_INT64
@ LY_TYPE_INT64
Definition: tree_schema.h:811
lys_deviate::min_set
uint8_t min_set
Definition: tree_schema.h:1931
lys_type_info_binary::length
struct lys_restr * length
Definition: tree_schema.h:821
LY_STMT_REVISIONDATE
@ LY_STMT_REVISIONDATE
Definition: tree_schema.h:313
lys_set_private
void * lys_set_private(const struct lys_node *node, void *priv)
Set a schema private pointer to a user pointer.
lys_features_state
int lys_features_state(const struct lys_module *module, const char *feature)
Get the current status of the specified feature in the module.
lys_ext_complex_get_substmt
void * lys_ext_complex_get_substmt(LY_STMT stmt, struct lys_ext_instance_complex *ext, struct lyext_substmt **info)
get pointer to the place where the specified extension's substatement is supposed to be stored in the...
LY_STMT_MANDATORY
@ LY_STMT_MANDATORY
Definition: tree_schema.h:325
lys_deviate::max_set
uint8_t max_set
Definition: tree_schema.h:1932
lys_unique
YANG list's unique statement structure, see RFC 6020 sec. 7.8.3
Definition: tree_schema.h:2028
LYS_OUT_JSON
@ LYS_OUT_JSON
Definition: tree_schema.h:210
lys_node_case
Schema case node structure.
Definition: tree_schema.h:1653
LY_STMT_STATUS
@ LY_STMT_STATUS
Definition: tree_schema.h:329
lys_node::nodetype
LYS_NODE nodetype
Definition: tree_schema.h:1235
lys_ext_instance::padding
uint8_t padding
Definition: tree_schema.h:493
lys_revision
YANG revision statement for (sub)modules.
Definition: tree_schema.h:1992
LY_STMT_UNITS
@ LY_STMT_UNITS
Definition: tree_schema.h:314
lys_ext::ext
struct lys_ext_instance ** ext
Definition: tree_schema.h:459
lys_module::ident
struct lys_ident * ident
Definition: tree_schema.h:718
lys_type_bit::iffeature
struct lys_iffeature * iffeature
Definition: tree_schema.h:841
LY_STMT_IMPORT
@ LY_STMT_IMPORT
Definition: tree_schema.h:373
LY_STMT_POSITION
@ LY_STMT_POSITION
Definition: tree_schema.h:335
lys_ext_instance::parent_type
uint8_t parent_type
Definition: tree_schema.h:491
LY_STMT_EXTENSION
@ LY_STMT_EXTENSION
Definition: tree_schema.h:370
lys_refine_mod_list
Container for list modifications in lys_refine_mod.
Definition: tree_schema.h:1866
LYXP_NODE_ROOT
@ LYXP_NODE_ROOT
Definition: tree_schema.h:2303
LY_STMT_REFERENCE
@ LY_STMT_REFERENCE
Definition: tree_schema.h:312
lys_ident::der
struct ly_set * der
Definition: tree_schema.h:2105
LY_STMT_REFINE
@ LY_STMT_REFINE
Definition: tree_schema.h:366
LY_STMT_CARD_OPT
@ LY_STMT_CARD_OPT
Definition: tree_schema.h:383
lys_parse_mem
const struct lys_module * lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format)
Load a schema into the specified context.
LYS_ANYDATA
@ LYS_ANYDATA
Definition: tree_schema.h:254
lyext_plugin_list
Definition: extensions.h:212
LYS_LEAF
@ LYS_LEAF
Definition: tree_schema.h:241
LY_STMT_REQINSTANCE
@ LY_STMT_REQINSTANCE
Definition: tree_schema.h:319
lys_refine_mod
Union to hold target modification in lys_refine.
Definition: tree_schema.h:1874
lys_ext_instance_substmt
const void * lys_ext_instance_substmt(const struct lys_ext_instance *ext)
Get address of the substatement structure to which the extension instance refers.
lys_parent
struct lys_node * lys_parent(const struct lys_node *node)
Return parent node in the schema tree.
LY_TYPE_LEAFREF
@ LY_TYPE_LEAFREF
Definition: tree_schema.h:802
lys_node::prev
struct lys_node * prev
Definition: tree_schema.h:1242
LY_STMT_DEVIATION
@ LY_STMT_DEVIATION
Definition: tree_schema.h:369
LYS_OUT_YANG
@ LYS_OUT_YANG
Definition: tree_schema.h:206
lys_node_leaf
Schema leaf node structure.
Definition: tree_schema.h:1353
LYXP_NODE_ATTR
@ LYXP_NODE_ATTR
Definition: tree_schema.h:2309
lys_type_info_bits::count
unsigned int count
Definition: tree_schema.h:849
lys_node_leaf::type
struct lys_type type
Definition: tree_schema.h:1387
LYS_OUT_INFO
@ LYS_OUT_INFO
Definition: tree_schema.h:209
lys_node_grp::unres_count
uint16_t unres_count
Definition: tree_schema.h:1623
lys_module::inc_size
uint8_t inc_size
Definition: tree_schema.h:702
lys_module::ext_size
uint8_t ext_size
Definition: tree_schema.h:711
lys_node_uses
Schema uses node structure.
Definition: tree_schema.h:1567
LY_STMT_CONTAINER
@ LY_STMT_CONTAINER
Definition: tree_schema.h:343
lys_node_leaflist::min
uint32_t min
Definition: tree_schema.h:1447
lys_module::deviation_size
uint8_t deviation_size
Definition: tree_schema.h:709
lys_node_leaf::units
const char * units
Definition: tree_schema.h:1388
LYS_OUT_YIN
@ LYS_OUT_YIN
Definition: tree_schema.h:207
lys_print_fd
int lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file descriptor.
lys_print_mem
int lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a memory block. It is up to caller to free the returne...
lys_node_grp::padding_iffsize
uint8_t padding_iffsize
Definition: tree_schema.h:1620
lys_type_enum
Single enumeration value specification for lys_type_info_enums.
Definition: tree_schema.h:868
lys_node_grp::padding_iff
void * padding_iff
Definition: tree_schema.h:1627
LY_STMT_GROUPING
@ LY_STMT_GROUPING
Definition: tree_schema.h:344
lys_ext::plugin
struct lyext_plugin * plugin
Definition: tree_schema.h:462
ly_ctx
libyang context handler.
lys_deviate::type
struct lys_type * type
Definition: tree_schema.h:1941
lys_node::priv
void * priv
Definition: tree_schema.h:1247
lys_type_bit::iffeature_size
uint8_t iffeature_size
Definition: tree_schema.h:835
lys_node_augment::target
struct lys_node * target
Definition: tree_schema.h:1857
lys_include::submodule
struct lys_submodule * submodule
Definition: tree_schema.h:1981
lys_deviation::deviate_size
uint8_t deviate_size
Definition: tree_schema.h:1958
LYS_EXT
@ LYS_EXT
Definition: tree_schema.h:255
LYS_VERSION
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:661
lys_module::extensions_size
uint8_t extensions_size
Definition: tree_schema.h:710
LY_TYPE_UINT16
@ LY_TYPE_UINT16
Definition: tree_schema.h:808
lys_type_info::enums
struct lys_type_info_enums enums
Definition: tree_schema.h:969
lys_type::parent
struct lys_tpdf * parent
Definition: tree_schema.h:988
lys_ext::dsc
const char * dsc
Definition: tree_schema.h:454
LY_STMT_ANYXML
@ LY_STMT_ANYXML
Definition: tree_schema.h:340
LY_TYPE_BITS
@ LY_TYPE_BITS
Definition: tree_schema.h:795
lys_type_info::lref
struct lys_type_info_lref lref
Definition: tree_schema.h:973
LY_STMT_YINELEM
@ LY_STMT_YINELEM
Definition: tree_schema.h:321
lys_type_info::dec64
struct lys_type_info_dec64 dec64
Definition: tree_schema.h:968
lys_node_augment
YANG augment structure (covering both possibilities - uses's substatement as well as (sub)module's su...
Definition: tree_schema.h:1831
lys_ident::base
struct lys_ident ** base
Definition: tree_schema.h:2104
lys_module::deviation
struct lys_deviation * deviation
Definition: tree_schema.h:721
lys_module::ns
const char * ns
Definition: tree_schema.h:727
lys_module::features_size
uint8_t features_size
Definition: tree_schema.h:707
lys_module::extensions
struct lys_ext * extensions
Definition: tree_schema.h:722
LY_STMT_ERRTAG
@ LY_STMT_ERRTAG
Definition: tree_schema.h:304
ly_set
Structure to hold a set of (not necessary somehow connected) lyd_node or lys_node objects....
Definition: libyang.h:1708
LY_DEVIATE_DEL
@ LY_DEVIATE_DEL
Definition: tree_schema.h:1918
LY_STMT_ARGUMENT
@ LY_STMT_ARGUMENT
Definition: tree_schema.h:293
lys_ext_instance_complex::content
char content[1]
Definition: tree_schema.h:533
lys_node_container
Schema container node structure.
Definition: tree_schema.h:1263
LY_STMT_MAX
@ LY_STMT_MAX
Definition: tree_schema.h:333
lys_node_grp
Schema grouping node structure.
Definition: tree_schema.h:1614
lys_type_info_dec64::dig
uint8_t dig
Definition: tree_schema.h:858
lys_type_info_dec64::range
struct lys_restr * range
Definition: tree_schema.h:856
lys_node_container::must
struct lys_restr * must
Definition: tree_schema.h:1297
lys_ext_instance::priv
void * priv
Definition: tree_schema.h:495
lys_type_info_enums::enm
struct lys_type_enum * enm
Definition: tree_schema.h:888
lys_node::module
struct lys_module * module
Definition: tree_schema.h:1233
lys_node::next
struct lys_node * next
Definition: tree_schema.h:1241
lys_node_list::keys_size
uint8_t keys_size
Definition: tree_schema.h:1471
lys_type_bit::flags
uint16_t flags
Definition: tree_schema.h:832
LY_STMT_CHOICE
@ LY_STMT_CHOICE
Definition: tree_schema.h:342
lys_type_enum::value
int32_t value
Definition: tree_schema.h:878
LY_DEVIATE_ADD
@ LY_DEVIATE_ADD
Definition: tree_schema.h:1916
lys_module::rev
struct lys_revision * rev
Definition: tree_schema.h:713
LY_STMT_NODE
@ LY_STMT_NODE
Definition: tree_schema.h:291
lys_type_info_union::has_ptr_type
int has_ptr_type
Definition: tree_schema.h:958
LYS_IN_UNKNOWN
@ LYS_IN_UNKNOWN
Definition: tree_schema.h:196
lys_set_disabled
int lys_set_disabled(const struct lys_module *module)
Disable module in its context to avoid its further usage (it will be hidden for module getters).
lys_deviate::flags
uint8_t flags
Definition: tree_schema.h:1927
lys_type_info::inst
struct lys_type_info_inst inst
Definition: tree_schema.h:971
LY_TYPE_UNION
@ LY_TYPE_UNION
Definition: tree_schema.h:804
LY_STMT_INPUT
@ LY_STMT_INPUT
Definition: tree_schema.h:345
lys_module::tpdf_size
uint16_t tpdf_size
Definition: tree_schema.h:705
lys_find_path
struct ly_set * lys_find_path(const struct lys_module *cur_module, const struct lys_node *cur_node, const char *path)
Search for schema nodes matching the provided path.
LY_STMT_ANYDATA
@ LY_STMT_ANYDATA
Definition: tree_schema.h:339
lys_module::augment
struct lys_node_augment * augment
Definition: tree_schema.h:720
LY_STMT_CONFIG
@ LY_STMT_CONFIG
Definition: tree_schema.h:322
LY_STMT
LY_STMT
List of YANG statements.
Definition: tree_schema.h:290
LYS_GROUPING
@ LYS_GROUPING
Definition: tree_schema.h:250
LY_STMT_SUBMODULE
@ LY_STMT_SUBMODULE
Definition: tree_schema.h:361
lys_module::prefix
const char * prefix
Definition: tree_schema.h:677
lys_feature
YANG feature definition structure.
Definition: tree_schema.h:2037
LY_STMT_IFFEATURE
@ LY_STMT_IFFEATURE
Definition: tree_schema.h:354
LYS_USES
@ LYS_USES
Definition: tree_schema.h:251
lytype_plugin_list
Definition: user_types.h:62
lys_print_path
int lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file.
lys_node::parent
struct lys_node * parent
Definition: tree_schema.h:1236
lys_module::augment_size
uint8_t augment_size
Definition: tree_schema.h:708
lys_tpdf
YANG typedef structure providing information from the schema.
Definition: tree_schema.h:2003
lys_type_info_ident
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Definition: tree_schema.h:895
lys_ext_instance::parent
void * parent
Definition: tree_schema.h:476
lys_iffeature::features
struct lys_feature ** features
Definition: tree_schema.h:1081
lys_set_enabled
int lys_set_enabled(const struct lys_module *module)
Enable previously disabled module.
lys_node_leaf::dflt
const char * dflt
Definition: tree_schema.h:1391
LY_DEVIATE_NO
@ LY_DEVIATE_NO
Definition: tree_schema.h:1915
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition: tree_schema.h:792
lys_module::tpdf
struct lys_tpdf * tpdf
Definition: tree_schema.h:717
lys_type_info_str::pat_count
unsigned int pat_count
Definition: tree_schema.h:944
lys_node_container::when
struct lys_when * when
Definition: tree_schema.h:1296
lys_node_container::must_size
uint8_t must_size
Definition: tree_schema.h:1273
lys_iffeature::expr
uint8_t * expr
Definition: tree_schema.h:1079
lys_module::padding2
uint8_t padding2[2]
Definition: tree_schema.h:697
lys_ident
Structure to hold information about identity, see RFC 6020 sec. 7.16
Definition: tree_schema.h:2088
LYS_INPUT
@ LYS_INPUT
Definition: tree_schema.h:248
LY_STMT_PRESENCE
@ LY_STMT_PRESENCE
Definition: tree_schema.h:311
lys_node_choice
Schema choice node structure.
Definition: tree_schema.h:1311
LY_STMT_CASE
@ LY_STMT_CASE
Definition: tree_schema.h:341
lys_ext::padding
uint8_t padding[5]
Definition: tree_schema.h:458
lys_type::value_flags
uint8_t value_flags
Definition: tree_schema.h:983
LY_TYPE_ENUM
@ LY_TYPE_ENUM
Definition: tree_schema.h:799
lys_submodule
Submodule schema node structure that can be included into a YANG module.
Definition: tree_schema.h:737
LY_STMT_PATTERN
@ LY_STMT_PATTERN
Definition: tree_schema.h:357
lys_module::ref
const char * ref
Definition: tree_schema.h:679
LYS_DEVIATE_TYPE
enum lys_deviate_type LYS_DEVIATE_TYPE
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2
LYS_AUGMENT
@ LYS_AUGMENT
Definition: tree_schema.h:252
lys_is_key
const struct lys_node_list * lys_is_key(const struct lys_node_leaf *node, uint8_t *index)
Check if the schema leaf node is used as a key for a list.
lys_module::dsc
const char * dsc
Definition: tree_schema.h:678
lys_node_uses::refine_size
uint8_t refine_size
Definition: tree_schema.h:1578
lys_node
Common structure representing single YANG data statement describing.
Definition: tree_schema.h:1217
lys_type_info_lref
Container for information about leafref types (LY_TYPE_LEAFREF), used in lys_type_info.
Definition: tree_schema.h:922
lys_node_leaflist::backlinks
struct ly_set * backlinks
Definition: tree_schema.h:1423
lys_import
YANG import structure used to reference other schemas (modules).
Definition: tree_schema.h:1967
LYS_OUT_UNKNOWN
@ LYS_OUT_UNKNOWN
Definition: tree_schema.h:205
LY_TYPE_IDENT
@ LY_TYPE_IDENT
Definition: tree_schema.h:800
LY_STMT_ACTION
@ LY_STMT_ACTION
Definition: tree_schema.h:338
lys_parse_path
const struct lys_module * lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format)
Load a schema into the specified context from a file.
lys_unique::expr_size
uint8_t expr_size
Definition: tree_schema.h:2030
lys_type_info_str::patterns
struct lys_restr * patterns
Definition: tree_schema.h:938
lys_unique::expr
const char ** expr
Definition: tree_schema.h:2029
lys_ext_instance::arg_value
const char * arg_value
Definition: tree_schema.h:478
lys_refine_mod::list
struct lys_refine_mod_list list
Definition: tree_schema.h:1876
LY_STMT_REVISION
@ LY_STMT_REVISION
Definition: tree_schema.h:360
lys_ext_instance::insubstmt
uint8_t insubstmt
Definition: tree_schema.h:488
lys_type_info_dec64
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Definition: tree_schema.h:855
lyext_substmt::stmt
LY_STMT stmt
Definition: tree_schema.h:444
lys_parse_fd
const struct lys_module * lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format)
Read a schema from file descriptor into the specified context.
lys_ext
YANG extension definition.
Definition: tree_schema.h:452
lys_print_clb
int lys_print_clb(ssize_t(*writeclb)(void *arg, const void *buf, size_t count), void *arg, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format using a provided callback.
lys_refine
YANG uses's refine substatement structure, see RFC 6020 sec. 7.12.2
Definition: tree_schema.h:1883
lys_node_list::tpdf_size
uint8_t tpdf_size
Definition: tree_schema.h:1470
lys_print_file
int lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file stream.
LY_STMT_MODULE
@ LY_STMT_MODULE
Definition: tree_schema.h:337
lys_type_info_lref::path
const char * path
Definition: tree_schema.h:923
lys_node_anydata
Schema anydata (and anyxml) node structure.
Definition: tree_schema.h:1519
lys_restr::eapptag
const char * eapptag
Definition: tree_schema.h:2064
lys_type_info_dec64::div
uint64_t div
Definition: tree_schema.h:862
LY_STMT_MIN
@ LY_STMT_MIN
Definition: tree_schema.h:334
LY_STMT_ORDEREDBY
@ LY_STMT_ORDEREDBY
Definition: tree_schema.h:327
LY_TYPE_INT16
@ LY_TYPE_INT16
Definition: tree_schema.h:807
LY_TYPE_DEC64
@ LY_TYPE_DEC64
Definition: tree_schema.h:797
lys_module::latest_revision
uint8_t latest_revision
Definition: tree_schema.h:694
lys_is_disabled
const struct lys_node * lys_is_disabled(const struct lys_node *node, int recursive)
Check if the schema node is disabled in the schema tree, i.e. there is any disabled if-feature statem...
lys_type_info_num
Container for information about integer types, used in lys_type_info.
Definition: tree_schema.h:914
lys_type_info_union::types
struct lys_type * types
Definition: tree_schema.h:956
lys_ext::ref
const char * ref
Definition: tree_schema.h:455
lys_module::filepath
const char * filepath
Definition: tree_schema.h:682
lys_node_uses::grp
struct lys_node_grp * grp
Definition: tree_schema.h:1600
LY_STMT_LEAFLIST
@ LY_STMT_LEAFLIST
Definition: tree_schema.h:347
LY_STMT_OUTPUT
@ LY_STMT_OUTPUT
Definition: tree_schema.h:350
lys_type_info::num
struct lys_type_info_num num
Definition: tree_schema.h:972
lys_type_info_union
Container for information about union types (LY_TYPE_UNION), used in lys_type_info.
Definition: tree_schema.h:955
lys_module::data
struct lys_node * data
Definition: tree_schema.h:726
LY_TYPE_UINT32
@ LY_TYPE_UINT32
Definition: tree_schema.h:810
LY_TYPE_UNKNOWN
@ LY_TYPE_UNKNOWN
Definition: tree_schema.h:813
lys_type_info::str
struct lys_type_info_str str
Definition: tree_schema.h:974
lys_module::org
const char * org
Definition: tree_schema.h:680
lys_unique::trg_type
uint8_t trg_type
Definition: tree_schema.h:2031
lys_deviation::orig_node
struct lys_node * orig_node
Definition: tree_schema.h:1956
lys_type_info::ident
struct lys_type_info_ident ident
Definition: tree_schema.h:970
ly_clean_plugins
int ly_clean_plugins(void)
Unload all the YANG extension and type plugins.
LY_TYPE_INT32
@ LY_TYPE_INT32
Definition: tree_schema.h:809
LYS_VERSION_UNDEF
@ LYS_VERSION_UNDEF
Definition: tree_schema.h:662
LY_STMT_UNIQUE
@ LY_STMT_UNIQUE
Definition: tree_schema.h:336
lys_implemented_module
struct lys_module * lys_implemented_module(const struct lys_module *mod)
Find the implemented revision of the given module in the context.
lys_ext::flags
uint16_t flags
Definition: tree_schema.h:456
lys_module::deviated
uint8_t deviated
Definition: tree_schema.h:688
lys_iffeature
Compiled if-feature expression structure.
Definition: tree_schema.h:1078
LY_TYPE_STRING
@ LY_TYPE_STRING
Definition: tree_schema.h:803
lys_search_localfile
int lys_search_localfile(const char *const *searchpaths, int cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format)
Search for the schema file in the specified searchpaths.
LYXP_NODE_ROOT_CONFIG
@ LYXP_NODE_ROOT_CONFIG
Definition: tree_schema.h:2304
lys_node_leaflist::dflt_size
uint8_t dflt_size
Definition: tree_schema.h:1414
lys_ext_instance::ext_type
uint8_t ext_type
Definition: tree_schema.h:492
LYXP_NODE_NONE
@ LYXP_NODE_NONE
Definition: tree_schema.h:2311
ly_register_exts
int ly_register_exts(struct lyext_plugin_list *plugin, const char *log_name)
Directly register a YANG extension by pointer.
LY_STMT_CARD
LY_STMT_CARD
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:382
LYS_OUTPUT
@ LYS_OUTPUT
Definition: tree_schema.h:249
lys_ext_instance_complex::substmt
struct lyext_substmt * substmt
Definition: tree_schema.h:532
lys_node_leaflist
Schema leaf-list node structure.
Definition: tree_schema.h:1404
lys_type_info_lref::target
struct lys_node_leaf * target
Definition: tree_schema.h:925
LY_STMT_IDENTITY
@ LY_STMT_IDENTITY
Definition: tree_schema.h:372
lys_module::implemented
uint8_t implemented
Definition: tree_schema.h:693
LY_DEVIATE_RPL
@ LY_DEVIATE_RPL
Definition: tree_schema.h:1917
lys_ext_instance_presence
int lys_ext_instance_presence(struct lys_ext *def, struct lys_ext_instance **ext, uint8_t ext_size)
Get the position of the extension instance in the extensions list.
LY_STMT_WHEN
@ LY_STMT_WHEN
Definition: tree_schema.h:359
lyext_substmt::offset
size_t offset
Definition: tree_schema.h:445
LY_STMT_LEAF
@ LY_STMT_LEAF
Definition: tree_schema.h:346
LY_TYPE_EMPTY
@ LY_TYPE_EMPTY
Definition: tree_schema.h:798
lys_ext_instance
Generic extension instance structure.
Definition: tree_schema.h:472
lys_type_info_str
Container for information about string types (LY_TYPE_STRING), used in lys_type_info.
Definition: tree_schema.h:935
LY_STMT_RPC
@ LY_STMT_RPC
Definition: tree_schema.h:363
LYS_NOTIF
@ LYS_NOTIF
Definition: tree_schema.h:246
LY_STMT_ENUM
@ LY_STMT_ENUM
Definition: tree_schema.h:365
lys_node_list::keys
struct lys_node_leaf ** keys
Definition: tree_schema.h:1497
LY_STMT_RANGE
@ LY_STMT_RANGE
Definition: tree_schema.h:358
lys_xpath_atomize
struct ly_set * lys_xpath_atomize(const struct lys_node *ctx_node, enum lyxp_node_type ctx_node_type, const char *expr, int options)
Get all the partial XPath nodes (atoms) that are required for expr to be evaluated.
lys_type_info
Union for holding type-specific information in lys_type.
Definition: tree_schema.h:965
lys_features_list
const char ** lys_features_list(const struct lys_module *module, uint8_t **states)
Get list of all the defined features in the module and its submodules.
lys_node_leaf::child
void * child
Definition: tree_schema.h:1371
lys_type_info::binary
struct lys_type_info_binary binary
Definition: tree_schema.h:966
LY_STMT_AUGMENT
@ LY_STMT_AUGMENT
Definition: tree_schema.h:367
LY_STMT_TYPE
@ LY_STMT_TYPE
Definition: tree_schema.h:353
LY_STMT_CONTACT
@ LY_STMT_CONTACT
Definition: tree_schema.h:301
LYS_LEAFLIST
@ LYS_LEAFLIST
Definition: tree_schema.h:242
lys_feature::depfeatures
struct ly_set * depfeatures
Definition: tree_schema.h:2052
lys_node_list::keys_str
const char * keys_str
Definition: tree_schema.h:1503
lys_type_info_inst
Container for information about instance-identifier types (LY_TYPE_INST), used in lys_type_info.
Definition: tree_schema.h:903
LYS_OUT_TREE
@ LYS_OUT_TREE
Definition: tree_schema.h:208
lys_node_notif
Schema notification node structure.
Definition: tree_schema.h:1736
lys_node_uses::refine
struct lys_refine * refine
Definition: tree_schema.h:1598
lys_node_leaflist::max
uint32_t max
Definition: tree_schema.h:1448
LY_STMT_NAMESPACE
@ LY_STMT_NAMESPACE
Definition: tree_schema.h:307
lys_main_module
struct lys_module * lys_main_module(const struct lys_module *module)
Return main module of the module.
lyext_plugin
Definition: extensions.h:178
lys_when::cond
const char * cond
Definition: tree_schema.h:2075
LYEXT_TYPE
LYEXT_TYPE
Extension types.
Definition: tree_schema.h:392
lys_features_enable
int lys_features_enable(const struct lys_module *module, const char *feature)
Enable specified feature in the module.
LYS_IN_YIN
@ LYS_IN_YIN
Definition: tree_schema.h:198
LY_TYPE_BOOL
@ LY_TYPE_BOOL
Definition: tree_schema.h:796
lys_type_bit::pos
uint32_t pos
Definition: tree_schema.h:838
lys_import::rev
char rev[11]
Definition: tree_schema.h:1970
lys_type::info
union lys_type_info info
Definition: tree_schema.h:990
lys_module::features
struct lys_feature * features
Definition: tree_schema.h:719
lys_module::ident_size
uint16_t ident_size
Definition: tree_schema.h:704
lys_node_container::presence
const char * presence
Definition: tree_schema.h:1299
lys_deviate::mod
LYS_DEVIATE_TYPE mod
Definition: tree_schema.h:1925
LYXP_NODE_TEXT
@ LYXP_NODE_TEXT
Definition: tree_schema.h:2308
LYS_RPC
@ LYS_RPC
Definition: tree_schema.h:247
LY_STMT_PATH
@ LY_STMT_PATH
Definition: tree_schema.h:309
lys_getnext
const struct lys_node * lys_getnext(const struct lys_node *last, const struct lys_node *parent, const struct lys_module *module, int options)
Get next schema tree (sibling) node element that can be instantiated in a data tree....
lys_ext_instance::def
struct lys_ext * def
Definition: tree_schema.h:473
LY_STMT_INCLUDE
@ LY_STMT_INCLUDE
Definition: tree_schema.h:374
lys_node_inout
RPC input and output node structure.
Definition: tree_schema.h:1698
lys_node_list
Schema list node structure.
Definition: tree_schema.h:1460
LYS_ANYXML
@ LYS_ANYXML
Definition: tree_schema.h:244
LY_STMT_CARD_MAND
@ LY_STMT_CARD_MAND
Definition: tree_schema.h:384
lys_submodule::padding
uint8_t padding[3]
Definition: tree_schema.h:757
LY_STMT_MUST
@ LY_STMT_MUST
Definition: tree_schema.h:356
LYS_ACTION
@ LYS_ACTION
Definition: tree_schema.h:253
LYS_IN_YANG
@ LYS_IN_YANG
Definition: tree_schema.h:197
lys_restr::expr
const char * expr
Definition: tree_schema.h:2059
LY_STMT_TYPEDEF
@ LY_STMT_TYPEDEF
Definition: tree_schema.h:352