libyang  4.0.2
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 
16 #ifndef LY_TREE_SCHEMA_H_
17 #define LY_TREE_SCHEMA_H_
18 
19 #define PCRE2_CODE_UNIT_WIDTH 8
20 
21 #include <pcre2.h>
22 
23 #include <stdint.h>
24 #include <stdio.h>
25 
26 #include "log.h"
27 #include "ly_config.h"
28 #include "tree.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 struct ly_ctx;
35 struct ly_path;
36 struct ly_set;
37 struct lys_module;
38 struct lysc_node;
39 struct lyxp_expr;
40 
154 /* *INDENT-OFF* */
155 
184 #define LYSC_TREE_DFS_BEGIN(START, ELEM) \
185  { ly_bool LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
186  for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node *)(START); \
187  (ELEM); \
188  (ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
189 
203 #define LYSC_TREE_DFS_END(START, ELEM) \
204  /* select element for the next run - children first */ \
205  if (LYSC_TREE_DFS_continue) { \
206  (LYSC_TREE_DFS_next) = NULL; \
207  } else { \
208  (LYSC_TREE_DFS_next) = (struct lysc_node *)lysc_node_child(ELEM); \
209  } \
210  if (!(LYSC_TREE_DFS_next)) { \
211  /* no children, try siblings */ \
212  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
213  } \
214  while (!(LYSC_TREE_DFS_next)) { \
215  /* parent is already processed, go to its sibling */ \
216  (ELEM) = (ELEM)->parent; \
217  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
218  } }
219 
223 #define _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) \
224  if ((ELEM) == (struct lysc_node *)(START)) { \
225  /* we are done, no next element to process */ \
226  break; \
227  } \
228  (NEXT) = (ELEM)->next;
229 
230 /* *INDENT-ON* */
231 
232 #define LY_REV_SIZE 11
239 #define LYS_UNKNOWN 0x0000
240 #define LYS_CONTAINER 0x0001
241 #define LYS_CHOICE 0x0002
242 #define LYS_LEAF 0x0004
243 #define LYS_LEAFLIST 0x0008
244 #define LYS_LIST 0x0010
245 #define LYS_ANYXML 0x0020
246 #define LYS_ANYDATA 0x0060
247 #define LYS_CASE 0x0080
249 #define LYS_RPC 0x0100
250 #define LYS_ACTION 0x0200
251 #define LYS_NOTIF 0x0400
253 #define LYS_USES 0x0800
254 #define LYS_INPUT 0x1000
255 #define LYS_OUTPUT 0x2000
256 #define LYS_GROUPING 0x4000
257 #define LYS_AUGMENT 0x8000
258 
259 #define LYS_NODETYPE_MASK 0xffff
265 struct lysp_import {
266  struct lys_module *module;
268  const char *name;
269  const char *prefix;
270  const char *dsc;
271  const char *ref;
273  uint16_t flags;
274  char rev[LY_REV_SIZE];
275 };
276 
280 struct lysp_include {
283  const char *name;
284  const char *dsc;
285  const char *ref;
287  char rev[LY_REV_SIZE];
291 };
292 
296 struct lysp_ext {
297  const char *name;
298  const char *argname;
299  const char *dsc;
300  const char *ref;
302  uintptr_t plugin_ref;
303  uint16_t flags;
304 };
305 
309 struct lysp_feature {
310  const char *name;
315  const char *dsc;
316  const char *ref;
318  uint16_t flags;
320 };
321 
326  uint8_t *expr;
328 };
329 
333 struct lysp_qname {
334  const char *str;
335  const struct lysp_module *mod;
337  uint16_t flags;
339 };
340 
344 struct lysp_ident {
345  const char *name;
347  const char **bases;
348  const char *dsc;
349  const char *ref;
351  uint16_t flags;
352 };
353 
357 struct lysp_restr {
358 #define LYSP_RESTR_PATTERN_ACK 0x06
359 #define LYSP_RESTR_PATTERN_NACK 0x15
360  struct lysp_qname arg;
363  const char *emsg;
364  const char *eapptag;
365  const char *dsc;
366  const char *ref;
368 };
369 
375  const char *dsc;
376  const char *ref;
378 };
379 
384  const char *name;
385  const char *dsc;
386  const char *ref;
387  int64_t value;
390  uint16_t flags;
392 };
393 
399 struct lysp_type {
400  const char *name;
401  struct lysp_restr *range;
402  struct lysp_restr *length;
406  struct lyxp_expr *path;
407  const char **bases;
408  struct lysp_type *types;
411  const struct lysp_module *pmod;
412  struct lysc_type *compiled;
414  uint8_t fraction_digits;
416  uint16_t flags;
417 };
418 
422 struct lysp_tpdf {
423  const char *name;
424  const char *units;
425  struct lysp_qname dflt;
426  const char *dsc;
427  const char *ref;
429  struct lysp_type type;
430  uint16_t flags;
431 };
432 
436 struct lysp_when {
437  const char *cond;
438  const char *dsc;
439  const char *ref;
441 };
442 
446 struct lysp_refine {
447  const char *nodeid;
448  const char *dsc;
449  const char *ref;
451  struct lysp_restr *musts;
452  const char *presence;
453  struct lysp_qname *dflts;
454  uint32_t min;
455  uint32_t max;
457  uint16_t flags;
458 };
459 
468 #define LYS_DEV_NOT_SUPPORTED 1
469 #define LYS_DEV_ADD 2
470 #define LYS_DEV_DELETE 3
471 #define LYS_DEV_REPLACE 4
477 struct lysp_deviate {
478  uint8_t mod;
479  struct lysp_deviate *next;
481 };
482 
484  uint8_t mod;
485  struct lysp_deviate *next;
487  const char *units;
488  struct lysp_restr *musts;
489  struct lysp_qname *uniques;
490  struct lysp_qname *dflts;
491  uint16_t flags;
492  uint32_t min;
493  uint32_t max;
494 };
495 
497  uint8_t mod;
498  struct lysp_deviate *next;
500  const char *units;
501  struct lysp_restr *musts;
502  struct lysp_qname *uniques;
503  struct lysp_qname *dflts;
504 };
505 
507  uint8_t mod;
508  struct lysp_deviate *next;
510  struct lysp_type *type;
511  const char *units;
512  struct lysp_qname dflt;
513  uint16_t flags;
514  uint32_t min;
515  uint32_t max;
516 };
517 
519  const char *nodeid;
520  const char *dsc;
521  const char *ref;
524 };
525 
649 #define LYS_CONFIG_W 0x01
650 #define LYS_CONFIG_R 0x02
651 #define LYS_CONFIG_MASK 0x03
652 #define LYS_STATUS_CURR 0x04
653 #define LYS_STATUS_DEPRC 0x08
654 #define LYS_STATUS_OBSLT 0x10
655 #define LYS_STATUS_MASK 0x1C
656 #define LYS_MAND_TRUE 0x20
661 #define LYS_MAND_FALSE 0x40
664 #define LYS_MAND_MASK 0x60
665 #define LYS_PRESENCE 0x80
668 #define LYS_UNIQUE 0x80
669 #define LYS_KEY 0x0100
670 #define LYS_KEYLESS 0x0200
671 #define LYS_DISABLED 0x0100
672 #define LYS_FENABLED 0x20
673 #define LYS_ORDBY_SYSTEM 0x80
675 #define LYS_ORDBY_USER 0x40
678 #define LYS_ORDBY_MASK 0xC0
679 #define LYS_YINELEM_TRUE 0x80
680 #define LYS_YINELEM_FALSE 0x0100
681 #define LYS_YINELEM_MASK 0x0180
682 #define LYS_USED_GRP 0x0400
684 #define LYS_SET_VALUE 0x0200
685 #define LYS_SET_MIN 0x0200
686 #define LYS_SET_MAX 0x0400
688 #define LYS_SET_BASE 0x0001
689 #define LYS_SET_BIT 0x0002
690 #define LYS_SET_ENUM 0x0004
691 #define LYS_SET_FRDIGITS 0x0008
692 #define LYS_SET_LENGTH 0x0010
693 #define LYS_SET_PATH 0x0020
694 #define LYS_SET_PATTERN 0x0040
695 #define LYS_SET_RANGE 0x0080
696 #define LYS_SET_TYPE 0x0100
697 #define LYS_SET_REQINST 0x0200
698 #define LYS_SET_DFLT 0x0200
703 #define LYS_SET_UNITS 0x0400
704 #define LYS_SET_CONFIG 0x0800
706 #define LYS_SINGLEQUOTED 0x0100
708 #define LYS_DOUBLEQUOTED 0x0200
711 #define LYS_YIN_ATTR 0x0400
712 #define LYS_YIN_ARGUMENT 0x0800
714 #define LYS_INTERNAL 0x1000
716 #define LYS_IS_ENUM 0x0200
718 #define LYS_IS_INPUT 0x1000
720 #define LYS_IS_OUTPUT 0x2000
722 #define LYS_IS_NOTIF 0x4000
724 #define LYS_FLAGS_COMPILED_MASK 0xff
730 struct lysp_node {
731  struct lysp_node *parent;
732  uint16_t nodetype;
733  uint16_t flags;
734  struct lysp_node *next;
735  const char *name;
736  const char *dsc;
737  const char *ref;
738  struct lysp_qname *iffeatures;
741 };
746 struct lysp_node_container {
747  union {
748  struct lysp_node node;
750  struct {
751  struct lysp_node *parent;
752  uint16_t nodetype;
753  uint16_t flags;
754  struct lysp_node *next;
755  const char *name;
756  const char *dsc;
757  const char *ref;
758  struct lysp_qname *iffeatures;
759  struct lysp_ext_instance *exts;
760  };
761  };
763  /* container */
764  struct lysp_restr *musts;
765  struct lysp_when *when;
766  const char *presence;
767  struct lysp_tpdf *typedefs;
769  struct lysp_node *child;
770  struct lysp_node_action *actions;
771  struct lysp_node_notif *notifs;
772 };
773 
774 struct lysp_node_leaf {
775  union {
776  struct lysp_node node;
778  struct {
779  struct lysp_node *parent;
780  uint16_t nodetype;
781  uint16_t flags;
782  struct lysp_node *next;
783  const char *name;
784  const char *dsc;
785  const char *ref;
786  struct lysp_qname *iffeatures;
788  };
789  };
791  /* leaf */
792  struct lysp_restr *musts;
793  struct lysp_when *when;
794  struct lysp_type type;
795  const char *units;
796  struct lysp_qname dflt;
797 };
798 
799 struct lysp_node_leaflist {
800  union {
801  struct lysp_node node;
803  struct {
804  struct lysp_node *parent;
805  uint16_t nodetype;
806  uint16_t flags;
807  struct lysp_node *next;
808  const char *name;
809  const char *dsc;
810  const char *ref;
811  struct lysp_qname *iffeatures;
813  };
814  };
816  /* leaf-list */
817  struct lysp_restr *musts;
818  struct lysp_when *when;
819  struct lysp_type type;
820  const char *units;
821  struct lysp_qname *dflts;
823  uint32_t min;
824  uint32_t max;
825 };
826 
827 struct lysp_node_list {
828  union {
829  struct lysp_node node;
831  struct {
832  struct lysp_node *parent;
833  uint16_t nodetype;
834  uint16_t flags;
835  struct lysp_node *next;
836  const char *name;
837  const char *dsc;
838  const char *ref;
839  struct lysp_qname *iffeatures;
840  struct lysp_ext_instance *exts;
841  };
842  };
844  /* list */
845  struct lysp_restr *musts;
846  struct lysp_when *when;
847  const char *key;
848  struct lysp_tpdf *typedefs;
850  struct lysp_node *child;
851  struct lysp_node_action *actions;
852  struct lysp_node_notif *notifs;
853  struct lysp_qname *uniques;
854  uint32_t min;
855  uint32_t max;
856 };
857 
858 struct lysp_node_choice {
859  union {
860  struct lysp_node node;
862  struct {
863  struct lysp_node *parent;
864  uint16_t nodetype;
865  uint16_t flags;
866  struct lysp_node *next;
867  const char *name;
868  const char *dsc;
869  const char *ref;
870  struct lysp_qname *iffeatures;
872  };
873  };
875  /* choice */
876  struct lysp_node *child;
877  struct lysp_when *when;
878  struct lysp_qname dflt;
879 };
881 struct lysp_node_case {
882  union {
883  struct lysp_node node;
885  struct {
886  struct lysp_node *parent;
887  uint16_t nodetype;
888  uint16_t flags;
889  struct lysp_node *next;
890  const char *name;
891  const char *dsc;
892  const char *ref;
893  struct lysp_qname *iffeatures;
895  };
896  };
898  /* case */
899  struct lysp_node *child;
900  struct lysp_when *when;
901 };
902 
904  union {
905  struct lysp_node node;
907  struct {
908  struct lysp_node *parent;
909  uint16_t nodetype;
910  uint16_t flags;
911  struct lysp_node *next;
912  const char *name;
913  const char *dsc;
914  const char *ref;
915  struct lysp_qname *iffeatures;
916  struct lysp_ext_instance *exts;
917  };
918  };
920  /* anyxml/anydata */
921  struct lysp_restr *musts;
922  struct lysp_when *when;
923 };
924 
926  union {
927  struct lysp_node node;
929  struct {
930  struct lysp_node *parent;
931  uint16_t nodetype;
932  uint16_t flags;
933  struct lysp_node *next;
934  const char *name;
935  const char *dsc;
936  const char *ref;
937  struct lysp_qname *iffeatures;
938  struct lysp_ext_instance *exts;
939  };
940  };
942  /* uses */
945  struct lysp_when *when;
946 };
951 struct lysp_node_action_inout {
952  union {
953  struct lysp_node node;
955  struct {
956  struct lysp_node *parent;
957  uint16_t nodetype;
958  uint16_t flags;
959  struct lysp_node *next;
960  const char *name;
961  const char *dsc;
962  const char *ref;
963  struct lysp_qname *iffeatures;
964  struct lysp_ext_instance *exts;
965  };
966  };
968  /* inout */
969  struct lysp_restr *musts;
970  struct lysp_tpdf *typedefs;
971  struct lysp_node_grp *groupings;
972  struct lysp_node *child;
973 };
974 
978 struct lysp_node_action {
979  union {
980  struct lysp_node node;
982  struct {
983  struct lysp_node *parent;
984  uint16_t nodetype;
985  uint16_t flags;
986  struct lysp_node_action *next;
987  const char *name;
988  const char *dsc;
989  const char *ref;
990  struct lysp_qname *iffeatures;
991  struct lysp_ext_instance *exts;
992  };
993  };
995  /* action */
996  struct lysp_tpdf *typedefs;
1001 };
1002 
1006 struct lysp_node_notif {
1007  union {
1008  struct lysp_node node;
1010  struct {
1011  struct lysp_node *parent;
1012  uint16_t nodetype;
1013  uint16_t flags;
1014  struct lysp_node_notif *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  /* notif */
1024  struct lysp_restr *musts;
1026  struct lysp_node_grp *groupings;
1027  struct lysp_node *child;
1028 };
1029 
1033 struct lysp_node_grp {
1034  union {
1035  struct lysp_node node;
1037  struct {
1038  struct lysp_node *parent;
1039  uint16_t nodetype;
1040  uint16_t flags;
1041  struct lysp_node_grp *next;
1042  const char *name;
1043  const char *dsc;
1044  const char *ref;
1045  struct lysp_qname *iffeatures;
1046  struct lysp_ext_instance *exts;
1047  };
1048  };
1050  /* grp */
1053  struct lysp_node *child;
1054  struct lysp_node_action *actions;
1056 };
1057 
1061 struct lysp_node_augment {
1062  union {
1063  struct lysp_node node;
1065  struct {
1066  struct lysp_node *parent;
1067  uint16_t nodetype;
1068  uint16_t flags;
1069  struct lysp_node_augment *next;
1070  const char *nodeid;
1071  const char *dsc;
1072  const char *ref;
1073  struct lysp_qname *iffeatures;
1074  struct lysp_ext_instance *exts;
1075  };
1076  };
1078  struct lysp_node *child;
1079  struct lysp_when *when;
1081  struct lysp_node_notif *notifs;
1082 };
1087 typedef enum LYS_VERSION {
1088  LYS_VERSION_UNDEF = 0,
1089  LYS_VERSION_1_0 = 1,
1090  LYS_VERSION_1_1 = 2
1091 } LYS_VERSION;
1092 
1098 struct lysp_module {
1099  struct lys_module *mod;
1101  struct lysp_revision *revs;
1103  struct lysp_import *imports;
1104  struct lysp_include *includes;
1109  struct lysp_node_grp *groupings;
1110  struct lysp_node *data;
1111  struct lysp_node_augment *augments;
1112  struct lysp_node_action *rpcs;
1113  struct lysp_node_notif *notifs;
1114  struct lysp_deviation *deviations;
1115  struct lysp_ext_instance *exts;
1117  uint8_t version;
1118  uint8_t parsing : 1;
1119  uint8_t is_submod : 1;
1120 };
1123  struct lys_module *mod;
1134  struct lysp_node *data;
1138  struct lysp_deviation *deviations;
1139  struct lysp_ext_instance *exts;
1141  uint8_t version;
1142  uint8_t parsing : 1;
1143  uint8_t is_submod : 1;
1145  uint8_t latest_revision : 2;
1149  const char *name;
1150  const char *filepath;
1151  const char *prefix;
1152  const char *org;
1153  const char *contact;
1154  const char *dsc;
1155  const char *ref;
1156 };
1164 #define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
1165 
1170 struct lysc_prefix {
1171  char *prefix;
1172  const struct lys_module *mod;
1173 };
1174 
1182 struct lysc_ext {
1183  const char *name;
1184  const char *argname;
1185  struct lysc_ext_instance *exts;
1186  uintptr_t plugin_ref;
1187  struct lys_module *module;
1188  uint16_t flags;
1189 };
1194 struct lysc_when {
1195  struct lyxp_expr *cond;
1196  struct lysc_node *context;
1197  struct lysc_prefix *prefixes;
1198  const char *dsc;
1199  const char *ref;
1201  uint32_t refcount;
1202  uint16_t flags;
1203 };
1208 struct lysc_ident {
1209  const char *name;
1210  const char *dsc;
1211  const char *ref;
1212  struct lys_module *module;
1213  struct lysc_ident **derived;
1216  uint16_t flags;
1217 };
1225 #define LYS_IFF_NOT 0x00
1226 #define LYS_IFF_AND 0x01
1227 #define LYS_IFF_OR 0x02
1228 #define LYS_IFF_F 0x03
1234 struct lysc_revision {
1235  char date[LY_REV_SIZE];
1236  struct lysc_ext_instance *exts;
1237 };
1238 
1239 struct lysc_range {
1240  struct lysc_range_part {
1241  union {
1242  int64_t min_64;
1243  uint64_t min_u64;
1244  };
1245  union {
1246  int64_t max_64;
1247  uint64_t max_u64;
1248  };
1249  } *parts;
1250  const char *dsc;
1251  const char *ref;
1252  const char *emsg;
1253  const char *eapptag;
1255 };
1256 
1258  const char *expr;
1259  const char *dsc;
1260  const char *ref;
1261  const char *emsg;
1262  const char *eapptag;
1264  uint32_t inverted : 1;
1265  uint32_t refcount : 31;
1266 };
1267 
1268 struct lysc_must {
1269  struct lyxp_expr *cond;
1271  const char *dsc;
1272  const char *ref;
1273  const char *emsg;
1274  const char *eapptag;
1276 };
1278 struct lysc_type {
1279  const char *name;
1281  uintptr_t plugin_ref;
1283  uint32_t refcount;
1285 };
1288  const char *name;
1290  uintptr_t plugin_ref;
1292  uint32_t refcount;
1294  struct lysc_range *range;
1295 };
1298  const char *name;
1300  uintptr_t plugin_ref;
1302  uint32_t refcount;
1304  uint8_t fraction_digits;
1305  struct lysc_range *range;
1306 };
1309  const char *name;
1311  uintptr_t plugin_ref;
1313  uint32_t refcount;
1315  struct lysc_range *length;
1317 };
1320  const char *name;
1321  const char *dsc;
1322  const char *ref;
1325  union {
1326  int32_t value;
1327  uint32_t position;
1328  };
1329  uint16_t flags;
1331 };
1332 
1334  const char *name;
1335  struct lysc_ext_instance *exts;
1336  uintptr_t plugin_ref;
1338  uint32_t refcount;
1341 };
1342 
1344  const char *name;
1345  struct lysc_ext_instance *exts;
1346  uintptr_t plugin_ref;
1348  uint32_t refcount;
1350  struct lysc_type_bitenum_item *bits;
1352 };
1355  const char *name;
1357  uintptr_t plugin_ref;
1359  uint32_t refcount;
1361  struct lyxp_expr *path;
1365 };
1367 struct lysc_type_identityref {
1368  const char *name;
1369  struct lysc_ext_instance *exts;
1370  uintptr_t plugin_ref;
1372  uint32_t refcount;
1374  struct lysc_ident **bases;
1376 };
1378 struct lysc_type_instanceid {
1379  const char *name;
1381  uintptr_t plugin_ref;
1383  uint32_t refcount;
1386 };
1389  const char *name;
1391  uintptr_t plugin_ref;
1393  uint32_t refcount;
1395  struct lysc_type **types;
1396 };
1399  const char *name;
1401  uintptr_t plugin_ref;
1403  uint32_t refcount;
1405  struct lysc_range *length;
1406 };
1411 #define LYS_NODE_HASH_COUNT 4
1412 
1416 struct lysc_node {
1417  uint16_t nodetype;
1418  uint16_t flags;
1420  struct lys_module *module;
1421  struct lysc_node *parent;
1422  struct lysc_node *next;
1423  struct lysc_node *prev;
1427  const char *name;
1428  const char *dsc;
1429  const char *ref;
1430  struct lysc_ext_instance *exts;
1431  void *priv;
1432 };
1433 
1435  union {
1436  struct lysc_node node;
1438  struct {
1439  uint16_t nodetype;
1440  uint16_t flags;
1441  uint8_t hash[LYS_NODE_HASH_COUNT];
1442  struct lys_module *module;
1443  struct lysc_node *parent;
1444  struct lysc_node *next;
1445  struct lysc_node *prev;
1446  const char *name;
1447  const char *dsc;
1448  const char *ref;
1450  void *priv;
1451  };
1452  };
1454  struct lysc_node *child;
1455  struct lysc_must *musts;
1456 };
1457 
1458 struct lysc_node_action {
1459  union {
1460  struct lysc_node node;
1462  struct {
1463  uint16_t nodetype;
1464  uint16_t flags;
1465  uint8_t hash[LYS_NODE_HASH_COUNT];
1466  struct lys_module *module;
1467  struct lysc_node *parent;
1468  struct lysc_node_action *next;
1469  struct lysc_node_action *prev;
1473  const char *name;
1474  const char *dsc;
1475  const char *ref;
1477  void *priv;
1478  };
1479  };
1481  struct lysc_when **when;
1484  struct lysc_node_action_inout input;
1487 };
1488 
1489 struct lysc_node_notif {
1490  union {
1491  struct lysc_node node;
1493  struct {
1494  uint16_t nodetype;
1495  uint16_t flags;
1496  uint8_t hash[LYS_NODE_HASH_COUNT];
1497  struct lys_module *module;
1498  struct lysc_node *parent;
1499  struct lysc_node_notif *next;
1500  struct lysc_node_notif *prev;
1504  const char *name;
1505  const char *dsc;
1506  const char *ref;
1508  void *priv;
1509  };
1510  };
1512  struct lysc_node *child;
1513  struct lysc_must *musts;
1514  struct lysc_when **when;
1517 };
1518 
1519 struct lysc_node_container {
1520  union {
1521  struct lysc_node node;
1523  struct {
1524  uint16_t nodetype;
1525  uint16_t flags;
1526  uint8_t hash[LYS_NODE_HASH_COUNT];
1527  struct lys_module *module;
1528  struct lysc_node *parent;
1529  struct lysc_node *next;
1530  struct lysc_node *prev;
1534  const char *name;
1535  const char *dsc;
1536  const char *ref;
1538  void *priv;
1539  };
1540  };
1542  struct lysc_node *child;
1543  struct lysc_must *musts;
1544  struct lysc_when **when;
1545  struct lysc_node_action *actions;
1546  struct lysc_node_notif *notifs;
1547 };
1548 
1549 struct lysc_node_case {
1550  union {
1551  struct lysc_node node;
1553  struct {
1554  uint16_t nodetype;
1555  uint16_t flags;
1556  uint8_t hash[LYS_NODE_HASH_COUNT];
1557  struct lys_module *module;
1558  struct lysc_node *parent;
1559  struct lysc_node *next;
1560  struct lysc_node *prev;
1564  const char *name;
1565  const char *dsc;
1566  const char *ref;
1568  void *priv;
1569  };
1570  };
1572  struct lysc_node *child;
1574  struct lysc_when **when;
1575 };
1576 
1577 struct lysc_node_choice {
1578  union {
1579  struct lysc_node node;
1581  struct {
1582  uint16_t nodetype;
1583  uint16_t flags;
1584  uint8_t hash[LYS_NODE_HASH_COUNT];
1585  struct lys_module *module;
1586  struct lysc_node *parent;
1587  struct lysc_node *next;
1588  struct lysc_node *prev;
1592  const char *name;
1593  const char *dsc;
1594  const char *ref;
1596  void *priv;
1597  };
1598  };
1600  struct lysc_node_case *cases;
1601  struct lysc_when **when;
1602  struct lysc_node_case *dflt;
1603 };
1604 
1605 struct lysc_value {
1606  const char *str;
1607  struct lysc_prefix *prefixes;
1608 };
1609 
1610 struct lysc_node_leaf {
1611  union {
1612  struct lysc_node node;
1614  struct {
1615  uint16_t nodetype;
1616  uint16_t flags;
1617  uint8_t hash[LYS_NODE_HASH_COUNT];
1618  struct lys_module *module;
1619  struct lysc_node *parent;
1620  struct lysc_node *next;
1621  struct lysc_node *prev;
1625  const char *name;
1626  const char *dsc;
1627  const char *ref;
1629  void *priv;
1630  };
1631  };
1633  struct lysc_must *musts;
1634  struct lysc_when **when;
1635  struct lysc_type *type;
1637  const char *units;
1638  struct lysc_value dflt;
1639 };
1640 
1641 struct lysc_node_leaflist {
1642  union {
1643  struct lysc_node node;
1645  struct {
1646  uint16_t nodetype;
1647  uint16_t flags;
1648  uint8_t hash[LYS_NODE_HASH_COUNT];
1649  struct lys_module *module;
1650  struct lysc_node *parent;
1651  struct lysc_node *next;
1652  struct lysc_node *prev;
1656  const char *name;
1657  const char *dsc;
1658  const char *ref;
1660  void *priv;
1661  };
1662  };
1664  struct lysc_must *musts;
1665  struct lysc_when **when;
1666  struct lysc_type *type;
1668  const char *units;
1669  struct lysc_value *dflts;
1671  uint32_t min;
1672  uint32_t max;
1674 };
1675 
1676 struct lysc_node_list {
1677  union {
1678  struct lysc_node node;
1680  struct {
1681  uint16_t nodetype;
1682  uint16_t flags;
1683  uint8_t hash[LYS_NODE_HASH_COUNT];
1684  struct lys_module *module;
1685  struct lysc_node *parent;
1686  struct lysc_node *next;
1687  struct lysc_node *prev;
1691  const char *name;
1692  const char *dsc;
1693  const char *ref;
1695  void *priv;
1696  };
1697  };
1699  struct lysc_node *child;
1700  struct lysc_must *musts;
1701  struct lysc_when **when;
1702  struct lysc_node_action *actions;
1703  struct lysc_node_notif *notifs;
1705  struct lysc_node_leaf ***uniques;
1706  uint32_t min;
1707  uint32_t max;
1708 };
1709 
1710 struct lysc_node_anydata {
1711  union {
1712  struct lysc_node node;
1714  struct {
1715  uint16_t nodetype;
1716  uint16_t flags;
1717  uint8_t hash[LYS_NODE_HASH_COUNT];
1718  struct lys_module *module;
1719  struct lysc_node *parent;
1720  struct lysc_node *next;
1721  struct lysc_node *prev;
1725  const char *name;
1726  const char *dsc;
1727  const char *ref;
1729  void *priv;
1730  };
1731  };
1733  struct lysc_must *musts;
1734  struct lysc_when **when;
1735 };
1736 
1740 struct lysc_submodule {
1741  const char *name;
1742  const char *revision;
1743  const char *filepath;
1744 };
1745 
1752 struct lysc_module {
1753  struct lys_module *mod;
1755  const char **features;
1756  struct lysc_node *data;
1757  struct lysc_node_action *rpcs;
1760 };
1768 #define lysc_is_userordered(lysc_node) \
1769  ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
1777 #define lysc_is_key(lysc_node) \
1778  ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
1779 
1786 #define lysc_is_np_cont(lysc_node) \
1787  ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
1788 
1795 #define lysc_is_dup_inst_list(lysc_node) \
1796  ((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
1797  ((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
1798 
1806 LIBYANG_API_DECL struct lyplg_type *lysc_get_type_plugin(uintptr_t plugin_ref);
1807 
1815 LIBYANG_API_DECL struct lyplg_ext *lysc_get_ext_plugin(uintptr_t plugin_ref);
1816 
1823 LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
1824 
1828 #define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
1829 
1840 LIBYANG_API_DECL const struct lysc_when *lysc_has_when(const struct lysc_node *node);
1841 
1849 LIBYANG_API_DECL const struct lys_module *lysc_owner_module(const struct lysc_node *node);
1850 
1857 LIBYANG_API_DECL const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
1858 
1865 LIBYANG_API_DECL const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
1866 
1873 LIBYANG_API_DECL const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
1874 
1881 LIBYANG_API_DECL const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
1882 
1889 LIBYANG_API_DECL const struct lysp_node *lysp_node_child(const struct lysp_node *node);
1890 
1897 LIBYANG_API_DECL const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
1898 
1905 LIBYANG_API_DECL const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
1906 
1917 LIBYANG_API_DECL const struct lysc_node *lysc_node_child(const struct lysc_node *node);
1918 
1926 LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node);
1927 
1935 LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
1936 
1944 LIBYANG_API_DECL const struct lysc_node *lysc_node_lref_target(const struct lysc_node *node);
1945 
1955 LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set);
1956 
1968 LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node,
1969  ly_bool match_ancestors, struct ly_set **set);
1970 
1980 typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
1981 
1998 LIBYANG_API_DECL LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
1999 
2011 LIBYANG_API_DECL LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
2012 
2021 LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff);
2022 
2034 LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident);
2035 
2044 LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod,
2045  uint32_t *idx);
2046 
2052 #define LYS_FIND_XP_SCHEMA 0x08
2053 #define LYS_FIND_XP_OUTPUT 0x10
2054 #define LYS_FIND_NO_MATCH_ERROR 0x40
2056 #define LYS_FIND_SCHEMAMOUNT 0x0200
2071 LIBYANG_API_DECL LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2072  uint32_t options, struct ly_set **set);
2073 
2086 LIBYANG_API_DECL LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod,
2087  const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set);
2088 
2100 LIBYANG_API_DECL LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2101  uint32_t options, struct ly_set **set);
2102 
2111 LIBYANG_API_DECL LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
2112 
2123 LIBYANG_API_DECL LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path,
2124  ly_bool output, struct ly_set **set);
2125 
2135 LIBYANG_API_DECL const struct lysc_node *lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2136  const char *path, ly_bool output);
2137 
2141 typedef enum {
2142  LYSC_PATH_LOG,
2143  LYSC_PATH_DATA,
2146 } LYSC_PATH_TYPE;
2147 
2159 LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
2160 
2164 struct lys_module {
2165  struct ly_ctx *ctx;
2166  const char *name;
2167  const char *revision;
2168  const char *ns;
2169  const char *prefix;
2170  const char *filepath;
2171  const char *org;
2172  const char *contact;
2173  const char *dsc;
2174  const char *ref;
2176  struct lysp_module *parsed;
2177  struct lysc_module *compiled;
2180  struct lysc_ext *extensions;
2182  struct lysc_ident *identities;
2197  uint8_t version : 2;
2198  uint8_t latest_revision : 4;
2200 };
2201 
2209 #define LYS_MOD_LATEST_REV 0x01
2210 #define LYS_MOD_LATEST_SEARCHDIRS 0x02
2211 #define LYS_MOD_IMPORTED_REV 0x04
2214 #define LYS_MOD_LATEST_IMPCLB 0x08
2229 LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
2250 LIBYANG_API_DECL const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
2251  const struct lysc_module *module, uint32_t options);
2252 
2265 LIBYANG_API_DECL const struct lysc_node *lys_getnext_ext(const struct lysc_node *last, const struct lysc_node *parent,
2266  const struct lysc_ext_instance *ext, uint32_t options);
2267 
2275 #define LYS_GETNEXT_WITHCHOICE 0x01
2276 #define LYS_GETNEXT_NOCHOICE 0x02
2277 #define LYS_GETNEXT_WITHCASE 0x04
2278 #define LYS_GETNEXT_INTONPCONT 0x08
2279 #define LYS_GETNEXT_OUTPUT 0x10
2281 #define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20
2284 #define LYS_GETNEXT_EXT_XPATH 0x40
2300 LIBYANG_API_DECL const struct lysc_node *lys_find_child(const struct lysc_node *parent, const struct lys_module *module,
2301  const char *name, size_t name_len, uint16_t nodetype, uint32_t options);
2302 
2318 LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
2319 
2326 LIBYANG_API_DECL const char *lys_nodetype2str(uint16_t nodetype);
2327 
2334 LIBYANG_API_DECL const char *lyxp_get_expr(const struct lyxp_expr *path);
2335 
2338 #ifdef __cplusplus
2339 }
2340 #endif
2341 
2342 #endif /* LY_TREE_SCHEMA_H_ */
struct lys_module * mod
Definition: tree_schema.h:1117
struct lysp_node_action * actions
Definition: tree_schema.h:1098
const char * name
Definition: tree_schema.h:297
const char * units
Definition: tree_schema.h:511
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition: tree_schema.h:1188
uint8_t version
Definition: tree_schema.h:1135
struct lysp_node_grp * groupings
Definition: tree_schema.h:989
struct lysc_ext * extensions
Definition: tree_schema.h:2200
struct lysp_type type
Definition: tree_schema.h:812
struct lysc_ext_instance * exts
Definition: tree_schema.h:1353
struct lysp_feature ** depfeatures
Definition: tree_schema.h:313
Compiled YANG data node.
Definition: tree_schema.h:1434
const char * argname
Definition: tree_schema.h:1202
struct lysp_when * when
Definition: tree_schema.h:895
LY_DATA_TYPE basetype
Definition: tree_schema.h:1389
struct lysp_tpdf * typedefs
Definition: tree_schema.h:866
struct lysp_qname * dflts
Definition: tree_schema.h:503
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1014
struct lysp_node * data
Definition: tree_schema.h:1128
Qualified name (optional prefix followed by an identifier).
Definition: tree_schema.h:333
struct lysc_ident ** derived
Definition: tree_schema.h:1231
struct lysc_node_case * dflt
Definition: tree_schema.h:1620
struct lysp_when * when
Definition: tree_schema.h:1097
LY_DATA_TYPE basetype
Definition: tree_schema.h:1420
struct lysp_node * next
Definition: tree_schema.h:752
struct lysp_restr * musts
Definition: tree_schema.h:451
struct lysc_type_bitenum_item * bits
Definition: tree_schema.h:1368
uint16_t flags
Definition: tree_schema.h:430
struct ly_ctx * ctx
Definition: tree_schema.h:2185
const char * units
Definition: tree_schema.h:1655
struct lysp_ext_instance * exts
Definition: tree_schema.h:480
ly_bool to_compile
Definition: tree_schema.h:2215
const char * dsc
Definition: tree_schema.h:754
struct lysc_must * musts
Definition: tree_schema.h:1473
const char * name
Definition: tree_schema.h:1417
uintptr_t plugin_ref
Definition: tree_schema.h:1329
struct lysp_module * parsed
Definition: tree_schema.h:2196
struct lysc_node * context
Definition: tree_schema.h:1214
Compiled YANG if-feature-stmt.
Definition: tree_schema.h:325
const char * name
Definition: tree_schema.h:1201
uint16_t flags
Definition: tree_schema.h:1234
const char * name
Definition: tree_schema.h:1316
struct lysp_node_action * actions
Definition: tree_schema.h:1072
struct lysc_when ** when
Definition: tree_schema.h:1499
struct lysc_ext_instance * exts
Definition: tree_schema.h:1307
LY_DATA_TYPE basetype
Definition: tree_schema.h:1410
struct lysp_tpdf * typedefs
Definition: tree_schema.h:988
Hold type-specific functions for various operations with the data values.
const char * dsc
Definition: tree_schema.h:365
YANG import-stmt.
Definition: tree_schema.h:265
Extension plugin implementing various aspects of a YANG extension.
Covers restrictions: range, length, pattern, must.
Definition: tree_schema.h:357
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1069
const char * revision
Definition: tree_schema.h:1760
const char * name
Definition: tree_schema.h:1407
struct lysp_import * imports
Definition: tree_schema.h:1145
struct lysc_ext_instance * exts
Definition: tree_schema.h:1418
struct lysp_type * types
Definition: tree_schema.h:408
struct lysc_when ** when
Definition: tree_schema.h:1719
struct lysp_node_augment * augments
Definition: tree_schema.h:1129
struct lysc_prefix * prefixes
Definition: tree_schema.h:1288
YANG extension compiled instance.
Definition: plugins_exts.h:436
char rev[11]
Definition: tree_schema.h:287
struct lysp_when * when
Definition: tree_schema.h:836
struct lysc_when ** when
Definition: tree_schema.h:1619
struct lysc_range::lysc_range_part * parts
LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node, ly_bool match_ancestors, struct ly_set **set)
Get all the leafref (or union with leafrefs) nodes that target a specific node.
const char * dsc
Definition: tree_schema.h:1228
struct lysc_ext_instance * exts
Definition: tree_schema.h:1398
uint32_t max
Definition: tree_schema.h:455
const char * prefix
Definition: tree_schema.h:2189
LY_ERR
libyang&#39;s error codes returned by the libyang functions.
Definition: log.h:240
struct lysp_include * includes
Definition: tree_schema.h:1122
uintptr_t plugin_ref
Definition: tree_schema.h:1375
LIBYANG_API_DECL struct lyplg_type * lysc_get_type_plugin(uintptr_t plugin_ref)
Get a type plugin.
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:28
Compiled YANG extension-stmt.
Definition: tree_schema.h:1200
const char * name
Definition: tree_schema.h:1352
uint16_t flags
Definition: tree_schema.h:351
struct lysc_node * child
Definition: tree_schema.h:1717
struct lysp_ext_instance * exts
Definition: plugins_exts.h:421
struct lysc_ext_instance * exts
Definition: tree_schema.h:1374
uint32_t refcount
Definition: tree_schema.h:1421
uint8_t latest_revision
Definition: tree_schema.h:2218
struct lysc_ext_instance * exts
Definition: tree_schema.h:1233
struct lysp_restr * musts
Definition: tree_schema.h:939
YANG refine-stmt.
Definition: tree_schema.h:446
struct lysp_qname dflt
Definition: tree_schema.h:896
struct lys_module * module
Definition: tree_schema.h:1230
uint16_t flags
Definition: tree_schema.h:1206
struct lysp_when * when
Definition: tree_schema.h:940
const char * name
Definition: tree_schema.h:1167
uint8_t latest_revision
Definition: tree_schema.h:1163
struct lysp_node * child
Definition: tree_schema.h:1045
struct lysp_qname * iffeatures
Definition: tree_schema.h:346
struct lysp_when * when
Definition: tree_schema.h:918
const char * ref
Definition: tree_schema.h:376
struct lysc_node * child
Definition: tree_schema.h:1530
struct lysc_ident * identities
Definition: tree_schema.h:2202
const char * ref
Definition: tree_schema.h:2194
struct lysp_ext * extensions
Definition: tree_schema.h:1123
const char * ns
Definition: tree_schema.h:2188
ly_bool implemented
Definition: tree_schema.h:2214
uint32_t refcount
Definition: tree_schema.h:1356
const char * name
Definition: tree_schema.h:1445
const char * dsc
Definition: tree_schema.h:299
LY_DATA_TYPE
YANG built-in types.
Definition: tree.h:202
const char * org
Definition: tree_schema.h:2191
struct lysc_must * musts
Definition: tree_schema.h:1531
struct lysp_ext_instance * exts
Definition: tree_schema.h:409
YANG feature-stmt.
Definition: tree_schema.h:309
const char * ref
Definition: tree_schema.h:1173
struct lys_module * mod
Definition: tree_schema.h:1190
YANG identity-stmt.
Definition: tree_schema.h:1226
struct lysc_node * parent
Definition: tree_schema.h:1439
const char * contact
Definition: tree_schema.h:1171
struct lysc_value dflt
Definition: tree_schema.h:1656
LIBYANG_API_DECL struct lyplg_ext * lysc_get_ext_plugin(uintptr_t plugin_ref)
Get an extension plugin.
struct lysp_qname * dflts
Definition: tree_schema.h:839
libyang generic macros and functions to work with YANG schema or data trees.
struct lysc_when ** when
Definition: tree_schema.h:1652
struct lysp_node_action * rpcs
Definition: tree_schema.h:1130
struct lysp_ext_instance * exts
Definition: tree_schema.h:272
struct lysp_qname * dflts
Definition: tree_schema.h:490
struct lysc_ext_instance * exts
Definition: tree_schema.h:1203
LY_DATA_TYPE basetype
Definition: tree_schema.h:1400
struct lysc_ext_instance * exts
Definition: plugins_exts.h:440
const char * dsc
Definition: tree_schema.h:315
const char * dsc
Definition: tree_schema.h:385
uintptr_t plugin_ref
Definition: tree_schema.h:1299
const char * cond
Definition: tree_schema.h:437
uint32_t refcount
Definition: tree_schema.h:1331
const char * filepath
Definition: tree_schema.h:1168
const char * name
Definition: tree_schema.h:268
YANG identity-stmt.
Definition: tree_schema.h:344
const char * ref
Definition: tree_schema.h:1229
struct lys_module * module
Definition: tree_schema.h:1205
struct lysc_ext_instance * exts
Definition: tree_schema.h:1281
LY_DATA_TYPE basetype
Definition: tree_schema.h:1376
struct lysc_iffeature * iffeatures_c
Definition: tree_schema.h:312
uint32_t refcount
Definition: tree_schema.h:1366
const char * ref
Definition: tree_schema.h:349
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:500
struct lysp_node_grp * groupings
Definition: tree_schema.h:1044
uint8_t version
Definition: tree_schema.h:2217
const char * dsc
Definition: tree_schema.h:448
const char * name
Definition: tree_schema.h:400
const char * ref
Definition: tree_schema.h:439
LY_DATA_TYPE basetype
Definition: tree_schema.h:1365
const char * name
Definition: tree_schema.h:753
const char * ref
Definition: tree_schema.h:316
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1150
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:1149
struct lysp_node * child
Definition: tree_schema.h:868
struct lysp_node * child
Definition: tree_schema.h:894
Compiled YANG submodule with only some basic metadata required for generating ietf-yang-library data...
Definition: tree_schema.h:1758
const char * dsc
Definition: tree_schema.h:1277
char * prefix
Definition: tree_schema.h:1189
uint8_t is_submod
Definition: tree_schema.h:1137
struct lysp_node_action * actions
Definition: tree_schema.h:788
uint32_t min
Definition: tree_schema.h:872
struct lysc_ext_instance * exts
Definition: tree_schema.h:1387
struct lysc_ext_instance * exts
Definition: tree_schema.h:1341
const char * ref
Definition: tree_schema.h:755
LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set)
Get the target node(s) of a leafref node or union node with leafrefs.
LY_DATA_TYPE basetype
Definition: tree_schema.h:1330
uint16_t nodetype
Definition: tree_schema.h:1435
Extension structure of the lysp_node for YANG container.
Definition: tree_schema.h:764
uint16_t flags
Definition: tree_schema.h:1220
const char * name
Definition: tree_schema.h:1373
const char * ref
Definition: tree_schema.h:1269
struct lys_module * module
Definition: tree_schema.h:266
#define LY_REV_SIZE
Definition: tree_schema.h:232
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:402
uint32_t refcount
Definition: tree_schema.h:1411
const char * ref
Definition: tree_schema.h:449
struct lysp_ext_instance * exts
Definition: tree_schema.h:1133
struct lysc_node_case * cases
Definition: tree_schema.h:1618
Enumeration/Bit value definition.
Definition: tree_schema.h:383
struct lysc_type * compiled
Definition: tree_schema.h:412
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:1770
const char * name
Definition: tree_schema.h:1362
uint32_t inverted
Definition: tree_schema.h:1282
struct lysc_node * child
Definition: tree_schema.h:1560
struct lysp_qname dflt
Definition: tree_schema.h:512
struct lysp_qname dflt
Definition: tree_schema.h:425
struct lysp_restr * musts
Definition: tree_schema.h:987
struct lysp_ext_instance * exts
Definition: tree_schema.h:286
struct lysp_ext_instance * exts
Definition: tree_schema.h:1157
struct lysp_qname * iffeatures
Definition: tree_schema.h:311
YANG grouping-stmt.
Definition: tree_schema.h:1051
struct lysp_deviate * next
Definition: tree_schema.h:508
const char * eapptag
Definition: tree_schema.h:364
struct lys_module * mod
Definition: tree_schema.h:1141
struct lysp_ext_instance * exts
Definition: tree_schema.h:523
struct lysp_deviate * next
Definition: tree_schema.h:479
struct lysc_range * range
Definition: tree_schema.h:1323
struct lysp_ext_instance * exts
Definition: tree_schema.h:486
ly_bool injected
Definition: tree_schema.h:288
void * priv
Definition: tree_schema.h:1449
struct lysc_node_action * rpcs
Definition: tree_schema.h:1775
uint32_t refcount
Definition: tree_schema.h:1320
const char * ref
Definition: tree_schema.h:285
struct lysp_type_enum * enums
Definition: tree_schema.h:404
const char * name
Definition: tree_schema.h:310
const char * nodeid
Definition: tree_schema.h:447
struct lysc_node_leaf *** uniques
Definition: tree_schema.h:1723
struct lysc_type ** types
Definition: tree_schema.h:1413
struct lysp_ext_instance * exts
Definition: tree_schema.h:509
uint8_t hash[4]
Definition: tree_schema.h:1437
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:360
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:1998
const char * units
Definition: tree_schema.h:838
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:1423
struct lysp_submodule * submodule
Definition: tree_schema.h:281
YANG type-stmt.
Definition: tree_schema.h:399
uint8_t fraction_digits
Definition: tree_schema.h:1322
uintptr_t plugin_ref
Definition: tree_schema.h:1364
const char * ref
Definition: tree_schema.h:366
LY_DATA_TYPE basetype
Definition: tree_schema.h:1355
struct lysc_pattern ** patterns
Definition: tree_schema.h:1334
LIBYANG_API_DECL const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
struct lysp_restr * musts
Definition: tree_schema.h:488
struct lysc_range * length
Definition: tree_schema.h:1333
const char * prefix
Definition: tree_schema.h:269
struct lysc_must * musts
Definition: tree_schema.h:1751
const char * dsc
Definition: tree_schema.h:520
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 * name
Definition: tree_schema.h:283
struct lysc_node_notif * notifs
Definition: tree_schema.h:1721
struct lysc_node * next
Definition: tree_schema.h:1440
struct lysp_qname * uniques
Definition: tree_schema.h:502
YANG revision-stmt.
Definition: tree_schema.h:373
struct lysp_qname dflt
Definition: tree_schema.h:814
struct lyxp_expr * path
Definition: tree_schema.h:1379
struct lysc_ext_instance * exts
Definition: tree_schema.h:1298
struct lysp_ext_instance * exts
Definition: tree_schema.h:301
struct lysp_node * child
Definition: tree_schema.h:787
const char * presence
Definition: tree_schema.h:784
struct lysp_deviation * deviations
Definition: tree_schema.h:1132
struct lysp_type type
Definition: tree_schema.h:837
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition: tree_schema.h:477
const char * ref
Definition: tree_schema.h:427
const char * dsc
Definition: tree_schema.h:375
uintptr_t plugin_ref
Definition: tree_schema.h:1318
struct lysc_node_action_inout input
Definition: tree_schema.h:1502
struct lysp_type * type
Definition: tree_schema.h:510
char date[11]
Definition: tree_schema.h:374
const char * name
Definition: tree_schema.h:384
struct lysp_include * includes
Definition: tree_schema.h:1146
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:1408
struct lysp_node_grp * groupings
Definition: tree_schema.h:786
YANG notification-stmt.
Definition: tree_schema.h:1024
const char * dsc
Definition: tree_schema.h:1268
struct lysp_node_notif * notifs
Definition: tree_schema.h:789
struct lysp_when * when
Definition: tree_schema.h:783
const char * dsc
Definition: tree_schema.h:1446
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:1532
struct lysp_revision * revs
Definition: tree_schema.h:1143
YANG extension-stmt.
Definition: tree_schema.h:296
uint16_t flags
Definition: tree_schema.h:273
struct lysp_node_notif * notifs
Definition: tree_schema.h:870
struct lysp_restr * musts
Definition: tree_schema.h:782
struct lysc_node * child
Definition: tree_schema.h:1472
uint16_t flags
Definition: tree_schema.h:337
uint32_t refcount
Definition: tree_schema.h:1219
struct lysp_ext_instance * exts
Definition: tree_schema.h:317
uint32_t max
Definition: tree_schema.h:873
const char ** bases
Definition: tree_schema.h:347
struct lyxp_expr * cond
Definition: tree_schema.h:1287
const char * units
Definition: tree_schema.h:1686
const char * eapptag
Definition: tree_schema.h:1271
struct lysp_ext_instance * exts
Definition: tree_schema.h:499
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:785
struct lysp_node_grp * groupings
Definition: tree_schema.h:867
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition: tree_schema.h:1079
struct lysc_must * musts
Definition: tree_schema.h:1718
struct lysc_ext_instance * exts
Definition: tree_schema.h:1777
uintptr_t plugin_ref
Definition: tree_schema.h:1409
const char * dsc
Definition: tree_schema.h:284
struct lysp_module * mod
Definition: tree_schema.h:335
struct lysp_ident * identities
Definition: tree_schema.h:1125
struct lysp_node_notif * notifs
Definition: tree_schema.h:1073
struct lysp_module * pmod
Definition: tree_schema.h:411
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node...
Definition: set.h:47
const char * ref
Definition: tree_schema.h:271
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:1503
struct lysp_ext_instance * exts
Definition: tree_schema.h:367
struct lysp_qname * uniques
Definition: tree_schema.h:489
const char * name
Definition: tree_schema.h:1327
uint8_t is_submod
Definition: tree_schema.h:1161
struct lysc_node_action * actions
Definition: tree_schema.h:1563
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1116
struct lysc_prefix * prefixes
Definition: tree_schema.h:1215
struct lysp_when * when
Definition: tree_schema.h:963
YANG rpc-stmt and action-stmt.
Definition: tree_schema.h:996
const char ** bases
Definition: tree_schema.h:407
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2184
const char * name
Definition: tree_schema.h:1297
struct lysp_feature * features
Definition: tree_schema.h:1148
const char * name
Definition: tree_schema.h:423
const char * units
Definition: tree_schema.h:487
struct lyxp_expr * cond
Definition: tree_schema.h:1213
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
struct lysc_range * range
Definition: tree_schema.h:1312
struct lysc_node_notif * notifs
Definition: tree_schema.h:1564
struct lysc_ext_instance * exts
Definition: tree_schema.h:1328
const char * eapptag
Definition: tree_schema.h:1280
const char * emsg
Definition: tree_schema.h:1291
struct lysp_qname * uniques
Definition: tree_schema.h:871
struct lysp_ext_instance * exts
Definition: tree_schema.h:389
const char * ref
Definition: tree_schema.h:1447
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:1429
struct lysc_type * type
Definition: tree_schema.h:1653
uint16_t flags
Definition: tree_schema.h:303
struct lysp_node * child
Definition: tree_schema.h:1096
struct lys_module ** deviated_by
Definition: tree_schema.h:2212
struct lysp_node_grp * groupings
Definition: tree_schema.h:1070
const char * filepath
Definition: tree_schema.h:2190
const char * str
Definition: tree_schema.h:334
struct lysp_ext_instance * exts
Definition: tree_schema.h:350
struct lysc_ext_instance * exts
Definition: tree_schema.h:1218
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:415
const char * ref
Definition: tree_schema.h:386
struct lysp_restr * range
Definition: tree_schema.h:401
YANG input-stmt and output-stmt.
Definition: tree_schema.h:969
const char * filepath
Definition: tree_schema.h:1761
struct lysc_when ** when
Definition: tree_schema.h:1562
struct lysp_node * child
Definition: tree_schema.h:917
YANG when-stmt.
Definition: tree_schema.h:436
LYSC_PATH_TYPE
Types of the different schema paths.
Definition: tree_schema.h:2161
struct lysc_when ** when
Definition: tree_schema.h:1683
struct lysc_when ** when
Definition: tree_schema.h:1592
struct lysp_node_grp * groupings
Definition: tree_schema.h:1015
struct lysc_prefix * prefixes
Definition: tree_schema.h:1625
uint8_t parsing
Definition: tree_schema.h:1136
struct lysp_deviate * next
Definition: tree_schema.h:485
struct lysp_node_notif * notifs
Definition: tree_schema.h:1099
struct lysp_revision * revs
Definition: tree_schema.h:1119
uint32_t refcount
Definition: tree_schema.h:1310
uint8_t require_instance
Definition: tree_schema.h:1382
LY_DATA_TYPE basetype
Definition: tree_schema.h:1319
struct lysp_deviate * next
Definition: tree_schema.h:498
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:1105
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1043
uint16_t flags
Definition: tree_schema.h:1436
const char * dsc
Definition: tree_schema.h:426
struct lysp_ext_instance * exts
Definition: tree_schema.h:440
struct lysp_node * child
Definition: tree_schema.h:990
struct lys_module * module
Definition: tree_schema.h:1438
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:1293
uint16_t flags
Definition: tree_schema.h:318
uintptr_t plugin_ref
Definition: tree_schema.h:302
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:810
const char * dsc
Definition: tree_schema.h:270
struct lysc_must * musts
Definition: tree_schema.h:1651
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:450
Generic YANG data node.
Definition: tree_schema.h:748
struct lysp_deviate * deviates
Definition: tree_schema.h:522
uint16_t flags
Definition: tree_schema.h:751
const char * org
Definition: tree_schema.h:1170
const char * expr
Definition: tree_schema.h:1276
const char * dsc
Definition: tree_schema.h:2193
uint16_t flags
Definition: tree_schema.h:416
struct lysp_restr * patterns
Definition: tree_schema.h:403
uintptr_t plugin_ref
Definition: tree_schema.h:1308
const char * ref
Definition: tree_schema.h:300
const char * emsg
Definition: tree_schema.h:1279
struct lysc_must * musts
Definition: tree_schema.h:1682
const char * eapptag
Definition: tree_schema.h:1292
struct lysp_restr * musts
Definition: tree_schema.h:1042
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:345
const char * dsc
Definition: tree_schema.h:348
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:428
uint32_t refcount
Definition: tree_schema.h:1283
struct lysc_type_bitenum_item * enums
Definition: tree_schema.h:1358
const char * nodeid
Definition: tree_schema.h:519
uintptr_t plugin_ref
Definition: tree_schema.h:1354
YANG include-stmt.
Definition: tree_schema.h:280
struct lysc_ext_instance * exts
Definition: tree_schema.h:1254
struct lysp_ext_instance * exts
Definition: tree_schema.h:377
struct lysp_node_action_inout input
Definition: tree_schema.h:1017
uint16_t flags
Definition: tree_schema.h:457
struct lysp_ext * extensions
Definition: tree_schema.h:1147
struct lysp_qname * iffeatures
Definition: tree_schema.h:388
uintptr_t plugin_ref
Definition: tree_schema.h:1204
LY_DATA_TYPE basetype
Definition: tree_schema.h:1309
struct lysc_node * data
Definition: tree_schema.h:1774
uint8_t mod
Definition: tree_schema.h:478
struct lysc_ident ** bases
Definition: tree_schema.h:1392
const char * units
Definition: tree_schema.h:424
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:1776
struct lysp_node_augment * augments
Definition: tree_schema.h:962
struct lysc_ext_instance * exts
Definition: tree_schema.h:1317
struct lysc_module * compiled
Definition: tree_schema.h:2197
const char * units
Definition: tree_schema.h:813
const char * argname
Definition: tree_schema.h:298
uint16_t nodetype
Definition: tree_schema.h:750
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:1590
struct lysp_restr * musts
Definition: tree_schema.h:863
const char * contact
Definition: tree_schema.h:2192
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1126
struct lysp_node_grp * groupings
Definition: tree_schema.h:1127
LY_DATA_TYPE basetype
Definition: tree_schema.h:1300
struct lysp_node * parent
Definition: tree_schema.h:749
struct lysp_when * when
Definition: tree_schema.h:864
struct lysp_restr * musts
Definition: tree_schema.h:835
struct lys_module ** augmented_by
Definition: tree_schema.h:2211
struct lysp_node_notif * notifs
Definition: tree_schema.h:1155
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:1771
struct lysc_value * dflts
Definition: tree_schema.h:1687
struct lysp_refine * refines
Definition: tree_schema.h:961
const char * emsg
Definition: tree_schema.h:363
LIBYANG_API_DECL struct lysc_node * lysc_node_lref_target(const struct lysc_node *node)
Get the target node of a leafref node. Function lysc_node_lref_targets() should be used instead to ge...
const char * ref
Definition: tree_schema.h:1278
struct lysp_feature ** features
Definition: tree_schema.h:327
Logger manipulation routines and error definitions.
const char * ref
Definition: tree_schema.h:1217
const char * str
Definition: tree_schema.h:1624
const char * dsc
Definition: tree_schema.h:1172
struct lysc_submodule * submodules
Definition: tree_schema.h:2210
struct lysc_must * musts
Definition: tree_schema.h:1561
struct lysp_qname * dflts
Definition: tree_schema.h:453
struct lysp_ext_instance * exts
Definition: tree_schema.h:456
const char * dsc
Definition: tree_schema.h:438
const char ** features
Definition: tree_schema.h:1773
uint32_t min
Definition: tree_schema.h:454
const char * ref
Definition: tree_schema.h:521
const char * name
Definition: tree_schema.h:1306
const char * dsc
Definition: tree_schema.h:1289
struct lysp_when * when
Definition: tree_schema.h:811
struct lysp_node_augment * augments
Definition: tree_schema.h:1153
struct lysp_feature * features
Definition: tree_schema.h:1124
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.
uintptr_t plugin_ref
Definition: tree_schema.h:1419
const char * name
Definition: tree_schema.h:1227
struct lysc_type * type
Definition: tree_schema.h:1684
const char * presence
Definition: tree_schema.h:452
struct lysp_deviation * deviations
Definition: tree_schema.h:1156
struct lysp_type_enum * bits
Definition: tree_schema.h:405
const char * revision
Definition: tree_schema.h:2187
const char * emsg
Definition: tree_schema.h:1270
const char * key
Definition: tree_schema.h:865
uint16_t flags
Definition: tree_schema.h:390
uint8_t * expr
Definition: tree_schema.h:326
uint8_t fraction_digits
Definition: tree_schema.h:414
struct lysc_when ** when
Definition: tree_schema.h:1752
struct lysc_type * realtype
Definition: tree_schema.h:1381
struct lysp_node_notif * notifs
Definition: tree_schema.h:1131
libyang context handler.
YANG typedef-stmt.
Definition: tree_schema.h:422
struct lysp_node_action * actions
Definition: tree_schema.h:869
struct lysc_ext_instance * exts
Definition: tree_schema.h:1363
const char * ref
Definition: tree_schema.h:1290
struct lysp_restr * musts
Definition: tree_schema.h:501
YANG when-stmt.
Definition: tree_schema.h:1212
const char * name
Definition: tree_schema.h:1759
const char * name
Definition: tree_schema.h:2186
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:1380
struct lysp_node_action_inout output
Definition: tree_schema.h:1018
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:1448
struct lysp_import * imports
Definition: tree_schema.h:1121
struct lysp_node_grp * groupings
Definition: tree_schema.h:1151
struct lysp_node * child
Definition: tree_schema.h:1071
struct lyxp_expr * path
Definition: tree_schema.h:406
const char * dsc
Definition: tree_schema.h:1216
struct lysp_type type
Definition: tree_schema.h:429
struct lysc_node * prev
Definition: tree_schema.h:1441
const char * prefix
Definition: tree_schema.h:1169
struct lysp_node_action * rpcs
Definition: tree_schema.h:1154
struct lysc_node_action * actions
Definition: tree_schema.h:1720
YANG extension parsed instance.
Definition: plugins_exts.h:403
struct lysp_node * data
Definition: tree_schema.h:1152