libyang  6.4.13
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
tree_schema.h
Go to the documentation of this file.
1 
16 #ifndef LY_TREE_SCHEMA_H_
17 #define LY_TREE_SCHEMA_H_
18 
19 #include <stdint.h>
20 #include <stdio.h>
21 
22 #include "log.h"
23 #include "ly_config.h"
24 #include "utils.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct ly_ctx;
31 struct ly_path;
32 struct ly_set;
33 struct lyd_node;
34 struct lys_module;
35 struct lysc_node;
36 struct lyxp_expr;
37 
150 /* *INDENT-OFF* */
151 
180 #define LYSC_TREE_DFS_BEGIN(START, ELEM) \
181  { ly_bool LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
182  for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node *)(START); \
183  (ELEM); \
184  (ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
185 
199 #define LYSC_TREE_DFS_END(START, ELEM) \
200  /* select element for the next run - children first */ \
201  if (LYSC_TREE_DFS_continue) { \
202  (LYSC_TREE_DFS_next) = NULL; \
203  } else { \
204  (LYSC_TREE_DFS_next) = (struct lysc_node *)lysc_node_child(ELEM); \
205  } \
206  if (!(LYSC_TREE_DFS_next)) { \
207  /* no children, try siblings */ \
208  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
209  } \
210  while (!(LYSC_TREE_DFS_next)) { \
211  /* parent is already processed, go to its sibling */ \
212  (ELEM) = (ELEM)->parent; \
213  _LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
214  } }
215 
219 #define _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) \
220  if ((ELEM) == (struct lysc_node *)(START)) { \
221  /* we are done, no next element to process */ \
222  break; \
223  } \
224  (NEXT) = (ELEM)->next;
225 
226 /* *INDENT-ON* */
227 
228 #define LY_REV_SIZE 11
235 #define LYS_UNKNOWN 0x0000
236 #define LYS_CONTAINER 0x0001
237 #define LYS_CHOICE 0x0002
238 #define LYS_LEAF 0x0004
239 #define LYS_LEAFLIST 0x0008
240 #define LYS_LIST 0x0010
241 #define LYS_ANYXML 0x0020
242 #define LYS_ANYDATA 0x0060
243 #define LYS_CASE 0x0080
245 #define LYS_RPC 0x0100
246 #define LYS_ACTION 0x0200
247 #define LYS_NOTIF 0x0400
249 #define LYS_USES 0x0800
250 #define LYS_INPUT 0x1000
251 #define LYS_OUTPUT 0x2000
252 #define LYS_GROUPING 0x4000
253 #define LYS_AUGMENT 0x8000
254 
255 #define LYS_NODETYPE_MASK 0xffff
261 struct lysp_import {
262  struct lys_module *module;
264  const char *name;
265  const char *prefix;
266  const char *dsc;
267  const char *ref;
269  uint16_t flags;
270  char rev[LY_REV_SIZE];
271 };
272 
276 struct lysp_include {
279  const char *name;
280  const char *dsc;
281  const char *ref;
283  char rev[LY_REV_SIZE];
287 };
288 
292 struct lysp_ext {
293  const char *name;
294  const char *argname;
295  const char *dsc;
296  const char *ref;
298  uintptr_t plugin_ref;
299  uint16_t flags;
300 };
301 
305 struct lysp_feature {
306  const char *name;
311  const char *dsc;
312  const char *ref;
314  uint16_t flags;
316 };
317 
322  uint8_t *expr;
324 };
325 
329 struct lysp_qname {
330  const char *str;
331  const struct lysp_module *mod;
333  uint16_t flags;
335 };
336 
340 struct lysp_ident {
341  const char *name;
343  const char **bases;
344  const char *dsc;
345  const char *ref;
347  uint16_t flags;
348 };
349 
353 struct lysp_restr {
354 #define LYSP_RESTR_PATTERN_ACK 0x06
355 #define LYSP_RESTR_PATTERN_NACK 0x15
356  struct lysp_qname arg;
359  const char *emsg;
360  const char *eapptag;
361  const char *dsc;
362  const char *ref;
364 };
365 
371  const char *dsc;
372  const char *ref;
374 };
375 
380  const char *name;
381  const char *dsc;
382  const char *ref;
383  int64_t value;
386  uint16_t flags;
388 };
389 
395 struct lysp_type {
396  const char *name;
397  struct lysp_restr *range;
398  struct lysp_restr *length;
402  struct lyxp_expr *path;
403  const char **bases;
404  struct lysp_type *types;
407  const struct lysp_module *pmod;
408  struct lysc_type *compiled;
410  uint8_t fraction_digits;
412  uint16_t flags;
413 };
414 
418 struct lysp_tpdf {
419  const char *name;
420  const char *units;
421  struct lysp_qname dflt;
422  const char *dsc;
423  const char *ref;
425  struct lysp_type type;
426  uint16_t flags;
427 };
428 
432 struct lysp_when {
433  const char *cond;
434  const char *dsc;
435  const char *ref;
437 };
438 
442 struct lysp_refine {
443  const char *nodeid;
444  const char *dsc;
445  const char *ref;
447  struct lysp_restr *musts;
448  const char *presence;
449  struct lysp_qname *dflts;
450  uint32_t min;
451  uint32_t max;
453  uint16_t flags;
454 };
455 
464 #define LYS_DEV_NOT_SUPPORTED 1
465 #define LYS_DEV_ADD 2
466 #define LYS_DEV_DELETE 3
467 #define LYS_DEV_REPLACE 4
473 struct lysp_deviate {
474  uint8_t mod;
475  struct lysp_deviate *next;
477 };
478 
480  uint8_t mod;
481  struct lysp_deviate *next;
483  const char *units;
484  struct lysp_restr *musts;
485  struct lysp_qname *uniques;
486  struct lysp_qname *dflts;
487  uint16_t flags;
488  uint32_t min;
489  uint32_t max;
490 };
491 
493  uint8_t mod;
494  struct lysp_deviate *next;
496  const char *units;
497  struct lysp_restr *musts;
498  struct lysp_qname *uniques;
499  struct lysp_qname *dflts;
500 };
501 
503  uint8_t mod;
504  struct lysp_deviate *next;
506  struct lysp_type *type;
507  const char *units;
508  struct lysp_qname dflt;
509  uint16_t flags;
510  uint32_t min;
511  uint32_t max;
512 };
513 
515  const char *nodeid;
516  const char *dsc;
517  const char *ref;
520 };
521 
645 #define LYS_CONFIG_W 0x01
646 #define LYS_CONFIG_R 0x02
647 #define LYS_CONFIG_MASK 0x03
648 #define LYS_STATUS_CURR 0x04
649 #define LYS_STATUS_DEPRC 0x08
650 #define LYS_STATUS_OBSLT 0x10
651 #define LYS_STATUS_MASK 0x1C
652 #define LYS_MAND_TRUE 0x20
657 #define LYS_MAND_FALSE 0x40
660 #define LYS_MAND_MASK 0x60
661 #define LYS_PRESENCE 0x80
664 #define LYS_UNIQUE 0x80
665 #define LYS_KEY 0x0100
666 #define LYS_KEYLESS 0x0200
667 #define LYS_DISABLED 0x0100
668 #define LYS_FENABLED 0x20
669 #define LYS_ORDBY_SYSTEM 0x80
671 #define LYS_ORDBY_USER 0x40
674 #define LYS_ORDBY_MASK 0xC0
675 #define LYS_YINELEM_TRUE 0x80
676 #define LYS_YINELEM_FALSE 0x0100
677 #define LYS_YINELEM_MASK 0x0180
678 #define LYS_USED_GRP 0x0400
680 #define LYS_SET_VALUE 0x0200
681 #define LYS_SET_MIN 0x0200
682 #define LYS_SET_MAX 0x0400
684 #define LYS_SET_BASE 0x0001
685 #define LYS_SET_BIT 0x0002
686 #define LYS_SET_ENUM 0x0004
687 #define LYS_SET_FRDIGITS 0x0008
688 #define LYS_SET_LENGTH 0x0010
689 #define LYS_SET_PATH 0x0020
690 #define LYS_SET_PATTERN 0x0040
691 #define LYS_SET_RANGE 0x0080
692 #define LYS_SET_TYPE 0x0100
693 #define LYS_SET_REQINST 0x0200
694 #define LYS_SET_DFLT 0x0200
699 #define LYS_SET_UNITS 0x0400
700 #define LYS_SET_CONFIG 0x0800
702 #define LYS_SINGLEQUOTED 0x0100
704 #define LYS_DOUBLEQUOTED 0x0200
707 #define LYS_YIN_ATTR 0x0400
708 #define LYS_YIN_ARGUMENT 0x0800
710 #define LYS_INTERNAL 0x1000
712 #define LYS_IS_ENUM 0x0200
714 #define LYS_IS_INPUT 0x1000
716 #define LYS_IS_OUTPUT 0x2000
718 #define LYS_IS_NOTIF 0x4000
720 #define LYS_FLAGS_COMPILED_MASK 0xff
726 struct lysp_node {
727  struct lysp_node *parent;
728  uint16_t nodetype;
729  uint16_t flags;
730  struct lysp_node *next;
731  const char *name;
732  const char *dsc;
733  const char *ref;
737 };
738 
743  union {
744  struct lysp_node node;
746  struct {
747  struct lysp_node *parent;
748  uint16_t nodetype;
749  uint16_t flags;
750  struct lysp_node *next;
751  const char *name;
752  const char *dsc;
753  const char *ref;
754  struct lysp_qname *iffeatures;
755  struct lysp_ext_instance *exts;
756  };
757  };
759  /* container */
760  struct lysp_restr *musts;
761  struct lysp_when *when;
762  const char *presence;
763  struct lysp_tpdf *typedefs;
765  struct lysp_node *child;
768 };
769 
771  union {
772  struct lysp_node node;
774  struct {
775  struct lysp_node *parent;
776  uint16_t nodetype;
777  uint16_t flags;
778  struct lysp_node *next;
779  const char *name;
780  const char *dsc;
781  const char *ref;
782  struct lysp_qname *iffeatures;
783  struct lysp_ext_instance *exts;
784  };
785  };
787  /* leaf */
788  struct lysp_restr *musts;
789  struct lysp_when *when;
790  struct lysp_type type;
791  const char *units;
792  struct lysp_qname dflt;
793 };
794 
796  union {
797  struct lysp_node node;
799  struct {
800  struct lysp_node *parent;
801  uint16_t nodetype;
802  uint16_t flags;
803  struct lysp_node *next;
804  const char *name;
805  const char *dsc;
806  const char *ref;
807  struct lysp_qname *iffeatures;
808  struct lysp_ext_instance *exts;
809  };
810  };
812  /* leaf-list */
813  struct lysp_restr *musts;
814  struct lysp_when *when;
815  struct lysp_type type;
816  const char *units;
817  struct lysp_qname *dflts;
819  uint32_t min;
820  uint32_t max;
821 };
822 
824  union {
825  struct lysp_node node;
827  struct {
828  struct lysp_node *parent;
829  uint16_t nodetype;
830  uint16_t flags;
831  struct lysp_node *next;
832  const char *name;
833  const char *dsc;
834  const char *ref;
835  struct lysp_qname *iffeatures;
836  struct lysp_ext_instance *exts;
837  };
838  };
840  /* list */
841  struct lysp_restr *musts;
842  struct lysp_when *when;
843  const char *key;
844  struct lysp_tpdf *typedefs;
846  struct lysp_node *child;
849  struct lysp_qname *uniques;
850  uint32_t min;
851  uint32_t max;
852 };
853 
855  union {
856  struct lysp_node node;
858  struct {
859  struct lysp_node *parent;
860  uint16_t nodetype;
861  uint16_t flags;
862  struct lysp_node *next;
863  const char *name;
864  const char *dsc;
865  const char *ref;
866  struct lysp_qname *iffeatures;
867  struct lysp_ext_instance *exts;
868  };
869  };
871  /* choice */
872  struct lysp_node *child;
873  struct lysp_when *when;
874  struct lysp_qname dflt;
875 };
876 
878  union {
879  struct lysp_node node;
881  struct {
882  struct lysp_node *parent;
883  uint16_t nodetype;
884  uint16_t flags;
885  struct lysp_node *next;
886  const char *name;
887  const char *dsc;
888  const char *ref;
889  struct lysp_qname *iffeatures;
890  struct lysp_ext_instance *exts;
891  };
892  };
894  /* case */
895  struct lysp_node *child;
896  struct lysp_when *when;
897 };
898 
900  union {
901  struct lysp_node node;
903  struct {
904  struct lysp_node *parent;
905  uint16_t nodetype;
906  uint16_t flags;
907  struct lysp_node *next;
908  const char *name;
909  const char *dsc;
910  const char *ref;
911  struct lysp_qname *iffeatures;
912  struct lysp_ext_instance *exts;
913  };
914  };
916  /* anyxml/anydata */
917  struct lysp_restr *musts;
918  struct lysp_when *when;
919 };
920 
922  union {
923  struct lysp_node node;
925  struct {
926  struct lysp_node *parent;
927  uint16_t nodetype;
928  uint16_t flags;
929  struct lysp_node *next;
930  const char *name;
931  const char *dsc;
932  const char *ref;
933  struct lysp_qname *iffeatures;
934  struct lysp_ext_instance *exts;
935  };
936  };
938  /* uses */
941  struct lysp_when *when;
942 };
943 
948  union {
949  struct lysp_node node;
951  struct {
952  struct lysp_node *parent;
953  uint16_t nodetype;
954  uint16_t flags;
955  struct lysp_node *next;
956  const char *name;
957  const char *dsc;
958  const char *ref;
959  struct lysp_qname *iffeatures;
960  struct lysp_ext_instance *exts;
961  };
962  };
964  /* inout */
965  struct lysp_restr *musts;
966  struct lysp_tpdf *typedefs;
968  struct lysp_node *child;
969 };
970 
975  union {
976  struct lysp_node node;
978  struct {
979  struct lysp_node *parent;
980  uint16_t nodetype;
981  uint16_t flags;
982  struct lysp_node_action *next;
983  const char *name;
984  const char *dsc;
985  const char *ref;
986  struct lysp_qname *iffeatures;
987  struct lysp_ext_instance *exts;
988  };
989  };
991  /* action */
992  struct lysp_tpdf *typedefs;
997 };
998 
1003  union {
1004  struct lysp_node node;
1006  struct {
1007  struct lysp_node *parent;
1008  uint16_t nodetype;
1009  uint16_t flags;
1010  struct lysp_node_notif *next;
1011  const char *name;
1012  const char *dsc;
1013  const char *ref;
1014  struct lysp_qname *iffeatures;
1015  struct lysp_ext_instance *exts;
1016  };
1017  };
1019  /* notif */
1020  struct lysp_restr *musts;
1023  struct lysp_node *child;
1024 };
1025 
1030  union {
1031  struct lysp_node node;
1033  struct {
1034  struct lysp_node *parent;
1035  uint16_t nodetype;
1036  uint16_t flags;
1037  struct lysp_node_grp *next;
1038  const char *name;
1039  const char *dsc;
1040  const char *ref;
1041  struct lysp_qname *iffeatures;
1042  struct lysp_ext_instance *exts;
1043  };
1044  };
1046  /* grp */
1049  struct lysp_node *child;
1052 };
1053 
1058  union {
1059  struct lysp_node node;
1061  struct {
1062  struct lysp_node *parent;
1063  uint16_t nodetype;
1064  uint16_t flags;
1065  struct lysp_node_augment *next;
1066  const char *nodeid;
1067  const char *dsc;
1068  const char *ref;
1069  struct lysp_qname *iffeatures;
1070  struct lysp_ext_instance *exts;
1071  };
1072  };
1074  struct lysp_node *child;
1075  struct lysp_when *when;
1078 };
1079 
1083 typedef enum LYS_VERSION {
1086  LYS_VERSION_1_1 = 2
1088 
1094 struct lysp_module {
1095  struct lys_module *mod;
1105  struct lysp_node *data;
1112  uint8_t version;
1113  uint8_t parsing : 1;
1114  uint8_t is_submod : 1;
1115 };
1116 
1118  struct lys_module *mod;
1129  struct lysp_node *data;
1136  uint8_t version;
1137  uint8_t parsing : 1;
1138  uint8_t is_submod : 1;
1140  uint8_t latest_revision : 2;
1144  const char *name;
1145  const char *filepath;
1146  const char *prefix;
1147  const char *org;
1148  const char *contact;
1149  const char *dsc;
1150  const char *ref;
1151 };
1152 
1159 #define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
1160 
1165 struct lysc_prefix {
1166  char *prefix;
1167  const struct lys_module *mod;
1168 };
1169 
1177 struct lysc_ext {
1178  const char *name;
1179  const char *argname;
1181  uintptr_t plugin_ref;
1182  struct lys_module *module;
1183  uint16_t flags;
1184 };
1185 
1189 struct lysc_when {
1190  struct lyxp_expr *cond;
1191  struct lysc_node *context;
1193  const char *dsc;
1194  const char *ref;
1196  uint32_t refcount;
1197  uint16_t flags;
1198 };
1199 
1203 struct lysc_ident {
1204  const char *name;
1205  const char *dsc;
1206  const char *ref;
1207  struct lys_module *module;
1208  struct lysc_ident **derived;
1211  uint16_t flags;
1212 };
1213 
1220 #define LYS_IFF_NOT 0x00
1221 #define LYS_IFF_AND 0x01
1222 #define LYS_IFF_OR 0x02
1223 #define LYS_IFF_F 0x03
1232 };
1233 
1234 struct lysc_range {
1236  union {
1237  int64_t min_64;
1238  uint64_t min_u64;
1239  };
1240  union {
1241  int64_t max_64;
1242  uint64_t max_u64;
1243  };
1244  } *parts;
1245  const char *dsc;
1246  const char *ref;
1247  const char *emsg;
1248  const char *eapptag;
1250 };
1251 
1253  const char *expr;
1254  const char *dsc;
1255  const char *ref;
1256  const char *emsg;
1257  const char *eapptag;
1259  uint32_t inverted : 1;
1260  uint32_t format : 1;
1261  uint32_t refcount : 30;
1262 };
1263 
1264 struct lysc_must {
1265  struct lyxp_expr *cond;
1267  const char *dsc;
1268  const char *ref;
1269  const char *emsg;
1270  const char *eapptag;
1272 };
1273 
1274 struct lysc_type {
1275  const char *name;
1277  uintptr_t plugin_ref;
1279  uint32_t refcount;
1281 };
1282 
1284  const char *name;
1286  uintptr_t plugin_ref;
1288  uint32_t refcount;
1290  struct lysc_range *range;
1291 };
1292 
1294  const char *name;
1296  uintptr_t plugin_ref;
1298  uint32_t refcount;
1301  struct lysc_range *range;
1302 };
1303 
1305  const char *name;
1307  uintptr_t plugin_ref;
1309  uint32_t refcount;
1311  struct lysc_range *length;
1313 };
1314 
1316  const char *name;
1317  const char *dsc;
1318  const char *ref;
1321  union {
1322  int32_t value;
1323  uint32_t position;
1324  };
1325  uint16_t flags;
1327 };
1328 
1330  const char *name;
1332  uintptr_t plugin_ref;
1334  uint32_t refcount;
1337 };
1338 
1340  const char *name;
1342  uintptr_t plugin_ref;
1344  uint32_t refcount;
1348 };
1349 
1351  const char *name;
1353  uintptr_t plugin_ref;
1355  uint32_t refcount;
1357  struct lyxp_expr *path;
1361 };
1362 
1364  const char *name;
1366  uintptr_t plugin_ref;
1368  uint32_t refcount;
1370  struct lysc_ident **bases;
1372 };
1373 
1375  const char *name;
1377  uintptr_t plugin_ref;
1379  uint32_t refcount;
1382 };
1383 
1385  const char *name;
1387  uintptr_t plugin_ref;
1389  uint32_t refcount;
1391  struct lysc_type **types;
1392 };
1393 
1395  const char *name;
1397  uintptr_t plugin_ref;
1399  uint32_t refcount;
1401  struct lysc_range *length;
1402 };
1403 
1407 #define LYS_NODE_HASH_COUNT 4
1408 
1412 struct lysc_node {
1413  uint16_t nodetype;
1414  uint16_t flags;
1416  struct lys_module *module;
1417  struct lysc_node *parent;
1418  struct lysc_node *next;
1419  struct lysc_node *prev;
1423  const char *name;
1424  const char *dsc;
1425  const char *ref;
1427  void *priv;
1428 };
1429 
1431  union {
1432  struct lysc_node node;
1434  struct {
1435  uint16_t nodetype;
1436  uint16_t flags;
1437  uint8_t hash[LYS_NODE_HASH_COUNT];
1438  struct lys_module *module;
1439  struct lysc_node *parent;
1440  struct lysc_node *next;
1441  struct lysc_node *prev;
1442  const char *name;
1443  const char *dsc;
1444  const char *ref;
1445  struct lysc_ext_instance *exts;
1446  void *priv;
1447  };
1448  };
1449 
1450  struct lysc_node *child;
1451  struct lysc_must *musts;
1452 };
1453 
1455  union {
1456  struct lysc_node node;
1458  struct {
1459  uint16_t nodetype;
1460  uint16_t flags;
1461  uint8_t hash[LYS_NODE_HASH_COUNT];
1462  struct lys_module *module;
1463  struct lysc_node *parent;
1464  struct lysc_node_action *next;
1465  struct lysc_node_action *prev;
1469  const char *name;
1470  const char *dsc;
1471  const char *ref;
1472  struct lysc_ext_instance *exts;
1473  void *priv;
1474  };
1475  };
1476 
1477  struct lysc_when **when;
1480  struct lysc_node_action_inout input;
1483 };
1484 
1486  union {
1487  struct lysc_node node;
1489  struct {
1490  uint16_t nodetype;
1491  uint16_t flags;
1492  uint8_t hash[LYS_NODE_HASH_COUNT];
1493  struct lys_module *module;
1494  struct lysc_node *parent;
1495  struct lysc_node_notif *next;
1496  struct lysc_node_notif *prev;
1500  const char *name;
1501  const char *dsc;
1502  const char *ref;
1503  struct lysc_ext_instance *exts;
1504  void *priv;
1505  };
1506  };
1507 
1508  struct lysc_node *child;
1509  struct lysc_must *musts;
1510  struct lysc_when **when;
1513 };
1514 
1516  union {
1517  struct lysc_node node;
1519  struct {
1520  uint16_t nodetype;
1521  uint16_t flags;
1522  uint8_t hash[LYS_NODE_HASH_COUNT];
1523  struct lys_module *module;
1524  struct lysc_node *parent;
1525  struct lysc_node *next;
1526  struct lysc_node *prev;
1530  const char *name;
1531  const char *dsc;
1532  const char *ref;
1533  struct lysc_ext_instance *exts;
1534  void *priv;
1535  };
1536  };
1537 
1538  struct lysc_node *child;
1539  struct lysc_must *musts;
1540  struct lysc_when **when;
1543 };
1544 
1546  union {
1547  struct lysc_node node;
1549  struct {
1550  uint16_t nodetype;
1551  uint16_t flags;
1552  uint8_t hash[LYS_NODE_HASH_COUNT];
1553  struct lys_module *module;
1554  struct lysc_node *parent;
1555  struct lysc_node *next;
1556  struct lysc_node *prev;
1560  const char *name;
1561  const char *dsc;
1562  const char *ref;
1563  struct lysc_ext_instance *exts;
1564  void *priv;
1565  };
1566  };
1567 
1568  struct lysc_node *child;
1569  struct lysc_when **when;
1570 };
1571 
1573  union {
1574  struct lysc_node node;
1576  struct {
1577  uint16_t nodetype;
1578  uint16_t flags;
1579  uint8_t hash[LYS_NODE_HASH_COUNT];
1580  struct lys_module *module;
1581  struct lysc_node *parent;
1582  struct lysc_node *next;
1583  struct lysc_node *prev;
1587  const char *name;
1588  const char *dsc;
1589  const char *ref;
1590  struct lysc_ext_instance *exts;
1591  void *priv;
1592  };
1593  };
1594 
1596  struct lysc_when **when;
1598 };
1599 
1600 struct lysc_value {
1601  const char *str;
1603 };
1604 
1606  union {
1607  struct lysc_node node;
1609  struct {
1610  uint16_t nodetype;
1611  uint16_t flags;
1612  uint8_t hash[LYS_NODE_HASH_COUNT];
1613  struct lys_module *module;
1614  struct lysc_node *parent;
1615  struct lysc_node *next;
1616  struct lysc_node *prev;
1620  const char *name;
1621  const char *dsc;
1622  const char *ref;
1623  struct lysc_ext_instance *exts;
1624  void *priv;
1625  };
1626  };
1627 
1628  struct lysc_must *musts;
1629  struct lysc_when **when;
1630  struct lysc_type *type;
1632  const char *units;
1633  struct lysc_value dflt;
1634 };
1635 
1637  union {
1638  struct lysc_node node;
1640  struct {
1641  uint16_t nodetype;
1642  uint16_t flags;
1643  uint8_t hash[LYS_NODE_HASH_COUNT];
1644  struct lys_module *module;
1645  struct lysc_node *parent;
1646  struct lysc_node *next;
1647  struct lysc_node *prev;
1651  const char *name;
1652  const char *dsc;
1653  const char *ref;
1654  struct lysc_ext_instance *exts;
1655  void *priv;
1656  };
1657  };
1658 
1659  struct lysc_must *musts;
1660  struct lysc_when **when;
1661  struct lysc_type *type;
1663  const char *units;
1664  struct lysc_value *dflts;
1667  uint32_t min;
1668  uint32_t max;
1670 };
1671 
1673  union {
1674  struct lysc_node node;
1676  struct {
1677  uint16_t nodetype;
1678  uint16_t flags;
1679  uint8_t hash[LYS_NODE_HASH_COUNT];
1680  struct lys_module *module;
1681  struct lysc_node *parent;
1682  struct lysc_node *next;
1683  struct lysc_node *prev;
1687  const char *name;
1688  const char *dsc;
1689  const char *ref;
1690  struct lysc_ext_instance *exts;
1691  void *priv;
1692  };
1693  };
1694 
1695  struct lysc_node *child;
1696  struct lysc_must *musts;
1697  struct lysc_when **when;
1702  uint32_t min;
1703  uint32_t max;
1704 };
1705 
1707  union {
1708  struct lysc_node node;
1710  struct {
1711  uint16_t nodetype;
1712  uint16_t flags;
1713  uint8_t hash[LYS_NODE_HASH_COUNT];
1714  struct lys_module *module;
1715  struct lysc_node *parent;
1716  struct lysc_node *next;
1717  struct lysc_node *prev;
1721  const char *name;
1722  const char *dsc;
1723  const char *ref;
1724  struct lysc_ext_instance *exts;
1725  void *priv;
1726  };
1727  };
1728 
1729  struct lysc_must *musts;
1730  struct lysc_when **when;
1731 };
1732 
1737  const char *name;
1738  const char *revision;
1739  const char *filepath;
1740 };
1741 
1748 struct lysc_module {
1749  struct lys_module *mod;
1751  const char **features;
1753  struct lysc_node *data;
1757 };
1758 
1765 #define lysc_is_userordered(lysc_node) \
1766  ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
1767 
1774 #define lysc_is_key(lysc_node) \
1775  ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
1776 
1783 #define lysc_is_np_cont(lysc_node) \
1784  ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
1785 
1792 #define lysc_is_dup_inst_list(lysc_node) \
1793  ((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
1794  ((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
1795 
1803 LIBYANG_API_DECL struct lyplg_type *lysc_get_type_plugin(uintptr_t plugin_ref);
1804 
1812 LIBYANG_API_DECL struct lyplg_ext *lysc_get_ext_plugin(uintptr_t plugin_ref);
1813 
1820 LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
1821 
1825 #define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
1826 
1837 LIBYANG_API_DECL const struct lysc_when *lysc_has_when(const struct lysc_node *node);
1838 
1846 LIBYANG_API_DECL const struct lys_module *lysc_owner_module(const struct lysc_node *node);
1847 
1854 LIBYANG_API_DECL const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
1855 
1862 LIBYANG_API_DECL const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
1863 
1870 LIBYANG_API_DECL const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
1871 
1878 LIBYANG_API_DECL const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
1879 
1886 LIBYANG_API_DECL const struct lysp_node *lysp_node_child(const struct lysp_node *node);
1887 
1895 LIBYANG_API_DECL const char *lysp_submodule_revision(const struct lysp_submodule *submod);
1896 
1903 LIBYANG_API_DECL const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
1904 
1911 LIBYANG_API_DECL const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
1912 
1923 LIBYANG_API_DECL const struct lysc_node *lysc_node_child(const struct lysc_node *node);
1924 
1932 LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node);
1933 
1941 LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
1942 
1950 LIBYANG_API_DECL const struct lysc_node *lysc_node_lref_target(const struct lysc_node *node);
1951 
1961 LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set);
1962 
1974 LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node,
1975  ly_bool match_ancestors, struct ly_set **set);
1976 
1986 typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
1987 
2004 LIBYANG_API_DECL LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
2005 
2017 LIBYANG_API_DECL LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
2018 
2027 LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff);
2028 
2040 LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident);
2041 
2050 LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod,
2051  uint32_t *idx);
2052 
2065 LIBYANG_API_DECL const struct lys_module *lys_find_module(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2066  const char *prefix, uint32_t prefix_len, LY_VALUE_FORMAT format, const void *prefix_data);
2067 
2075 #define LYS_GETNEXT_WITHCHOICE 0x01
2076 #define LYS_GETNEXT_NOCHOICE 0x02
2077 #define LYS_GETNEXT_WITHCASE 0x04
2078 #define LYS_GETNEXT_INTONPCONT 0x08
2080 #define LYS_GETNEXT_OUTPUT 0x10
2105 LIBYANG_API_DECL const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
2106  const struct lysc_module *module, uint32_t options);
2107 
2123 LIBYANG_API_DECL const struct lysc_node *lys_find_child(const struct ly_ctx *ctx, const struct lysc_node *parent,
2124  const struct lys_module *mod, const char *mod_name, uint32_t mod_len, const char *name, uint32_t name_len,
2125  uint32_t options);
2126 
2132 #define LYS_FIND_XP_SCHEMA 0x08
2133 #define LYS_FIND_XP_OUTPUT 0x10
2134 #define LYS_FIND_NO_MATCH_ERROR 0x40
2149 LIBYANG_API_DECL LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2150  uint32_t options, struct ly_set **set);
2151 
2164 LIBYANG_API_DECL LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod,
2165  const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set);
2166 
2178 LIBYANG_API_DECL LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2179  uint32_t options, struct ly_set **set);
2180 
2189 LIBYANG_API_DECL LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
2190 
2201 LIBYANG_API_DECL LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path,
2202  ly_bool output, struct ly_set **set);
2203 
2213 LIBYANG_API_DECL const struct lysc_node *lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2214  const char *path, ly_bool output);
2215 
2219 typedef enum {
2225 
2237 LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
2238 
2242 struct lys_module {
2243  struct ly_ctx *ctx;
2244  const char *name;
2245  const char *revision;
2246  const char *ns;
2247  const char *prefix;
2248  const char *filepath;
2249  const char *org;
2250  const char *contact;
2251  const char *dsc;
2252  const char *ref;
2275  uint8_t version : 2;
2276  uint8_t latest_revision : 4;
2278 };
2279 
2287 #define LYS_MOD_LATEST_REV 0x01
2288 #define LYS_MOD_LATEST_SEARCHDIRS 0x02
2289 #define LYS_MOD_IMPORTED_REV 0x04
2292 #define LYS_MOD_LATEST_IMPCLB 0x08
2307 LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
2308 
2324 LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
2325 
2343 LIBYANG_API_DECL LY_ERR lys_compare(const struct ly_ctx *ctx, const struct lys_module *src_mod,
2344  const struct lys_module *trg_mod, ly_bool gen_local, ly_bool gen_full, struct lyd_node **schema_diff);
2345 
2352 LIBYANG_API_DECL const char *lys_nodetype2str(uint16_t nodetype);
2353 
2360 LIBYANG_API_DECL const char *lyxp_get_expr(const struct lyxp_expr *path);
2361 
2366 typedef enum {
2370 
2392 LIBYANG_API_DECL LY_ERR lys_sid_gen(const struct lys_module *module, uint64_t entry_point, uint64_t size,
2393  LYS_SID_FILE_STATUS status, const char *description, struct lyd_node **sid_file);
2394 
2422 LIBYANG_API_DECL LY_ERR lys_sid_update(const struct lys_module *module, const struct lyd_node *prev_sid_file,
2423  LYS_SID_FILE_STATUS status, const char *description, struct lyd_node **sid_file);
2424 
2440 LIBYANG_API_DECL LY_ERR lys_sid_range_add(struct lyd_node *sid_file, uint64_t entry_point, uint64_t size);
2441 
2444 #ifdef __cplusplus
2445 }
2446 #endif
2447 
2448 #endif /* LY_TREE_SCHEMA_H_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:252
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node,...
Definition: set.h:47
struct lysp_ext_instance * exts
Definition: plugins_exts.h:411
struct lysc_ext_instance * exts
Definition: plugins_exts.h:430
Extension plugin implementing various aspects of a YANG extension.
Definition: plugins_exts.h:962
YANG extension compiled instance.
Definition: plugins_exts.h:426
YANG extension parsed instance.
Definition: plugins_exts.h:392
Hold type-specific functions for various operations with the data values.
struct lysc_node * child
Definition: tree_schema.h:1568
struct lysp_ext_instance * exts
Definition: tree_schema.h:297
const char * dsc
Definition: tree_schema.h:1193
struct lysp_node_grp * groupings
Definition: tree_schema.h:1104
struct lysp_node * data
Definition: tree_schema.h:1129
struct lysp_restr * musts
Definition: tree_schema.h:497
struct lysc_when ** when
Definition: tree_schema.h:1477
const char * ref
Definition: tree_schema.h:362
struct lysp_tpdf * typedefs
Definition: tree_schema.h:992
uint16_t flags
Definition: tree_schema.h:453
const char * ref
Definition: tree_schema.h:517
const char * cond
Definition: tree_schema.h:433
struct lysp_when * when
Definition: tree_schema.h:761
const char * name
Definition: tree_schema.h:380
const char * ref
Definition: tree_schema.h:296
struct lysp_ext_instance * exts
Definition: tree_schema.h:519
struct lysp_node_notif * notifs
Definition: tree_schema.h:848
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1127
struct lysp_node_action * actions
Definition: tree_schema.h:1076
uint32_t refcount
Definition: tree_schema.h:1298
struct lysc_ext_instance * exts
Definition: tree_schema.h:1180
struct lysc_must * musts
Definition: tree_schema.h:1696
uintptr_t plugin_ref
Definition: tree_schema.h:1296
struct lysc_when ** when
Definition: tree_schema.h:1569
struct lysp_feature * features
Definition: tree_schema.h:1125
uintptr_t plugin_ref
Definition: tree_schema.h:1286
struct lysc_node_action * rpcs
Definition: tree_schema.h:1754
struct lysc_ext_instance * exts
Definition: tree_schema.h:1376
char rev[11]
Definition: tree_schema.h:270
struct lysp_node * child
Definition: tree_schema.h:968
const char * name
Definition: tree_schema.h:1737
ly_bool to_compile
Definition: tree_schema.h:2273
struct lysp_restr * musts
Definition: tree_schema.h:1020
struct lysc_node_action_inout output
Definition: tree_schema.h:1481
const char * prefix
Definition: tree_schema.h:265
struct lysp_restr * musts
Definition: tree_schema.h:760
const char * ref
Definition: tree_schema.h:312
const char * dsc
Definition: tree_schema.h:266
struct lysc_range * range
Definition: tree_schema.h:1290
struct lysp_include * includes
Definition: tree_schema.h:1099
struct lysc_range * range
Definition: tree_schema.h:1301
struct lysp_node_grp * groupings
Definition: tree_schema.h:845
struct lysp_ext_instance * exts
Definition: tree_schema.h:736
const char * ref
Definition: tree_schema.h:435
const char * units
Definition: tree_schema.h:1632
struct lysc_when ** when
Definition: tree_schema.h:1629
struct lysc_when ** when
Definition: tree_schema.h:1540
struct lysp_revision * revs
Definition: tree_schema.h:1120
struct lysc_node * child
Definition: tree_schema.h:1508
const char * name
Definition: tree_schema.h:1385
struct lysp_qname * dflts
Definition: tree_schema.h:486
uint16_t nodetype
Definition: tree_schema.h:1413
struct lys_module ** augmented_by
Definition: tree_schema.h:2269
uint8_t version
Definition: tree_schema.h:2275
LY_DATA_TYPE basetype
Definition: tree_schema.h:1308
const char * name
Definition: tree_schema.h:2244
struct lysp_node_notif * notifs
Definition: tree_schema.h:1051
struct lysp_restr * range
Definition: tree_schema.h:397
struct lysp_qname * dflts
Definition: tree_schema.h:817
struct lysc_ext_instance * exts
Definition: tree_schema.h:1276
const char * ref
Definition: tree_schema.h:372
LY_DATA_TYPE basetype
Definition: tree_schema.h:1378
struct lysp_deviate * next
Definition: tree_schema.h:494
struct lysp_qname arg
Definition: tree_schema.h:356
struct lysc_node_action * actions
Definition: tree_schema.h:1698
LY_DATA_TYPE basetype
Definition: tree_schema.h:1278
struct lysp_node * child
Definition: tree_schema.h:846
struct lysp_deviate * next
Definition: tree_schema.h:504
uintptr_t plugin_ref
Definition: tree_schema.h:1342
const char * units
Definition: tree_schema.h:816
struct lysp_import * imports
Definition: tree_schema.h:1122
struct lyxp_expr * path
Definition: tree_schema.h:1357
struct lysp_ext_instance * exts
Definition: tree_schema.h:405
struct lys_module ** deviated_by
Definition: tree_schema.h:2270
struct lysp_qname dflt
Definition: tree_schema.h:874
uint8_t require_instance
Definition: tree_schema.h:411
struct lysc_when ** when
Definition: tree_schema.h:1660
const char * units
Definition: tree_schema.h:496
struct lysp_when * when
Definition: tree_schema.h:918
const char * eapptag
Definition: tree_schema.h:1270
struct lysp_ext_instance * exts
Definition: tree_schema.h:268
struct lysp_type type
Definition: tree_schema.h:425
const char * units
Definition: tree_schema.h:507
struct lysp_node_notif * notifs
Definition: tree_schema.h:767
LY_DATA_TYPE basetype
Definition: tree_schema.h:1287
LY_DATA_TYPE basetype
Definition: tree_schema.h:1333
struct lysc_node_notif * notifs
Definition: tree_schema.h:1755
struct lyxp_expr * cond
Definition: tree_schema.h:1265
uint8_t hash[4]
Definition: tree_schema.h:1415
uint32_t refcount
Definition: tree_schema.h:1261
const char * name
Definition: tree_schema.h:1395
const char * str
Definition: tree_schema.h:1601
struct lysp_qname * uniques
Definition: tree_schema.h:849
const char * name
Definition: tree_schema.h:264
const char * ref
Definition: tree_schema.h:345
const char * dsc
Definition: tree_schema.h:1424
const char * prefix
Definition: tree_schema.h:1146
struct lysc_node_notif * notifs
Definition: tree_schema.h:1699
struct lysp_node_notif * notifs
Definition: tree_schema.h:1077
uint16_t nodetype
Definition: tree_schema.h:728
struct lysc_ext_instance * exts
Definition: tree_schema.h:1365
const char * emsg
Definition: tree_schema.h:359
uint16_t flags
Definition: tree_schema.h:1197
struct lysc_module * compiled
Definition: tree_schema.h:2255
const char * contact
Definition: tree_schema.h:2250
struct lys_module * module
Definition: tree_schema.h:1416
uint16_t flags
Definition: tree_schema.h:347
struct lysp_when * when
Definition: tree_schema.h:941
struct lysc_must * musts
Definition: tree_schema.h:1539
const char * presence
Definition: tree_schema.h:762
const char * name
Definition: tree_schema.h:1204
const char * nodeid
Definition: tree_schema.h:515
struct lysp_when * when
Definition: tree_schema.h:873
struct lysp_tpdf * typedefs
Definition: tree_schema.h:966
const char * revision
Definition: tree_schema.h:2245
uint8_t is_submod
Definition: tree_schema.h:1114
struct lysc_type * type
Definition: tree_schema.h:1661
const char * name
Definition: tree_schema.h:1178
const char * dsc
Definition: tree_schema.h:516
struct lysp_node * next
Definition: tree_schema.h:730
LY_DATA_TYPE basetype
Definition: tree_schema.h:1343
struct lysp_restr * patterns
Definition: tree_schema.h:399
struct lysp_ext_instance * exts
Definition: tree_schema.h:373
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1021
struct lysp_type type
Definition: tree_schema.h:790
struct lysp_node * child
Definition: tree_schema.h:872
struct lysc_ident * identities
Definition: tree_schema.h:2260
struct lysc_ext_instance * exts
Definition: tree_schema.h:1295
struct lysp_qname * iffeatures
Definition: tree_schema.h:384
const char * ref
Definition: tree_schema.h:382
const char * name
Definition: tree_schema.h:293
const char * name
Definition: tree_schema.h:1294
LY_DATA_TYPE basetype
Definition: tree_schema.h:1297
const char * name
Definition: tree_schema.h:1275
uint16_t flags
Definition: tree_schema.h:386
struct lysp_node_action * actions
Definition: tree_schema.h:847
struct lysp_ext_instance * exts
Definition: tree_schema.h:424
const char * expr
Definition: tree_schema.h:1253
struct lysp_node_augment * augments
Definition: tree_schema.h:1130
uint32_t refcount
Definition: tree_schema.h:1288
struct lysp_node * parent
Definition: tree_schema.h:727
const char * dsc
Definition: tree_schema.h:1254
struct lysp_ext_instance * exts
Definition: tree_schema.h:282
const char * emsg
Definition: tree_schema.h:1256
struct lysp_node_action * rpcs
Definition: tree_schema.h:1131
struct lysp_node_action * actions
Definition: tree_schema.h:766
struct lysp_node_grp * groupings
Definition: tree_schema.h:967
struct lysp_qname * iffeatures
Definition: tree_schema.h:307
struct lysp_node_grp * groupings
Definition: tree_schema.h:1128
uint16_t flags
Definition: tree_schema.h:299
struct lysc_ext * extensions
Definition: tree_schema.h:2258
uint16_t flags
Definition: tree_schema.h:412
struct lysc_ext_instance * exts
Definition: tree_schema.h:1249
struct lysp_node * data
Definition: tree_schema.h:1105
struct lysp_feature ** depfeatures
Definition: tree_schema.h:309
struct lysc_type_bitenum_item * bits
Definition: tree_schema.h:1346
struct lysp_ext * extensions
Definition: tree_schema.h:1100
const char * presence
Definition: tree_schema.h:448
uint8_t mod
Definition: tree_schema.h:474
uintptr_t plugin_ref
Definition: tree_schema.h:1397
struct lysp_ext_instance * exts
Definition: tree_schema.h:363
struct lysc_node * parent
Definition: tree_schema.h:1417
uint8_t latest_revision
Definition: tree_schema.h:2276
struct lys_module * module
Definition: tree_schema.h:1207
const char * name
Definition: tree_schema.h:419
uint32_t refcount
Definition: tree_schema.h:1196
uintptr_t plugin_ref
Definition: tree_schema.h:1332
const char * dsc
Definition: tree_schema.h:361
uintptr_t plugin_ref
Definition: tree_schema.h:298
uintptr_t plugin_ref
Definition: tree_schema.h:1307
const char * dsc
Definition: tree_schema.h:2251
struct lysp_type_enum * bits
Definition: tree_schema.h:401
struct lysc_pattern ** patterns
Definition: tree_schema.h:1312
struct lysp_node_action_inout output
Definition: tree_schema.h:996
struct lysp_ident * identities
Definition: tree_schema.h:1102
struct lysp_ext_instance * exts
Definition: tree_schema.h:495
uint8_t * expr
Definition: tree_schema.h:322
struct lysp_type * types
Definition: tree_schema.h:404
LY_DATA_TYPE basetype
Definition: tree_schema.h:1367
const char * ref
Definition: tree_schema.h:1150
struct lysc_node * child
Definition: tree_schema.h:1450
const char * argname
Definition: tree_schema.h:1179
struct lysp_ext_instance * exts
Definition: tree_schema.h:436
struct lysp_qname dflt
Definition: tree_schema.h:421
struct lysp_node * child
Definition: tree_schema.h:1074
struct lysp_deviation * deviations
Definition: tree_schema.h:1109
struct lys_module * mod
Definition: tree_schema.h:1118
const char * org
Definition: tree_schema.h:2249
struct lysp_qname dflt
Definition: tree_schema.h:508
struct lysp_node * child
Definition: tree_schema.h:1023
const char * ref
Definition: tree_schema.h:445
const char * ref
Definition: tree_schema.h:733
uintptr_t plugin_ref
Definition: tree_schema.h:1277
struct lysc_iffeature * iffeatures_c
Definition: tree_schema.h:308
const struct lysp_module * pmod
Definition: tree_schema.h:407
const char * dsc
Definition: tree_schema.h:371
struct lysp_qname * uniques
Definition: tree_schema.h:498
struct lysp_ext_instance * exts
Definition: tree_schema.h:452
struct lysp_node_augment * augments
Definition: tree_schema.h:1106
const char * contact
Definition: tree_schema.h:1148
ly_bool implemented
Definition: tree_schema.h:2272
const char * key
Definition: tree_schema.h:843
const char * name
Definition: tree_schema.h:1144
struct lys_module * mod
Definition: tree_schema.h:1095
struct lysc_value dflt
Definition: tree_schema.h:1633
uint16_t flags
Definition: tree_schema.h:426
struct lysc_node_case * cases
Definition: tree_schema.h:1595
const char * ref
Definition: tree_schema.h:2252
uint16_t flags
Definition: tree_schema.h:729
uint16_t flags
Definition: tree_schema.h:1414
struct lysp_restr * musts
Definition: tree_schema.h:965
struct lysp_ext_instance * exts
Definition: tree_schema.h:385
struct lysc_value * dflts
Definition: tree_schema.h:1664
const char * filepath
Definition: tree_schema.h:1739
const char * ref
Definition: tree_schema.h:267
const char * filepath
Definition: tree_schema.h:1145
struct lysc_node_notif * notifs
Definition: tree_schema.h:1542
uint32_t max
Definition: tree_schema.h:451
const char * dsc
Definition: tree_schema.h:295
struct lysp_include * includes
Definition: tree_schema.h:1123
struct lysc_must * musts
Definition: tree_schema.h:1451
uint32_t min
Definition: tree_schema.h:450
struct lysp_deviate * deviates
Definition: tree_schema.h:518
struct lysc_ext_instance * exts
Definition: tree_schema.h:1195
ly_bool injected
Definition: tree_schema.h:284
const char * units
Definition: tree_schema.h:483
struct lysp_qname dflt
Definition: tree_schema.h:792
uintptr_t plugin_ref
Definition: tree_schema.h:1353
const char * name
Definition: tree_schema.h:1284
void * priv
Definition: tree_schema.h:1427
const char * name
Definition: tree_schema.h:1330
struct lysc_node_action * actions
Definition: tree_schema.h:1541
const char * name
Definition: tree_schema.h:396
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1103
struct lysp_qname * uniques
Definition: tree_schema.h:485
struct lysp_when * when
Definition: tree_schema.h:1075
struct lysc_range * length
Definition: tree_schema.h:1401
uint32_t min
Definition: tree_schema.h:850
const char * name
Definition: tree_schema.h:306
struct lysp_restr * length
Definition: tree_schema.h:398
struct lysc_when ** when
Definition: tree_schema.h:1730
const char * eapptag
Definition: tree_schema.h:1248
struct lysp_ext_instance * exts
Definition: tree_schema.h:505
struct lysc_type * type
Definition: tree_schema.h:1630
struct lysp_restr * musts
Definition: tree_schema.h:484
struct lysp_restr * musts
Definition: tree_schema.h:841
struct lysp_ident * identities
Definition: tree_schema.h:1126
const char * units
Definition: tree_schema.h:791
struct lyxp_expr * path
Definition: tree_schema.h:402
struct lysp_qname * dflts
Definition: tree_schema.h:449
struct lysc_node * next
Definition: tree_schema.h:1418
const char * dsc
Definition: tree_schema.h:344
struct lysc_ext_instance * exts
Definition: tree_schema.h:1386
struct lysp_restr * musts
Definition: tree_schema.h:447
struct lysp_node * child
Definition: tree_schema.h:895
struct lysp_qname * iffeatures
Definition: tree_schema.h:734
uint8_t latest_revision
Definition: tree_schema.h:1140
uintptr_t plugin_ref
Definition: tree_schema.h:1387
struct lysp_ext_instance * exts
Definition: tree_schema.h:1134
struct lysc_ext_instance * exts
Definition: tree_schema.h:1341
const char * dsc
Definition: tree_schema.h:1205
struct lysp_revision * revs
Definition: tree_schema.h:1097
struct lysc_type * compiled
Definition: tree_schema.h:408
struct lysc_node * child
Definition: tree_schema.h:1538
uint16_t flags
Definition: tree_schema.h:1211
struct lys_module * module
Definition: tree_schema.h:262
const char * revision
Definition: tree_schema.h:1738
struct lysc_ext_instance * exts
Definition: tree_schema.h:1319
struct lysp_type * type
Definition: tree_schema.h:506
struct lysc_node_leaf *** uniques
Definition: tree_schema.h:1701
struct lysp_qname * iffeatures
Definition: tree_schema.h:446
struct lysp_when * when
Definition: tree_schema.h:896
const char * name
Definition: tree_schema.h:279
struct lysp_submodule * submodule
Definition: tree_schema.h:277
struct lysp_ext_instance * exts
Definition: tree_schema.h:313
const char * name
Definition: tree_schema.h:1351
struct lysp_feature * features
Definition: tree_schema.h:1101
struct lysp_qname * dflts
Definition: tree_schema.h:499
struct lysp_restr * musts
Definition: tree_schema.h:917
const char * ref
Definition: tree_schema.h:281
struct lysp_node_action * rpcs
Definition: tree_schema.h:1107
struct lysp_ext_instance * exts
Definition: tree_schema.h:346
const char * name
Definition: tree_schema.h:1305
const char ** bases
Definition: tree_schema.h:343
LY_DATA_TYPE basetype
Definition: tree_schema.h:1354
const char * dsc
Definition: tree_schema.h:1245
const char * name
Definition: tree_schema.h:1423
struct lys_module * mod
Definition: tree_schema.h:1749
struct lysc_node_action_inout input
Definition: tree_schema.h:1480
struct lysp_when * when
Definition: tree_schema.h:789
const char * dsc
Definition: tree_schema.h:444
struct lysp_node_action * actions
Definition: tree_schema.h:1050
uint16_t flags
Definition: tree_schema.h:1183
struct lysp_deviation * deviations
Definition: tree_schema.h:1133
char date[11]
Definition: tree_schema.h:370
uint32_t format
Definition: tree_schema.h:1260
char * prefix
Definition: tree_schema.h:1166
struct lysc_must * musts
Definition: tree_schema.h:1729
struct lysc_ident ** derived
Definition: tree_schema.h:1208
uint32_t refcount
Definition: tree_schema.h:1399
const char * ref
Definition: tree_schema.h:1425
struct lysc_prefix * prefixes
Definition: tree_schema.h:1358
struct lysc_ext_instance * exts
Definition: tree_schema.h:1331
const char * dsc
Definition: tree_schema.h:732
const char * ref
Definition: tree_schema.h:1206
struct lysc_type_bitenum_item * enums
Definition: tree_schema.h:1336
const char * dsc
Definition: tree_schema.h:1267
struct lysc_submodule * submodules
Definition: tree_schema.h:2268
struct lysc_must * musts
Definition: tree_schema.h:1628
struct lysp_node * child
Definition: tree_schema.h:765
const char * dsc
Definition: tree_schema.h:1149
const char * filepath
Definition: tree_schema.h:2248
struct lysp_node_action_inout input
Definition: tree_schema.h:995
struct lysp_tpdf * typedefs
Definition: tree_schema.h:1047
struct lysc_when ** when
Definition: tree_schema.h:1596
struct lysp_when * when
Definition: tree_schema.h:842
const char * ns
Definition: tree_schema.h:2246
const char * dsc
Definition: tree_schema.h:422
const char * ref
Definition: tree_schema.h:1194
struct lysp_node_grp * groupings
Definition: tree_schema.h:993
struct lysc_range * length
Definition: tree_schema.h:1311
const char * name
Definition: tree_schema.h:1340
struct lysc_prefix * prefixes
Definition: tree_schema.h:1192
struct lysp_tpdf * typedefs
Definition: tree_schema.h:844
struct lysc_when ** when
Definition: tree_schema.h:1510
const char ** features
Definition: tree_schema.h:1751
struct lysc_node * child
Definition: tree_schema.h:1695
struct lysp_node_augment * augments
Definition: tree_schema.h:940
uint32_t refcount
Definition: tree_schema.h:1344
uint32_t refcount
Definition: tree_schema.h:1334
struct lysp_tpdf * typedefs
Definition: tree_schema.h:763
struct lysc_ext_instance * exts
Definition: tree_schema.h:1271
struct lysp_type_enum * enums
Definition: tree_schema.h:400
const char * name
Definition: tree_schema.h:731
struct lysc_type * realtype
Definition: tree_schema.h:1359
const char * eapptag
Definition: tree_schema.h:360
struct lysc_ext_instance * exts
Definition: tree_schema.h:1231
struct lysp_node_grp * groupings
Definition: tree_schema.h:764
struct lysp_deviate * next
Definition: tree_schema.h:475
struct lysc_node * prev
Definition: tree_schema.h:1419
struct lysp_type type
Definition: tree_schema.h:815
const char * ref
Definition: tree_schema.h:1268
const char * dsc
Definition: tree_schema.h:381
uint32_t refcount
Definition: tree_schema.h:1309
const char * org
Definition: tree_schema.h:1147
struct lysc_ext_instance * exts
Definition: tree_schema.h:1210
const char * name
Definition: tree_schema.h:341
const char * ref
Definition: tree_schema.h:1255
struct lysc_node * data
Definition: tree_schema.h:1753
const char * dsc
Definition: tree_schema.h:434
uint8_t is_submod
Definition: tree_schema.h:1138
const char * emsg
Definition: tree_schema.h:1269
struct lysp_module * parsed
Definition: tree_schema.h:2254
uint32_t refcount
Definition: tree_schema.h:1279
struct lysc_must * musts
Definition: tree_schema.h:1509
struct lysc_ext_instance * exts
Definition: tree_schema.h:1285
struct lyxp_expr * cond
Definition: tree_schema.h:1190
uintptr_t plugin_ref
Definition: tree_schema.h:1181
const char * str
Definition: tree_schema.h:330
const char * prefix
Definition: tree_schema.h:2247
struct lysp_node_notif * notifs
Definition: tree_schema.h:1132
struct lysc_ext_instance * exts
Definition: tree_schema.h:1258
const char * eapptag
Definition: tree_schema.h:1257
uint8_t parsing
Definition: tree_schema.h:1113
struct lysp_qname * iffeatures
Definition: tree_schema.h:342
const char * ref
Definition: tree_schema.h:1246
struct lysc_node_case * dflt
Definition: tree_schema.h:1597
const char * units
Definition: tree_schema.h:420
struct lysc_ext_instance * exts
Definition: tree_schema.h:1306
struct lysp_when * when
Definition: tree_schema.h:814
struct lysc_type ** types
Definition: tree_schema.h:1391
uint16_t flags
Definition: tree_schema.h:314
const char * argname
Definition: tree_schema.h:294
const char ** bases
Definition: tree_schema.h:403
const char * dsc
Definition: tree_schema.h:311
struct lysc_ext_instance * exts
Definition: tree_schema.h:1426
struct lysc_ext_instance * exts
Definition: tree_schema.h:1756
struct ly_ctx * ctx
Definition: tree_schema.h:2243
struct lys_module * module
Definition: tree_schema.h:1182
uint32_t max
Definition: tree_schema.h:851
struct lysp_ext * extensions
Definition: tree_schema.h:1124
struct lysp_node_notif * notifs
Definition: tree_schema.h:1108
uint16_t flags
Definition: tree_schema.h:269
uint32_t inverted
Definition: tree_schema.h:1259
struct lysc_node * context
Definition: tree_schema.h:1191
LY_DATA_TYPE basetype
Definition: tree_schema.h:1398
struct lysp_ext_instance * exts
Definition: tree_schema.h:1110
struct lysc_ext_instance * exts
Definition: tree_schema.h:1396
char date[11]
Definition: tree_schema.h:1230
struct lysc_ext_instance * exts
Definition: tree_schema.h:1352
const char * units
Definition: tree_schema.h:1663
char rev[11]
Definition: tree_schema.h:283
uint8_t fraction_digits
Definition: tree_schema.h:410
const char * ref
Definition: tree_schema.h:423
struct lysp_restr * musts
Definition: tree_schema.h:788
struct lysc_must * musts
Definition: tree_schema.h:1659
struct lysc_when ** when
Definition: tree_schema.h:1697
struct lysp_import * imports
Definition: tree_schema.h:1098
struct lysp_ext_instance * exts
Definition: tree_schema.h:476
const struct lysp_module * mod
Definition: tree_schema.h:331
uint8_t version
Definition: tree_schema.h:1112
LY_DATA_TYPE basetype
Definition: tree_schema.h:1388
struct lysp_restr * musts
Definition: tree_schema.h:813
struct lysc_ident ** bases
Definition: tree_schema.h:1370
const char * emsg
Definition: tree_schema.h:1247
struct lysp_feature ** features
Definition: tree_schema.h:323
const char * dsc
Definition: tree_schema.h:280
const char * nodeid
Definition: tree_schema.h:443
struct lysp_ext_instance * exts
Definition: tree_schema.h:482
uint32_t refcount
Definition: tree_schema.h:1389
struct lysc_range::lysc_range_part * parts
uint16_t flags
Definition: tree_schema.h:333
struct lysc_prefix * prefixes
Definition: tree_schema.h:1266
struct lysp_node_grp * groupings
Definition: tree_schema.h:1022
uint8_t require_instance
Definition: tree_schema.h:1360
struct lysp_deviate * next
Definition: tree_schema.h:481
struct lysp_node * child
Definition: tree_schema.h:1049
const struct lys_module * mod
Definition: tree_schema.h:1167
struct lysp_node_grp * groupings
Definition: tree_schema.h:1048
struct lysc_prefix * prefixes
Definition: tree_schema.h:1602
struct lysp_refine * refines
Definition: tree_schema.h:939
uint8_t fraction_digits
Definition: tree_schema.h:1300
LIBYANG_API_DECL const struct lysp_tpdf * lysp_node_typedefs(const struct lysp_node *node)
Get the typedefs sized array of the given (parsed) schema node. Decides the node's type and in case i...
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.
LIBYANG_API_DECL LY_ERR lys_sid_range_add(struct lyd_node *sid_file, uint64_t entry_point, uint64_t size)
Append a new assignment range to an existing .sid file data tree.
LIBYANG_API_DECL const 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...
LIBYANG_API_DECL const struct lysc_node * lys_find_child(const struct ly_ctx *ctx, const struct lysc_node *parent, const struct lys_module *mod, const char *mod_name, uint32_t mod_len, const char *name, uint32_t name_len, uint32_t options)
Get a child node according to the specified criteria.
LIBYANG_API_DECL const struct lysc_node * lysc_node_child(const struct lysc_node *node)
Get the children linked list of the given (compiled) schema node.
LIBYANG_API_DECL struct lysc_must * lysc_node_musts(const struct lysc_node *node)
Get the must statements list if present in the node.
LIBYANG_API_DECL const struct lysc_node * lysc_data_node(const struct lysc_node *schema)
Get nearest schema parent (including the node itself) that can be instantiated in data.
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:1986
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
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.
LIBYANG_API_DECL const struct lysc_node_notif * lysc_node_notifs(const struct lysc_node *node)
Get the Notifications linked list of the given (compiled) schema node. Decides the node's type and in...
LIBYANG_API_DECL const struct lysp_node_action * lysp_node_actions(const struct lysp_node *node)
Get the actions/RPCs linked list of the given (parsed) schema node. Decides the node's type and in ca...
LIBYANG_API_DECL const struct lysc_node * lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path, ly_bool output)
Get a schema node based on the given data path (JSON format, see XPath Addressing).
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).
LIBYANG_API_DECL LY_ERR lys_compare(const struct ly_ctx *ctx, const struct lys_module *src_mod, const struct lys_module *trg_mod, ly_bool gen_local, ly_bool gen_full, struct lyd_node **schema_diff)
Compare 2 revisions of a module and generate their schema diff. Requires 'ietf-yang-schema-comparison...
LIBYANG_API_DECL const struct lysc_when * lysc_has_when(const struct lysc_node *node)
Check whether the schema node data instance existence depends on any when conditions....
LIBYANG_API_DECL const struct lysc_node * lys_getnext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_module *module, uint32_t options)
Get next schema (sibling) node element in the schema order that can be instantiated in a data tree....
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).
LYS_SID_FILE_STATUS
Status of a generated .sid file, mirroring the 'sid-file-status' leaf from ietf-sid-file (RFC 9595,...
Definition: tree_schema.h:2366
LIBYANG_API_DECL LY_ERR lys_sid_gen(const struct lys_module *module, uint64_t entry_point, uint64_t size, LYS_SID_FILE_STATUS status, const char *description, struct lyd_node **sid_file)
Generate a .sid file content of a module as an ietf-sid-file data tree.
LIBYANG_API_DECL struct lyplg_ext * lysc_get_ext_plugin(uintptr_t plugin_ref)
Get an extension plugin.
LIBYANG_API_DECL const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
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.
LIBYANG_API_DECL struct lyplg_type * lysc_get_type_plugin(uintptr_t plugin_ref)
Get a type plugin.
LIBYANG_API_DECL const struct lysp_node * lysp_node_child(const struct lysp_node *node)
Get the children linked list of the given (parsed) schema node. Decides the node's type and in case i...
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.
LIBYANG_API_DECL LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath, uint32_t options, struct ly_set **set)
Get all the schema nodes that are required for xpath to be evaluated (atoms).
LIBYANG_API_DECL const char * lysp_submodule_revision(const struct lysp_submodule *submod)
Get the last revision of a submodule.
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
LIBYANG_API_DECL const struct lysp_node_grp * lysp_node_groupings(const struct lysp_node *node)
Get the groupings linked list of the given (parsed) schema node. Decides the node's type and in case ...
LIBYANG_API_DECL const struct lys_module * lys_find_module(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *prefix, uint32_t prefix_len, LY_VALUE_FORMAT format, const void *prefix_data)
Find a module matching a prefix (or a default one).
LYSC_PATH_TYPE
Types of the different schema paths.
Definition: tree_schema.h:2219
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.
#define LYS_NODE_HASH_COUNT
Maximum number of hashes stored in a schema node.
Definition: tree_schema.h:1407
LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature)
Get the current real status of the specified feature in the module.
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 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.
LIBYANG_API_DECL LY_ERR lys_sid_update(const struct lys_module *module, const struct lyd_node *prev_sid_file, LYS_SID_FILE_STATUS status, const char *description, struct lyd_node **sid_file)
Update a .sid file content of a module from a previous .sid file.
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.
LIBYANG_API_DECL const struct lysc_node_action * lysc_node_actions(const struct lysc_node *node)
Get the actions/RPCs linked list of the given (compiled) schema node. Decides the node's type and in ...
LIBYANG_API_DECL const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
LIBYANG_API_DECL const struct lys_module * lysc_owner_module(const struct lysc_node *node)
Get the owner module of the schema node. It is the module of the top-level node. Generally,...
LYS_VERSION
supported YANG schema version values
Definition: tree_schema.h:1083
LIBYANG_API_DECL const struct lysp_node_notif * lysp_node_notifs(const struct lysp_node *node)
Get the Notifications linked list of the given (parsed) schema node. Decides the node's type and in c...
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.
#define LY_REV_SIZE
Definition: tree_schema.h:228
@ LYS_SID_FILE_UNPUBLISHED
Definition: tree_schema.h:2367
@ LYS_SID_FILE_PUBLISHED
Definition: tree_schema.h:2368
@ LYSC_PATH_LOG
Definition: tree_schema.h:2220
@ LYSC_PATH_DATA
Definition: tree_schema.h:2221
@ LYSC_PATH_DATA_PATTERN
Definition: tree_schema.h:2222
@ LYS_VERSION_UNDEF
Definition: tree_schema.h:1084
@ LYS_VERSION_1_0
Definition: tree_schema.h:1085
@ LYS_VERSION_1_1
Definition: tree_schema.h:1086
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2242
Compiled YANG extension-stmt.
Definition: tree_schema.h:1177
YANG identity-stmt.
Definition: tree_schema.h:1203
Compiled YANG if-feature-stmt.
Definition: tree_schema.h:321
Compiled YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1748
Compiled YANG data node.
Definition: tree_schema.h:1412
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition: tree_schema.h:1165
Compiled YANG revision statement.
Definition: tree_schema.h:1229
Compiled YANG submodule with only some basic metadata required for generating ietf-yang-library data.
Definition: tree_schema.h:1736
YANG when-stmt.
Definition: tree_schema.h:1189
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition: tree_schema.h:473
YANG extension-stmt.
Definition: tree_schema.h:292
YANG feature-stmt.
Definition: tree_schema.h:305
YANG identity-stmt.
Definition: tree_schema.h:340
YANG import-stmt.
Definition: tree_schema.h:261
YANG include-stmt.
Definition: tree_schema.h:276
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1094
Generic YANG data node.
Definition: tree_schema.h:726
YANG rpc-stmt and action-stmt.
Definition: tree_schema.h:974
YANG input-stmt and output-stmt.
Definition: tree_schema.h:947
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition: tree_schema.h:1057
Extension structure of the lysp_node for YANG container.
Definition: tree_schema.h:742
YANG grouping-stmt.
Definition: tree_schema.h:1029
YANG notification-stmt.
Definition: tree_schema.h:1002
Qualified name (optional prefix followed by an identifier).
Definition: tree_schema.h:329
YANG refine-stmt.
Definition: tree_schema.h:442
Covers restrictions: range, length, pattern, must.
Definition: tree_schema.h:353
YANG revision-stmt.
Definition: tree_schema.h:369
YANG typedef-stmt.
Definition: tree_schema.h:418
YANG type-stmt.
Definition: tree_schema.h:395
Enumeration/Bit value definition.
Definition: tree_schema.h:379
YANG when-stmt.
Definition: tree_schema.h:432
Logger manipulation routines and error definitions.
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:29
Generic structure for a data node.
Definition: tree_data.h:875
Utilities and generic types of libyang.
LY_DATA_TYPE
YANG built-in types.
Definition: utils.h:61
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
Definition: utils.h:93