libyang  2.0.7
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
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 #define PCRE2_CODE_UNIT_WIDTH 8
19 
20 #include <pcre2.h>
21 
22 #include <stdint.h>
23 #include <stdio.h>
24 
25 #include "log.h"
26 #include "tree.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 struct ly_ctx;
33 struct ly_path;
34 struct ly_set;
35 struct lys_module;
36 struct lysc_node;
37 struct lyxp_expr;
38 
151 /* *INDENT-OFF* */
152 
181 #define LYSC_TREE_DFS_BEGIN(START, ELEM) \
182  { ly_bool LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
183  for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node *)(START); \
184  (ELEM); \
185  (ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
186 
200 #define LYSC_TREE_DFS_END(START, ELEM) \
201  /* select element for the next run - children first */ \
202  if (LYSC_TREE_DFS_continue) { \
203  (LYSC_TREE_DFS_next) = NULL; \
204  } else { \
205  (LYSC_TREE_DFS_next) = (struct lysc_node *)lysc_node_child(ELEM); \
206  } \
207  if (!(LYSC_TREE_DFS_next)) { \
208  /* no children, try siblings */ \
209  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
210  } \
211  while (!(LYSC_TREE_DFS_next)) { \
212  /* parent is already processed, go to its sibling */ \
213  (ELEM) = (ELEM)->parent; \
214  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
215  } }
216 
220 #define _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) \
221  if ((ELEM) == (struct lysc_node *)(START)) { \
222  /* we are done, no next element to process */ \
223  break; \
224  } \
225  (NEXT) = (ELEM)->next;
226 
227 /* *INDENT-ON* */
228 
229 #define LY_REV_SIZE 11
236 #define LYS_UNKNOWN 0x0000
237 #define LYS_CONTAINER 0x0001
238 #define LYS_CHOICE 0x0002
239 #define LYS_LEAF 0x0004
240 #define LYS_LEAFLIST 0x0008
241 #define LYS_LIST 0x0010
242 #define LYS_ANYXML 0x0020
243 #define LYS_ANYDATA 0x0060
244 #define LYS_CASE 0x0080
246 #define LYS_RPC 0x0100
247 #define LYS_ACTION 0x0200
248 #define LYS_NOTIF 0x0400
250 #define LYS_USES 0x0800
251 #define LYS_INPUT 0x1000
252 #define LYS_OUTPUT 0x2000
253 #define LYS_GROUPING 0x4000
254 #define LYS_AUGMENT 0x8000
255 
256 #define LYS_NODETYPE_MASK 0xffff
267 #define LY_STMT_IS_OP(STMT) (((STMT) == LY_STMT_ACTION) || ((STMT) == LY_STMT_RPC))
268 
278 #define LY_STMT_IS_DATA_NODE(STMT) (((STMT) >= LY_STMT_ANYDATA) && ((STMT) <= LY_STMT_LIST))
279 
290 #define LY_STMT_IS_NODE(STMT) (((STMT) >= LY_STMT_NOTIFICATION) && ((STMT) <= LY_STMT_LIST))
291 
295 enum ly_stmt {
297 
303 
304 /* LY_STMT_IS_OP */
308  LY_STMT_RPC,
312 /* LY_STMT_IS_DATA_NODE */
336  LY_STMT_LEAF,
346  LY_STMT_LIST,
352 
353 /* rest */
403  LY_STMT_TYPE,
407  LY_STMT_UNITS,
413 
414  /* separated from the list of statements
415  * the following tokens are part of the syntax and parsers have to work
416  * with them, but they are not a standard YANG statements
417  */
421 
422  /*
423  * YIN-specific tokens, still they are part of the syntax, but not the standard statements
424  */
427 };
428 
434 const char *ly_stmt2str(enum ly_stmt stmt);
435 
441 enum ly_stmt lys_nodetype2stmt(uint16_t nodetype);
442 
449  LY_STMT_CARD_OPT, /* 0..1 */
451  LY_STMT_CARD_SOME, /* 1..n */
452  LY_STMT_CARD_ANY /* 0..n */
453 };
454 
458 struct lysp_import {
459  struct lys_module *module;
461  const char *name;
462  const char *prefix;
463  const char *dsc;
464  const char *ref;
466  uint16_t flags;
467  char rev[LY_REV_SIZE];
468 };
469 
473 struct lysp_include {
476  const char *name;
477  const char *dsc;
478  const char *ref;
480  char rev[LY_REV_SIZE];
484 };
485 
489 struct lysp_ext {
490  const char *name;
491  const char *argname;
492  const char *dsc;
493  const char *ref;
495  uint16_t flags;
497  struct lysc_ext *compiled;
501 };
502 
506 struct lysp_stmt {
507  const char *stmt;
508  const char *arg;
510  void *prefix_data;
512  struct lysp_stmt *next;
513  struct lysp_stmt *child;
514  uint16_t flags;
515  enum ly_stmt kw;
516 };
517 
518 #define LYS_YIN 0x1
524  const char *name;
525  const char *argument;
527  struct lysp_node *parsed;
529  void *prefix_data;
532  struct lysp_stmt *child;
534  void *parent;
536  enum ly_stmt parent_stmt;
539  uint16_t flags;
540 };
541 
545 struct lysp_feature {
546  const char *name;
551  const char *dsc;
552  const char *ref;
554  uint16_t flags;
556 };
557 
562  uint8_t *expr;
564 };
565 
569 struct lysp_qname {
570  const char *str;
571  const struct lysp_module *mod;
573 };
574 
578 struct lysp_ident {
579  const char *name;
581  const char **bases;
582  const char *dsc;
583  const char *ref;
585  uint16_t flags;
586 };
587 
591 struct lysp_restr {
592 #define LYSP_RESTR_PATTERN_ACK 0x06
593 #define LYSP_RESTR_PATTERN_NACK 0x15
594  struct lysp_qname arg;
597  const char *emsg;
598  const char *eapptag;
599  const char *dsc;
600  const char *ref;
602 };
603 
609  const char *dsc;
610  const char *ref;
612 };
613 
618  const char *name;
619  const char *dsc;
620  const char *ref;
621  int64_t value;
624  uint16_t flags;
626 };
627 
633 struct lysp_type {
634  const char *name;
635  struct lysp_restr *range;
636  struct lysp_restr *length;
640  struct lyxp_expr *path;
641  const char **bases;
642  struct lysp_type *types;
645  const struct lysp_module *pmod;
646  struct lysc_type *compiled;
648  uint8_t fraction_digits;
650  uint16_t flags;
651 };
652 
656 struct lysp_tpdf {
657  const char *name;
658  const char *units;
659  struct lysp_qname dflt;
660  const char *dsc;
661  const char *ref;
663  struct lysp_type type;
664  uint16_t flags;
665 };
666 
670 struct lysp_when {
671  const char *cond;
672  const char *dsc;
673  const char *ref;
675 };
676 
680 struct lysp_refine {
681  const char *nodeid;
682  const char *dsc;
683  const char *ref;
685  struct lysp_restr *musts;
686  const char *presence;
687  struct lysp_qname *dflts;
688  uint32_t min;
689  uint32_t max;
691  uint16_t flags;
692 };
693 
702 #define LYS_DEV_NOT_SUPPORTED 1
703 #define LYS_DEV_ADD 2
704 #define LYS_DEV_DELETE 3
705 #define LYS_DEV_REPLACE 4
711 struct lysp_deviate {
712  uint8_t mod;
713  struct lysp_deviate *next;
715 };
716 
718  uint8_t mod;
719  struct lysp_deviate *next;
721  const char *units;
722  struct lysp_restr *musts;
723  struct lysp_qname *uniques;
724  struct lysp_qname *dflts;
725  uint16_t flags;
726  uint32_t min;
727  uint32_t max;
728 };
729 
731  uint8_t mod;
732  struct lysp_deviate *next;
734  const char *units;
735  struct lysp_restr *musts;
736  struct lysp_qname *uniques;
737  struct lysp_qname *dflts;
738 };
739 
741  uint8_t mod;
742  struct lysp_deviate *next;
744  struct lysp_type *type;
745  const char *units;
746  struct lysp_qname dflt;
747  uint16_t flags;
748  uint32_t min;
749  uint32_t max;
750 };
751 
753  const char *nodeid;
754  const char *dsc;
755  const char *ref;
758 };
759 
882 #define LYS_CONFIG_W 0x01
883 #define LYS_CONFIG_R 0x02
884 #define LYS_CONFIG_MASK 0x03
885 #define LYS_STATUS_CURR 0x04
886 #define LYS_STATUS_DEPRC 0x08
887 #define LYS_STATUS_OBSLT 0x10
888 #define LYS_STATUS_MASK 0x1C
889 #define LYS_MAND_TRUE 0x20
894 #define LYS_MAND_FALSE 0x40
897 #define LYS_MAND_MASK 0x60
898 #define LYS_PRESENCE 0x80
901 #define LYS_UNIQUE 0x80
902 #define LYS_KEY 0x0100
903 #define LYS_KEYLESS 0x0200
904 #define LYS_FENABLED 0x20
905 #define LYS_ORDBY_SYSTEM 0x80
907 #define LYS_ORDBY_USER 0x40
910 #define LYS_ORDBY_MASK 0x60
911 #define LYS_YINELEM_TRUE 0x80
912 #define LYS_YINELEM_FALSE 0x0100
913 #define LYS_YINELEM_MASK 0x0180
914 #define LYS_USED_GRP 0x0400
916 #define LYS_SET_VALUE 0x0200
917 #define LYS_SET_MIN 0x0200
918 #define LYS_SET_MAX 0x0400
920 #define LYS_SET_BASE 0x0001
921 #define LYS_SET_BIT 0x0002
922 #define LYS_SET_ENUM 0x0004
923 #define LYS_SET_FRDIGITS 0x0008
924 #define LYS_SET_LENGTH 0x0010
925 #define LYS_SET_PATH 0x0020
926 #define LYS_SET_PATTERN 0x0040
927 #define LYS_SET_RANGE 0x0080
928 #define LYS_SET_TYPE 0x0100
929 #define LYS_SET_REQINST 0x0200
930 #define LYS_SET_DFLT 0x0200
935 #define LYS_SET_UNITS 0x0400
936 #define LYS_SET_CONFIG 0x0800
938 #define LYS_SINGLEQUOTED 0x0100
939 #define LYS_DOUBLEQUOTED 0x0200
941 #define LYS_YIN_ATTR 0x0400
942 #define LYS_YIN_ARGUMENT 0x0800
944 #define LYS_INTERNAL 0x1000
946 #define LYS_IS_ENUM 0x0200
948 #define LYS_IS_INPUT 0x1000
950 #define LYS_IS_OUTPUT 0x2000
952 #define LYS_IS_NOTIF 0x4000
954 #define LYS_FLAGS_COMPILED_MASK 0xff
960 struct lysp_node {
961  struct lysp_node *parent;
962  uint16_t nodetype;
963  uint16_t flags;
964  struct lysp_node *next;
965  const char *name;
966  const char *dsc;
967  const char *ref;
971 };
972 
977  union {
978  struct lysp_node node;
979  struct {
980  struct lysp_node *parent;
981  uint16_t nodetype;
982  uint16_t flags;
983  struct lysp_node *next;
984  const char *name;
985  const char *dsc;
986  const char *ref;
987  struct lysp_qname *iffeatures;
988  struct lysp_ext_instance *exts;
989  };
990  };
992  /* container */
993  struct lysp_restr *musts;
994  struct lysp_when *when;
995  const char *presence;
996  struct lysp_tpdf *typedefs;
998  struct lysp_node *child;
1001 };
1002 
1004  union {
1005  struct lysp_node node;
1006  struct {
1007  struct lysp_node *parent;
1008  uint16_t nodetype;
1009  uint16_t flags;
1010  struct lysp_node *next;
1011  const char *name;
1012  const char *dsc;
1013  const char *ref;
1014  struct lysp_qname *iffeatures;
1015  struct lysp_ext_instance *exts;
1016  };
1017  };
1019  /* leaf */
1020  struct lysp_restr *musts;
1021  struct lysp_when *when;
1022  struct lysp_type type;
1023  const char *units;
1024  struct lysp_qname dflt;
1025 };
1026 
1028  union {
1029  struct lysp_node node;
1030  struct {
1031  struct lysp_node *parent;
1032  uint16_t nodetype;
1033  uint16_t flags;
1034  struct lysp_node *next;
1035  const char *name;
1036  const char *dsc;
1037  const char *ref;
1038  struct lysp_qname *iffeatures;
1039  struct lysp_ext_instance *exts;
1040  };
1041  };
1043  /* leaf-list */
1044  struct lysp_restr *musts;
1045  struct lysp_when *when;
1046  struct lysp_type type;
1047  const char *units;
1048  struct lysp_qname *dflts;
1050  uint32_t min;
1051  uint32_t max;
1052 };
1053 
1055  union {
1056  struct lysp_node node;
1057  struct {
1058  struct lysp_node *parent;
1059  uint16_t nodetype;
1060  uint16_t flags;
1061  struct lysp_node *next;
1062  const char *name;
1063  const char *dsc;
1064  const char *ref;
1065  struct lysp_qname *iffeatures;
1066  struct lysp_ext_instance *exts;
1067  };
1068  };
1070  /* list */
1071  struct lysp_restr *musts;
1072  struct lysp_when *when;
1073  const char *key;
1076  struct lysp_node *child;
1080  uint32_t min;
1081  uint32_t max;
1082 };
1083 
1085  union {
1086  struct lysp_node node;
1087  struct {
1088  struct lysp_node *parent;
1089  uint16_t nodetype;
1090  uint16_t flags;
1091  struct lysp_node *next;
1092  const char *name;
1093  const char *dsc;
1094  const char *ref;
1095  struct lysp_qname *iffeatures;
1096  struct lysp_ext_instance *exts;
1097  };
1098  };
1100  /* choice */
1101  struct lysp_node *child;
1102  struct lysp_when *when;
1103  struct lysp_qname dflt;
1104 };
1105 
1107  union {
1108  struct lysp_node node;
1109  struct {
1110  struct lysp_node *parent;
1111  uint16_t nodetype;
1112  uint16_t flags;
1113  struct lysp_node *next;
1114  const char *name;
1115  const char *dsc;
1116  const char *ref;
1117  struct lysp_qname *iffeatures;
1118  struct lysp_ext_instance *exts;
1119  };
1120  };
1122  /* case */
1123  struct lysp_node *child;
1124  struct lysp_when *when;
1125 };
1126 
1128  union {
1129  struct lysp_node node;
1130  struct {
1131  struct lysp_node *parent;
1132  uint16_t nodetype;
1133  uint16_t flags;
1134  struct lysp_node *next;
1135  const char *name;
1136  const char *dsc;
1137  const char *ref;
1138  struct lysp_qname *iffeatures;
1139  struct lysp_ext_instance *exts;
1140  };
1141  };
1143  /* anyxml/anydata */
1144  struct lysp_restr *musts;
1145  struct lysp_when *when;
1146 };
1147 
1149  union {
1150  struct lysp_node node;
1151  struct {
1152  struct lysp_node *parent;
1153  uint16_t nodetype;
1154  uint16_t flags;
1155  struct lysp_node *next;
1156  const char *name;
1157  const char *dsc;
1158  const char *ref;
1159  struct lysp_qname *iffeatures;
1160  struct lysp_ext_instance *exts;
1161  };
1162  };
1164  /* uses */
1167  struct lysp_when *when;
1168 };
1169 
1174  union {
1175  struct lysp_node node;
1176  struct {
1177  struct lysp_node *parent;
1178  uint16_t nodetype;
1179  uint16_t flags;
1180  struct lysp_node *next;
1181  const char *name;
1182  const char *dsc;
1183  const char *ref;
1184  struct lysp_qname *iffeatures;
1185  struct lysp_ext_instance *exts;
1186  };
1187  };
1189  /* inout */
1190  struct lysp_restr *musts;
1193  struct lysp_node *child;
1194 };
1195 
1200  union {
1201  struct lysp_node node;
1202  struct {
1203  struct lysp_node *parent;
1204  uint16_t nodetype;
1205  uint16_t flags;
1206  struct lysp_node_action *next;
1207  const char *name;
1208  const char *dsc;
1209  const char *ref;
1210  struct lysp_qname *iffeatures;
1211  struct lysp_ext_instance *exts;
1212  };
1213  };
1215  /* action */
1219  struct lysp_node_action_inout input;
1221 };
1222 
1227  union {
1228  struct lysp_node node;
1229  struct {
1230  struct lysp_node *parent;
1231  uint16_t nodetype;
1232  uint16_t flags;
1233  struct lysp_node_notif *next;
1234  const char *name;
1235  const char *dsc;
1236  const char *ref;
1237  struct lysp_qname *iffeatures;
1238  struct lysp_ext_instance *exts;
1239  };
1240  };
1242  /* notif */
1243  struct lysp_restr *musts;
1246  struct lysp_node *child;
1247 };
1248 
1253  union {
1254  struct lysp_node node;
1255  struct {
1256  struct lysp_node *parent;
1257  uint16_t nodetype;
1258  uint16_t flags;
1259  struct lysp_node_grp *next;
1260  const char *name;
1261  const char *dsc;
1262  const char *ref;
1263  struct lysp_qname *iffeatures;
1264  struct lysp_ext_instance *exts;
1265  };
1266  };
1268  /* grp */
1271  struct lysp_node *child;
1274 };
1275 
1280  union {
1281  struct lysp_node node;
1282  struct {
1283  struct lysp_node *parent;
1284  uint16_t nodetype;
1285  uint16_t flags;
1286  struct lysp_node_augment *next;
1287  const char *nodeid;
1288  const char *dsc;
1289  const char *ref;
1290  struct lysp_qname *iffeatures;
1291  struct lysp_ext_instance *exts;
1292  };
1293  };
1295  struct lysp_node *child;
1296  struct lysp_when *when;
1299 };
1300 
1304 typedef enum LYS_VERSION {
1307  LYS_VERSION_1_1 = 2
1309 
1315 struct lysp_module {
1316  struct lys_module *mod;
1327  struct lysp_node *data;
1334  uint8_t version;
1335  uint8_t parsing : 1;
1336  uint8_t is_submod : 1;
1337 };
1338 
1340  struct lys_module *mod;
1351  struct lysp_node *data;
1358  uint8_t version;
1359  uint8_t parsing : 1;
1360  uint8_t is_submod : 1;
1362  uint8_t latest_revision : 2;
1366  const char *name;
1367  const char *filepath;
1368  const char *prefix;
1369  const char *org;
1370  const char *contact;
1371  const char *dsc;
1372  const char *ref;
1373 };
1374 
1381 #define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
1382 
1387 struct lysc_prefix {
1388  char *prefix;
1389  const struct lys_module *mod;
1390 };
1391 
1399 struct lysc_ext {
1400  const char *name;
1401  const char *argname;
1403  struct lyplg_ext *plugin;
1404  struct lys_module *module;
1405  uint32_t refcount;
1406  uint16_t flags;
1407 };
1408 
1416  enum ly_stmt stmt;
1418  void *storage;
1420 };
1421 
1426  struct lysc_ext *def;
1427  const char *argument;
1428  struct lys_module *module;
1432  void *data;
1434  void *parent;
1436  enum ly_stmt parent_stmt;
1439 };
1440 
1444 struct lysc_when {
1445  struct lyxp_expr *cond;
1446  struct lysc_node *context;
1448  const char *dsc;
1449  const char *ref;
1451  uint32_t refcount;
1452  uint16_t flags;
1453 };
1454 
1458 struct lysc_ident {
1459  const char *name;
1460  const char *dsc;
1461  const char *ref;
1462  struct lys_module *module;
1463  struct lysc_ident **derived;
1465  uint16_t flags;
1466 };
1467 
1474 #define LYS_IFF_NOT 0x00
1475 #define LYS_IFF_AND 0x01
1476 #define LYS_IFF_OR 0x02
1477 #define LYS_IFF_F 0x03
1486 };
1487 
1488 struct lysc_range {
1490  union {
1491  int64_t min_64;
1492  uint64_t min_u64;
1493  };
1494  union {
1495  int64_t max_64;
1496  uint64_t max_u64;
1497  };
1498  } *parts;
1499  const char *dsc;
1500  const char *ref;
1501  const char *emsg;
1502  const char *eapptag;
1504 };
1505 
1507  const char *expr;
1508  pcre2_code *code;
1509  const char *dsc;
1510  const char *ref;
1511  const char *emsg;
1512  const char *eapptag;
1514  uint32_t inverted : 1;
1515  uint32_t refcount : 31;
1516 };
1517 
1518 struct lysc_must {
1519  struct lyxp_expr *cond;
1521  const char *dsc;
1522  const char *ref;
1523  const char *emsg;
1524  const char *eapptag;
1526 };
1527 
1528 struct lysc_type {
1530  struct lyplg_type *plugin;
1532  uint32_t refcount;
1533 };
1534 
1537  struct lyplg_type *plugin;
1539  uint32_t refcount;
1540  struct lysc_range *range;
1541 };
1542 
1545  struct lyplg_type *plugin;
1547  uint32_t refcount;
1549  struct lysc_range *range;
1550 };
1551 
1554  struct lyplg_type *plugin;
1556  uint32_t refcount;
1557  struct lysc_range *length;
1559 };
1560 
1562  const char *name;
1563  const char *dsc;
1564  const char *ref;
1566  union {
1567  int32_t value;
1568  uint32_t position;
1569  };
1570  uint16_t flags;
1572 };
1573 
1576  struct lyplg_type *plugin;
1578  uint32_t refcount;
1580 };
1581 
1584  struct lyplg_type *plugin;
1586  uint32_t refcount;
1589 };
1590 
1593  struct lyplg_type *plugin;
1595  uint32_t refcount;
1596  struct lyxp_expr *path;
1598  const struct lys_module *cur_mod;
1601 };
1602 
1605  struct lyplg_type *plugin;
1607  uint32_t refcount;
1608  struct lysc_ident **bases;
1610 };
1611 
1614  struct lyplg_type *plugin;
1616  uint32_t refcount;
1618 };
1619 
1622  struct lyplg_type *plugin;
1624  uint32_t refcount;
1625  struct lysc_type **types;
1626 };
1627 
1630  struct lyplg_type *plugin;
1632  uint32_t refcount;
1633  struct lysc_range *length;
1634 };
1635 
1639 #define LYS_NODE_HASH_COUNT 4
1640 
1644 struct lysc_node {
1645  uint16_t nodetype;
1646  uint16_t flags;
1648  struct lys_module *module;
1649  struct lysc_node *parent;
1650  struct lysc_node *next;
1651  struct lysc_node *prev;
1655  const char *name;
1656  const char *dsc;
1657  const char *ref;
1659  void *priv;
1660 };
1661 
1663  union {
1664  struct lysc_node node;
1665  struct {
1666  uint16_t nodetype;
1667  uint16_t flags;
1668  uint8_t hash[LYS_NODE_HASH_COUNT];
1669  struct lys_module *module;
1670  struct lysc_node *parent;
1671  struct lysc_node *next;
1672  struct lysc_node *prev;
1673  const char *name;
1674  const char *dsc;
1675  const char *ref;
1676  struct lysc_ext_instance *exts;
1677  void *priv;
1678  };
1679  };
1680 
1681  struct lysc_node *child;
1682  struct lysc_must *musts;
1683 };
1684 
1686  union {
1687  struct lysc_node node;
1688  struct {
1689  uint16_t nodetype;
1690  uint16_t flags;
1691  uint8_t hash[LYS_NODE_HASH_COUNT];
1692  struct lys_module *module;
1693  struct lysc_node *parent;
1694  struct lysc_node_action *next;
1695  struct lysc_node_action *prev;
1699  const char *name;
1700  const char *dsc;
1701  const char *ref;
1702  struct lysc_ext_instance *exts;
1703  void *priv;
1704  };
1705  };
1706 
1707  struct lysc_when **when;
1710  struct lysc_node_action_inout input;
1713 };
1714 
1716  union {
1717  struct lysc_node node;
1718  struct {
1719  uint16_t nodetype;
1720  uint16_t flags;
1721  uint8_t hash[LYS_NODE_HASH_COUNT];
1722  struct lys_module *module;
1723  struct lysc_node *parent;
1724  struct lysc_node_notif *next;
1725  struct lysc_node_notif *prev;
1729  const char *name;
1730  const char *dsc;
1731  const char *ref;
1732  struct lysc_ext_instance *exts;
1733  void *priv;
1734  };
1735  };
1736 
1737  struct lysc_node *child;
1738  struct lysc_must *musts;
1739  struct lysc_when **when;
1742 };
1743 
1745  union {
1746  struct lysc_node node;
1747  struct {
1748  uint16_t nodetype;
1749  uint16_t flags;
1750  uint8_t hash[LYS_NODE_HASH_COUNT];
1751  struct lys_module *module;
1752  struct lysc_node *parent;
1753  struct lysc_node *next;
1754  struct lysc_node *prev;
1758  const char *name;
1759  const char *dsc;
1760  const char *ref;
1761  struct lysc_ext_instance *exts;
1762  void *priv;
1763  };
1764  };
1765 
1766  struct lysc_node *child;
1767  struct lysc_must *musts;
1768  struct lysc_when **when;
1771 };
1772 
1774  union {
1775  struct lysc_node node;
1776  struct {
1777  uint16_t nodetype;
1778  uint16_t flags;
1779  uint8_t hash[LYS_NODE_HASH_COUNT];
1780  struct lys_module *module;
1781  struct lysc_node *parent;
1782  struct lysc_node *next;
1783  struct lysc_node *prev;
1787  const char *name;
1788  const char *dsc;
1789  const char *ref;
1790  struct lysc_ext_instance *exts;
1791  void *priv;
1792  };
1793  };
1794 
1795  struct lysc_node *child;
1797  struct lysc_when **when;
1798 };
1799 
1801  union {
1802  struct lysc_node node;
1803  struct {
1804  uint16_t nodetype;
1805  uint16_t flags;
1806  uint8_t hash[LYS_NODE_HASH_COUNT];
1807  struct lys_module *module;
1808  struct lysc_node *parent;
1809  struct lysc_node *next;
1810  struct lysc_node *prev;
1814  const char *name;
1815  const char *dsc;
1816  const char *ref;
1817  struct lysc_ext_instance *exts;
1818  void *priv;
1819  };
1820  };
1821 
1825  struct lysc_when **when;
1827 };
1828 
1830  union {
1831  struct lysc_node node;
1832  struct {
1833  uint16_t nodetype;
1834  uint16_t flags;
1835  uint8_t hash[LYS_NODE_HASH_COUNT];
1836  struct lys_module *module;
1837  struct lysc_node *parent;
1838  struct lysc_node *next;
1839  struct lysc_node *prev;
1843  const char *name;
1844  const char *dsc;
1845  const char *ref;
1846  struct lysc_ext_instance *exts;
1847  void *priv;
1848  };
1849  };
1850 
1851  struct lysc_must *musts;
1852  struct lysc_when **when;
1853  struct lysc_type *type;
1855  const char *units;
1856  struct lyd_value *dflt;
1857 };
1858 
1860  union {
1861  struct lysc_node node;
1862  struct {
1863  uint16_t nodetype;
1864  uint16_t flags;
1865  uint8_t hash[LYS_NODE_HASH_COUNT];
1866  struct lys_module *module;
1867  struct lysc_node *parent;
1868  struct lysc_node *next;
1869  struct lysc_node *prev;
1873  const char *name;
1874  const char *dsc;
1875  const char *ref;
1876  struct lysc_ext_instance *exts;
1877  void *priv;
1878  };
1879  };
1880 
1881  struct lysc_must *musts;
1882  struct lysc_when **when;
1883  struct lysc_type *type;
1885  const char *units;
1886  struct lyd_value **dflts;
1889  uint32_t min;
1890  uint32_t max;
1892 };
1893 
1895  union {
1896  struct lysc_node node;
1897  struct {
1898  uint16_t nodetype;
1899  uint16_t flags;
1900  uint8_t hash[LYS_NODE_HASH_COUNT];
1901  struct lys_module *module;
1902  struct lysc_node *parent;
1903  struct lysc_node *next;
1904  struct lysc_node *prev;
1908  const char *name;
1909  const char *dsc;
1910  const char *ref;
1911  struct lysc_ext_instance *exts;
1912  void *priv;
1913  };
1914  };
1915 
1916  struct lysc_node *child;
1917  struct lysc_must *musts;
1918  struct lysc_when **when;
1923  uint32_t min;
1924  uint32_t max;
1925 };
1926 
1928  union {
1929  struct lysc_node node;
1930  struct {
1931  uint16_t nodetype;
1932  uint16_t flags;
1933  uint8_t hash[LYS_NODE_HASH_COUNT];
1934  struct lys_module *module;
1935  struct lysc_node *parent;
1936  struct lysc_node *next;
1937  struct lysc_node *prev;
1941  const char *name;
1942  const char *dsc;
1943  const char *ref;
1944  struct lysc_ext_instance *exts;
1945  void *priv;
1946  };
1947  };
1948 
1949  struct lysc_must *musts;
1950  struct lysc_when **when;
1951 };
1952 
1959 struct lysc_module {
1960  struct lys_module *mod;
1962  struct lysc_node *data;
1966 };
1967 
1974 #define lysc_is_userordered(lysc_node) \
1975  ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
1976 
1983 #define lysc_is_key(lysc_node) \
1984  ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
1985 
1992 #define lysc_is_np_cont(lysc_node) \
1993  ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
1994 
2001 #define lysc_is_dup_inst_list(lysc_node) \
2002  ((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
2003  ((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
2004 
2015 const struct lysc_when *lysc_has_when(const struct lysc_node *node);
2016 
2023 const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
2024 
2031 const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
2032 
2039 const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
2040 
2047 const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
2048 
2055 const struct lysp_node *lysp_node_child(const struct lysp_node *node);
2056 
2063 const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
2064 
2071 const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
2072 
2083 const struct lysc_node *lysc_node_child(const struct lysc_node *node);
2084 
2092 struct lysc_must *lysc_node_musts(const struct lysc_node *node);
2093 
2101 struct lysc_when **lysc_node_when(const struct lysc_node *node);
2102 
2112 typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
2113 
2130 LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
2131 
2143 LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
2144 
2154 
2163 struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod, uint32_t *idx);
2164 
2181 LY_ERR lysc_ext_substmt(const struct lysc_ext_instance *ext, enum ly_stmt substmt,
2182  void **instance_p, enum ly_stmt_cardinality *cardinality_p);
2183 
2189 #define LYS_FIND_XP_SCHEMA 0x08
2190 #define LYS_FIND_XP_OUTPUT 0x10
2204 LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2205  uint32_t options, struct ly_set **set);
2206 
2219 LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod,
2220  const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set);
2221 
2233 LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath, uint32_t options,
2234  struct ly_set **set);
2235 
2244 LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
2245 
2256 LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path, ly_bool output,
2257  struct ly_set **set);
2258 
2268 const struct lysc_node *lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path,
2269  ly_bool output);
2270 
2274 typedef enum {
2278 
2290 char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
2291 
2295 struct lys_module {
2296  struct ly_ctx *ctx;
2297  const char *name;
2298  const char *revision;
2299  const char *ns;
2300  const char *prefix;
2301  const char *filepath;
2302  const char *org;
2303  const char *contact;
2304  const char *dsc;
2305  const char *ref;
2328 };
2329 
2342 LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
2343 
2364 const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
2365  const struct lysc_module *module, uint32_t options);
2366 
2390 const struct lysc_node *lys_getnext_ext(const struct lysc_node *last, const struct lysc_node *parent,
2391  const struct lysc_ext_instance *ext, uint32_t options);
2392 
2400 #define LYS_GETNEXT_WITHCHOICE 0x01
2401 #define LYS_GETNEXT_NOCHOICE 0x02
2402 #define LYS_GETNEXT_WITHCASE 0x04
2403 #define LYS_GETNEXT_INTONPCONT 0x08
2404 #define LYS_GETNEXT_OUTPUT 0x10
2420 const struct lysc_node *lys_find_child(const struct lysc_node *parent, const struct lys_module *module,
2421  const char *name, size_t name_len, uint16_t nodetype, uint32_t options);
2422 
2438 LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
2439 
2446 const char *lys_nodetype2str(uint16_t nodetype);
2447 
2454 const char *lyxp_get_expr(const struct lyxp_expr *path);
2455 
2458 #ifdef __cplusplus
2459 }
2460 #endif
2461 
2462 #endif /* LY_TREE_SCHEMA_H_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:242
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node,...
Definition: set.h:47
Extension plugin implementing various aspects of a YANG extension.
Definition: plugins_exts.h:179
Hold type-specific functions for various operations with the data values.
struct lysc_node * child
Definition: tree_schema.h:1795
struct lysp_ext_instance * exts
Definition: tree_schema.h:494
struct lyplg_type * plugin
Definition: tree_schema.h:1605
const char * dsc
Definition: tree_schema.h:1448
struct lyd_value * dflt
Definition: tree_schema.h:1856
struct lysp_node_grp * groupings
Definition: tree_schema.h:1326
struct lysp_node * data
Definition: tree_schema.h:1351
struct lysp_restr * musts
Definition: tree_schema.h:735
struct lysc_when ** when
Definition: tree_schema.h:1707
const char * ref
Definition: tree_schema.h:600
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1216
uint16_t flags
Definition: tree_schema.h:691
const char * ref
Definition: tree_schema.h:755
const char * cond
Definition: tree_schema.h:671
struct lysp_when * when
Definition: tree_schema.h:994
const char * name
Definition: tree_schema.h:618
const char * ref
Definition: tree_schema.h:493
struct lysp_ext_instance * exts
Definition: tree_schema.h:757
struct lysp_node_notif * notifs
Definition: tree_schema.h:1078
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1349
struct lyd_value ** dflts
Definition: tree_schema.h:1886
const char * argument
Definition: tree_schema.h:525
struct lysp_node_action * actions
Definition: tree_schema.h:1297
uint32_t refcount
Definition: tree_schema.h:1547
struct lysc_ext_instance * exts
Definition: tree_schema.h:1402
struct lysc_must * musts
Definition: tree_schema.h:1917
struct lysc_when ** when
Definition: tree_schema.h:1797
struct lysp_feature * features
Definition: tree_schema.h:1347
struct lysc_node_action * rpcs
Definition: tree_schema.h:1963
struct lysc_ext_instance * exts
Definition: tree_schema.h:1613
uint64_t parent_stmt_index
Definition: tree_schema.h:1437
char rev[11]
Definition: tree_schema.h:467
struct lysp_node * child
Definition: tree_schema.h:1193
ly_bool to_compile
Definition: tree_schema.h:2322
struct lysp_restr * musts
Definition: tree_schema.h:1243
struct lysc_node_action_inout output
Definition: tree_schema.h:1711
const char * prefix
Definition: tree_schema.h:462
struct lysp_restr * musts
Definition: tree_schema.h:993
const char * ref
Definition: tree_schema.h:552
const char * dsc
Definition: tree_schema.h:463
struct lysc_range * range
Definition: tree_schema.h:1540
struct lysp_include * includes
Definition: tree_schema.h:1321
struct lysc_range * range
Definition: tree_schema.h:1549
struct lysc_ext * compiled
Definition: tree_schema.h:497
struct lysp_node_grp * groupings
Definition: tree_schema.h:1075
struct lysp_ext_instance * exts
Definition: tree_schema.h:970
const char * ref
Definition: tree_schema.h:673
const char * units
Definition: tree_schema.h:1855
struct lysc_when ** when
Definition: tree_schema.h:1852
struct lysc_when ** when
Definition: tree_schema.h:1768
struct lysp_revision * revs
Definition: tree_schema.h:1342
struct lysc_node * child
Definition: tree_schema.h:1737
struct lysp_qname * dflts
Definition: tree_schema.h:724
uint16_t nodetype
Definition: tree_schema.h:1645
struct lys_module ** augmented_by
Definition: tree_schema.h:2318
struct lyplg_type * plugin
Definition: tree_schema.h:1584
const char * name
Definition: tree_schema.h:524
LY_DATA_TYPE basetype
Definition: tree_schema.h:1555
const char * name
Definition: tree_schema.h:2297
struct lysp_node_notif * notifs
Definition: tree_schema.h:1273
struct lysp_restr * range
Definition: tree_schema.h:635
struct lysp_qname * dflts
Definition: tree_schema.h:1048
struct lysc_ext_instance * exts
Definition: tree_schema.h:1529
const char * ref
Definition: tree_schema.h:610
LY_DATA_TYPE basetype
Definition: tree_schema.h:1615
pcre2_code * code
Definition: tree_schema.h:1508
struct lysp_deviate * next
Definition: tree_schema.h:732
struct lysp_qname arg
Definition: tree_schema.h:594
struct lysc_node_action * actions
Definition: tree_schema.h:1919
LY_DATA_TYPE basetype
Definition: tree_schema.h:1531
struct lysp_node * child
Definition: tree_schema.h:1076
struct lysp_deviate * next
Definition: tree_schema.h:742
const char * units
Definition: tree_schema.h:1047
struct lysp_import * imports
Definition: tree_schema.h:1344
struct lyxp_expr * path
Definition: tree_schema.h:1596
struct lysp_ext_instance * exts
Definition: tree_schema.h:643
struct lys_module ** deviated_by
Definition: tree_schema.h:2319
struct lysp_qname dflt
Definition: tree_schema.h:1103
uint8_t require_instance
Definition: tree_schema.h:649
struct lysc_when ** when
Definition: tree_schema.h:1882
const char * units
Definition: tree_schema.h:734
struct lysp_when * when
Definition: tree_schema.h:1145
const char * eapptag
Definition: tree_schema.h:1524
struct lysp_ext_instance * exts
Definition: tree_schema.h:465
struct lysp_type type
Definition: tree_schema.h:663
const char * units
Definition: tree_schema.h:745
struct lysp_node_notif * notifs
Definition: tree_schema.h:1000
struct lyplg_type * plugin
Definition: tree_schema.h:1630
LY_DATA_TYPE basetype
Definition: tree_schema.h:1538
LY_DATA_TYPE basetype
Definition: tree_schema.h:1577
struct lysc_node_notif * notifs
Definition: tree_schema.h:1964
struct lyxp_expr * cond
Definition: tree_schema.h:1519
uint8_t hash[4]
Definition: tree_schema.h:1647
uint32_t refcount
Definition: tree_schema.h:1515
struct lysp_qname * uniques
Definition: tree_schema.h:1079
const char * name
Definition: tree_schema.h:461
enum ly_stmt_cardinality cardinality
Definition: tree_schema.h:1417
const char * ref
Definition: tree_schema.h:583
const char * dsc
Definition: tree_schema.h:1656
const char * prefix
Definition: tree_schema.h:1368
struct lysc_node_notif * notifs
Definition: tree_schema.h:1920
struct lysp_node_notif * notifs
Definition: tree_schema.h:1298
uint16_t nodetype
Definition: tree_schema.h:962
struct lysc_ext_instance * exts
Definition: tree_schema.h:1604
const char * emsg
Definition: tree_schema.h:597
uint16_t flags
Definition: tree_schema.h:1452
const char * arg
Definition: tree_schema.h:508
struct lysc_module * compiled
Definition: tree_schema.h:2308
LY_VALUE_FORMAT format
Definition: tree_schema.h:526
const char * contact
Definition: tree_schema.h:2303
struct lys_module * module
Definition: tree_schema.h:1648
uint16_t flags
Definition: tree_schema.h:585
struct lysp_when * when
Definition: tree_schema.h:1167
const char * argument
Definition: tree_schema.h:1427
struct lysc_must * musts
Definition: tree_schema.h:1767
const char * presence
Definition: tree_schema.h:995
const char * name
Definition: tree_schema.h:1459
const char * nodeid
Definition: tree_schema.h:753
struct lysp_stmt * child
Definition: tree_schema.h:513
struct lysp_when * when
Definition: tree_schema.h:1102
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1191
const char * revision
Definition: tree_schema.h:2298
uint8_t is_submod
Definition: tree_schema.h:1336
struct lysc_type * type
Definition: tree_schema.h:1883
const char * name
Definition: tree_schema.h:1400
const char * dsc
Definition: tree_schema.h:754
struct lysp_node * next
Definition: tree_schema.h:964
LY_DATA_TYPE basetype
Definition: tree_schema.h:1585
struct lysp_restr * patterns
Definition: tree_schema.h:637
struct lysp_ext_instance * exts
Definition: tree_schema.h:611
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1244
struct lysp_type type
Definition: tree_schema.h:1022
struct lysp_node * child
Definition: tree_schema.h:1101
struct lysc_ident * identities
Definition: tree_schema.h:2311
uint16_t flags
Definition: tree_schema.h:514
struct lysc_ext_instance * exts
Definition: tree_schema.h:1544
struct lysp_qname * iffeatures
Definition: tree_schema.h:622
const char * ref
Definition: tree_schema.h:620
const char * name
Definition: tree_schema.h:490
LY_DATA_TYPE basetype
Definition: tree_schema.h:1546
uint16_t flags
Definition: tree_schema.h:624
struct lysp_node_action * actions
Definition: tree_schema.h:1077
struct lysp_ext_instance * exts
Definition: tree_schema.h:662
const char * expr
Definition: tree_schema.h:1507
struct lysp_node_augment * augments
Definition: tree_schema.h:1352
uint32_t refcount
Definition: tree_schema.h:1539
struct lysp_node * parent
Definition: tree_schema.h:961
const char * dsc
Definition: tree_schema.h:1509
struct lysp_ext_instance * exts
Definition: tree_schema.h:479
const char * emsg
Definition: tree_schema.h:1511
struct lysp_node_action * rpcs
Definition: tree_schema.h:1353
struct lysp_node_action * actions
Definition: tree_schema.h:999
struct lysp_node_grp * groupings
Definition: tree_schema.h:1192
struct lysp_qname * iffeatures
Definition: tree_schema.h:547
struct lysp_node_grp * groupings
Definition: tree_schema.h:1350
uint16_t flags
Definition: tree_schema.h:495
uint16_t flags
Definition: tree_schema.h:650
struct lysc_ext_instance * exts
Definition: tree_schema.h:1503
struct lysp_node * data
Definition: tree_schema.h:1327
struct lysp_feature ** depfeatures
Definition: tree_schema.h:549
struct lysc_type_bitenum_item * bits
Definition: tree_schema.h:1587
struct lysp_ext * extensions
Definition: tree_schema.h:1322
const char * presence
Definition: tree_schema.h:686
uint8_t mod
Definition: tree_schema.h:712
struct lyplg_type * plugin
Definition: tree_schema.h:1545
struct lysp_ext_instance * exts
Definition: tree_schema.h:601
struct lysc_node * parent
Definition: tree_schema.h:1649
uint8_t latest_revision
Definition: tree_schema.h:2324
struct lyplg_type * plugin
Definition: tree_schema.h:1554
struct lys_module * module
Definition: tree_schema.h:1462
const char * name
Definition: tree_schema.h:657
const struct lys_module * cur_mod
Definition: tree_schema.h:1598
uint32_t refcount
Definition: tree_schema.h:1451
const char * dsc
Definition: tree_schema.h:599
const char * dsc
Definition: tree_schema.h:2304
enum ly_stmt parent_stmt
Definition: tree_schema.h:536
struct lysp_type_enum * bits
Definition: tree_schema.h:639
struct lysc_pattern ** patterns
Definition: tree_schema.h:1558
struct lysp_node_action_inout output
Definition: tree_schema.h:1220
struct lysp_ident * identities
Definition: tree_schema.h:1324
struct lysp_ext_instance * exts
Definition: tree_schema.h:733
uint8_t * expr
Definition: tree_schema.h:562
struct lysp_type * types
Definition: tree_schema.h:642
LY_DATA_TYPE basetype
Definition: tree_schema.h:1606
const char * ref
Definition: tree_schema.h:1372
struct lysc_node * child
Definition: tree_schema.h:1681
const char * argname
Definition: tree_schema.h:1401
struct lysp_ext_instance * exts
Definition: tree_schema.h:674
struct lysp_qname dflt
Definition: tree_schema.h:659
struct lysp_node * child
Definition: tree_schema.h:1295
struct lysp_deviation * deviations
Definition: tree_schema.h:1331
struct lys_module * mod
Definition: tree_schema.h:1340
const char * org
Definition: tree_schema.h:2302
struct lysp_qname dflt
Definition: tree_schema.h:746
struct lysp_node * child
Definition: tree_schema.h:1246
const char * ref
Definition: tree_schema.h:683
const char * ref
Definition: tree_schema.h:967
struct lysc_iffeature * iffeatures_c
Definition: tree_schema.h:548
const struct lysp_module * pmod
Definition: tree_schema.h:645
const char * dsc
Definition: tree_schema.h:609
struct lysp_qname * uniques
Definition: tree_schema.h:736
LY_VALUE_FORMAT format
Definition: tree_schema.h:509
struct lysp_ext_instance * exts
Definition: tree_schema.h:690
struct lysp_node_augment * augments
Definition: tree_schema.h:1328
const char * contact
Definition: tree_schema.h:1370
ly_bool implemented
Definition: tree_schema.h:2321
const char * key
Definition: tree_schema.h:1073
const char * name
Definition: tree_schema.h:1366
struct lys_module * mod
Definition: tree_schema.h:1316
uint16_t flags
Definition: tree_schema.h:664
struct lysc_node_case * cases
Definition: tree_schema.h:1822
const char * ref
Definition: tree_schema.h:2305
uint16_t flags
Definition: tree_schema.h:963
uint16_t flags
Definition: tree_schema.h:1646
struct lysp_restr * musts
Definition: tree_schema.h:1190
struct lysp_ext_instance * exts
Definition: tree_schema.h:623
const char * ref
Definition: tree_schema.h:464
const char * filepath
Definition: tree_schema.h:1367
struct lysc_node_notif * notifs
Definition: tree_schema.h:1770
uint32_t max
Definition: tree_schema.h:689
const char * dsc
Definition: tree_schema.h:492
struct lysc_ext_substmt * substmts
Definition: tree_schema.h:1430
struct lysp_include * includes
Definition: tree_schema.h:1345
struct lysp_stmt * child
Definition: tree_schema.h:532
struct lysc_must * musts
Definition: tree_schema.h:1682
uint32_t min
Definition: tree_schema.h:688
struct lysp_deviate * deviates
Definition: tree_schema.h:756
struct lysc_ext_instance * exts
Definition: tree_schema.h:1450
struct lyplg_type * plugin
Definition: tree_schema.h:1530
ly_bool injected
Definition: tree_schema.h:481
const char * units
Definition: tree_schema.h:721
struct lysp_qname dflt
Definition: tree_schema.h:1024
void * priv
Definition: tree_schema.h:1659
struct lysc_node_action * actions
Definition: tree_schema.h:1769
const char * name
Definition: tree_schema.h:634
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1325
struct lysp_qname * uniques
Definition: tree_schema.h:723
struct lysp_when * when
Definition: tree_schema.h:1296
struct lysc_range * length
Definition: tree_schema.h:1633
const char * name
Definition: tree_schema.h:546
enum ly_stmt kw
Definition: tree_schema.h:515
struct lysp_restr * length
Definition: tree_schema.h:636
uint32_t refcount
Definition: tree_schema.h:1405
struct lysc_when ** when
Definition: tree_schema.h:1950
const char * eapptag
Definition: tree_schema.h:1502
struct lysp_ext_instance * exts
Definition: tree_schema.h:743
struct lysc_type * type
Definition: tree_schema.h:1853
struct lysp_restr * musts
Definition: tree_schema.h:722
struct lysp_restr * musts
Definition: tree_schema.h:1071
struct lysp_ident * identities
Definition: tree_schema.h:1348
const char * units
Definition: tree_schema.h:1023
struct lyplg_type * plugin
Definition: tree_schema.h:1614
struct lyxp_expr * path
Definition: tree_schema.h:640
struct lysp_qname * dflts
Definition: tree_schema.h:687
struct lysc_node * next
Definition: tree_schema.h:1650
const char * dsc
Definition: tree_schema.h:582
struct lysc_ext_instance * exts
Definition: tree_schema.h:1621
struct lysp_restr * musts
Definition: tree_schema.h:685
struct lysp_node * child
Definition: tree_schema.h:1123
struct lysp_qname * iffeatures
Definition: tree_schema.h:968
uint8_t latest_revision
Definition: tree_schema.h:1362
struct lysp_ext_instance * exts
Definition: tree_schema.h:1356
struct lysc_ext_instance * exts
Definition: tree_schema.h:1583
const char * dsc
Definition: tree_schema.h:1460
struct lysp_revision * revs
Definition: tree_schema.h:1318
struct lysp_node * parsed
Definition: tree_schema.h:527
struct lysc_type * compiled
Definition: tree_schema.h:646
struct lysc_node * child
Definition: tree_schema.h:1766
uint16_t flags
Definition: tree_schema.h:1465
struct lys_module * module
Definition: tree_schema.h:459
struct lysc_ext_instance * exts
Definition: tree_schema.h:1565
struct lysp_type * type
Definition: tree_schema.h:744
struct lysc_node_leaf *** uniques
Definition: tree_schema.h:1922
struct lysp_qname * iffeatures
Definition: tree_schema.h:684
struct lysp_when * when
Definition: tree_schema.h:1124
const char * name
Definition: tree_schema.h:476
struct lysp_submodule * submodule
Definition: tree_schema.h:474
struct lysp_ext_instance * exts
Definition: tree_schema.h:553
struct lysp_feature * features
Definition: tree_schema.h:1323
struct lysp_qname * dflts
Definition: tree_schema.h:737
struct lysp_restr * musts
Definition: tree_schema.h:1144
const char * ref
Definition: tree_schema.h:478
struct lysp_node_action * rpcs
Definition: tree_schema.h:1329
struct lysp_ext_instance * exts
Definition: tree_schema.h:584
const char ** bases
Definition: tree_schema.h:581
LY_DATA_TYPE basetype
Definition: tree_schema.h:1594
const char * dsc
Definition: tree_schema.h:1499
const char * name
Definition: tree_schema.h:1655
struct lys_module * mod
Definition: tree_schema.h:1960
struct lysc_node_action_inout input
Definition: tree_schema.h:1710
struct lysp_when * when
Definition: tree_schema.h:1021
const char * dsc
Definition: tree_schema.h:682
struct lysp_node_action * actions
Definition: tree_schema.h:1272
uint16_t flags
Definition: tree_schema.h:1406
struct lyplg_ext * plugin
Definition: tree_schema.h:1403
struct lysp_deviation * deviations
Definition: tree_schema.h:1355
char date[11]
Definition: tree_schema.h:608
char * prefix
Definition: tree_schema.h:1388
struct lysc_must * musts
Definition: tree_schema.h:1949
struct lysc_ident ** derived
Definition: tree_schema.h:1463
uint32_t refcount
Definition: tree_schema.h:1632
const char * ref
Definition: tree_schema.h:1657
struct lysc_ext * def
Definition: tree_schema.h:1426
struct lysc_prefix * prefixes
Definition: tree_schema.h:1597
struct lysc_ext_instance * exts
Definition: tree_schema.h:1575
const char * dsc
Definition: tree_schema.h:966
const char * ref
Definition: tree_schema.h:1461
uint64_t parent_stmt_index
Definition: tree_schema.h:537
struct lysc_type_bitenum_item * enums
Definition: tree_schema.h:1579
const char * dsc
Definition: tree_schema.h:1521
struct lysc_must * musts
Definition: tree_schema.h:1851
struct lysp_node * child
Definition: tree_schema.h:998
const char * dsc
Definition: tree_schema.h:1371
const char * filepath
Definition: tree_schema.h:2301
struct lysp_node_action_inout input
Definition: tree_schema.h:1219
struct lysc_ext_instance * exts
Definition: tree_schema.h:1429
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1269
struct lysc_when ** when
Definition: tree_schema.h:1825
struct lyplg_type * plugin
Definition: tree_schema.h:1622
struct lysp_when * when
Definition: tree_schema.h:1072
const char * ns
Definition: tree_schema.h:2299
const char * dsc
Definition: tree_schema.h:660
const char * ref
Definition: tree_schema.h:1449
struct lysp_node_grp * groupings
Definition: tree_schema.h:1217
struct lysc_range * length
Definition: tree_schema.h:1557
struct lysc_prefix * prefixes
Definition: tree_schema.h:1447
const char * stmt
Definition: tree_schema.h:507
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1074
struct lysc_when ** when
Definition: tree_schema.h:1739
struct lyplg_type * plugin
Definition: tree_schema.h:1576
struct lysc_node * child
Definition: tree_schema.h:1916
struct lysp_node_augment * augments
Definition: tree_schema.h:1166
uint32_t refcount
Definition: tree_schema.h:1586
uint32_t refcount
Definition: tree_schema.h:1578
struct lysp_tpdf * typedefs
Definition: tree_schema.h:996
struct lysc_ext_instance * exts
Definition: tree_schema.h:1525
struct lysp_type_enum * enums
Definition: tree_schema.h:638
const char * name
Definition: tree_schema.h:965
struct lysc_type * realtype
Definition: tree_schema.h:1599
const char * eapptag
Definition: tree_schema.h:598
enum ly_stmt stmt
Definition: tree_schema.h:1416
struct lysc_ext_instance * exts
Definition: tree_schema.h:1485
struct lysp_node_grp * groupings
Definition: tree_schema.h:997
struct lysp_deviate * next
Definition: tree_schema.h:713
struct lysc_node * prev
Definition: tree_schema.h:1651
struct lysp_type type
Definition: tree_schema.h:1046
const char * ref
Definition: tree_schema.h:1522
const char * dsc
Definition: tree_schema.h:619
uint32_t refcount
Definition: tree_schema.h:1556
const char * org
Definition: tree_schema.h:1369
struct lysc_ext_instance * exts
Definition: tree_schema.h:1464
struct lyplg_type * plugin
Definition: tree_schema.h:1593
const char * name
Definition: tree_schema.h:579
const char * ref
Definition: tree_schema.h:1510
struct lysc_node * data
Definition: tree_schema.h:1962
const char * dsc
Definition: tree_schema.h:672
uint8_t is_submod
Definition: tree_schema.h:1360
struct lysp_stmt * next
Definition: tree_schema.h:512
const char * emsg
Definition: tree_schema.h:1523
struct lysp_module * parsed
Definition: tree_schema.h:2307
uint32_t refcount
Definition: tree_schema.h:1532
struct lysc_must * musts
Definition: tree_schema.h:1738
struct lysc_ext_instance * exts
Definition: tree_schema.h:1536
struct lyxp_expr * cond
Definition: tree_schema.h:1445
struct lyplg_type * plugin
Definition: tree_schema.h:1537
const char * str
Definition: tree_schema.h:570
const char * prefix
Definition: tree_schema.h:2300
struct lysp_node_notif * notifs
Definition: tree_schema.h:1354
struct lysc_ext_instance * exts
Definition: tree_schema.h:1513
const char * eapptag
Definition: tree_schema.h:1512
uint8_t parsing
Definition: tree_schema.h:1335
struct lysp_qname * iffeatures
Definition: tree_schema.h:580
const char * ref
Definition: tree_schema.h:1500
struct lysc_node_case * dflt
Definition: tree_schema.h:1826
const char * units
Definition: tree_schema.h:658
struct lysc_ext_instance * exts
Definition: tree_schema.h:1553
struct lys_module * module
Definition: tree_schema.h:1428
struct lysp_when * when
Definition: tree_schema.h:1045
struct lysc_type ** types
Definition: tree_schema.h:1625
uint16_t flags
Definition: tree_schema.h:554
const char * argname
Definition: tree_schema.h:491
const char ** bases
Definition: tree_schema.h:641
enum ly_stmt parent_stmt
Definition: tree_schema.h:1436
const char * dsc
Definition: tree_schema.h:551
struct lysc_ext_instance * exts
Definition: tree_schema.h:1658
struct lysc_ext_instance * exts
Definition: tree_schema.h:1965
struct ly_ctx * ctx
Definition: tree_schema.h:2296
struct lys_module * module
Definition: tree_schema.h:1404
struct lysp_ext * extensions
Definition: tree_schema.h:1346
struct lysp_node_notif * notifs
Definition: tree_schema.h:1330
uint16_t flags
Definition: tree_schema.h:466
uint32_t inverted
Definition: tree_schema.h:1514
struct lysc_node * context
Definition: tree_schema.h:1446
LY_DATA_TYPE basetype
Definition: tree_schema.h:1631
struct lysp_ext_instance * exts
Definition: tree_schema.h:1332
struct lysc_ext_instance * exts
Definition: tree_schema.h:1629
char date[11]
Definition: tree_schema.h:1484
struct lysc_ext_instance * exts
Definition: tree_schema.h:1592
const char * units
Definition: tree_schema.h:1885
char rev[11]
Definition: tree_schema.h:480
uint8_t fraction_digits
Definition: tree_schema.h:648
const char * ref
Definition: tree_schema.h:661
struct lysp_restr * musts
Definition: tree_schema.h:1020
struct lysc_must * musts
Definition: tree_schema.h:1881
struct lysc_when ** when
Definition: tree_schema.h:1918
struct lysp_import * imports
Definition: tree_schema.h:1320
void * prefix_data
Definition: tree_schema.h:510
struct lysp_ext_instance * exts
Definition: tree_schema.h:714
const struct lysp_module * mod
Definition: tree_schema.h:571
uint8_t version
Definition: tree_schema.h:1334
LY_DATA_TYPE basetype
Definition: tree_schema.h:1623
struct lysp_restr * musts
Definition: tree_schema.h:1044
struct lysc_ident ** bases
Definition: tree_schema.h:1608
const char * emsg
Definition: tree_schema.h:1501
struct lysp_feature ** features
Definition: tree_schema.h:563
const char * dsc
Definition: tree_schema.h:477
const char * nodeid
Definition: tree_schema.h:681
struct lysp_ext_instance * exts
Definition: tree_schema.h:720
uint32_t refcount
Definition: tree_schema.h:1624
struct lysc_range::lysc_range_part * parts
struct lysc_prefix * prefixes
Definition: tree_schema.h:1520
struct lysp_node_grp * groupings
Definition: tree_schema.h:1245
uint8_t require_instance
Definition: tree_schema.h:1600
struct lysp_deviate * next
Definition: tree_schema.h:719
struct lysp_node * child
Definition: tree_schema.h:1271
const struct lys_module * mod
Definition: tree_schema.h:1389
struct lysp_node_grp * groupings
Definition: tree_schema.h:1270
struct lysp_refine * refines
Definition: tree_schema.h:1165
uint8_t fraction_digits
Definition: tree_schema.h:1548
LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod, const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set)
Get all the schema nodes that are required for expr to be evaluated (atoms).
LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data)
DFS traversal of all the schema nodes in a module including RPCs and notifications.
char * lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen)
Generate path of the given node in the requested format.
LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path, ly_bool output, struct ly_set **set)
Get all the schema nodes that are required for path to be evaluated (atoms).
LY_ERR lys_feature_value(const struct lys_module *module, const char *feature)
Get the current real status of the specified feature in the module.
const struct lysp_tpdf * lysp_node_typedefs(const struct lysp_node *node)
Get the typedefs sized array of the given (parsed) schema node. Decides the node's type and in case i...
LY_ERR(* lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue)
Callback to be called for every schema node in a DFS traversal.
Definition: tree_schema.h:2112
struct lysp_feature * lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod, uint32_t *idx)
Get the next feature in the module or submodules.
const char * ly_stmt2str(enum ly_stmt stmt)
Stringify statement identifier.
const struct lysc_node * lys_find_child(const struct lysc_node *parent, const struct lys_module *module, const char *name, size_t name_len, uint16_t nodetype, uint32_t options)
Get child node according to the specified criteria.
LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data)
DFS traversal of all the schema nodes in a (sub)tree including any actions and nested notifications.
const struct lysc_node * lys_getnext_ext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_ext_instance *ext, uint32_t options)
Get next schema tree (sibling) node element that can be instantiated in a data tree.
const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set)
Get all the schema nodes that are required for path to be evaluated (atoms).
LY_ERR lysc_ext_substmt(const struct lysc_ext_instance *ext, enum ly_stmt substmt, void **instance_p, enum ly_stmt_cardinality *cardinality_p)
Get pointer to the storage of the specified substatement in the given extension instance.
ly_stmt
List of YANG statements.
Definition: tree_schema.h:295
const struct lysp_node_notif * lysp_node_notifs(const struct lysp_node *node)
Get the Notifications linked list of the given (parsed) schema node. Decides the node's type and in c...
const struct lysc_node_notif * lysc_node_notifs(const struct lysc_node *node)
Get the Notifications linked list of the given (compiled) schema node. Decides the node's type and in...
struct lysc_when ** lysc_node_when(const struct lysc_node *node)
Get the when statements list if present in the node.
const struct lysc_node_action * lysc_node_actions(const struct lysc_node *node)
Get the actions/RPCs linked list of the given (compiled) schema node. Decides the node's type and in ...
const struct lysc_when * lysc_has_when(const struct lysc_node *node)
Check whether the schema node data instance existence depends on any when conditions....
ly_stmt_cardinality
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:448
LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
const struct lysc_node * lys_getnext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_module *module, uint32_t options)
Get next schema tree (sibling) node element that can be instantiated in a data tree....
LYSC_PATH_TYPE
Types of the different schema paths.
Definition: tree_schema.h:2274
const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
#define LYS_NODE_HASH_COUNT
Maximum number of hashes stored in a schema node.
Definition: tree_schema.h:1639
const struct lysp_node_action * lysp_node_actions(const struct lysp_node *node)
Get the actions/RPCs linked list of the given (parsed) schema node. Decides the node's type and in ca...
LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set)
Get all the schema nodes that are required for xpath to be evaluated (atoms).
LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set)
Evaluate an xpath expression on schema nodes.
struct lysc_must * lysc_node_musts(const struct lysc_node *node)
Get the must statements list if present in the node.
const struct lysc_node * lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path, ly_bool output)
Get a schema node based on the given data path (JSON format, see XPath Addressing).
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:1304
const struct lysc_node * lysc_node_child(const struct lysc_node *node)
Get the children linked list of the given (compiled) schema node.
const struct lysp_node * lysp_node_child(const struct lysp_node *node)
Get the children linked list of the given (parsed) schema node. Decides the node's type and in case i...
enum ly_stmt lys_nodetype2stmt(uint16_t nodetype)
Convert nodetype to statement identifier.
const struct lysp_node_grp * lysp_node_groupings(const struct lysp_node *node)
Get the groupings linked list of the given (parsed) schema node. Decides the node's type and in case ...
#define LY_REV_SIZE
Definition: tree_schema.h:229
@ LY_STMT_REVISION
Definition: tree_schema.h:399
@ LY_STMT_MUST
Definition: tree_schema.h:385
@ LY_STMT_ARGUMENT
Definition: tree_schema.h:354
@ LY_STMT_ENUM
Definition: tree_schema.h:365
@ LY_STMT_LEAF
Definition: tree_schema.h:336
@ LY_STMT_ERROR_APP_TAG
Definition: tree_schema.h:366
@ LY_STMT_MAX_ELEMENTS
Definition: tree_schema.h:381
@ LY_STMT_REFERENCE
Definition: tree_schema.h:395
@ LY_STMT_REVISION_DATE
Definition: tree_schema.h:400
@ LY_STMT_SYNTAX_LEFT_BRACE
Definition: tree_schema.h:419
@ LY_STMT_UNIQUE
Definition: tree_schema.h:406
@ LY_STMT_REQUIRE_INSTANCE
Definition: tree_schema.h:398
@ LY_STMT_DEVIATION
Definition: tree_schema.h:364
@ LY_STMT_IMPORT
Definition: tree_schema.h:376
@ LY_STMT_CONTACT
Definition: tree_schema.h:359
@ LY_STMT_LENGTH
Definition: tree_schema.h:379
@ LY_STMT_IF_FEATURE
Definition: tree_schema.h:373
@ LY_STMT_SYNTAX_RIGHT_BRACE
Definition: tree_schema.h:420
@ LY_STMT_ANYDATA
Definition: tree_schema.h:313
@ LY_STMT_CONTAINER
Definition: tree_schema.h:330
@ LY_STMT_PATTERN
Definition: tree_schema.h:390
@ LY_STMT_POSITION
Definition: tree_schema.h:391
@ LY_STMT_PREFIX
Definition: tree_schema.h:392
@ LY_STMT_WHEN
Definition: tree_schema.h:410
@ LY_STMT_BELONGS_TO
Definition: tree_schema.h:356
@ LY_STMT_ORGANIZATION
Definition: tree_schema.h:388
@ LY_STMT_AUGMENT
Definition: tree_schema.h:323
@ LY_STMT_SUBMODULE
Definition: tree_schema.h:402
@ LY_STMT_ANYXML
Definition: tree_schema.h:318
@ LY_STMT_MIN_ELEMENTS
Definition: tree_schema.h:382
@ LY_STMT_SYNTAX_SEMICOLON
Definition: tree_schema.h:418
@ LY_STMT_NAMESPACE
Definition: tree_schema.h:386
@ LY_STMT_YANG_VERSION
Definition: tree_schema.h:411
@ LY_STMT_MANDATORY
Definition: tree_schema.h:380
@ LY_STMT_PATH
Definition: tree_schema.h:389
@ LY_STMT_EXTENSION
Definition: tree_schema.h:368
@ LY_STMT_CASE
Definition: tree_schema.h:324
@ LY_STMT_MODULE
Definition: tree_schema.h:384
@ LY_STMT_ERROR_MESSAGE
Definition: tree_schema.h:367
@ LY_STMT_OUTPUT
Definition: tree_schema.h:302
@ LY_STMT_REFINE
Definition: tree_schema.h:397
@ LY_STMT_IDENTITY
Definition: tree_schema.h:372
@ LY_STMT_TYPEDEF
Definition: tree_schema.h:405
@ LY_STMT_NONE
Definition: tree_schema.h:296
@ LY_STMT_ARG_VALUE
Definition: tree_schema.h:426
@ LY_STMT_DESCRIPTION
Definition: tree_schema.h:361
@ LY_STMT_ARG_TEXT
Definition: tree_schema.h:425
@ LY_STMT_CONFIG
Definition: tree_schema.h:358
@ LY_STMT_RANGE
Definition: tree_schema.h:394
@ LY_STMT_ORDERED_BY
Definition: tree_schema.h:387
@ LY_STMT_INCLUDE
Definition: tree_schema.h:377
@ LY_STMT_YIN_ELEMENT
Definition: tree_schema.h:412
@ LY_STMT_EXTENSION_INSTANCE
Definition: tree_schema.h:369
@ LY_STMT_BIT
Definition: tree_schema.h:357
@ LY_STMT_FRACTION_DIGITS
Definition: tree_schema.h:371
@ LY_STMT_ACTION
Definition: tree_schema.h:305
@ LY_STMT_MODIFIER
Definition: tree_schema.h:383
@ LY_STMT_TYPE
Definition: tree_schema.h:403
@ LY_STMT_BASE
Definition: tree_schema.h:355
@ LY_STMT_LEAF_LIST
Definition: tree_schema.h:341
@ LY_STMT_FEATURE
Definition: tree_schema.h:370
@ LY_STMT_RPC
Definition: tree_schema.h:308
@ LY_STMT_DEVIATE
Definition: tree_schema.h:363
@ LY_STMT_UNITS
Definition: tree_schema.h:407
@ LY_STMT_GROUPING
Definition: tree_schema.h:335
@ LY_STMT_KEY
Definition: tree_schema.h:378
@ LY_STMT_NOTIFICATION
Definition: tree_schema.h:298
@ LY_STMT_CHOICE
Definition: tree_schema.h:325
@ LY_STMT_VALUE
Definition: tree_schema.h:409
@ LY_STMT_USES
Definition: tree_schema.h:351
@ LY_STMT_PRESENCE
Definition: tree_schema.h:393
@ LY_STMT_STATUS
Definition: tree_schema.h:401
@ LY_STMT_INPUT
Definition: tree_schema.h:301
@ LY_STMT_LIST
Definition: tree_schema.h:346
@ LY_STMT_DEFAULT
Definition: tree_schema.h:360
@ LY_STMT_CARD_MAND
Definition: tree_schema.h:450
@ LY_STMT_CARD_ANY
Definition: tree_schema.h:452
@ LY_STMT_CARD_OPT
Definition: tree_schema.h:449
@ LY_STMT_CARD_SOME
Definition: tree_schema.h:451
@ LYSC_PATH_LOG
Definition: tree_schema.h:2275
@ LYSC_PATH_DATA
Definition: tree_schema.h:2276
@ LYS_VERSION_UNDEF
Definition: tree_schema.h:1305
@ LYS_VERSION_1_0
Definition: tree_schema.h:1306
@ LYS_VERSION_1_1
Definition: tree_schema.h:1307
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2295
Compiled YANG extension-stmt.
Definition: tree_schema.h:1399
YANG extension instance.
Definition: tree_schema.h:1425
Description of the extension instance substatements.
Definition: tree_schema.h:1415
YANG identity-stmt.
Definition: tree_schema.h:1458
Compiled YANG if-feature-stmt.
Definition: tree_schema.h:561
Compiled YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1959
Compiled YANG data node.
Definition: tree_schema.h:1644
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition: tree_schema.h:1387
Compiled YANG revision statement.
Definition: tree_schema.h:1483
YANG when-stmt.
Definition: tree_schema.h:1444
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition: tree_schema.h:711
YANG extension-stmt.
Definition: tree_schema.h:489
YANG extension instance.
Definition: tree_schema.h:523
YANG feature-stmt.
Definition: tree_schema.h:545
YANG identity-stmt.
Definition: tree_schema.h:578
YANG import-stmt.
Definition: tree_schema.h:458
YANG include-stmt.
Definition: tree_schema.h:473
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1315
Generic YANG data node.
Definition: tree_schema.h:960
YANG rpc-stmt and action-stmt.
Definition: tree_schema.h:1199
YANG input-stmt and output-stmt.
Definition: tree_schema.h:1173
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition: tree_schema.h:1279
Extension structure of the lysp_node for YANG container.
Definition: tree_schema.h:976
YANG grouping-stmt.
Definition: tree_schema.h:1252
YANG notification-stmt.
Definition: tree_schema.h:1226
Qualified name (optional prefix followed by an identifier).
Definition: tree_schema.h:569
YANG refine-stmt.
Definition: tree_schema.h:680
Covers restrictions: range, length, pattern, must.
Definition: tree_schema.h:591
YANG revision-stmt.
Definition: tree_schema.h:607
Helper structure for generic storage of the extension instances content.
Definition: tree_schema.h:506
YANG typedef-stmt.
Definition: tree_schema.h:656
YANG type-stmt.
Definition: tree_schema.h:633
Enumeration/Bit value definition.
Definition: tree_schema.h:617
YANG when-stmt.
Definition: tree_schema.h:670
LY_DATA_TYPE
YANG built-in types.
Definition: tree.h:203
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
Definition: tree.h:235
#define LY_ARRAY_COUNT_TYPE
Type (i.e. size) of the sized array's size counter.
Definition: tree.h:104
Logger manipulation routines and error definitions.
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:25
libyang generic macros and functions to work with YANG schema or data trees.
YANG data representation.
Definition: tree_data.h:531