libyang  2.0.164
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 */
314 /* LY_STMT_IS_DATA_NODE */
354 
355 /* rest */
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;
972  struct lysp_qname *iffeatures;
974  struct lysp_ext_instance *exts;
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;
1000  struct lysp_tpdf *typedefs;
1001  struct lysp_node_grp *groupings;
1002  struct lysp_node *child;
1003  struct lysp_node_action *actions;
1004  struct lysp_node_notif *notifs;
1005 };
1006 
1007 struct lysp_node_leaf {
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 
1031 struct lysp_node_leaflist {
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 
1058 struct lysp_node_list {
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;
1078  struct lysp_tpdf *typedefs;
1079  struct lysp_node_grp *groupings;
1080  struct lysp_node *child;
1081  struct lysp_node_action *actions;
1082  struct lysp_node_notif *notifs;
1083  struct lysp_qname *uniques;
1084  uint32_t min;
1085  uint32_t max;
1086 };
1087 
1088 struct lysp_node_choice {
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 
1110 struct lysp_node_case {
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 
1131 struct lysp_node_anydata {
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 
1152 struct lysp_node_uses {
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 */
1170  struct lysp_node_augment *augments;
1171  struct lysp_when *when;
1172 };
1173 
1177 struct lysp_node_action_inout {
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;
1195  struct lysp_tpdf *typedefs;
1197  struct lysp_node *child;
1198 };
1199 
1203 struct lysp_node_action {
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 */
1221  struct lysp_node_grp *groupings;
1223  struct lysp_node_action_inout input;
1225 };
1226 
1230 struct lysp_node_notif {
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;
1248  struct lysp_tpdf *typedefs;
1250  struct lysp_node *child;
1251 };
1252 
1256 struct lysp_node_grp {
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 */
1274  struct lysp_node_grp *groupings;
1275  struct lysp_node *child;
1276  struct lysp_node_action *actions;
1277  struct lysp_node_notif *notifs;
1278 };
1279 
1283 struct lysp_node_augment {
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;
1301  struct lysp_node_action *actions;
1303 };
1304 
1308 typedef enum LYS_VERSION {
1309  LYS_VERSION_UNDEF = 0,
1310  LYS_VERSION_1_0 = 1,
1311  LYS_VERSION_1_1 = 2
1312 } LYS_VERSION;
1313 
1319 struct lysp_module {
1320  struct lys_module *mod;
1322  struct lysp_revision *revs;
1328  struct lysp_ident *identities;
1329  struct lysp_tpdf *typedefs;
1330  struct lysp_node_grp *groupings;
1331  struct lysp_node *data;
1332  struct lysp_node_augment *augments;
1333  struct lysp_node_action *rpcs;
1334  struct lysp_node_notif *notifs;
1338  uint8_t version;
1339  uint8_t parsing : 1;
1340  uint8_t is_submod : 1;
1341 };
1344  struct lys_module *mod;
1353  struct lysp_tpdf *typedefs;
1355  struct lysp_node *data;
1357  struct lysp_node_action *rpcs;
1358  struct lysp_node_notif *notifs;
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 };
1385 #define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
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;
1406  struct lysc_ext_instance *exts;
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 };
1429 struct lysc_ext_instance {
1430  struct lysc_ext *def;
1431  const char *argument;
1432  struct lys_module *module;
1433  struct lysc_ext_instance *exts;
1434  struct lysc_ext_substmt *substmts;
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;
1451  struct lysc_prefix *prefixes;
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 };
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];
1490  struct lysc_ext_instance *exts;
1491 };
1492 
1493 struct lysc_range {
1494  struct lysc_range_part {
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;
1508  struct lysc_ext_instance *exts;
1509 };
1512  const char *expr;
1513  pcre2_code *code;
1514  const char *dsc;
1515  const char *ref;
1516  const char *emsg;
1517  const char *eapptag;
1518  struct lysc_ext_instance *exts;
1519  uint32_t inverted : 1;
1520  uint32_t refcount : 31;
1521 };
1523 struct lysc_must {
1524  struct lyxp_expr *cond;
1525  struct lysc_prefix *prefixes;
1526  const char *dsc;
1527  const char *ref;
1528  const char *emsg;
1529  const char *eapptag;
1531 };
1533 struct lysc_type {
1535  struct lyplg_type *plugin;
1537  uint32_t refcount;
1539 };
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;
1554  uint8_t fraction_digits;
1555  struct lysc_range *range;
1556 };
1560  struct lyplg_type *plugin;
1562  uint32_t refcount;
1563  struct lysc_range *length;
1564  struct lysc_pattern **patterns;
1565 };
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 };
1581  struct lysc_ext_instance *exts;
1582  struct lyplg_type *plugin;
1584  uint32_t refcount;
1586 };
1589  struct lysc_ext_instance *exts;
1590  struct lyplg_type *plugin;
1592  uint32_t refcount;
1593  struct lysc_type_bitenum_item *bits;
1595 };
1599  struct lyplg_type *plugin;
1601  uint32_t refcount;
1602  struct lyxp_expr *path;
1603  struct lysc_prefix *prefixes;
1604  const struct lys_module *cur_mod;
1607 };
1610  struct lysc_ext_instance *exts;
1611  struct lyplg_type *plugin;
1613  uint32_t refcount;
1614  struct lysc_ident **bases;
1616 };
1620  struct lyplg_type *plugin;
1622  uint32_t refcount;
1623  uint8_t require_instance;
1624 };
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
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;
1664  struct lysc_ext_instance *exts;
1665  void *priv;
1666 };
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 
1691 struct lysc_node_action {
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;
1709  void *priv;
1710  };
1711  };
1712 
1713  struct lysc_when **when;
1716  struct lysc_node_action_inout input;
1719 };
1720 
1721 struct lysc_node_notif {
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;
1739  void *priv;
1740  };
1741  };
1742 
1743  struct lysc_node *child;
1744  struct lysc_must *musts;
1745  struct lysc_when **when;
1748 };
1749 
1750 struct lysc_node_container {
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;
1768  void *priv;
1769  };
1770  };
1771 
1772  struct lysc_node *child;
1773  struct lysc_must *musts;
1774  struct lysc_when **when;
1775  struct lysc_node_action *actions;
1776  struct lysc_node_notif *notifs;
1777 };
1778 
1779 struct lysc_node_case {
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;
1797  void *priv;
1798  };
1799  };
1800 
1801  struct lysc_node *child;
1803  struct lysc_when **when;
1804 };
1805 
1806 struct lysc_node_choice {
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;
1824  void *priv;
1825  };
1826  };
1827 
1828  struct lysc_node_case *cases;
1831  struct lysc_when **when;
1832  struct lysc_node_case *dflt;
1833 };
1834 
1835 struct lysc_node_leaf {
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;
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 
1865 struct lysc_node_leaflist {
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;
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 
1900 struct lysc_node_list {
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;
1918  void *priv;
1919  };
1920  };
1921 
1922  struct lysc_node *child;
1923  struct lysc_must *musts;
1924  struct lysc_when **when;
1925  struct lysc_node_action *actions;
1926  struct lysc_node_notif *notifs;
1928  struct lysc_node_leaf ***uniques;
1929  uint32_t min;
1930  uint32_t max;
1931 };
1932 
1933 struct lysc_node_anydata {
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;
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;
1969  struct lysc_node_action *rpcs;
1970  struct lysc_node_notif *notifs;
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)
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)
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 {
2319  LYSC_PATH_LOG,
2321 } LYSC_PATH_TYPE;
2322 
2334 LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
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;
2351  struct lysp_module *parsed;
2352  struct lysc_module *compiled;
2355  struct lysc_ident *identities;
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);
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_ */
struct lys_module * mod
Definition: tree_schema.h:1336
struct lyplg_type * plugin
Definition: tree_schema.h:1644
struct lysp_node_action * actions
Definition: tree_schema.h:1317
const char * name
Definition: tree_schema.h:492
YANG extension instance.
Definition: tree_schema.h:525
const char * units
Definition: tree_schema.h:747
void * prefix_data
Definition: tree_schema.h:512
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition: tree_schema.h:1407
const char * argument
Definition: tree_schema.h:527
uint8_t version
Definition: tree_schema.h:1354
struct lysp_node_grp * groupings
Definition: tree_schema.h:1212
struct lysp_type type
Definition: tree_schema.h:1042
struct lyd_value ** dflts
Definition: tree_schema.h:1908
struct lysc_ext_instance * exts
Definition: tree_schema.h:1597
struct lysp_feature ** depfeatures
Definition: tree_schema.h:551
Compiled YANG data node.
Definition: tree_schema.h:1666
const char * argname
Definition: tree_schema.h:1421
struct lysp_when * when
Definition: tree_schema.h:1122
LY_DATA_TYPE basetype
Definition: tree_schema.h:1628
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1094
struct lysp_qname * dflts
Definition: tree_schema.h:739
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1236
struct lysp_node * data
Definition: tree_schema.h:1347
Qualified name (optional prefix followed by an identifier).
Definition: tree_schema.h:571
struct lysc_ident ** derived
Definition: tree_schema.h:1483
struct lysc_node_case * dflt
Definition: tree_schema.h:1848
struct lysp_when * when
Definition: tree_schema.h:1316
struct lysc_ext * def
Definition: tree_schema.h:1446
struct lysp_node * next
Definition: tree_schema.h:984
struct lysp_restr * musts
Definition: tree_schema.h:687
struct lysc_type_bitenum_item * bits
Definition: tree_schema.h:1609
uint16_t flags
Definition: tree_schema.h:666
struct ly_ctx * ctx
Definition: tree_schema.h:2357
const char * units
Definition: tree_schema.h:1877
struct lysp_ext_instance * exts
Definition: tree_schema.h:716
ly_bool to_compile
Definition: tree_schema.h:2384
const char * dsc
Definition: tree_schema.h:986
struct lysc_must * musts
Definition: tree_schema.h:1704
LIBYANG_API_DECL enum ly_stmt lys_nodetype2stmt(uint16_t nodetype)
Convert nodetype to statement identifier.
struct lysp_module * parsed
Definition: tree_schema.h:2368
struct lysc_node * context
Definition: tree_schema.h:1466
Compiled YANG if-feature-stmt.
Definition: tree_schema.h:563
const char * name
Definition: tree_schema.h:1420
uint16_t flags
Definition: tree_schema.h:1486
struct lysp_node_action * actions
Definition: tree_schema.h:1292
struct lysc_when ** when
Definition: tree_schema.h:1729
struct lyplg_type * plugin
Definition: tree_schema.h:1551
struct lysc_ext_instance * exts
Definition: tree_schema.h:1449
struct lysc_ext_instance * exts
Definition: tree_schema.h:1558
LY_DATA_TYPE basetype
Definition: tree_schema.h:1645
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1211
Hold type-specific functions for various operations with the data values.
const char * dsc
Definition: tree_schema.h:601
const char * arg
Definition: tree_schema.h:510
YANG import-stmt.
Definition: tree_schema.h:460
Extension plugin implementing various aspects of a YANG extension.
Definition: plugins_exts.h:195
Covers restrictions: range, length, pattern, must.
Definition: tree_schema.h:593
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1289
struct lysp_import * imports
Definition: tree_schema.h:1364
struct lysp_type * types
Definition: tree_schema.h:644
struct lysc_when ** when
Definition: tree_schema.h:1940
struct lysp_node_augment * augments
Definition: tree_schema.h:1348
struct lysc_prefix * prefixes
Definition: tree_schema.h:1541
char rev[11]
Definition: tree_schema.h:482
struct lysp_when * when
Definition: tree_schema.h:1065
struct lysc_when ** when
Definition: tree_schema.h:1847
struct lysc_range::lysc_range_part * parts
const char * dsc
Definition: tree_schema.h:1480
struct lysc_ext_instance * exts
Definition: tree_schema.h:1635
uint32_t max
Definition: tree_schema.h:691
YANG extension instance.
Definition: tree_schema.h:1445
const char * prefix
Definition: tree_schema.h:2361
struct lysp_include * includes
Definition: tree_schema.h:1341
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:27
Compiled YANG extension-stmt.
Definition: tree_schema.h:1419
uint16_t flags
Definition: tree_schema.h:587
struct lysc_node * child
Definition: tree_schema.h:1938
struct lysc_ext_instance * exts
Definition: tree_schema.h:1614
struct lyplg_type * plugin
Definition: tree_schema.h:1627
uint8_t latest_revision
Definition: tree_schema.h:2386
struct lysc_ext_instance * exts
Definition: tree_schema.h:1485
struct lysp_restr * musts
Definition: tree_schema.h:1164
YANG refine-stmt.
Definition: tree_schema.h:682
struct lysp_qname dflt
Definition: tree_schema.h:1123
const char * name
Definition: tree_schema.h:526
struct lys_module * module
Definition: tree_schema.h:1482
struct lyplg_type * plugin
Definition: tree_schema.h:1606
uint16_t flags
Definition: tree_schema.h:1426
struct lysp_when * when
Definition: tree_schema.h:1165
const char * name
Definition: tree_schema.h:1386
uint8_t latest_revision
Definition: tree_schema.h:1382
struct lysp_node * child
Definition: tree_schema.h:1266
struct lysp_qname * iffeatures
Definition: tree_schema.h:582
struct lysp_when * when
Definition: tree_schema.h:1144
enum ly_stmt parent_stmt
Definition: tree_schema.h:1456
const char * ref
Definition: tree_schema.h:612
struct lysc_node * child
Definition: tree_schema.h:1759
struct lysc_ident * identities
Definition: tree_schema.h:2372
const char * ref
Definition: tree_schema.h:2366
struct lysp_ext * extensions
Definition: tree_schema.h:1342
const char * ns
Definition: tree_schema.h:2360
ly_bool implemented
Definition: tree_schema.h:2383
uint32_t refcount
Definition: tree_schema.h:1600
const char * name
Definition: tree_schema.h:1677
const char * dsc
Definition: tree_schema.h:494
LY_DATA_TYPE
YANG built-in types.
Definition: tree.h:202
const char * org
Definition: tree_schema.h:2363
struct lysc_must * musts
Definition: tree_schema.h:1760
struct lysp_ext_instance * exts
Definition: tree_schema.h:645
YANG feature-stmt.
Definition: tree_schema.h:547
const char * ref
Definition: tree_schema.h:1392
struct lys_module * mod
Definition: tree_schema.h:1409
YANG identity-stmt.
Definition: tree_schema.h:1478
struct lysc_node * parent
Definition: tree_schema.h:1671
const char * contact
Definition: tree_schema.h:1390
struct lysp_qname * dflts
Definition: tree_schema.h:1068
libyang generic macros and functions to work with YANG schema or data trees.
struct lysc_when ** when
Definition: tree_schema.h:1874
struct lysp_node_action * rpcs
Definition: tree_schema.h:1349
struct lysp_ext_instance * exts
Definition: tree_schema.h:467
struct lysp_qname * dflts
Definition: tree_schema.h:726
struct lysc_ext_instance * exts
Definition: tree_schema.h:1422
LY_DATA_TYPE basetype
Definition: tree_schema.h:1637
const char * dsc
Definition: tree_schema.h:553
const char * dsc
Definition: tree_schema.h:621
const char * cond
Definition: tree_schema.h:673
uint32_t refcount
Definition: tree_schema.h:1578
const char * filepath
Definition: tree_schema.h:1387
const char * name
Definition: tree_schema.h:463
YANG identity-stmt.
Definition: tree_schema.h:580
const char * ref
Definition: tree_schema.h:1481
struct lysc_ext_instance * exts
Definition: tree_schema.h:1524
struct lys_module * module
Definition: tree_schema.h:1424
struct lysc_ext_instance * exts
Definition: tree_schema.h:1534
LY_DATA_TYPE basetype
Definition: tree_schema.h:1616
struct lysc_iffeature * iffeatures_c
Definition: tree_schema.h:550
uint32_t refcount
Definition: tree_schema.h:1608
const char * ref
Definition: tree_schema.h:585
LIBYANG_API_DECL 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&#39;s type and in case ...
const char * units
Definition: tree_schema.h:736
struct lysp_node_grp * groupings
Definition: tree_schema.h:1265
const char * dsc
Definition: tree_schema.h:684
const char * name
Definition: tree_schema.h:636
const char * ref
Definition: tree_schema.h:675
LY_DATA_TYPE basetype
Definition: tree_schema.h:1607
const char * name
Definition: tree_schema.h:985
const char * ref
Definition: tree_schema.h:554
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1369
LIBYANG_API_DECL 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...
struct lysp_ident * identities
Definition: tree_schema.h:1368
struct lysp_node * child
Definition: tree_schema.h:1096
struct lysp_node * child
Definition: tree_schema.h:1121
const char * dsc
Definition: tree_schema.h:1530
enum ly_stmt stmt
Definition: tree_schema.h:1436
char * prefix
Definition: tree_schema.h:1408
uint8_t is_submod
Definition: tree_schema.h:1356
struct lysp_node_action * actions
Definition: tree_schema.h:1019
struct lysc_ext_instance * exts
Definition: tree_schema.h:1626
uint64_t parent_stmt_index
Definition: tree_schema.h:1457
struct lysp_node * parsed
Definition: tree_schema.h:529
struct lys_module * module
Definition: tree_schema.h:1448
struct lysc_ext_instance * exts
Definition: tree_schema.h:1587
const char * ref
Definition: tree_schema.h:987
LY_DATA_TYPE basetype
Definition: tree_schema.h:1577
uint16_t nodetype
Definition: tree_schema.h:1667
Extension structure of the lysp_node for YANG container.
Definition: tree_schema.h:996
uint16_t flags
Definition: tree_schema.h:1472
const char * ref
Definition: tree_schema.h:1521
struct lys_module * module
Definition: tree_schema.h:461
#define LY_REV_SIZE
Definition: tree_schema.h:231
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).
struct lysp_restr * length
Definition: tree_schema.h:638
uint32_t refcount
Definition: tree_schema.h:1646
const char * ref
Definition: tree_schema.h:685
struct lysp_ext_instance * exts
Definition: tree_schema.h:1352
struct lysc_node_case * cases
Definition: tree_schema.h:1844
Enumeration/Bit value definition.
Definition: tree_schema.h:619
struct lysc_type * compiled
Definition: tree_schema.h:648
LIBYANG_API_DECL 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&#39;s type and in...
Compiled YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1981
uint32_t inverted
Definition: tree_schema.h:1535
struct lysc_node * child
Definition: tree_schema.h:1788
struct lysp_qname dflt
Definition: tree_schema.h:748
struct lysp_qname dflt
Definition: tree_schema.h:661
ly_stmt
List of YANG statements.
Definition: tree_schema.h:297
struct lysp_restr * musts
Definition: tree_schema.h:1210
struct lysp_ext_instance * exts
Definition: tree_schema.h:481
struct lysp_ext_instance * exts
Definition: tree_schema.h:1376
struct lysp_qname * iffeatures
Definition: tree_schema.h:549
YANG grouping-stmt.
Definition: tree_schema.h:1272
struct lysp_deviate * next
Definition: tree_schema.h:744
const char * eapptag
Definition: tree_schema.h:600
struct lys_module * mod
Definition: tree_schema.h:1360
struct lysp_ext_instance * exts
Definition: tree_schema.h:759
struct lysp_deviate * next
Definition: tree_schema.h:715
struct lysc_range * range
Definition: tree_schema.h:1571
struct lysp_ext_instance * exts
Definition: tree_schema.h:722
ly_bool injected
Definition: tree_schema.h:483
struct lysp_stmt * child
Definition: tree_schema.h:534
void * priv
Definition: tree_schema.h:1681
struct lysc_node_action * rpcs
Definition: tree_schema.h:1985
const char * ref
Definition: tree_schema.h:480
struct lysp_type_enum * enums
Definition: tree_schema.h:640
const char * name
Definition: tree_schema.h:548
const char * nodeid
Definition: tree_schema.h:683
struct lysc_node_leaf *** uniques
Definition: tree_schema.h:1944
struct lysc_type ** types
Definition: tree_schema.h:1647
struct lysp_ext_instance * exts
Definition: tree_schema.h:745
uint8_t hash[4]
Definition: tree_schema.h:1669
LIBYANG_API_DECL 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...
struct lysp_qname arg
Definition: tree_schema.h:596
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:2156
const char * units
Definition: tree_schema.h:1067
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.
struct lysc_range * length
Definition: tree_schema.h:1655
struct lysp_submodule * submodule
Definition: tree_schema.h:476
char rev[11]
Definition: tree_schema.h:469
YANG type-stmt.
Definition: tree_schema.h:635
enum ly_stmt kw
Definition: tree_schema.h:517
uint8_t fraction_digits
Definition: tree_schema.h:1570
const char * ref
Definition: tree_schema.h:602
LY_DATA_TYPE basetype
Definition: tree_schema.h:1599
struct lysc_pattern ** patterns
Definition: tree_schema.h:1580
LIBYANG_API_DECL const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
struct lysp_restr * musts
Definition: tree_schema.h:724
struct lysc_range * length
Definition: tree_schema.h:1579
const char * prefix
Definition: tree_schema.h:464
struct lysc_must * musts
Definition: tree_schema.h:1971
const char * dsc
Definition: tree_schema.h:756
YANG data representation.
Definition: tree_data.h:548
uint32_t refcount
Definition: tree_schema.h:1553
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).
const char * argument
Definition: tree_schema.h:1447
const char * name
Definition: tree_schema.h:478
struct lysc_node_notif * notifs
Definition: tree_schema.h:1942
struct lysc_node * next
Definition: tree_schema.h:1672
struct lysc_ext_substmt * substmts
Definition: tree_schema.h:1450
struct lysp_qname * uniques
Definition: tree_schema.h:738
YANG revision-stmt.
Definition: tree_schema.h:609
struct lysp_qname dflt
Definition: tree_schema.h:1044
LY_VALUE_FORMAT format
Definition: tree_schema.h:511
struct lyxp_expr * path
Definition: tree_schema.h:1618
const char * stmt
Definition: tree_schema.h:509
struct lysc_ext_instance * exts
Definition: tree_schema.h:1550
struct lysp_ext_instance * exts
Definition: tree_schema.h:496
struct lysp_node * child
Definition: tree_schema.h:1018
struct lysp_stmt * next
Definition: tree_schema.h:514
const char * presence
Definition: tree_schema.h:1015
struct lysp_deviation * deviations
Definition: tree_schema.h:1351
struct lysp_type type
Definition: tree_schema.h:1066
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition: tree_schema.h:713
const char * ref
Definition: tree_schema.h:663
uint32_t refcount
Definition: tree_schema.h:1425
const char * dsc
Definition: tree_schema.h:611
struct lyplg_type * plugin
Definition: tree_schema.h:1576
struct lysc_node_action_inout input
Definition: tree_schema.h:1732
struct lysp_type * type
Definition: tree_schema.h:746
char date[11]
Definition: tree_schema.h:610
const char * name
Definition: tree_schema.h:620
struct lysp_include * includes
Definition: tree_schema.h:1365
struct lyd_value * dflt
Definition: tree_schema.h:1878
LIBYANG_API_DECL struct lysc_node * lysc_node_child(const struct lysc_node *node)
Get the children linked list of the given (compiled) schema node.
struct lysc_ext_instance * exts
Definition: tree_schema.h:1643
struct lysp_node_grp * groupings
Definition: tree_schema.h:1017
YANG notification-stmt.
Definition: tree_schema.h:1246
const char * dsc
Definition: tree_schema.h:1520
struct lysp_node_notif * notifs
Definition: tree_schema.h:1020
struct lysp_when * when
Definition: tree_schema.h:1014
const char * dsc
Definition: tree_schema.h:1678
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
struct lysc_when ** when
Definition: tree_schema.h:1761
struct lyplg_type * plugin
Definition: tree_schema.h:1636
struct lysp_revision * revs
Definition: tree_schema.h:1362
YANG extension-stmt.
Definition: tree_schema.h:491
uint16_t flags
Definition: tree_schema.h:468
struct lysp_node_notif * notifs
Definition: tree_schema.h:1098
Description of the extension instance substatements.
Definition: tree_schema.h:1435
struct lysp_restr * musts
Definition: tree_schema.h:1013
struct lysc_node * child
Definition: tree_schema.h:1703
uint32_t refcount
Definition: tree_schema.h:1471
struct lysp_ext_instance * exts
Definition: tree_schema.h:555
const char ** bases
Definition: tree_schema.h:583
uint64_t parent_stmt_index
Definition: tree_schema.h:539
struct lyxp_expr * cond
Definition: tree_schema.h:1540
const char * units
Definition: tree_schema.h:1907
LY_VALUE_FORMAT format
Definition: tree_schema.h:528
const char * eapptag
Definition: tree_schema.h:1523
struct lysp_ext_instance * exts
Definition: tree_schema.h:735
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).
LIBYANG_API_DECL 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&#39;s type and in ...
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1016
struct lysp_node_grp * groupings
Definition: tree_schema.h:1095
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition: tree_schema.h:1299
struct lysc_must * musts
Definition: tree_schema.h:1939
struct lysc_ext_instance * exts
Definition: tree_schema.h:1987
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.
const char * dsc
Definition: tree_schema.h:479
struct lysp_module * mod
Definition: tree_schema.h:573
struct lysp_ident * identities
Definition: tree_schema.h:1344
struct lysp_node_notif * notifs
Definition: tree_schema.h:1293
struct lysp_module * pmod
Definition: tree_schema.h:647
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node...
Definition: set.h:46
const char * ref
Definition: tree_schema.h:466
LIBYANG_API_DECL 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).
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.
LIBYANG_API_DECL struct lysc_when ** lysc_node_when(const struct lysc_node *node)
Get the when statements list if present in the node.
struct lysc_node_action_inout output
Definition: tree_schema.h:1733
struct lysp_ext_instance * exts
Definition: tree_schema.h:603
uint16_t flags
Definition: tree_schema.h:516
struct lysp_qname * uniques
Definition: tree_schema.h:725
uint8_t is_submod
Definition: tree_schema.h:1380
struct lysc_node_action * actions
Definition: tree_schema.h:1791
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1335
struct lysc_prefix * prefixes
Definition: tree_schema.h:1467
struct lysp_when * when
Definition: tree_schema.h:1187
YANG rpc-stmt and action-stmt.
Definition: tree_schema.h:1219
const char ** bases
Definition: tree_schema.h:643
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2356
struct lysp_feature * features
Definition: tree_schema.h:1367
const char * name
Definition: tree_schema.h:659
const char * units
Definition: tree_schema.h:723
struct lyxp_expr * cond
Definition: tree_schema.h:1465
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
struct lyplg_type * plugin
Definition: tree_schema.h:1615
struct lysc_range * range
Definition: tree_schema.h:1562
struct lysc_node_notif * notifs
Definition: tree_schema.h:1792
struct lysc_ext_instance * exts
Definition: tree_schema.h:1575
const char * eapptag
Definition: tree_schema.h:1533
const char * emsg
Definition: tree_schema.h:1544
struct lysp_qname * uniques
Definition: tree_schema.h:1099
struct lysp_ext_instance * exts
Definition: tree_schema.h:625
const char * ref
Definition: tree_schema.h:1679
LIBYANG_API_DECL 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...
#define LYS_NODE_HASH_COUNT
Maximum number of hashes stored in a schema node.
Definition: tree_schema.h:1661
struct lysc_type * type
Definition: tree_schema.h:1875
uint16_t flags
Definition: tree_schema.h:497
struct lysp_node * child
Definition: tree_schema.h:1315
struct lys_module ** deviated_by
Definition: tree_schema.h:2381
struct lysp_node_grp * groupings
Definition: tree_schema.h:1290
struct lysp_stmt * child
Definition: tree_schema.h:515
const char * filepath
Definition: tree_schema.h:2362
const char * str
Definition: tree_schema.h:572
struct lysp_ext_instance * exts
Definition: tree_schema.h:586
struct lysc_ext_instance * exts
Definition: tree_schema.h:1470
LIBYANG_API_DECL 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&#39;s type and in c...
uint8_t require_instance
Definition: tree_schema.h:651
const char * ref
Definition: tree_schema.h:622
struct lysp_restr * range
Definition: tree_schema.h:637
Helper structure for generic storage of the extension instances content.
Definition: tree_schema.h:508
YANG input-stmt and output-stmt.
Definition: tree_schema.h:1193
pcre2_code * code
Definition: tree_schema.h:1529
struct lysc_when ** when
Definition: tree_schema.h:1790
struct lysp_node * child
Definition: tree_schema.h:1143
enum ly_stmt_cardinality cardinality
Definition: tree_schema.h:1437
YANG when-stmt.
Definition: tree_schema.h:672
LYSC_PATH_TYPE
Types of the different schema paths.
Definition: tree_schema.h:2335
struct lysc_when ** when
Definition: tree_schema.h:1904
struct lysc_when ** when
Definition: tree_schema.h:1819
struct lysp_node_grp * groupings
Definition: tree_schema.h:1237
uint8_t parsing
Definition: tree_schema.h:1355
#define LY_ARRAY_COUNT_TYPE
Type (i.e. size) of the sized array&#39;s size counter.
Definition: tree.h:104
struct lyplg_type * plugin
Definition: tree_schema.h:1559
struct lysp_deviate * next
Definition: tree_schema.h:721
struct lysp_node_notif * notifs
Definition: tree_schema.h:1318
struct lysp_revision * revs
Definition: tree_schema.h:1338
uint32_t refcount
Definition: tree_schema.h:1561
uint8_t require_instance
Definition: tree_schema.h:1622
struct lysp_deviate * next
Definition: tree_schema.h:734
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:1324
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1264
uint16_t flags
Definition: tree_schema.h:1668
const char * dsc
Definition: tree_schema.h:662
struct lysp_ext_instance * exts
Definition: tree_schema.h:676
struct lysp_node * child
Definition: tree_schema.h:1213
struct lys_module * module
Definition: tree_schema.h:1670
LIBYANG_API_DECL 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&#39;s type and in case i...
struct lysc_ext_instance * exts
Definition: tree_schema.h:1546
uint16_t flags
Definition: tree_schema.h:556
LIBYANG_API_DECL 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&#39;s type and in case i...
struct lysp_restr * musts
Definition: tree_schema.h:1040
const char * dsc
Definition: tree_schema.h:465
struct lysc_must * musts
Definition: tree_schema.h:1873
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...
struct lysp_qname * iffeatures
Definition: tree_schema.h:686
Generic YANG data node.
Definition: tree_schema.h:980
struct lysp_deviate * deviates
Definition: tree_schema.h:758
uint16_t flags
Definition: tree_schema.h:983
const char * org
Definition: tree_schema.h:1389
const char * expr
Definition: tree_schema.h:1528
const char * dsc
Definition: tree_schema.h:2365
uint16_t flags
Definition: tree_schema.h:652
struct lysp_restr * patterns
Definition: tree_schema.h:639
const char * ref
Definition: tree_schema.h:495
const char * emsg
Definition: tree_schema.h:1532
struct lysc_must * musts
Definition: tree_schema.h:1903
const char * eapptag
Definition: tree_schema.h:1545
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
Definition: tree.h:235
struct lysp_restr * musts
Definition: tree_schema.h:1263
LIBYANG_API_DECL 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, in case of augments it is the target module, recursively, otherwise it is the module where the node is defined.
const char * name
Definition: tree_schema.h:581
const char * dsc
Definition: tree_schema.h:584
LIBYANG_API_DECL const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
struct lysp_ext_instance * exts
Definition: tree_schema.h:664
uint32_t refcount
Definition: tree_schema.h:1536
struct lysc_type_bitenum_item * enums
Definition: tree_schema.h:1601
const char * nodeid
Definition: tree_schema.h:755
YANG include-stmt.
Definition: tree_schema.h:475
struct lysp_ext_instance * exts
Definition: tree_schema.h:613
struct lysp_node_action_inout input
Definition: tree_schema.h:1239
uint16_t flags
Definition: tree_schema.h:693
struct lysp_ext * extensions
Definition: tree_schema.h:1366
struct lysp_qname * iffeatures
Definition: tree_schema.h:624
LY_DATA_TYPE basetype
Definition: tree_schema.h:1560
struct lysc_node * data
Definition: tree_schema.h:1984
uint8_t mod
Definition: tree_schema.h:714
struct lysc_ident ** bases
Definition: tree_schema.h:1630
struct lyplg_type * plugin
Definition: tree_schema.h:1598
const char * units
Definition: tree_schema.h:660
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.
struct lysc_node_notif * notifs
Definition: tree_schema.h:1986
LIBYANG_API_DECL const char * ly_stmt2str(enum ly_stmt stmt)
Stringify statement identifier.
struct lysp_node_augment * augments
Definition: tree_schema.h:1186
struct lysc_module * compiled
Definition: tree_schema.h:2369
const char * units
Definition: tree_schema.h:1043
const char * argname
Definition: tree_schema.h:493
uint16_t nodetype
Definition: tree_schema.h:982
LIBYANG_API_DECL struct lysc_when * lysc_has_when(const struct lysc_node *node)
Check whether the schema node data instance existence depends on any when conditions. This node and any direct parent choice and case schema nodes are also examined for when conditions.
struct lysc_node * child
Definition: tree_schema.h:1817
ly_stmt_cardinality
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:450
struct lysp_restr * musts
Definition: tree_schema.h:1091
const char * contact
Definition: tree_schema.h:2364
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1345
struct lysp_node_grp * groupings
Definition: tree_schema.h:1346
LY_DATA_TYPE basetype
Definition: tree_schema.h:1552
struct lysp_node * parent
Definition: tree_schema.h:981
struct lysp_when * when
Definition: tree_schema.h:1092
struct lysp_restr * musts
Definition: tree_schema.h:1064
struct lys_module ** augmented_by
Definition: tree_schema.h:2380
struct lysp_node_notif * notifs
Definition: tree_schema.h:1374
LIBYANG_API_DECL 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&#39;s type and in ca...
struct lys_module * mod
Definition: tree_schema.h:1982
struct lysp_refine * refines
Definition: tree_schema.h:1185
const char * emsg
Definition: tree_schema.h:599
LY_ERR
libyang&#39;s error codes returned by the libyang functions.
Definition: log.h:247
const char * ref
Definition: tree_schema.h:1531
struct lysp_feature ** features
Definition: tree_schema.h:565
Logger manipulation routines and error definitions.
const char * ref
Definition: tree_schema.h:1469
const char * dsc
Definition: tree_schema.h:1391
struct lysc_ext * compiled
Definition: tree_schema.h:499
struct lysc_must * musts
Definition: tree_schema.h:1789
struct lysp_qname * dflts
Definition: tree_schema.h:689
struct lysp_ext_instance * exts
Definition: tree_schema.h:692
const char * dsc
Definition: tree_schema.h:674
uint32_t min
Definition: tree_schema.h:690
const char * ref
Definition: tree_schema.h:757
const char * dsc
Definition: tree_schema.h:1542
struct lysp_when * when
Definition: tree_schema.h:1041
struct lysp_node_augment * augments
Definition: tree_schema.h:1372
struct lysp_feature * features
Definition: tree_schema.h:1343
struct lys_module * cur_mod
Definition: tree_schema.h:1620
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.
const char * name
Definition: tree_schema.h:1479
struct lysc_type * type
Definition: tree_schema.h:1905
const char * presence
Definition: tree_schema.h:688
struct lysp_deviation * deviations
Definition: tree_schema.h:1375
struct lysp_type_enum * bits
Definition: tree_schema.h:641
const char * revision
Definition: tree_schema.h:2359
const char * emsg
Definition: tree_schema.h:1522
const char * key
Definition: tree_schema.h:1093
uint16_t flags
Definition: tree_schema.h:626
uint8_t * expr
Definition: tree_schema.h:564
uint8_t fraction_digits
Definition: tree_schema.h:650
struct lysc_when ** when
Definition: tree_schema.h:1972
struct lysc_type * realtype
Definition: tree_schema.h:1621
struct lysp_node_notif * notifs
Definition: tree_schema.h:1350
libyang context handler.
YANG typedef-stmt.
Definition: tree_schema.h:658
struct lysp_node_action * actions
Definition: tree_schema.h:1097
struct lysc_ext_instance * exts
Definition: tree_schema.h:1605
const char * ref
Definition: tree_schema.h:1543
struct lysp_restr * musts
Definition: tree_schema.h:737
YANG when-stmt.
Definition: tree_schema.h:1464
const char * name
Definition: tree_schema.h:2358
struct lyplg_ext * plugin
Definition: tree_schema.h:1423
LIBYANG_API_DECL struct lysc_must * lysc_node_musts(const struct lysc_node *node)
Get the must statements list if present in the node.
struct lysc_prefix * prefixes
Definition: tree_schema.h:1619
struct lysp_node_action_inout output
Definition: tree_schema.h:1240
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.
struct lysc_ext_instance * exts
Definition: tree_schema.h:1680
struct lysp_import * imports
Definition: tree_schema.h:1340
struct lysp_node_grp * groupings
Definition: tree_schema.h:1370
struct lysp_node * child
Definition: tree_schema.h:1291
struct lyxp_expr * path
Definition: tree_schema.h:642
const char * dsc
Definition: tree_schema.h:1468
struct lysp_type type
Definition: tree_schema.h:665
struct lysc_node * prev
Definition: tree_schema.h:1673
const char * prefix
Definition: tree_schema.h:1388
struct lysp_node_action * rpcs
Definition: tree_schema.h:1373
struct lysc_node_action * actions
Definition: tree_schema.h:1941
struct lysp_node * data
Definition: tree_schema.h:1371