libyang  2.0.164
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 "config.h"
26 #include "log.h"
27 #include "tree.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct ly_ctx;
34 struct ly_path;
35 struct ly_set;
36 struct lys_module;
37 struct lysc_node;
38 struct lyxp_expr;
39 
153 /* *INDENT-OFF* */
154 
183 #define LYSC_TREE_DFS_BEGIN(START, ELEM) \
184  { ly_bool LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
185  for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node *)(START); \
186  (ELEM); \
187  (ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
188 
202 #define LYSC_TREE_DFS_END(START, ELEM) \
203  /* select element for the next run - children first */ \
204  if (LYSC_TREE_DFS_continue) { \
205  (LYSC_TREE_DFS_next) = NULL; \
206  } else { \
207  (LYSC_TREE_DFS_next) = (struct lysc_node *)lysc_node_child(ELEM); \
208  } \
209  if (!(LYSC_TREE_DFS_next)) { \
210  /* no children, try siblings */ \
211  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
212  } \
213  while (!(LYSC_TREE_DFS_next)) { \
214  /* parent is already processed, go to its sibling */ \
215  (ELEM) = (ELEM)->parent; \
216  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
217  } }
218 
222 #define _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) \
223  if ((ELEM) == (struct lysc_node *)(START)) { \
224  /* we are done, no next element to process */ \
225  break; \
226  } \
227  (NEXT) = (ELEM)->next;
228 
229 /* *INDENT-ON* */
230 
231 #define LY_REV_SIZE 11
238 #define LYS_UNKNOWN 0x0000
239 #define LYS_CONTAINER 0x0001
240 #define LYS_CHOICE 0x0002
241 #define LYS_LEAF 0x0004
242 #define LYS_LEAFLIST 0x0008
243 #define LYS_LIST 0x0010
244 #define LYS_ANYXML 0x0020
245 #define LYS_ANYDATA 0x0060
246 #define LYS_CASE 0x0080
248 #define LYS_RPC 0x0100
249 #define LYS_ACTION 0x0200
250 #define LYS_NOTIF 0x0400
252 #define LYS_USES 0x0800
253 #define LYS_INPUT 0x1000
254 #define LYS_OUTPUT 0x2000
255 #define LYS_GROUPING 0x4000
256 #define LYS_AUGMENT 0x8000
257 
258 #define LYS_NODETYPE_MASK 0xffff
269 #define LY_STMT_IS_OP(STMT) (((STMT) == LY_STMT_ACTION) || ((STMT) == LY_STMT_RPC))
270 
280 #define LY_STMT_IS_DATA_NODE(STMT) (((STMT) >= LY_STMT_ANYDATA) && ((STMT) <= LY_STMT_LIST))
281 
292 #define LY_STMT_IS_NODE(STMT) (((STMT) >= LY_STMT_NOTIFICATION) && ((STMT) <= LY_STMT_LIST))
293 
297 enum ly_stmt {
299 
305 
306 /* LY_STMT_IS_OP */
310  LY_STMT_RPC,
314 /* LY_STMT_IS_DATA_NODE */
338  LY_STMT_LEAF,
348  LY_STMT_LIST,
354 
355 /* rest */
405  LY_STMT_TYPE,
409  LY_STMT_UNITS,
415 
416  /* separated from the list of statements
417  * the following tokens are part of the syntax and parsers have to work
418  * with them, but they are not a standard YANG statements
419  */
423 
424  /*
425  * YIN-specific tokens, still they are part of the syntax, but not the standard statements
426  */
429 };
430 
436 LIBYANG_API_DECL const char *ly_stmt2str(enum ly_stmt stmt);
437 
443 LIBYANG_API_DECL enum ly_stmt lys_nodetype2stmt(uint16_t nodetype);
444 
451  LY_STMT_CARD_OPT, /* 0..1 */
453  LY_STMT_CARD_SOME, /* 1..n */
454  LY_STMT_CARD_ANY /* 0..n */
455 };
456 
460 struct lysp_import {
461  struct lys_module *module;
463  const char *name;
464  const char *prefix;
465  const char *dsc;
466  const char *ref;
468  uint16_t flags;
469  char rev[LY_REV_SIZE];
470 };
471 
475 struct lysp_include {
478  const char *name;
479  const char *dsc;
480  const char *ref;
482  char rev[LY_REV_SIZE];
486 };
487 
491 struct lysp_ext {
492  const char *name;
493  const char *argname;
494  const char *dsc;
495  const char *ref;
497  uint16_t flags;
499  struct lysc_ext *compiled;
503 };
504 
508 struct lysp_stmt {
509  const char *stmt;
510  const char *arg;
512  void *prefix_data;
514  struct lysp_stmt *next;
515  struct lysp_stmt *child;
516  uint16_t flags;
517  enum ly_stmt kw;
518 };
519 
520 #define LYS_YIN 0x1
525 struct lysp_ext_instance {
526  const char *name;
527  const char *argument;
529  struct lysp_node *parsed;
531  void *prefix_data;
534  struct lysp_stmt *child;
536  void *parent;
538  enum ly_stmt parent_stmt;
541  uint16_t flags;
542 };
543 
547 struct lysp_feature {
548  const char *name;
553  const char *dsc;
554  const char *ref;
556  uint16_t flags;
558 };
559 
564  uint8_t *expr;
566 };
567 
571 struct lysp_qname {
572  const char *str;
573  const struct lysp_module *mod;
575 };
576 
580 struct lysp_ident {
581  const char *name;
583  const char **bases;
584  const char *dsc;
585  const char *ref;
587  uint16_t flags;
588 };
589 
593 struct lysp_restr {
594 #define LYSP_RESTR_PATTERN_ACK 0x06
595 #define LYSP_RESTR_PATTERN_NACK 0x15
596  struct lysp_qname arg;
599  const char *emsg;
600  const char *eapptag;
601  const char *dsc;
602  const char *ref;
604 };
605 
611  const char *dsc;
612  const char *ref;
614 };
615 
620  const char *name;
621  const char *dsc;
622  const char *ref;
623  int64_t value;
626  uint16_t flags;
628 };
629 
635 struct lysp_type {
636  const char *name;
637  struct lysp_restr *range;
638  struct lysp_restr *length;
642  struct lyxp_expr *path;
643  const char **bases;
644  struct lysp_type *types;
647  const struct lysp_module *pmod;
648  struct lysc_type *compiled;
650  uint8_t fraction_digits;
652  uint16_t flags;
653 };
654 
658 struct lysp_tpdf {
659  const char *name;
660  const char *units;
661  struct lysp_qname dflt;
662  const char *dsc;
663  const char *ref;
665  struct lysp_type type;
666  uint16_t flags;
667 };
668 
672 struct lysp_when {
673  const char *cond;
674  const char *dsc;
675  const char *ref;
677 };
678 
682 struct lysp_refine {
683  const char *nodeid;
684  const char *dsc;
685  const char *ref;
687  struct lysp_restr *musts;
688  const char *presence;
689  struct lysp_qname *dflts;
690  uint32_t min;
691  uint32_t max;
693  uint16_t flags;
694 };
695 
704 #define LYS_DEV_NOT_SUPPORTED 1
705 #define LYS_DEV_ADD 2
706 #define LYS_DEV_DELETE 3
707 #define LYS_DEV_REPLACE 4
713 struct lysp_deviate {
714  uint8_t mod;
715  struct lysp_deviate *next;
717 };
718 
720  uint8_t mod;
721  struct lysp_deviate *next;
723  const char *units;
724  struct lysp_restr *musts;
725  struct lysp_qname *uniques;
726  struct lysp_qname *dflts;
727  uint16_t flags;
728  uint32_t min;
729  uint32_t max;
730 };
731 
733  uint8_t mod;
734  struct lysp_deviate *next;
736  const char *units;
737  struct lysp_restr *musts;
738  struct lysp_qname *uniques;
739  struct lysp_qname *dflts;
740 };
741 
743  uint8_t mod;
744  struct lysp_deviate *next;
746  struct lysp_type *type;
747  const char *units;
748  struct lysp_qname dflt;
749  uint16_t flags;
750  uint32_t min;
751  uint32_t max;
752 };
753 
755  const char *nodeid;
756  const char *dsc;
757  const char *ref;
760 };
761 
885 #define LYS_CONFIG_W 0x01
886 #define LYS_CONFIG_R 0x02
887 #define LYS_CONFIG_MASK 0x03
888 #define LYS_STATUS_CURR 0x04
889 #define LYS_STATUS_DEPRC 0x08
890 #define LYS_STATUS_OBSLT 0x10
891 #define LYS_STATUS_MASK 0x1C
892 #define LYS_MAND_TRUE 0x20
897 #define LYS_MAND_FALSE 0x40
900 #define LYS_MAND_MASK 0x60
901 #define LYS_PRESENCE 0x80
904 #define LYS_UNIQUE 0x80
905 #define LYS_KEY 0x0100
906 #define LYS_KEYLESS 0x0200
907 #define LYS_DISABLED 0x0100
908 #define LYS_FENABLED 0x20
909 #define LYS_ORDBY_SYSTEM 0x80
911 #define LYS_ORDBY_USER 0x40
914 #define LYS_ORDBY_MASK 0x60
915 #define LYS_YINELEM_TRUE 0x80
916 #define LYS_YINELEM_FALSE 0x0100
917 #define LYS_YINELEM_MASK 0x0180
918 #define LYS_USED_GRP 0x0400
920 #define LYS_SET_VALUE 0x0200
921 #define LYS_SET_MIN 0x0200
922 #define LYS_SET_MAX 0x0400
924 #define LYS_SET_BASE 0x0001
925 #define LYS_SET_BIT 0x0002
926 #define LYS_SET_ENUM 0x0004
927 #define LYS_SET_FRDIGITS 0x0008
928 #define LYS_SET_LENGTH 0x0010
929 #define LYS_SET_PATH 0x0020
930 #define LYS_SET_PATTERN 0x0040
931 #define LYS_SET_RANGE 0x0080
932 #define LYS_SET_TYPE 0x0100
933 #define LYS_SET_REQINST 0x0200
934 #define LYS_SET_DFLT 0x0200
939 #define LYS_SET_UNITS 0x0400
940 #define LYS_SET_CONFIG 0x0800
942 #define LYS_SINGLEQUOTED 0x0100
943 #define LYS_DOUBLEQUOTED 0x0200
945 #define LYS_YIN_ATTR 0x0400
946 #define LYS_YIN_ARGUMENT 0x0800
948 #define LYS_INTERNAL 0x1000
950 #define LYS_IS_ENUM 0x0200
952 #define LYS_IS_INPUT 0x1000
954 #define LYS_IS_OUTPUT 0x2000
956 #define LYS_IS_NOTIF 0x4000
958 #define LYS_FLAGS_COMPILED_MASK 0xff
964 struct lysp_node {
965  struct lysp_node *parent;
966  uint16_t nodetype;
967  uint16_t flags;
968  struct lysp_node *next;
969  const char *name;
970  const char *dsc;
971  const char *ref;
975 };
976 
981  union {
982  struct lysp_node node;
983  struct {
984  struct lysp_node *parent;
985  uint16_t nodetype;
986  uint16_t flags;
987  struct lysp_node *next;
988  const char *name;
989  const char *dsc;
990  const char *ref;
991  struct lysp_qname *iffeatures;
992  struct lysp_ext_instance *exts;
993  };
994  };
996  /* container */
997  struct lysp_restr *musts;
998  struct lysp_when *when;
999  const char *presence;
1002  struct lysp_node *child;
1005 };
1006 
1008  union {
1009  struct lysp_node node;
1010  struct {
1011  struct lysp_node *parent;
1012  uint16_t nodetype;
1013  uint16_t flags;
1014  struct lysp_node *next;
1015  const char *name;
1016  const char *dsc;
1017  const char *ref;
1018  struct lysp_qname *iffeatures;
1019  struct lysp_ext_instance *exts;
1020  };
1021  };
1023  /* leaf */
1024  struct lysp_restr *musts;
1025  struct lysp_when *when;
1026  struct lysp_type type;
1027  const char *units;
1028  struct lysp_qname dflt;
1029 };
1030 
1032  union {
1033  struct lysp_node node;
1034  struct {
1035  struct lysp_node *parent;
1036  uint16_t nodetype;
1037  uint16_t flags;
1038  struct lysp_node *next;
1039  const char *name;
1040  const char *dsc;
1041  const char *ref;
1042  struct lysp_qname *iffeatures;
1043  struct lysp_ext_instance *exts;
1044  };
1045  };
1047  /* leaf-list */
1048  struct lysp_restr *musts;
1049  struct lysp_when *when;
1050  struct lysp_type type;
1051  const char *units;
1052  struct lysp_qname *dflts;
1054  uint32_t min;
1055  uint32_t max;
1056 };
1057 
1059  union {
1060  struct lysp_node node;
1061  struct {
1062  struct lysp_node *parent;
1063  uint16_t nodetype;
1064  uint16_t flags;
1065  struct lysp_node *next;
1066  const char *name;
1067  const char *dsc;
1068  const char *ref;
1069  struct lysp_qname *iffeatures;
1070  struct lysp_ext_instance *exts;
1071  };
1072  };
1074  /* list */
1075  struct lysp_restr *musts;
1076  struct lysp_when *when;
1077  const char *key;
1080  struct lysp_node *child;
1084  uint32_t min;
1085  uint32_t max;
1086 };
1087 
1089  union {
1090  struct lysp_node node;
1091  struct {
1092  struct lysp_node *parent;
1093  uint16_t nodetype;
1094  uint16_t flags;
1095  struct lysp_node *next;
1096  const char *name;
1097  const char *dsc;
1098  const char *ref;
1099  struct lysp_qname *iffeatures;
1100  struct lysp_ext_instance *exts;
1101  };
1102  };
1104  /* choice */
1105  struct lysp_node *child;
1106  struct lysp_when *when;
1107  struct lysp_qname dflt;
1108 };
1109 
1111  union {
1112  struct lysp_node node;
1113  struct {
1114  struct lysp_node *parent;
1115  uint16_t nodetype;
1116  uint16_t flags;
1117  struct lysp_node *next;
1118  const char *name;
1119  const char *dsc;
1120  const char *ref;
1121  struct lysp_qname *iffeatures;
1122  struct lysp_ext_instance *exts;
1123  };
1124  };
1126  /* case */
1127  struct lysp_node *child;
1128  struct lysp_when *when;
1129 };
1130 
1132  union {
1133  struct lysp_node node;
1134  struct {
1135  struct lysp_node *parent;
1136  uint16_t nodetype;
1137  uint16_t flags;
1138  struct lysp_node *next;
1139  const char *name;
1140  const char *dsc;
1141  const char *ref;
1142  struct lysp_qname *iffeatures;
1143  struct lysp_ext_instance *exts;
1144  };
1145  };
1147  /* anyxml/anydata */
1148  struct lysp_restr *musts;
1149  struct lysp_when *when;
1150 };
1151 
1153  union {
1154  struct lysp_node node;
1155  struct {
1156  struct lysp_node *parent;
1157  uint16_t nodetype;
1158  uint16_t flags;
1159  struct lysp_node *next;
1160  const char *name;
1161  const char *dsc;
1162  const char *ref;
1163  struct lysp_qname *iffeatures;
1164  struct lysp_ext_instance *exts;
1165  };
1166  };
1168  /* uses */
1171  struct lysp_when *when;
1172 };
1173 
1178  union {
1179  struct lysp_node node;
1180  struct {
1181  struct lysp_node *parent;
1182  uint16_t nodetype;
1183  uint16_t flags;
1184  struct lysp_node *next;
1185  const char *name;
1186  const char *dsc;
1187  const char *ref;
1188  struct lysp_qname *iffeatures;
1189  struct lysp_ext_instance *exts;
1190  };
1191  };
1193  /* inout */
1194  struct lysp_restr *musts;
1197  struct lysp_node *child;
1198 };
1199 
1204  union {
1205  struct lysp_node node;
1206  struct {
1207  struct lysp_node *parent;
1208  uint16_t nodetype;
1209  uint16_t flags;
1210  struct lysp_node_action *next;
1211  const char *name;
1212  const char *dsc;
1213  const char *ref;
1214  struct lysp_qname *iffeatures;
1215  struct lysp_ext_instance *exts;
1216  };
1217  };
1219  /* action */
1223  struct lysp_node_action_inout input;
1225 };
1226 
1231  union {
1232  struct lysp_node node;
1233  struct {
1234  struct lysp_node *parent;
1235  uint16_t nodetype;
1236  uint16_t flags;
1237  struct lysp_node_notif *next;
1238  const char *name;
1239  const char *dsc;
1240  const char *ref;
1241  struct lysp_qname *iffeatures;
1242  struct lysp_ext_instance *exts;
1243  };
1244  };
1246  /* notif */
1247  struct lysp_restr *musts;
1250  struct lysp_node *child;
1251 };
1252 
1257  union {
1258  struct lysp_node node;
1259  struct {
1260  struct lysp_node *parent;
1261  uint16_t nodetype;
1262  uint16_t flags;
1263  struct lysp_node_grp *next;
1264  const char *name;
1265  const char *dsc;
1266  const char *ref;
1267  struct lysp_qname *iffeatures;
1268  struct lysp_ext_instance *exts;
1269  };
1270  };
1272  /* grp */
1275  struct lysp_node *child;
1278 };
1279 
1284  union {
1285  struct lysp_node node;
1286  struct {
1287  struct lysp_node *parent;
1288  uint16_t nodetype;
1289  uint16_t flags;
1290  struct lysp_node_augment *next;
1291  const char *nodeid;
1292  const char *dsc;
1293  const char *ref;
1294  struct lysp_qname *iffeatures;
1295  struct lysp_ext_instance *exts;
1296  };
1297  };
1299  struct lysp_node *child;
1300  struct lysp_when *when;
1303 };
1304 
1308 typedef enum LYS_VERSION {
1311  LYS_VERSION_1_1 = 2
1313 
1319 struct lysp_module {
1320  struct lys_module *mod;
1331  struct lysp_node *data;
1338  uint8_t version;
1339  uint8_t parsing : 1;
1340  uint8_t is_submod : 1;
1341 };
1342 
1344  struct lys_module *mod;
1355  struct lysp_node *data;
1362  uint8_t version;
1363  uint8_t parsing : 1;
1364  uint8_t is_submod : 1;
1366  uint8_t latest_revision : 2;
1370  const char *name;
1371  const char *filepath;
1372  const char *prefix;
1373  const char *org;
1374  const char *contact;
1375  const char *dsc;
1376  const char *ref;
1377 };
1378 
1385 #define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
1386 
1391 struct lysc_prefix {
1392  char *prefix;
1393  const struct lys_module *mod;
1394 };
1395 
1403 struct lysc_ext {
1404  const char *name;
1405  const char *argname;
1407  struct lyplg_ext *plugin;
1408  struct lys_module *module;
1409  uint32_t refcount;
1410  uint16_t flags;
1411 };
1412 
1420  enum ly_stmt stmt;
1422  void *storage;
1424 };
1425 
1430  struct lysc_ext *def;
1431  const char *argument;
1432  struct lys_module *module;
1436  void *data;
1438  void *parent;
1440  enum ly_stmt parent_stmt;
1443 };
1444 
1448 struct lysc_when {
1449  struct lyxp_expr *cond;
1450  struct lysc_node *context;
1452  const char *dsc;
1453  const char *ref;
1455  uint32_t refcount;
1456  uint16_t flags;
1457 };
1458 
1462 struct lysc_ident {
1463  const char *name;
1464  const char *dsc;
1465  const char *ref;
1466  struct lys_module *module;
1467  struct lysc_ident **derived;
1470  uint16_t flags;
1471 };
1472 
1479 #define LYS_IFF_NOT 0x00
1480 #define LYS_IFF_AND 0x01
1481 #define LYS_IFF_OR 0x02
1482 #define LYS_IFF_F 0x03
1488 struct lysc_revision {
1489  char date[LY_REV_SIZE];
1491 };
1492 
1493 struct lysc_range {
1495  union {
1496  int64_t min_64;
1497  uint64_t min_u64;
1498  };
1499  union {
1500  int64_t max_64;
1501  uint64_t max_u64;
1502  };
1503  } *parts;
1504  const char *dsc;
1505  const char *ref;
1506  const char *emsg;
1507  const char *eapptag;
1509 };
1510 
1512  const char *expr;
1513  pcre2_code *code;
1514  const char *dsc;
1515  const char *ref;
1516  const char *emsg;
1517  const char *eapptag;
1519  uint32_t inverted : 1;
1520  uint32_t refcount : 31;
1521 };
1522 
1523 struct lysc_must {
1524  struct lyxp_expr *cond;
1526  const char *dsc;
1527  const char *ref;
1528  const char *emsg;
1529  const char *eapptag;
1531 };
1532 
1533 struct lysc_type {
1535  struct lyplg_type *plugin;
1537  uint32_t refcount;
1539 };
1540 
1543  struct lyplg_type *plugin;
1545  uint32_t refcount;
1546  struct lysc_range *range;
1547 };
1548 
1551  struct lyplg_type *plugin;
1553  uint32_t refcount;
1555  struct lysc_range *range;
1556 };
1557 
1560  struct lyplg_type *plugin;
1562  uint32_t refcount;
1563  struct lysc_range *length;
1565 };
1566 
1568  const char *name;
1569  const char *dsc;
1570  const char *ref;
1572  union {
1573  int32_t value;
1574  uint32_t position;
1575  };
1576  uint16_t flags;
1578 };
1579 
1582  struct lyplg_type *plugin;
1584  uint32_t refcount;
1586 };
1587 
1590  struct lyplg_type *plugin;
1592  uint32_t refcount;
1595 };
1596 
1599  struct lyplg_type *plugin;
1601  uint32_t refcount;
1602  struct lyxp_expr *path;
1604  const struct lys_module *cur_mod;
1607 };
1608 
1611  struct lyplg_type *plugin;
1613  uint32_t refcount;
1614  struct lysc_ident **bases;
1616 };
1617 
1620  struct lyplg_type *plugin;
1622  uint32_t refcount;
1624 };
1625 
1628  struct lyplg_type *plugin;
1630  uint32_t refcount;
1631  struct lysc_type **types;
1632 };
1633 
1636  struct lyplg_type *plugin;
1638  uint32_t refcount;
1639  struct lysc_range *length;
1640 };
1641 
1645 #define LYS_NODE_HASH_COUNT 4
1646 
1650 struct lysc_node {
1651  uint16_t nodetype;
1652  uint16_t flags;
1654  struct lys_module *module;
1655  struct lysc_node *parent;
1656  struct lysc_node *next;
1657  struct lysc_node *prev;
1661  const char *name;
1662  const char *dsc;
1663  const char *ref;
1665  void *priv;
1666 };
1667 
1669  union {
1670  struct lysc_node node;
1671  struct {
1672  uint16_t nodetype;
1673  uint16_t flags;
1674  uint8_t hash[LYS_NODE_HASH_COUNT];
1675  struct lys_module *module;
1676  struct lysc_node *parent;
1677  struct lysc_node *next;
1678  struct lysc_node *prev;
1679  const char *name;
1680  const char *dsc;
1681  const char *ref;
1682  struct lysc_ext_instance *exts;
1683  void *priv;
1684  };
1685  };
1686 
1687  struct lysc_node *child;
1688  struct lysc_must *musts;
1689 };
1690 
1692  union {
1693  struct lysc_node node;
1694  struct {
1695  uint16_t nodetype;
1696  uint16_t flags;
1697  uint8_t hash[LYS_NODE_HASH_COUNT];
1698  struct lys_module *module;
1699  struct lysc_node *parent;
1700  struct lysc_node_action *next;
1701  struct lysc_node_action *prev;
1705  const char *name;
1706  const char *dsc;
1707  const char *ref;
1708  struct lysc_ext_instance *exts;
1709  void *priv;
1710  };
1711  };
1712 
1713  struct lysc_when **when;
1716  struct lysc_node_action_inout input;
1719 };
1720 
1722  union {
1723  struct lysc_node node;
1724  struct {
1725  uint16_t nodetype;
1726  uint16_t flags;
1727  uint8_t hash[LYS_NODE_HASH_COUNT];
1728  struct lys_module *module;
1729  struct lysc_node *parent;
1730  struct lysc_node_notif *next;
1731  struct lysc_node_notif *prev;
1735  const char *name;
1736  const char *dsc;
1737  const char *ref;
1738  struct lysc_ext_instance *exts;
1739  void *priv;
1740  };
1741  };
1742 
1743  struct lysc_node *child;
1744  struct lysc_must *musts;
1745  struct lysc_when **when;
1748 };
1749 
1751  union {
1752  struct lysc_node node;
1753  struct {
1754  uint16_t nodetype;
1755  uint16_t flags;
1756  uint8_t hash[LYS_NODE_HASH_COUNT];
1757  struct lys_module *module;
1758  struct lysc_node *parent;
1759  struct lysc_node *next;
1760  struct lysc_node *prev;
1764  const char *name;
1765  const char *dsc;
1766  const char *ref;
1767  struct lysc_ext_instance *exts;
1768  void *priv;
1769  };
1770  };
1771 
1772  struct lysc_node *child;
1773  struct lysc_must *musts;
1774  struct lysc_when **when;
1777 };
1778 
1780  union {
1781  struct lysc_node node;
1782  struct {
1783  uint16_t nodetype;
1784  uint16_t flags;
1785  uint8_t hash[LYS_NODE_HASH_COUNT];
1786  struct lys_module *module;
1787  struct lysc_node *parent;
1788  struct lysc_node *next;
1789  struct lysc_node *prev;
1793  const char *name;
1794  const char *dsc;
1795  const char *ref;
1796  struct lysc_ext_instance *exts;
1797  void *priv;
1798  };
1799  };
1800 
1801  struct lysc_node *child;
1803  struct lysc_when **when;
1804 };
1805 
1807  union {
1808  struct lysc_node node;
1809  struct {
1810  uint16_t nodetype;
1811  uint16_t flags;
1812  uint8_t hash[LYS_NODE_HASH_COUNT];
1813  struct lys_module *module;
1814  struct lysc_node *parent;
1815  struct lysc_node *next;
1816  struct lysc_node *prev;
1820  const char *name;
1821  const char *dsc;
1822  const char *ref;
1823  struct lysc_ext_instance *exts;
1824  void *priv;
1825  };
1826  };
1827 
1831  struct lysc_when **when;
1833 };
1834 
1836  union {
1837  struct lysc_node node;
1838  struct {
1839  uint16_t nodetype;
1840  uint16_t flags;
1841  uint8_t hash[LYS_NODE_HASH_COUNT];
1842  struct lys_module *module;
1843  struct lysc_node *parent;
1844  struct lysc_node *next;
1845  struct lysc_node *prev;
1849  const char *name;
1850  const char *dsc;
1851  const char *ref;
1852  struct lysc_ext_instance *exts;
1853  void *priv;
1854  };
1855  };
1856 
1857  struct lysc_must *musts;
1858  struct lysc_when **when;
1859  struct lysc_type *type;
1861  const char *units;
1862  struct lyd_value *dflt;
1863 };
1864 
1866  union {
1867  struct lysc_node node;
1868  struct {
1869  uint16_t nodetype;
1870  uint16_t flags;
1871  uint8_t hash[LYS_NODE_HASH_COUNT];
1872  struct lys_module *module;
1873  struct lysc_node *parent;
1874  struct lysc_node *next;
1875  struct lysc_node *prev;
1879  const char *name;
1880  const char *dsc;
1881  const char *ref;
1882  struct lysc_ext_instance *exts;
1883  void *priv;
1884  };
1885  };
1886 
1887  struct lysc_must *musts;
1888  struct lysc_when **when;
1889  struct lysc_type *type;
1891  const char *units;
1892  struct lyd_value **dflts;
1895  uint32_t min;
1896  uint32_t max;
1898 };
1899 
1901  union {
1902  struct lysc_node node;
1903  struct {
1904  uint16_t nodetype;
1905  uint16_t flags;
1906  uint8_t hash[LYS_NODE_HASH_COUNT];
1907  struct lys_module *module;
1908  struct lysc_node *parent;
1909  struct lysc_node *next;
1910  struct lysc_node *prev;
1914  const char *name;
1915  const char *dsc;
1916  const char *ref;
1917  struct lysc_ext_instance *exts;
1918  void *priv;
1919  };
1920  };
1921 
1922  struct lysc_node *child;
1923  struct lysc_must *musts;
1924  struct lysc_when **when;
1929  uint32_t min;
1930  uint32_t max;
1931 };
1932 
1934  union {
1935  struct lysc_node node;
1936  struct {
1937  uint16_t nodetype;
1938  uint16_t flags;
1939  uint8_t hash[LYS_NODE_HASH_COUNT];
1940  struct lys_module *module;
1941  struct lysc_node *parent;
1942  struct lysc_node *next;
1943  struct lysc_node *prev;
1947  const char *name;
1948  const char *dsc;
1949  const char *ref;
1950  struct lysc_ext_instance *exts;
1951  void *priv;
1952  };
1953  };
1954 
1955  struct lysc_must *musts;
1956  struct lysc_when **when;
1957 };
1958 
1965 struct lysc_module {
1966  struct lys_module *mod;
1968  struct lysc_node *data;
1972 };
1973 
1980 #define lysc_is_userordered(lysc_node) \
1981  ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
1982 
1989 #define lysc_is_key(lysc_node) \
1990  ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
1991 
1998 #define lysc_is_np_cont(lysc_node) \
1999  ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
2000 
2007 #define lysc_is_dup_inst_list(lysc_node) \
2008  ((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
2009  ((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
2010 
2017 LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
2018 
2022 #define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
2023 
2034 LIBYANG_API_DECL const struct lysc_when *lysc_has_when(const struct lysc_node *node);
2035 
2043 LIBYANG_API_DECL const struct lys_module *lysc_owner_module(const struct lysc_node *node);
2044 
2051 LIBYANG_API_DECL const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
2052 
2059 LIBYANG_API_DECL const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
2060 
2067 LIBYANG_API_DECL const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
2068 
2075 LIBYANG_API_DECL const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
2076 
2083 LIBYANG_API_DECL const struct lysp_node *lysp_node_child(const struct lysp_node *node);
2084 
2091 LIBYANG_API_DECL const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
2092 
2099 LIBYANG_API_DECL const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
2100 
2111 LIBYANG_API_DECL const struct lysc_node *lysc_node_child(const struct lysc_node *node);
2112 
2120 LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node);
2121 
2129 LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
2130 
2140 typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
2141 
2158 LIBYANG_API_DECL LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
2159 
2171 LIBYANG_API_DECL LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
2172 
2181 LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff);
2182 
2194 LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident);
2195 
2204 LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod,
2205  uint32_t *idx);
2206 
2223 LIBYANG_API_DECL LY_ERR lysc_ext_substmt(const struct lysc_ext_instance *ext, enum ly_stmt substmt,
2224  void **instance_p, enum ly_stmt_cardinality *cardinality_p);
2225 
2231 #define LYS_FIND_XP_SCHEMA 0x08
2232 #define LYS_FIND_XP_OUTPUT 0x10
2233 #define LYS_FIND_NO_MATCH_ERROR 0x40
2248 LIBYANG_API_DECL LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2249  uint32_t options, struct ly_set **set);
2250 
2263 LIBYANG_API_DECL LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod,
2264  const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set);
2265 
2277 LIBYANG_API_DECL LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2278  uint32_t options, struct ly_set **set);
2279 
2288 LIBYANG_API_DECL LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
2289 
2300 LIBYANG_API_DECL LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path,
2301  ly_bool output, struct ly_set **set);
2302 
2312 LIBYANG_API_DECL const struct lysc_node *lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2313  const char *path, ly_bool output);
2314 
2318 typedef enum {
2322 
2334 LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
2335 
2339 struct lys_module {
2340  struct ly_ctx *ctx;
2341  const char *name;
2342  const char *revision;
2343  const char *ns;
2344  const char *prefix;
2345  const char *filepath;
2346  const char *org;
2347  const char *contact;
2348  const char *dsc;
2349  const char *ref;
2370 };
2371 
2379 #define LYS_MOD_LATEST_REV 0x01
2380 #define LYS_MOD_LATEST_SEARCHDIRS 0x02
2381 #define LYS_MOD_IMPORTED_REV 0x04
2384 #define LYS_MOD_LATEST_IMPCLB 0x08
2399 LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
2400 
2420 LIBYANG_API_DECL const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
2421  const struct lysc_module *module, uint32_t options);
2422 
2435 LIBYANG_API_DECL const struct lysc_node *lys_getnext_ext(const struct lysc_node *last, const struct lysc_node *parent,
2436  const struct lysc_ext_instance *ext, uint32_t options);
2437 
2445 #define LYS_GETNEXT_WITHCHOICE 0x01
2446 #define LYS_GETNEXT_NOCHOICE 0x02
2447 #define LYS_GETNEXT_WITHCASE 0x04
2448 #define LYS_GETNEXT_INTONPCONT 0x08
2449 #define LYS_GETNEXT_OUTPUT 0x10
2465 LIBYANG_API_DECL const struct lysc_node *lys_find_child(const struct lysc_node *parent, const struct lys_module *module,
2466  const char *name, size_t name_len, uint16_t nodetype, uint32_t options);
2467 
2483 LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
2484 
2491 LIBYANG_API_DECL const char *lys_nodetype2str(uint16_t nodetype);
2492 
2499 LIBYANG_API_DECL const char *lyxp_get_expr(const struct lyxp_expr *path);
2500 
2503 #ifdef __cplusplus
2504 }
2505 #endif
2506 
2507 #endif /* LY_TREE_SCHEMA_H_ */
lysc_when::refcount
uint32_t refcount
Definition: tree_schema.h:1455
lysc_node::priv
void * priv
Definition: tree_schema.h:1665
lysp_type::enums
struct lysp_type_enum * enums
Definition: tree_schema.h:640
lysp_refine::flags
uint16_t flags
Definition: tree_schema.h:693
lysp_node_notif::child
struct lysp_node * child
Definition: tree_schema.h:1250
LYS_VERSION_1_0
@ LYS_VERSION_1_0
Definition: tree_schema.h:1310
lysc_node_leaflist::units
const char * units
Definition: tree_schema.h:1891
lysp_submodule::imports
struct lysp_import * imports
Definition: tree_schema.h:1348
lysc_type_bitenum_item::ref
const char * ref
Definition: tree_schema.h:1570
lysc_type_num::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1542
LY_STMT_MODIFIER
@ LY_STMT_MODIFIER
Definition: tree_schema.h:385
lysp_stmt
Helper structure for generic storage of the extension instances content.
Definition: tree_schema.h:508
LY_STMT_ERROR_MESSAGE
@ LY_STMT_ERROR_MESSAGE
Definition: tree_schema.h:369
LY_STMT_IMPORT
@ LY_STMT_IMPORT
Definition: tree_schema.h:378
lysc_type_dec::refcount
uint32_t refcount
Definition: tree_schema.h:1553
lysc_type_identityref
Definition: tree_schema.h:1609
lysc_type_union::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1629
lysp_deviate_add::min
uint32_t min
Definition: tree_schema.h:728
lysp_ext
YANG extension-stmt.
Definition: tree_schema.h:491
lyplg_type
Hold type-specific functions for various operations with the data values.
Definition: plugins_types.h:573
lysp_node::iffeatures
struct lysp_qname * iffeatures
Definition: tree_schema.h:972
LY_STMT_UNITS
@ LY_STMT_UNITS
Definition: tree_schema.h:409
lysp_stmt::stmt
const char * stmt
Definition: tree_schema.h:509
LY_STMT_CASE
@ LY_STMT_CASE
Definition: tree_schema.h:326
lysp_node_uses
Definition: tree_schema.h:1152
lysc_iffeature
Compiled YANG if-feature-stmt.
Definition: tree_schema.h:563
lysp_type_enum::value
int64_t value
Definition: tree_schema.h:623
lysc_node::dsc
const char * dsc
Definition: tree_schema.h:1662
lysp_deviate_rpl::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:745
lysc_node_case::when
struct lysc_when ** when
Definition: tree_schema.h:1803
lysp_submodule::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1358
lysp_stmt::kw
enum ly_stmt kw
Definition: tree_schema.h:517
lysc_type_instanceid::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1620
lysc_type_leafref::realtype
struct lysc_type * realtype
Definition: tree_schema.h:1605
lysc_node_action_inout::child
struct lysc_node * child
Definition: tree_schema.h:1687
LY_STMT_IDENTITY
@ LY_STMT_IDENTITY
Definition: tree_schema.h:374
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition: tree.h:203
lys_set_implemented
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
lysc_data_node
LIBYANG_API_DECL const struct lysc_node * lysc_data_node(const struct lysc_node *schema)
Get nearest schema parent (including the node itself) that can be instantiated in data.
lysc_prefix::mod
const struct lys_module * mod
Definition: tree_schema.h:1393
LY_STMT_SYNTAX_RIGHT_BRACE
@ LY_STMT_SYNTAX_RIGHT_BRACE
Definition: tree_schema.h:422
lysp_module
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1319
lysp_type_enum::ref
const char * ref
Definition: tree_schema.h:622
LY_STMT_USES
@ LY_STMT_USES
Definition: tree_schema.h:353
lysc_range::lysc_range_part
Definition: tree_schema.h:1494
LY_STMT_DESCRIPTION
@ LY_STMT_DESCRIPTION
Definition: tree_schema.h:363
lysp_deviate_del::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:735
lysp_node_container::when
struct lysp_when * when
Definition: tree_schema.h:998
lysp_refine::musts
struct lysp_restr * musts
Definition: tree_schema.h:687
lysp_tpdf::name
const char * name
Definition: tree_schema.h:659
lysc_node_anydata::when
struct lysc_when ** when
Definition: tree_schema.h:1956
LY_STMT_REVISION
@ LY_STMT_REVISION
Definition: tree_schema.h:401
LY_STMT_NAMESPACE
@ LY_STMT_NAMESPACE
Definition: tree_schema.h:388
lysc_when::context
struct lysc_node * context
Definition: tree_schema.h:1450
lysp_node_uses::augments
struct lysp_node_augment * augments
Definition: tree_schema.h:1170
lysc_node_anydata
Definition: tree_schema.h:1933
lys_identity_iffeature_value
LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident)
Get how the if-feature statement is evaluated for certain identity.
lysp_tpdf::dsc
const char * dsc
Definition: tree_schema.h:662
lysp_node_notif
YANG notification-stmt.
Definition: tree_schema.h:1230
LY_STMT_CONTACT
@ LY_STMT_CONTACT
Definition: tree_schema.h:361
lysp_node_action_inout::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1195
lysp_ident::bases
const char ** bases
Definition: tree_schema.h:583
LY_STMT_RPC
@ LY_STMT_RPC
Definition: tree_schema.h:310
lysp_node::name
const char * name
Definition: tree_schema.h:969
lysp_module::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1329
LY_STMT_PREFIX
@ LY_STMT_PREFIX
Definition: tree_schema.h:394
lysc_node_notif
Definition: tree_schema.h:1721
lysp_include::dsc
const char * dsc
Definition: tree_schema.h:479
lysp_node_notifs
LIBYANG_API_DECL 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...
lysc_ext::argname
const char * argname
Definition: tree_schema.h:1405
lysp_type::pmod
const struct lysp_module * pmod
Definition: tree_schema.h:647
lysc_node_choice::cases
struct lysc_node_case * cases
Definition: tree_schema.h:1828
lysc_type_str::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1561
lysp_include::rev
char rev[11]
Definition: tree_schema.h:482
lysp_tpdf
YANG typedef-stmt.
Definition: tree_schema.h:658
LY_STMT_CARD_SOME
@ LY_STMT_CARD_SOME
Definition: tree_schema.h:453
LY_STMT_DEFAULT
@ LY_STMT_DEFAULT
Definition: tree_schema.h:362
lysc_node_list::uniques
struct lysc_node_leaf *** uniques
Definition: tree_schema.h:1928
lys_module::compiled
struct lysc_module * compiled
Definition: tree_schema.h:2352
lysc_type_enum::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1583
LY_STMT_MUST
@ LY_STMT_MUST
Definition: tree_schema.h:387
lysc_when
YANG when-stmt.
Definition: tree_schema.h:1448
lysp_type_enum
Enumeration/Bit value definition.
Definition: tree_schema.h:619
lysp_module::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:1336
lysp_node_leaflist::dflts
struct lysp_qname * dflts
Definition: tree_schema.h:1052
lysc_ext_instance::def
struct lysc_ext * def
Definition: tree_schema.h:1430
lysp_node_anydata
Definition: tree_schema.h:1131
lysc_module::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1971
lysc_type_str::length
struct lysc_range * length
Definition: tree_schema.h:1563
lysp_module::augments
struct lysp_node_augment * augments
Definition: tree_schema.h:1332
lysc_ext_substmt::storage
void * storage
Definition: tree_schema.h:1422
LY_REV_SIZE
#define LY_REV_SIZE
Definition: tree_schema.h:231
lys_module::ns
const char * ns
Definition: tree_schema.h:2343
lysp_node_groupings
LIBYANG_API_DECL 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 ...
lysp_node_list::musts
struct lysp_restr * musts
Definition: tree_schema.h:1075
lysp_deviate_rpl::flags
uint16_t flags
Definition: tree_schema.h:749
lysp_revision::date
char date[11]
Definition: tree_schema.h:610
LYSC_PATH_LOG
@ LYSC_PATH_LOG
Definition: tree_schema.h:2319
lys_module::name
const char * name
Definition: tree_schema.h:2341
lysc_node_leaflist::when
struct lysc_when ** when
Definition: tree_schema.h:1888
lysp_node_augment
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition: tree_schema.h:1283
lysc_node_leaflist::max
uint32_t max
Definition: tree_schema.h:1896
LY_STMT_AUGMENT
@ LY_STMT_AUGMENT
Definition: tree_schema.h:325
LY_STMT_CONTAINER
@ LY_STMT_CONTAINER
Definition: tree_schema.h:332
lysp_tpdf::dflt
struct lysp_qname dflt
Definition: tree_schema.h:661
LY_STMT_REFERENCE
@ LY_STMT_REFERENCE
Definition: tree_schema.h:397
LY_STMT_ARGUMENT
@ LY_STMT_ARGUMENT
Definition: tree_schema.h:356
lysc_ext::module
struct lys_module * module
Definition: tree_schema.h:1408
LY_STMT_REQUIRE_INSTANCE
@ LY_STMT_REQUIRE_INSTANCE
Definition: tree_schema.h:400
lysp_ext_instance::name
const char * name
Definition: tree_schema.h:526
lys_module::identities
struct lysc_ident * identities
Definition: tree_schema.h:2355
lys_module::latest_revision
uint8_t latest_revision
Definition: tree_schema.h:2369
lysc_node
Compiled YANG data node.
Definition: tree_schema.h:1650
lysp_node_anydata::musts
struct lysp_restr * musts
Definition: tree_schema.h:1148
lysc_type_bits::bits
struct lysc_type_bitenum_item * bits
Definition: tree_schema.h:1593
LY_STMT_CONFIG
@ LY_STMT_CONFIG
Definition: tree_schema.h:360
lysp_submodule::features
struct lysp_feature * features
Definition: tree_schema.h:1351
lysp_node_augment::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1302
lysp_node_list::max
uint32_t max
Definition: tree_schema.h:1085
lysp_submodule::ref
const char * ref
Definition: tree_schema.h:1376
lysp_module::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1330
lysp_submodule::dsc
const char * dsc
Definition: tree_schema.h:1375
lys_module::deviated_by
struct lys_module ** deviated_by
Definition: tree_schema.h:2364
lysc_node_choice
Definition: tree_schema.h:1806
lysc_module::data
struct lysc_node * data
Definition: tree_schema.h:1968
lysc_type_bin::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1635
lysc_range::parts
struct lysc_range::lysc_range_part * parts
LY_STMT_ERROR_APP_TAG
@ LY_STMT_ERROR_APP_TAG
Definition: tree_schema.h:368
lysc_type_bin::length
struct lysc_range * length
Definition: tree_schema.h:1639
lysc_pattern::refcount
uint32_t refcount
Definition: tree_schema.h:1520
lysp_node_notif::musts
struct lysp_restr * musts
Definition: tree_schema.h:1247
lysp_deviation::dsc
const char * dsc
Definition: tree_schema.h:756
lysc_node_action::when
struct lysc_when ** when
Definition: tree_schema.h:1713
lysp_ext::ref
const char * ref
Definition: tree_schema.h:495
lysp_deviate_add::mod
uint8_t mod
Definition: tree_schema.h:720
lysc_node_list::when
struct lysc_when ** when
Definition: tree_schema.h:1924
lysc_node_container
Definition: tree_schema.h:1750
lysc_path
LIBYANG_API_DECL 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.
lysp_node_leaflist
Definition: tree_schema.h:1031
lysc_pattern::expr
const char * expr
Definition: tree_schema.h:1512
LYS_VERSION_1_1
@ LYS_VERSION_1_1
Definition: tree_schema.h:1311
lysc_ext_instance::parent_stmt
enum ly_stmt parent_stmt
Definition: tree_schema.h:1440
lysp_feature::dsc
const char * dsc
Definition: tree_schema.h:553
lys_module
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2339
lysc_ext_instance::module
struct lys_module * module
Definition: tree_schema.h:1432
lysc_node::flags
uint16_t flags
Definition: tree_schema.h:1652
lys_module::contact
const char * contact
Definition: tree_schema.h:2347
lysc_node_notifs
LIBYANG_API_DECL 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...
lysp_ident::iffeatures
struct lysp_qname * iffeatures
Definition: tree_schema.h:582
lysp_when::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:676
lysp_feature::iffeatures_c
struct lysc_iffeature * iffeatures_c
Definition: tree_schema.h:550
lysp_revision::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:613
LY_STMT_SYNTAX_LEFT_BRACE
@ LY_STMT_SYNTAX_LEFT_BRACE
Definition: tree_schema.h:421
LY_STMT_REFINE
@ LY_STMT_REFINE
Definition: tree_schema.h:399
LY_STMT_LIST
@ LY_STMT_LIST
Definition: tree_schema.h:348
lysc_ident::derived
struct lysc_ident ** derived
Definition: tree_schema.h:1467
lysp_submodule::deviations
struct lysp_deviation * deviations
Definition: tree_schema.h:1359
LY_STMT_FEATURE
@ LY_STMT_FEATURE
Definition: tree_schema.h:372
lysp_deviation::nodeid
const char * nodeid
Definition: tree_schema.h:755
lysc_ext::refcount
uint32_t refcount
Definition: tree_schema.h:1409
lysp_submodule::org
const char * org
Definition: tree_schema.h:1373
ly_bool
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:27
lysc_ext::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1406
lysc_node::next
struct lysc_node * next
Definition: tree_schema.h:1656
lysc_when::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1454
lysp_submodule::augments
struct lysp_node_augment * augments
Definition: tree_schema.h:1356
lysp_node_list::min
uint32_t min
Definition: tree_schema.h:1084
lysc_node_container::child
struct lysc_node * child
Definition: tree_schema.h:1772
lysp_type_enum::iffeatures
struct lysp_qname * iffeatures
Definition: tree_schema.h:624
lysp_node_leaf::dflt
struct lysp_qname dflt
Definition: tree_schema.h:1028
lysp_deviate_add::next
struct lysp_deviate * next
Definition: tree_schema.h:721
lysc_type::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1534
lysp_refine::dflts
struct lysp_qname * dflts
Definition: tree_schema.h:689
lysp_include::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:481
lysp_deviate_add::musts
struct lysp_restr * musts
Definition: tree_schema.h:724
lysp_submodule::revs
struct lysp_revision * revs
Definition: tree_schema.h:1346
lysc_tree_dfs_full
LIBYANG_API_DECL 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.
lysp_restr::emsg
const char * emsg
Definition: tree_schema.h:599
lysc_type_instanceid::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1619
lysc_pattern::eapptag
const char * eapptag
Definition: tree_schema.h:1517
lysc_type_identityref::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1610
lysp_module::extensions
struct lysp_ext * extensions
Definition: tree_schema.h:1326
lysp_refine::ref
const char * ref
Definition: tree_schema.h:685
lysp_node_leaflist::when
struct lysp_when * when
Definition: tree_schema.h:1049
lysc_type_enum::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1581
lysc_type_leafref::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1599
lysc_node_leaf::dflt
struct lyd_value * dflt
Definition: tree_schema.h:1862
lysc_range::emsg
const char * emsg
Definition: tree_schema.h:1506
lysp_node_action_inout::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1196
LY_STMT_GROUPING
@ LY_STMT_GROUPING
Definition: tree_schema.h:337
lysp_feature_next
LIBYANG_API_DECL 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.
lysp_node_child
LIBYANG_API_DECL 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...
LY_STMT_ARG_TEXT
@ LY_STMT_ARG_TEXT
Definition: tree_schema.h:427
lysp_feature::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:555
lysp_node_case::child
struct lysp_node * child
Definition: tree_schema.h:1127
lysp_deviate
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition: tree_schema.h:713
lysp_submodule::mod
struct lys_module * mod
Definition: tree_schema.h:1344
lysp_submodule::name
const char * name
Definition: tree_schema.h:1370
lysp_node::nodetype
uint16_t nodetype
Definition: tree_schema.h:966
lysc_range::eapptag
const char * eapptag
Definition: tree_schema.h:1507
lysp_deviate::mod
uint8_t mod
Definition: tree_schema.h:714
lysc_node_leaflist::musts
struct lysc_must * musts
Definition: tree_schema.h:1887
lysp_type::bits
struct lysp_type_enum * bits
Definition: tree_schema.h:641
lysc_node_musts
LIBYANG_API_DECL struct lysc_must * lysc_node_musts(const struct lysc_node *node)
Get the must statements list if present in the node.
lysp_ext_instance::parent_stmt_index
uint64_t parent_stmt_index
Definition: tree_schema.h:539
lysp_deviate_add::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:722
lysp_ext::dsc
const char * dsc
Definition: tree_schema.h:494
lys_module::to_compile
ly_bool to_compile
Definition: tree_schema.h:2367
lysc_node_leaf::type
struct lysc_type * type
Definition: tree_schema.h:1859
lysp_module::imports
struct lysp_import * imports
Definition: tree_schema.h:1324
lysc_ext_substmt::cardinality
enum ly_stmt_cardinality cardinality
Definition: tree_schema.h:1421
lysp_deviate_del::mod
uint8_t mod
Definition: tree_schema.h:733
LYSC_PATH_TYPE
LYSC_PATH_TYPE
Types of the different schema paths.
Definition: tree_schema.h:2318
lysp_node_grp
YANG grouping-stmt.
Definition: tree_schema.h:1256
lysp_deviate_del::dflts
struct lysp_qname * dflts
Definition: tree_schema.h:739
lysc_node::module
struct lys_module * module
Definition: tree_schema.h:1654
lysp_feature::name
const char * name
Definition: tree_schema.h:548
lys_find_lypath_atoms
LIBYANG_API_DECL 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).
lysp_node::dsc
const char * dsc
Definition: tree_schema.h:970
lysp_import::name
const char * name
Definition: tree_schema.h:463
lysp_deviate_add::uniques
struct lysp_qname * uniques
Definition: tree_schema.h:725
lysp_node_list::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1078
lysc_owner_module
LIBYANG_API_DECL const struct lys_module * lysc_owner_module(const struct lysc_node *node)
Get the owner module of the schema node. It is the module of the top-level node. Generally,...
lysp_ext::name
const char * name
Definition: tree_schema.h:492
lysp_node_notif::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1248
LY_STMT_NONE
@ LY_STMT_NONE
Definition: tree_schema.h:298
lysp_node_uses::refines
struct lysp_refine * refines
Definition: tree_schema.h:1169
lysc_type_union::refcount
uint32_t refcount
Definition: tree_schema.h:1630
LYSC_PATH_DATA
@ LYSC_PATH_DATA
Definition: tree_schema.h:2320
lysp_submodule::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1353
lysc_type_enum::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1582
LY_STMT_CARD_OPT
@ LY_STMT_CARD_OPT
Definition: tree_schema.h:451
lysp_submodule::extensions
struct lysp_ext * extensions
Definition: tree_schema.h:1350
lysp_restr::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:603
lysp_node_action_inout
YANG input-stmt and output-stmt.
Definition: tree_schema.h:1177
lysc_type_leafref::path
struct lyxp_expr * path
Definition: tree_schema.h:1602
lysc_ident::name
const char * name
Definition: tree_schema.h:1463
lysc_when::ref
const char * ref
Definition: tree_schema.h:1453
lysp_deviate_del::units
const char * units
Definition: tree_schema.h:736
LY_STMT_ANYDATA
@ LY_STMT_ANYDATA
Definition: tree_schema.h:315
LY_STMT_UNIQUE
@ LY_STMT_UNIQUE
Definition: tree_schema.h:408
lysp_node_list::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1082
LY_STMT_MODULE
@ LY_STMT_MODULE
Definition: tree_schema.h:386
LY_STMT_SUBMODULE
@ LY_STMT_SUBMODULE
Definition: tree_schema.h:404
LY_STMT_DEVIATE
@ LY_STMT_DEVIATE
Definition: tree_schema.h:365
lysc_pattern::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1518
lys_module::parsed
struct lysp_module * parsed
Definition: tree_schema.h:2351
lysp_tpdf::units
const char * units
Definition: tree_schema.h:660
lysp_module::identities
struct lysp_ident * identities
Definition: tree_schema.h:1328
LY_STMT_POSITION
@ LY_STMT_POSITION
Definition: tree_schema.h:393
lysc_type_str::patterns
struct lysc_pattern ** patterns
Definition: tree_schema.h:1564
lysc_node_container::when
struct lysc_when ** when
Definition: tree_schema.h:1774
lysc_type_bitenum_item
Definition: tree_schema.h:1567
lysp_module::data
struct lysp_node * data
Definition: tree_schema.h:1331
lysp_deviate_rpl::dflt
struct lysp_qname dflt
Definition: tree_schema.h:748
lysc_module::notifs
struct lysc_node_notif * notifs
Definition: tree_schema.h:1970
lysp_node_choice::dflt
struct lysp_qname dflt
Definition: tree_schema.h:1107
lysp_feature::ref
const char * ref
Definition: tree_schema.h:554
lysp_node_action::output
struct lysp_node_action_inout output
Definition: tree_schema.h:1224
lysp_tpdf::type
struct lysp_type type
Definition: tree_schema.h:665
lysc_type_num::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1543
lysc_type_dec::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1551
lysp_node_container::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1001
lysp_submodule::identities
struct lysp_ident * identities
Definition: tree_schema.h:1352
lysp_submodule::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1354
lysp_refine::max
uint32_t max
Definition: tree_schema.h:691
lysc_type_leafref
Definition: tree_schema.h:1597
lysp_node_typedefs
LIBYANG_API_DECL 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...
lysp_submodule::parsing
uint8_t parsing
Definition: tree_schema.h:1363
lysc_must::eapptag
const char * eapptag
Definition: tree_schema.h:1529
lysc_when::dsc
const char * dsc
Definition: tree_schema.h:1452
LY_STMT_ORDERED_BY
@ LY_STMT_ORDERED_BY
Definition: tree_schema.h:389
lysp_restr::eapptag
const char * eapptag
Definition: tree_schema.h:600
lysc_pattern
Definition: tree_schema.h:1511
lysp_node_grp::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1274
lysc_type_union::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1628
lysp_node_list::key
const char * key
Definition: tree_schema.h:1077
ly_stmt
ly_stmt
List of YANG statements.
Definition: tree_schema.h:297
lysp_tpdf::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:664
lysc_type_identityref::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1612
lys_module::filepath
const char * filepath
Definition: tree_schema.h:2345
lysc_node_notif::musts
struct lysc_must * musts
Definition: tree_schema.h:1744
LY_STMT_IF_FEATURE
@ LY_STMT_IF_FEATURE
Definition: tree_schema.h:375
lysp_submodule::prefix
const char * prefix
Definition: tree_schema.h:1372
lysp_module::version
uint8_t version
Definition: tree_schema.h:1338
lysp_type::types
struct lysp_type * types
Definition: tree_schema.h:644
lysp_node_list::uniques
struct lysp_qname * uniques
Definition: tree_schema.h:1083
LY_STMT_YIN_ELEMENT
@ LY_STMT_YIN_ELEMENT
Definition: tree_schema.h:414
lysc_ext_substmt
Description of the extension instance substatements.
Definition: tree_schema.h:1419
lysc_type_str::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1560
lysp_type::range
struct lysp_restr * range
Definition: tree_schema.h:637
LY_STMT_INPUT
@ LY_STMT_INPUT
Definition: tree_schema.h:303
lysp_type::length
struct lysp_restr * length
Definition: tree_schema.h:638
lysp_import::rev
char rev[11]
Definition: tree_schema.h:469
LY_STMT_LEAF
@ LY_STMT_LEAF
Definition: tree_schema.h:338
lysc_ext::flags
uint16_t flags
Definition: tree_schema.h:1410
lysp_ext_instance::prefix_data
void * prefix_data
Definition: tree_schema.h:531
lysp_ident::name
const char * name
Definition: tree_schema.h:581
lysp_type::fraction_digits
uint8_t fraction_digits
Definition: tree_schema.h:650
lysc_type_bitenum_item::dsc
const char * dsc
Definition: tree_schema.h:1569
lysp_deviation::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:759
lysc_node_container::notifs
struct lysc_node_notif * notifs
Definition: tree_schema.h:1776
lysc_type_leafref::prefixes
struct lysc_prefix * prefixes
Definition: tree_schema.h:1603
lys_getnext
LIBYANG_API_DECL 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 (sibling) node element in the schema order that can be instantiated in a data tree....
lysp_ext_instance
YANG extension instance.
Definition: tree_schema.h:525
lysp_refine::iffeatures
struct lysp_qname * iffeatures
Definition: tree_schema.h:686
lysc_pattern::emsg
const char * emsg
Definition: tree_schema.h:1516
LY_STMT_INCLUDE
@ LY_STMT_INCLUDE
Definition: tree_schema.h:379
lysp_node_container::child
struct lysp_node * child
Definition: tree_schema.h:1002
lysp_type_enum::dsc
const char * dsc
Definition: tree_schema.h:621
lysp_ident::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:586
LY_STMT_TYPE
@ LY_STMT_TYPE
Definition: tree_schema.h:405
lysp_deviate_del::next
struct lysp_deviate * next
Definition: tree_schema.h:734
lysp_deviate_add::max
uint32_t max
Definition: tree_schema.h:729
lysp_submodule
Definition: tree_schema.h:1343
ly_ctx
libyang context handler.
LY_STMT_DEVIATION
@ LY_STMT_DEVIATION
Definition: tree_schema.h:366
lysp_module::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1334
lysc_node_notif::child
struct lysc_node * child
Definition: tree_schema.h:1743
lysc_pattern::code
pcre2_code * code
Definition: tree_schema.h:1513
lysp_submodule::rpcs
struct lysp_node_action * rpcs
Definition: tree_schema.h:1357
lysp_refine::nodeid
const char * nodeid
Definition: tree_schema.h:683
ly_set
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node,...
Definition: set.h:46
lysc_type_dec::range
struct lysc_range * range
Definition: tree_schema.h:1555
lysp_refine
YANG refine-stmt.
Definition: tree_schema.h:682
lysc_node_leaf::musts
struct lysc_must * musts
Definition: tree_schema.h:1857
lysc_node_action::output
struct lysc_node_action_inout output
Definition: tree_schema.h:1717
LYS_VERSION
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:1308
lysp_submodule::includes
struct lysp_include * includes
Definition: tree_schema.h:1349
lysc_node_list::actions
struct lysc_node_action * actions
Definition: tree_schema.h:1925
lysc_must::dsc
const char * dsc
Definition: tree_schema.h:1526
lysp_restr
Covers restrictions: range, length, pattern, must.
Definition: tree_schema.h:593
lysp_deviate_rpl::mod
uint8_t mod
Definition: tree_schema.h:743
lysp_stmt::flags
uint16_t flags
Definition: tree_schema.h:516
lysc_type_bits::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1589
lysc_node_action_inout::musts
struct lysc_must * musts
Definition: tree_schema.h:1688
lysc_type_leafref::cur_mod
const struct lys_module * cur_mod
Definition: tree_schema.h:1604
lysc_when::cond
struct lyxp_expr * cond
Definition: tree_schema.h:1449
LY_STMT_ACTION
@ LY_STMT_ACTION
Definition: tree_schema.h:307
lys_module::dsc
const char * dsc
Definition: tree_schema.h:2348
lys_module::ctx
struct ly_ctx * ctx
Definition: tree_schema.h:2340
lysp_node::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:974
lysc_node::name
const char * name
Definition: tree_schema.h:1661
lysp_tpdf::flags
uint16_t flags
Definition: tree_schema.h:666
lysc_type_bin::refcount
uint32_t refcount
Definition: tree_schema.h:1638
lysp_restr::dsc
const char * dsc
Definition: tree_schema.h:601
lysp_revision::dsc
const char * dsc
Definition: tree_schema.h:611
lysp_node_uses::when
struct lysp_when * when
Definition: tree_schema.h:1171
lysp_node_action_inout::musts
struct lysp_restr * musts
Definition: tree_schema.h:1194
lysp_qname
Qualified name (optional prefix followed by an identifier).
Definition: tree_schema.h:571
lysc_node_case
Definition: tree_schema.h:1779
lysp_deviate_add::dflts
struct lysp_qname * dflts
Definition: tree_schema.h:726
lysp_stmt::prefix_data
void * prefix_data
Definition: tree_schema.h:512
lysc_type_identityref::refcount
uint32_t refcount
Definition: tree_schema.h:1613
lysc_revision::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1490
LY_STMT_ARG_VALUE
@ LY_STMT_ARG_VALUE
Definition: tree_schema.h:428
lysc_type_dec::fraction_digits
uint8_t fraction_digits
Definition: tree_schema.h:1554
lysp_node_grp::child
struct lysp_node * child
Definition: tree_schema.h:1275
lysp_node_leaf::musts
struct lysp_restr * musts
Definition: tree_schema.h:1024
lysc_type_bitenum_item::name
const char * name
Definition: tree_schema.h:1568
lysp_deviate_rpl::next
struct lysp_deviate * next
Definition: tree_schema.h:744
lysc_type_num
Definition: tree_schema.h:1541
lysp_stmt::format
LY_VALUE_FORMAT format
Definition: tree_schema.h:511
lysc_must::prefixes
struct lysc_prefix * prefixes
Definition: tree_schema.h:1525
lysc_type_bits::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1590
lysp_type::require_instance
uint8_t require_instance
Definition: tree_schema.h:651
lysc_type_leafref::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1600
LY_STMT_OUTPUT
@ LY_STMT_OUTPUT
Definition: tree_schema.h:304
lysp_ident::dsc
const char * dsc
Definition: tree_schema.h:584
lysc_ext_instance::argument
const char * argument
Definition: tree_schema.h:1431
lysp_ext::argname
const char * argname
Definition: tree_schema.h:493
lysc_type_str::refcount
uint32_t refcount
Definition: tree_schema.h:1562
lysp_deviate_add
Definition: tree_schema.h:719
lysc_node_child
LIBYANG_API_DECL const struct lysc_node * lysc_node_child(const struct lysc_node *node)
Get the children linked list of the given (compiled) schema node.
lysc_type_identityref::bases
struct lysc_ident ** bases
Definition: tree_schema.h:1614
lysp_deviate::next
struct lysp_deviate * next
Definition: tree_schema.h:715
lys_find_xpath
LIBYANG_API_DECL 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.
lys_find_expr_atoms
LIBYANG_API_DECL 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).
lysc_ext_instance::data
void * data
Definition: tree_schema.h:1436
LY_STMT_BASE
@ LY_STMT_BASE
Definition: tree_schema.h:357
lysc_node_container::musts
struct lysc_must * musts
Definition: tree_schema.h:1773
lys_getnext_ext
LIBYANG_API_DECL 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 (sibling) node element in the schema order of an extension that can be instantiated i...
lys_module::ref
const char * ref
Definition: tree_schema.h:2349
lysc_type_num::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1544
LY_STMT_NOTIFICATION
@ LY_STMT_NOTIFICATION
Definition: tree_schema.h:300
lysc_node::prev
struct lysc_node * prev
Definition: tree_schema.h:1657
LY_STMT_KEY
@ LY_STMT_KEY
Definition: tree_schema.h:380
lysp_include::ref
const char * ref
Definition: tree_schema.h:480
lysc_ident
YANG identity-stmt.
Definition: tree_schema.h:1462
lysp_type
YANG type-stmt.
Definition: tree_schema.h:635
lysp_module::deviations
struct lysp_deviation * deviations
Definition: tree_schema.h:1335
lysc_ext_instance
YANG extension instance.
Definition: tree_schema.h:1429
lysc_type_leafref::require_instance
uint8_t require_instance
Definition: tree_schema.h:1606
lysc_ident::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1469
lysc_type::refcount
uint32_t refcount
Definition: tree_schema.h:1537
lysc_node_list::child
struct lysc_node * child
Definition: tree_schema.h:1922
lys_find_path
LIBYANG_API_DECL 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).
lysc_type_union::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1627
lysc_node_list::max
uint32_t max
Definition: tree_schema.h:1930
lysp_ident::flags
uint16_t flags
Definition: tree_schema.h:587
lysp_type::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:645
lysc_node_container::actions
struct lysc_node_action * actions
Definition: tree_schema.h:1775
lysc_when::prefixes
struct lysc_prefix * prefixes
Definition: tree_schema.h:1451
LY_STMT_PATH
@ LY_STMT_PATH
Definition: tree_schema.h:391
lysc_ident::dsc
const char * dsc
Definition: tree_schema.h:1464
lysp_ext::compiled
struct lysc_ext * compiled
Definition: tree_schema.h:499
lysp_submodule::latest_revision
uint8_t latest_revision
Definition: tree_schema.h:1366
lysp_include::injected
ly_bool injected
Definition: tree_schema.h:483
lysp_node_case::when
struct lysp_when * when
Definition: tree_schema.h:1128
lysp_type::bases
const char ** bases
Definition: tree_schema.h:643
lysp_ident
YANG identity-stmt.
Definition: tree_schema.h:580
lysc_node_leaflist
Definition: tree_schema.h:1865
lysp_node_leaflist::units
const char * units
Definition: tree_schema.h:1051
lysc_node_leaf
Definition: tree_schema.h:1835
lysp_type_enum::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:625
lysc_iffeature_value
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
tree.h
libyang generic macros and functions to work with YANG schema or data trees.
lysc_node_leaflist::type
struct lysc_type * type
Definition: tree_schema.h:1889
lysc_type_str
Definition: tree_schema.h:1558
lysp_qname::str
const char * str
Definition: tree_schema.h:572
lysc_node_leaf::when
struct lysc_when ** when
Definition: tree_schema.h:1858
lysp_node_container::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1004
lysc_node_actions
LIBYANG_API_DECL 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 ...
lysp_when::ref
const char * ref
Definition: tree_schema.h:675
lysc_node_anydata::musts
struct lysc_must * musts
Definition: tree_schema.h:1955
lysp_node_leaf::when
struct lysp_when * when
Definition: tree_schema.h:1025
LY_STMT_BELONGS_TO
@ LY_STMT_BELONGS_TO
Definition: tree_schema.h:358
lysp_module::revs
struct lysp_revision * revs
Definition: tree_schema.h:1322
lys_module::org
const char * org
Definition: tree_schema.h:2346
lysp_stmt::next
struct lysp_stmt * next
Definition: tree_schema.h:514
lyxp_get_expr
LIBYANG_API_DECL const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
LY_STMT_YANG_VERSION
@ LY_STMT_YANG_VERSION
Definition: tree_schema.h:413
lysp_type::compiled
struct lysc_type * compiled
Definition: tree_schema.h:648
lysp_import::module
struct lys_module * module
Definition: tree_schema.h:461
lysp_include
YANG include-stmt.
Definition: tree_schema.h:475
LY_STMT_LENGTH
@ LY_STMT_LENGTH
Definition: tree_schema.h:381
lysc_module::rpcs
struct lysc_node_action * rpcs
Definition: tree_schema.h:1969
LY_STMT_CARD_ANY
@ LY_STMT_CARD_ANY
Definition: tree_schema.h:454
lysp_feature::flags
uint16_t flags
Definition: tree_schema.h:556
lysc_type_bin::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1636
lysp_module::includes
struct lysp_include * includes
Definition: tree_schema.h:1325
lysp_node_leaflist::min
uint32_t min
Definition: tree_schema.h:1054
lysp_submodule::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:1360
lysc_when::flags
uint16_t flags
Definition: tree_schema.h:1456
lysp_revision::ref
const char * ref
Definition: tree_schema.h:612
lysp_deviate_del::musts
struct lysp_restr * musts
Definition: tree_schema.h:737
lysp_node_leaflist::musts
struct lysp_restr * musts
Definition: tree_schema.h:1048
lysc_ext
Compiled YANG extension-stmt.
Definition: tree_schema.h:1403
lysc_node_leaflist::dflts
struct lyd_value ** dflts
Definition: tree_schema.h:1892
lysp_node_action_inout::child
struct lysp_node * child
Definition: tree_schema.h:1197
lysp_deviate_rpl::min
uint32_t min
Definition: tree_schema.h:750
lysp_node_case
Definition: tree_schema.h:1110
lysc_node::nodetype
uint16_t nodetype
Definition: tree_schema.h:1651
lysc_node_notif::when
struct lysc_when ** when
Definition: tree_schema.h:1745
lysp_deviate_del
Definition: tree_schema.h:732
log.h
Logger manipulation routines and error definitions.
lysc_type_enum::enums
struct lysc_type_bitenum_item * enums
Definition: tree_schema.h:1585
lysp_feature::iffeatures
struct lysp_qname * iffeatures
Definition: tree_schema.h:549
lysp_node_leaf::units
const char * units
Definition: tree_schema.h:1027
lysc_node::parent
struct lysc_node * parent
Definition: tree_schema.h:1655
lysp_node_action
YANG rpc-stmt and action-stmt.
Definition: tree_schema.h:1203
LY_STMT_MANDATORY
@ LY_STMT_MANDATORY
Definition: tree_schema.h:382
lysp_type::patterns
struct lysp_restr * patterns
Definition: tree_schema.h:639
lysc_type_bitenum_item::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1571
lysc_pattern::inverted
uint32_t inverted
Definition: tree_schema.h:1519
lysp_import::dsc
const char * dsc
Definition: tree_schema.h:465
lysc_node_leaflist::min
uint32_t min
Definition: tree_schema.h:1895
lysc_dfs_clb
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:2140
lysp_node::parent
struct lysp_node * parent
Definition: tree_schema.h:965
lysp_submodule::is_submod
uint8_t is_submod
Definition: tree_schema.h:1364
lysc_type_instanceid::require_instance
uint8_t require_instance
Definition: tree_schema.h:1623
lysp_when::cond
const char * cond
Definition: tree_schema.h:673
lysc_range
Definition: tree_schema.h:1493
lysp_node_augment::when
struct lysp_when * when
Definition: tree_schema.h:1300
lysc_type_enum::refcount
uint32_t refcount
Definition: tree_schema.h:1584
lysc_type_str::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1559
lysc_must::cond
struct lyxp_expr * cond
Definition: tree_schema.h:1524
lysc_type::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1535
LY_STMT_FRACTION_DIGITS
@ LY_STMT_FRACTION_DIGITS
Definition: tree_schema.h:373
lysc_type_identityref::plugin
struct lyplg_type * plugin
Definition: tree_schema.h:1611
lyd_value
YANG data representation.
Definition: tree_data.h:548
lysc_must::emsg
const char * emsg
Definition: tree_schema.h:1528
lysp_type::name
const char * name
Definition: tree_schema.h:636
lysp_ident::ref
const char * ref
Definition: tree_schema.h:585
lys_module::implemented
ly_bool implemented
Definition: tree_schema.h:2366
LY_STMT_ANYXML
@ LY_STMT_ANYXML
Definition: tree_schema.h:320
lysc_node::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1664
lysp_ext::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:496
LY_STMT_ENUM
@ LY_STMT_ENUM
Definition: tree_schema.h:367
lysc_iffeature::features
struct lysp_feature ** features
Definition: tree_schema.h:565
lysp_include::name
const char * name
Definition: tree_schema.h:478
lysc_node_choice::when
struct lysc_when ** when
Definition: tree_schema.h:1831
LY_ERR
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:244
lysc_type_num::refcount
uint32_t refcount
Definition: tree_schema.h:1545
lysp_node_container::actions
struct lysp_node_action * actions
Definition: tree_schema.h:1003
lysc_ext_substmt::stmt
enum ly_stmt stmt
Definition: tree_schema.h:1420
lysp_deviation
Definition: tree_schema.h:754
lysc_must::ref
const char * ref
Definition: tree_schema.h:1527
lysp_node_choice::child
struct lysp_node * child
Definition: tree_schema.h:1105
lysc_module_dfs_full
LIBYANG_API_DECL 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.
lysc_type_bin::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1637
lysp_node_choice
Definition: tree_schema.h:1088
lysc_range::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1508
lysp_ext_instance::child
struct lysp_stmt * child
Definition: tree_schema.h:534
lysp_qname::mod
const struct lysp_module * mod
Definition: tree_schema.h:573
lysc_node_list
Definition: tree_schema.h:1900
lysp_deviate_add::flags
uint16_t flags
Definition: tree_schema.h:727
lysp_node_leaf
Definition: tree_schema.h:1007
LY_VALUE_FORMAT
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
Definition: tree.h:235
lysp_type::flags
uint16_t flags
Definition: tree_schema.h:652
lysc_node_leaf::units
const char * units
Definition: tree_schema.h:1861
lys_nodetype2str
LIBYANG_API_DECL const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
lysc_type_bits::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1591
lysp_node_choice::when
struct lysp_when * when
Definition: tree_schema.h:1106
LY_STMT_MIN_ELEMENTS
@ LY_STMT_MIN_ELEMENTS
Definition: tree_schema.h:384
LY_STMT_EXTENSION
@ LY_STMT_EXTENSION
Definition: tree_schema.h:370
lysc_ident::flags
uint16_t flags
Definition: tree_schema.h:1470
lysp_node_action::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1220
lysc_node_choice::dflt
struct lysc_node_case * dflt
Definition: tree_schema.h:1832
lysp_refine::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:692
lysp_node_notif::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1249
lysp_type_enum::name
const char * name
Definition: tree_schema.h:620
lysc_ext_instance::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1433
lysc_type_bin
Definition: tree_schema.h:1634
lysp_node_augment::actions
struct lysp_node_action * actions
Definition: tree_schema.h:1301
lysp_node_action::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1221
lysc_module
Compiled YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1965
lysp_node_grp::notifs
struct lysp_node_notif * notifs
Definition: tree_schema.h:1277
lysc_type_instanceid
Definition: tree_schema.h:1618
lysp_restr::ref
const char * ref
Definition: tree_schema.h:602
lysc_ext::name
const char * name
Definition: tree_schema.h:1404
lysp_node_container
Extension structure of the lysp_node for YANG container.
Definition: tree_schema.h:980
lysc_iffeature::expr
uint8_t * expr
Definition: tree_schema.h:564
LYS_VERSION_UNDEF
@ LYS_VERSION_UNDEF
Definition: tree_schema.h:1309
lysp_module::rpcs
struct lysp_node_action * rpcs
Definition: tree_schema.h:1333
LY_STMT_CHOICE
@ LY_STMT_CHOICE
Definition: tree_schema.h:327
lysp_feature
YANG feature-stmt.
Definition: tree_schema.h:547
lys_nodetype2stmt
LIBYANG_API_DECL enum ly_stmt lys_nodetype2stmt(uint16_t nodetype)
Convert nodetype to statement identifier.
lysc_type_bits::refcount
uint32_t refcount
Definition: tree_schema.h:1592
lysp_import
YANG import-stmt.
Definition: tree_schema.h:460
lysp_deviate::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:716
lysc_pattern::dsc
const char * dsc
Definition: tree_schema.h:1514
lysp_ext_instance::argument
const char * argument
Definition: tree_schema.h:527
lysp_refine::min
uint32_t min
Definition: tree_schema.h:690
LY_STMT_PRESENCE
@ LY_STMT_PRESENCE
Definition: tree_schema.h:395
lysc_type_bits
Definition: tree_schema.h:1588
lysp_deviate_add::units
const char * units
Definition: tree_schema.h:723
lysp_include::submodule
struct lysp_submodule * submodule
Definition: tree_schema.h:476
lysc_node_list::min
uint32_t min
Definition: tree_schema.h:1929
lysp_node_grp::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1273
LYS_NODE_HASH_COUNT
#define LYS_NODE_HASH_COUNT
Maximum number of hashes stored in a schema node.
Definition: tree_schema.h:1645
lysc_type
Definition: tree_schema.h:1533
lysp_module::is_submod
uint8_t is_submod
Definition: tree_schema.h:1340
lysp_node_container::typedefs
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1000
lysp_node_anydata::when
struct lysp_when * when
Definition: tree_schema.h:1149
lysp_submodule::version
uint8_t version
Definition: tree_schema.h:1362
lysc_node_list::musts
struct lysc_must * musts
Definition: tree_schema.h:1923
LY_STMT_STATUS
@ LY_STMT_STATUS
Definition: tree_schema.h:403
lysp_feature::depfeatures
struct lysp_feature ** depfeatures
Definition: tree_schema.h:551
lysc_type_union::types
struct lysc_type ** types
Definition: tree_schema.h:1631
lysp_import::flags
uint16_t flags
Definition: tree_schema.h:468
LY_ARRAY_COUNT_TYPE
#define LY_ARRAY_COUNT_TYPE
Type (i.e. size) of the sized array's size counter.
Definition: tree.h:104
lysp_submodule::data
struct lysp_node * data
Definition: tree_schema.h:1355
lysp_import::prefix
const char * prefix
Definition: tree_schema.h:464
lysp_node_container::presence
const char * presence
Definition: tree_schema.h:999
lysp_node_list::when
struct lysp_when * when
Definition: tree_schema.h:1076
lysc_type_dec
Definition: tree_schema.h:1549
lysp_deviate_rpl::max
uint32_t max
Definition: tree_schema.h:751
lysp_submodule::contact
const char * contact
Definition: tree_schema.h:1374
lys_module::prefix
const char * prefix
Definition: tree_schema.h:2344
lysp_type::path
struct lyxp_expr * path
Definition: tree_schema.h:642
LY_STMT_TYPEDEF
@ LY_STMT_TYPEDEF
Definition: tree_schema.h:407
lysc_type_dec::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1550
lysc_node::ref
const char * ref
Definition: tree_schema.h:1663
lys_module::augmented_by
struct lys_module ** augmented_by
Definition: tree_schema.h:2363
lysp_node::next
struct lysp_node * next
Definition: tree_schema.h:968
lys_module::revision
const char * revision
Definition: tree_schema.h:2342
lysc_ident::ref
const char * ref
Definition: tree_schema.h:1465
lysp_when
YANG when-stmt.
Definition: tree_schema.h:672
lysp_restr::arg
struct lysp_qname arg
Definition: tree_schema.h:596
lysp_ext_instance::parsed
struct lysp_node * parsed
Definition: tree_schema.h:529
lysp_node::ref
const char * ref
Definition: tree_schema.h:971
lysp_import::exts
struct lysp_ext_instance * exts
Definition: tree_schema.h:467
lysp_when::dsc
const char * dsc
Definition: tree_schema.h:674
LY_STMT_MAX_ELEMENTS
@ LY_STMT_MAX_ELEMENTS
Definition: tree_schema.h:383
LY_STMT_SYNTAX_SEMICOLON
@ LY_STMT_SYNTAX_SEMICOLON
Definition: tree_schema.h:420
lysp_node_leaflist::max
uint32_t max
Definition: tree_schema.h:1055
lysp_import::ref
const char * ref
Definition: tree_schema.h:466
lysp_stmt::child
struct lysp_stmt * child
Definition: tree_schema.h:515
lysc_prefix
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition: tree_schema.h:1391
lysc_type_num::range
struct lysc_range * range
Definition: tree_schema.h:1546
lysc_type_union
Definition: tree_schema.h:1626
ly_stmt_cardinality
ly_stmt_cardinality
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:450
lysp_node_action::input
struct lysp_node_action_inout input
Definition: tree_schema.h:1223
LY_STMT_BIT
@ LY_STMT_BIT
Definition: tree_schema.h:359
lysc_node::hash
uint8_t hash[4]
Definition: tree_schema.h:1653
LY_STMT_WHEN
@ LY_STMT_WHEN
Definition: tree_schema.h:412
lysp_node_grp::actions
struct lysp_node_action * actions
Definition: tree_schema.h:1276
lysp_refine::dsc
const char * dsc
Definition: tree_schema.h:684
lysp_deviation::deviates
struct lysp_deviate * deviates
Definition: tree_schema.h:758
lysp_node_list::actions
struct lysp_node_action * actions
Definition: tree_schema.h:1081
lysp_node_leaf::type
struct lysp_type type
Definition: tree_schema.h:1026
lysc_type::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1536
lysp_node
Generic YANG data node.
Definition: tree_schema.h:964
lysp_ext::flags
uint16_t flags
Definition: tree_schema.h:497
lysc_node_list::notifs
struct lysc_node_notif * notifs
Definition: tree_schema.h:1926
lysc_type_dec::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1552
lysp_revision
YANG revision-stmt.
Definition: tree_schema.h:609
lysc_type_bitenum_item::flags
uint16_t flags
Definition: tree_schema.h:1576
lysp_deviate_rpl::units
const char * units
Definition: tree_schema.h:747
lysp_node_actions
LIBYANG_API_DECL 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...
lysp_node_container::musts
struct lysp_restr * musts
Definition: tree_schema.h:997
lysc_node_when
LIBYANG_API_DECL struct lysc_when ** lysc_node_when(const struct lysc_node *node)
Get the when statements list if present in the node.
lysc_node_action_inout
Definition: tree_schema.h:1668
lysc_node_case::child
struct lysc_node * child
Definition: tree_schema.h:1801
lysc_node_action
Definition: tree_schema.h:1691
lysp_node_augment::child
struct lysp_node * child
Definition: tree_schema.h:1299
lysp_module::features
struct lysp_feature * features
Definition: tree_schema.h:1327
LY_STMT_VALUE
@ LY_STMT_VALUE
Definition: tree_schema.h:411
lysc_range::ref
const char * ref
Definition: tree_schema.h:1505
lysp_node_list
Definition: tree_schema.h:1058
lysp_node_list::child
struct lysp_node * child
Definition: tree_schema.h:1080
lysc_must::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1530
lysc_must
Definition: tree_schema.h:1523
lysp_ext_instance::flags
uint16_t flags
Definition: tree_schema.h:541
lysc_prefix::prefix
char * prefix
Definition: tree_schema.h:1392
lysp_deviation::ref
const char * ref
Definition: tree_schema.h:757
LY_STMT_RANGE
@ LY_STMT_RANGE
Definition: tree_schema.h:396
lysc_ident::module
struct lys_module * module
Definition: tree_schema.h:1466
lysp_ext_instance::format
LY_VALUE_FORMAT format
Definition: tree_schema.h:528
lysp_deviate_rpl
Definition: tree_schema.h:742
lysc_ext_instance::parent
void * parent
Definition: tree_schema.h:1438
lysp_node::flags
uint16_t flags
Definition: tree_schema.h:967
lysp_deviate_rpl::type
struct lysp_type * type
Definition: tree_schema.h:746
lysc_type_leafref::refcount
uint32_t refcount
Definition: tree_schema.h:1601
lys_find_path_atoms
LIBYANG_API_DECL 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_STMT_EXTENSION_INSTANCE
@ LY_STMT_EXTENSION_INSTANCE
Definition: tree_schema.h:371
lysc_ext_substmt
LIBYANG_API_DECL 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.
lysc_type_instanceid::refcount
uint32_t refcount
Definition: tree_schema.h:1622
lysp_node_list::groupings
struct lysp_node_grp * groupings
Definition: tree_schema.h:1079
lysc_type_instanceid::basetype
LY_DATA_TYPE basetype
Definition: tree_schema.h:1621
LY_STMT_CARD_MAND
@ LY_STMT_CARD_MAND
Definition: tree_schema.h:452
LY_STMT_REVISION_DATE
@ LY_STMT_REVISION_DATE
Definition: tree_schema.h:402
lysp_node_leaflist::type
struct lysp_type type
Definition: tree_schema.h:1050
lysc_node_action::input
struct lysc_node_action_inout input
Definition: tree_schema.h:1716
lysc_ext_instance::parent_stmt_index
uint64_t parent_stmt_index
Definition: tree_schema.h:1441
lysc_type_enum
Definition: tree_schema.h:1580
LY_STMT_LEAF_LIST
@ LY_STMT_LEAF_LIST
Definition: tree_schema.h:343
lysc_type_leafref::exts
struct lysc_ext_instance * exts
Definition: tree_schema.h:1598
lysp_module::parsing
uint8_t parsing
Definition: tree_schema.h:1339
lysp_deviate_del::uniques
struct lysp_qname * uniques
Definition: tree_schema.h:738
lysp_module::mod
struct lys_module * mod
Definition: tree_schema.h:1320
lysc_has_when
LIBYANG_API_DECL 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....
lysp_tpdf::ref
const char * ref
Definition: tree_schema.h:663
lysc_module::mod
struct lys_module * mod
Definition: tree_schema.h:1966
lyplg_ext
Extension plugin implementing various aspects of a YANG extension.
Definition: plugins_exts.h:195
ly_stmt2str
LIBYANG_API_DECL const char * ly_stmt2str(enum ly_stmt stmt)
Stringify statement identifier.
lysp_refine::presence
const char * presence
Definition: tree_schema.h:688
LY_STMT_ORGANIZATION
@ LY_STMT_ORGANIZATION
Definition: tree_schema.h:390
lysp_type_enum::flags
uint16_t flags
Definition: tree_schema.h:626
lysp_submodule::filepath
const char * filepath
Definition: tree_schema.h:1371
lysc_ext::plugin
struct lyplg_ext * plugin
Definition: tree_schema.h:1407
LY_STMT_PATTERN
@ LY_STMT_PATTERN
Definition: tree_schema.h:392
lysc_range::dsc
const char * dsc
Definition: tree_schema.h:1504
lysp_stmt::arg
const char * arg
Definition: tree_schema.h:510
lysc_pattern::ref
const char * ref
Definition: tree_schema.h:1515
lysc_ext_instance::substmts
struct lysc_ext_substmt * substmts
Definition: tree_schema.h:1434