libyang 5.4.9
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Loading...
Searching...
No Matches
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 "tree.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30struct ly_ctx;
31struct ly_path;
32struct ly_set;
33struct lys_module;
34struct lysc_node;
35struct lyxp_expr;
36
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
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;
271};
272
279 const char *name;
280 const char *dsc;
281 const char *ref;
287};
288
292struct 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
306 const char *name;
311 const char *dsc;
312 const char *ref;
314 uint16_t flags;
316};
317
322 uint8_t *expr;
324};
325
330 const char *str;
331 const struct lysp_module *mod;
333 uint16_t flags;
335};
336
341 const char *name;
343 const char **bases;
344 const char *dsc;
345 const char *ref;
347 uint16_t flags;
348};
349
354#define LYSP_RESTR_PATTERN_ACK 0x06
355#define LYSP_RESTR_PATTERN_NACK 0x15
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
395struct lysp_type {
396 const char *name;
402 struct lyxp_expr *path;
403 const char **bases;
404 struct lysp_type *types;
407 const struct lysp_module *pmod;
412 uint16_t flags;
413};
414
418struct lysp_tpdf {
419 const char *name;
420 const char *units;
422 const char *dsc;
423 const char *ref;
426 uint16_t flags;
427};
428
432struct lysp_when {
433 const char *cond;
434 const char *dsc;
435 const char *ref;
437};
438
443 const char *nodeid;
444 const char *dsc;
445 const char *ref;
448 const char *presence;
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
474 uint8_t mod;
477};
478
480 uint8_t mod;
483 const char *units;
487 uint16_t flags;
488 uint32_t min;
489 uint32_t max;
490};
491
493 uint8_t mod;
496 const char *units;
500};
501
503 uint8_t mod;
506 struct lysp_type *type;
507 const char *units;
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
726struct lysp_node {
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 */
761 struct lysp_when *when;
762 const char *presence;
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 */
789 struct lysp_when *when;
791 const char *units;
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 */
814 struct lysp_when *when;
816 const char *units;
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 */
842 struct lysp_when *when;
843 const char *key;
846 struct lysp_node *child;
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;
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 */
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 */
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 */
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 */
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 */
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 };
1075 struct lysp_when *when;
1078};
1079
1088
1117
1153
1160#define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
1161
1167 char *prefix;
1168 const struct lys_module *mod;
1169};
1170
1178struct lysc_ext {
1179 const char *name;
1180 const char *argname;
1182 uintptr_t plugin_ref;
1183 struct lys_module *module;
1184 uint16_t flags;
1185};
1186
1191 struct lyxp_expr *cond;
1194 const char *dsc;
1195 const char *ref;
1197 uint32_t refcount;
1198 uint16_t flags;
1199};
1200
1205 const char *name;
1206 const char *dsc;
1207 const char *ref;
1208 struct lys_module *module;
1212 uint16_t flags;
1213};
1214
1221#define LYS_IFF_NOT 0x00
1222#define LYS_IFF_AND 0x01
1223#define LYS_IFF_OR 0x02
1224#define LYS_IFF_F 0x03
1234
1237 union {
1238 int64_t min_64;
1239 uint64_t min_u64;
1240 };
1241 union {
1242 int64_t max_64;
1243 uint64_t max_u64;
1244 };
1246 const char *dsc;
1247 const char *ref;
1248 const char *emsg;
1249 const char *eapptag;
1251};
1252
1254 const char *expr;
1255 const char *dsc;
1256 const char *ref;
1257 const char *emsg;
1258 const char *eapptag;
1260 uint32_t inverted : 1;
1261 uint32_t format : 1;
1262 uint32_t refcount : 30;
1263};
1264
1266 struct lyxp_expr *cond;
1268 const char *dsc;
1269 const char *ref;
1270 const char *emsg;
1271 const char *eapptag;
1273};
1274
1276 const char *name;
1278 uintptr_t plugin_ref;
1280 uint32_t refcount;
1282};
1283
1293
1304
1315
1317 const char *name;
1318 const char *dsc;
1319 const char *ref;
1322 union {
1323 int32_t value;
1324 uint32_t position;
1325 };
1326 uint16_t flags;
1328};
1329
1339
1350
1363
1374
1384
1394
1404
1408#define LYS_NODE_HASH_COUNT 4
1409
1414 uint16_t nodetype;
1415 uint16_t flags;
1417 struct lys_module *module;
1419 struct lysc_node *next;
1420 struct lysc_node *prev;
1424 const char *name;
1425 const char *dsc;
1426 const char *ref;
1428 void *priv;
1429};
1430
1432 union {
1433 struct lysc_node node;
1435 struct {
1436 uint16_t nodetype;
1437 uint16_t flags;
1438 uint8_t hash[LYS_NODE_HASH_COUNT];
1439 struct lys_module *module;
1440 struct lysc_node *parent;
1441 struct lysc_node *next;
1442 struct lysc_node *prev;
1443 const char *name;
1444 const char *dsc;
1445 const char *ref;
1446 struct lysc_ext_instance *exts;
1447 void *priv;
1448 };
1449 };
1450
1453};
1454
1456 union {
1457 struct lysc_node node;
1459 struct {
1460 uint16_t nodetype;
1461 uint16_t flags;
1462 uint8_t hash[LYS_NODE_HASH_COUNT];
1463 struct lys_module *module;
1464 struct lysc_node *parent;
1465 struct lysc_node_action *next;
1466 struct lysc_node_action *prev;
1470 const char *name;
1471 const char *dsc;
1472 const char *ref;
1473 struct lysc_ext_instance *exts;
1474 void *priv;
1475 };
1476 };
1477
1478 struct lysc_when **when;
1484};
1485
1487 union {
1488 struct lysc_node node;
1490 struct {
1491 uint16_t nodetype;
1492 uint16_t flags;
1493 uint8_t hash[LYS_NODE_HASH_COUNT];
1494 struct lys_module *module;
1495 struct lysc_node *parent;
1496 struct lysc_node_notif *next;
1497 struct lysc_node_notif *prev;
1501 const char *name;
1502 const char *dsc;
1503 const char *ref;
1504 struct lysc_ext_instance *exts;
1505 void *priv;
1506 };
1507 };
1508
1511 struct lysc_when **when;
1514};
1515
1517 union {
1518 struct lysc_node node;
1520 struct {
1521 uint16_t nodetype;
1522 uint16_t flags;
1523 uint8_t hash[LYS_NODE_HASH_COUNT];
1524 struct lys_module *module;
1525 struct lysc_node *parent;
1526 struct lysc_node *next;
1527 struct lysc_node *prev;
1531 const char *name;
1532 const char *dsc;
1533 const char *ref;
1534 struct lysc_ext_instance *exts;
1535 void *priv;
1536 };
1537 };
1538
1541 struct lysc_when **when;
1544};
1545
1547 union {
1548 struct lysc_node node;
1550 struct {
1551 uint16_t nodetype;
1552 uint16_t flags;
1553 uint8_t hash[LYS_NODE_HASH_COUNT];
1554 struct lys_module *module;
1555 struct lysc_node *parent;
1556 struct lysc_node *next;
1557 struct lysc_node *prev;
1561 const char *name;
1562 const char *dsc;
1563 const char *ref;
1564 struct lysc_ext_instance *exts;
1565 void *priv;
1566 };
1567 };
1568
1571 struct lysc_when **when;
1572};
1573
1575 union {
1576 struct lysc_node node;
1578 struct {
1579 uint16_t nodetype;
1580 uint16_t flags;
1581 uint8_t hash[LYS_NODE_HASH_COUNT];
1582 struct lys_module *module;
1583 struct lysc_node *parent;
1584 struct lysc_node *next;
1585 struct lysc_node *prev;
1589 const char *name;
1590 const char *dsc;
1591 const char *ref;
1592 struct lysc_ext_instance *exts;
1593 void *priv;
1594 };
1595 };
1596
1598 struct lysc_when **when;
1600};
1601
1603 const char *str;
1605};
1606
1608 union {
1609 struct lysc_node node;
1611 struct {
1612 uint16_t nodetype;
1613 uint16_t flags;
1614 uint8_t hash[LYS_NODE_HASH_COUNT];
1615 struct lys_module *module;
1616 struct lysc_node *parent;
1617 struct lysc_node *next;
1618 struct lysc_node *prev;
1622 const char *name;
1623 const char *dsc;
1624 const char *ref;
1625 struct lysc_ext_instance *exts;
1626 void *priv;
1627 };
1628 };
1629
1631 struct lysc_when **when;
1632 struct lysc_type *type;
1634 const char *units;
1636};
1637
1639 union {
1640 struct lysc_node node;
1642 struct {
1643 uint16_t nodetype;
1644 uint16_t flags;
1645 uint8_t hash[LYS_NODE_HASH_COUNT];
1646 struct lys_module *module;
1647 struct lysc_node *parent;
1648 struct lysc_node *next;
1649 struct lysc_node *prev;
1653 const char *name;
1654 const char *dsc;
1655 const char *ref;
1656 struct lysc_ext_instance *exts;
1657 void *priv;
1658 };
1659 };
1660
1662 struct lysc_when **when;
1663 struct lysc_type *type;
1665 const char *units;
1669 uint32_t min;
1670 uint32_t max;
1672};
1673
1675 union {
1676 struct lysc_node node;
1678 struct {
1679 uint16_t nodetype;
1680 uint16_t flags;
1681 uint8_t hash[LYS_NODE_HASH_COUNT];
1682 struct lys_module *module;
1683 struct lysc_node *parent;
1684 struct lysc_node *next;
1685 struct lysc_node *prev;
1689 const char *name;
1690 const char *dsc;
1691 const char *ref;
1692 struct lysc_ext_instance *exts;
1693 void *priv;
1694 };
1695 };
1696
1699 struct lysc_when **when;
1704 uint32_t min;
1705 uint32_t max;
1706};
1707
1709 union {
1710 struct lysc_node node;
1712 struct {
1713 uint16_t nodetype;
1714 uint16_t flags;
1715 uint8_t hash[LYS_NODE_HASH_COUNT];
1716 struct lys_module *module;
1717 struct lysc_node *parent;
1718 struct lysc_node *next;
1719 struct lysc_node *prev;
1723 const char *name;
1724 const char *dsc;
1725 const char *ref;
1726 struct lysc_ext_instance *exts;
1727 void *priv;
1728 };
1729 };
1730
1732 struct lysc_when **when;
1733};
1734
1739 const char *name;
1740 const char *revision;
1741 const char *filepath;
1742};
1743
1760
1767#define lysc_is_userordered(lysc_node) \
1768 ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
1769
1776#define lysc_is_key(lysc_node) \
1777 ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
1778
1785#define lysc_is_np_cont(lysc_node) \
1786 ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
1787
1794#define lysc_is_dup_inst_list(lysc_node) \
1795 ((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
1796 ((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
1797
1805LIBYANG_API_DECL struct lyplg_type *lysc_get_type_plugin(uintptr_t plugin_ref);
1806
1814LIBYANG_API_DECL struct lyplg_ext *lysc_get_ext_plugin(uintptr_t plugin_ref);
1815
1822LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
1823
1827#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
1828
1839LIBYANG_API_DECL const struct lysc_when *lysc_has_when(const struct lysc_node *node);
1840
1848LIBYANG_API_DECL const struct lys_module *lysc_owner_module(const struct lysc_node *node);
1849
1856LIBYANG_API_DECL const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
1857
1864LIBYANG_API_DECL const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
1865
1872LIBYANG_API_DECL const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
1873
1880LIBYANG_API_DECL const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
1881
1888LIBYANG_API_DECL const struct lysp_node *lysp_node_child(const struct lysp_node *node);
1889
1896LIBYANG_API_DECL const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
1897
1904LIBYANG_API_DECL const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
1905
1916LIBYANG_API_DECL const struct lysc_node *lysc_node_child(const struct lysc_node *node);
1917
1925LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node);
1926
1934LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
1935
1943LIBYANG_API_DECL const struct lysc_node *lysc_node_lref_target(const struct lysc_node *node);
1944
1954LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set);
1955
1967LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node,
1968 ly_bool match_ancestors, struct ly_set **set);
1969
1979typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
1980
1997LIBYANG_API_DECL LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
1998
2010LIBYANG_API_DECL LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
2011
2020LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff);
2021
2033LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident);
2034
2043LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod,
2044 uint32_t *idx);
2045
2058LIBYANG_API_DECL const struct lys_module *lys_find_module(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2059 const char *prefix, uint32_t prefix_len, LY_VALUE_FORMAT format, const void *prefix_data);
2060
2068#define LYS_GETNEXT_WITHCHOICE 0x01
2069#define LYS_GETNEXT_NOCHOICE 0x02
2070#define LYS_GETNEXT_WITHCASE 0x04
2071#define LYS_GETNEXT_INTONPCONT 0x08
2073#define LYS_GETNEXT_OUTPUT 0x10
2098LIBYANG_API_DECL const struct lysc_node *lys_getnext(const struct lysc_node *last, const struct lysc_node *parent,
2099 const struct lysc_module *module, uint32_t options);
2100
2116LIBYANG_API_DECL const struct lysc_node *lys_find_child(const struct ly_ctx *ctx, const struct lysc_node *parent,
2117 const struct lys_module *mod, const char *mod_name, uint32_t mod_len, const char *name, uint32_t name_len,
2118 uint32_t options);
2119
2125#define LYS_FIND_XP_SCHEMA 0x08
2126#define LYS_FIND_XP_OUTPUT 0x10
2127#define LYS_FIND_NO_MATCH_ERROR 0x40
2142LIBYANG_API_DECL LY_ERR lys_find_xpath_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2143 uint32_t options, struct ly_set **set);
2144
2157LIBYANG_API_DECL LY_ERR lys_find_expr_atoms(const struct lysc_node *ctx_node, const struct lys_module *cur_mod,
2158 const struct lyxp_expr *expr, const struct lysc_prefix *prefixes, uint32_t options, struct ly_set **set);
2159
2171LIBYANG_API_DECL LY_ERR lys_find_xpath(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *xpath,
2172 uint32_t options, struct ly_set **set);
2173
2182LIBYANG_API_DECL LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
2183
2194LIBYANG_API_DECL LY_ERR lys_find_path_atoms(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *path,
2195 ly_bool output, struct ly_set **set);
2196
2206LIBYANG_API_DECL const struct lysc_node *lys_find_path(const struct ly_ctx *ctx, const struct lysc_node *ctx_node,
2207 const char *path, ly_bool output);
2208
2218
2230LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
2231
2236 struct ly_ctx *ctx;
2237 const char *name;
2238 const char *revision;
2239 const char *ns;
2240 const char *prefix;
2241 const char *filepath;
2242 const char *org;
2243 const char *contact;
2244 const char *dsc;
2245 const char *ref;
2268 uint8_t version : 2;
2269 uint8_t latest_revision : 4;
2271};
2272
2280#define LYS_MOD_LATEST_REV 0x01
2281#define LYS_MOD_LATEST_SEARCHDIRS 0x02
2282#define LYS_MOD_IMPORTED_REV 0x04
2285#define LYS_MOD_LATEST_IMPCLB 0x08
2300LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
2301
2317LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
2318
2325LIBYANG_API_DECL const char *lys_nodetype2str(uint16_t nodetype);
2326
2333LIBYANG_API_DECL const char *lyxp_get_expr(const struct lyxp_expr *path);
2334
2337#ifdef __cplusplus
2338}
2339#endif
2340
2341#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
Extension plugin implementing various aspects of a YANG extension.
YANG extension compiled instance.
YANG extension parsed instance.
Hold type-specific functions for various operations with the data values.
struct lysc_node * child
struct lysp_ext_instance * exts
const char * dsc
struct lysp_node_grp * groupings
struct lysp_node * data
struct lysp_restr * musts
struct lysc_when ** when
const char * ref
struct lysp_tpdf * typedefs
uint16_t flags
const char * ref
const char * cond
struct lysp_when * when
const char * name
const char * ref
struct lysp_ext_instance * exts
struct lysp_node_notif * notifs
struct lysp_tpdf * typedefs
struct lysp_node_action * actions
uint32_t refcount
struct lysc_ext_instance * exts
struct lysc_must * musts
uintptr_t plugin_ref
struct lysc_when ** when
struct lysp_feature * features
uintptr_t plugin_ref
struct lysc_node_action * rpcs
struct lysc_ext_instance * exts
char rev[11]
struct lysp_node * child
const char * name
ly_bool to_compile
struct lysp_restr * musts
struct lysc_node_action_inout output
const char * prefix
struct lysp_restr * musts
const char * ref
const char * dsc
struct lysc_range * range
struct lysp_include * includes
struct lysc_range * range
struct lysp_node_grp * groupings
struct lysp_ext_instance * exts
const char * ref
const char * units
struct lysc_when ** when
struct lysc_when ** when
struct lysp_revision * revs
struct lysc_node * child
const char * name
struct lysp_qname * dflts
uint16_t nodetype
struct lys_module ** augmented_by
uint8_t version
LY_DATA_TYPE basetype
const char * name
struct lysp_node_notif * notifs
struct lysp_restr * range
struct lysp_qname * dflts
struct lysc_ext_instance * exts
const char * ref
LY_DATA_TYPE basetype
struct lysp_deviate * next
struct lysp_qname arg
struct lysc_node_action * actions
LY_DATA_TYPE basetype
struct lysp_node * child
struct lysp_deviate * next
uintptr_t plugin_ref
const char * units
struct lysp_import * imports
struct lyxp_expr * path
struct lysp_ext_instance * exts
struct lys_module ** deviated_by
struct lysp_qname dflt
uint8_t require_instance
struct lysc_when ** when
const char * units
struct lysp_when * when
const char * eapptag
struct lysp_ext_instance * exts
struct lysp_type type
const char * units
struct lysp_node_notif * notifs
LY_DATA_TYPE basetype
LY_DATA_TYPE basetype
struct lysc_node_notif * notifs
struct lyxp_expr * cond
uint8_t hash[4]
uint32_t refcount
const char * name
const char * str
struct lysp_qname * uniques
const char * ref
const char * dsc
const char * prefix
struct lysc_node_notif * notifs
struct lysp_node_notif * notifs
uint16_t nodetype
struct lysc_ext_instance * exts
const char * emsg
uint16_t flags
struct lysc_module * compiled
const char * contact
uint16_t flags
struct lysp_when * when
struct lysc_must * musts
const char * presence
const char * name
const char * nodeid
struct lysp_when * when
struct lysp_tpdf * typedefs
const char * revision
uint8_t is_submod
struct lysc_type * type
const char * name
const char * dsc
struct lysp_node * next
LY_DATA_TYPE basetype
struct lysp_restr * patterns
struct lysp_ext_instance * exts
struct lysp_tpdf * typedefs
struct lys_module *struct lysc_ident ** derived
struct lysp_type type
struct lysp_node * child
struct lysc_ident * identities
struct lysc_ext_instance * exts
struct lysp_qname * iffeatures
const char * ref
const char * name
const char * name
LY_DATA_TYPE basetype
const char * name
struct lysp_node_action * actions
struct lysp_ext_instance * exts
const char * expr
struct lysp_node_augment * augments
uint32_t refcount
struct lysp_node * parent
const char * dsc
struct lysp_ext_instance * exts
const char * emsg
struct lysp_node_action * rpcs
struct lysp_node_action * actions
struct lysp_node_grp * groupings
struct lysp_qname * iffeatures
struct lysp_node_grp * groupings
uint16_t flags
struct lysc_ext * extensions
uint16_t flags
struct lysc_ext_instance * exts
struct lysp_node * data
struct lysp_feature ** depfeatures
struct lysc_type_bitenum_item * bits
struct lysp_ext * extensions
const char * presence
uintptr_t plugin_ref
struct lysp_ext_instance * exts
uint8_t latest_revision
const char * name
uint32_t refcount
uintptr_t plugin_ref
const char * dsc
uintptr_t plugin_ref
uintptr_t plugin_ref
const char * dsc
struct lysp_type_enum * bits
struct lysc_pattern ** patterns
struct lysp_node_action_inout output
struct lysp_ident * identities
struct lysp_ext_instance * exts
uint8_t * expr
struct lysp_type * types
const char * ref
struct lysc_node * child
const char * argname
struct lysp_ext_instance * exts
struct lysp_qname dflt
struct lysp_node * child
struct lysp_deviation * deviations
struct lys_module * mod
const char * org
struct lysp_qname dflt
struct lysp_node * child
const char * ref
const char * ref
uintptr_t plugin_ref
struct lysc_iffeature * iffeatures_c
const struct lysp_module * pmod
const char * dsc
struct lysp_qname * uniques
struct lysp_ext_instance * exts
struct lysp_node_augment * augments
const char * contact
ly_bool implemented
const char * key
const char * name
struct lys_module * mod
struct lysc_value dflt
uint16_t flags
struct lysc_node_case * cases
const char * ref
uint16_t flags
uint16_t flags
struct lysp_restr * musts
struct lysp_ext_instance * exts
struct lysc_value * dflts
const char * filepath
const char * ref
const char * filepath
struct lysc_node_notif * notifs
uint32_t max
const char * dsc
struct lysp_include * includes
struct lysc_must * musts
uint32_t min
struct lysp_deviate * deviates
struct lysc_ext_instance * exts
ly_bool injected
const char * units
struct lysp_qname dflt
const char * name
void * priv
const char * name
struct lysc_node_action * actions
const char * name
struct lysp_tpdf * typedefs
struct lysp_qname * uniques
struct lysp_when * when
struct lysc_range * length
const char * name
struct lysp_restr * length
struct lysc_when ** when
const char * eapptag
struct lysp_ext_instance * exts
struct lysc_type * type
struct lysp_restr * musts
struct lysp_restr * musts
struct lysp_ident * identities
const char * units
struct lyxp_expr * path
struct lysp_qname * dflts
struct lysc_node * next
const char * dsc
struct lysc_ext_instance * exts
struct lysp_restr * musts
struct lysp_node * child
struct lysp_qname * iffeatures
uint8_t latest_revision
uintptr_t plugin_ref
struct lys_module *struct lysc_node * parent
struct lysp_ext_instance * exts
struct lysc_ext_instance * exts
const char * dsc
struct lysp_revision * revs
struct lysc_type * compiled
struct lysc_node * child
uint16_t flags
const char * revision
struct lysc_ext_instance * exts
struct lysp_type * type
struct lysc_node_leaf *** uniques
struct lysp_qname * iffeatures
struct lysp_when * when
const char * name
struct lysp_submodule * submodule
struct lysp_ext_instance * exts
const char * name
struct lysp_feature * features
struct lysp_qname * dflts
struct lysp_restr * musts
const char * ref
struct lysp_node_action * rpcs
struct lysp_ext_instance * exts
const char * name
const char ** bases
LY_DATA_TYPE basetype
const char * dsc
const char * name
struct lys_module * mod
struct lysc_node_action_inout input
struct lysp_when * when
const char * dsc
struct lysp_node_action * actions
struct lysp_deviation * deviations
char date[11]
uint32_t format
struct lysc_must * musts
uint32_t refcount
const char * ref
struct lysc_prefix * prefixes
struct lysc_ext_instance * exts
const char * dsc
const char * ref
struct lysc_type_bitenum_item * enums
const char * dsc
struct lysc_submodule * submodules
struct lysc_must * musts
struct lysp_node * child
const char * dsc
const char * filepath
struct lysp_node_action_inout input
struct lysp_tpdf * typedefs
struct lysc_when ** when
struct lysp_when * when
const char * ns
const char * dsc
const char * ref
struct lysp_node_grp * groupings
struct lysc_range * length
const char * name
struct lysc_prefix * prefixes
struct lysp_tpdf * typedefs
struct lysc_when ** when
const char ** features
struct lysc_node * child
struct lysp_node_augment * augments
uint32_t refcount
uint32_t refcount
struct lysp_tpdf * typedefs
struct lysc_ext_instance * exts
struct lysp_type_enum * enums
const char * name
struct lysc_type * realtype
const char * eapptag
struct lysc_ext_instance * exts
struct lysp_node_grp * groupings
struct lysp_deviate * next
struct lysc_node * prev
struct lysp_type type
const char * ref
const char * dsc
uint32_t refcount
const char * org
struct lysc_ext_instance * exts
const char * name
const char * ref
struct lysc_node * data
struct lys_module *uint16_t flags
const char * dsc
const char * emsg
struct lysp_module * parsed
uint32_t refcount
struct lysc_must * musts
struct lysc_ext_instance * exts
struct lyxp_expr * cond
uintptr_t plugin_ref
const char * str
const char * prefix
struct lysp_node_notif * notifs
struct lysc_ext_instance * exts
const char * eapptag
uint8_t parsing
struct lysp_qname * iffeatures
const char * ref
struct lysc_node_case * dflt
const char * units
struct lysc_ext_instance * exts
struct lysp_when * when
struct lysc_type ** types
uint16_t flags
const char * argname
const char ** bases
const char * dsc
struct lysc_ext_instance * exts
struct lysc_ext_instance * exts
struct ly_ctx * ctx
struct lysp_ext * extensions
struct lysp_node_notif * notifs
uint16_t flags
uint32_t inverted
struct lysc_node * context
LY_DATA_TYPE basetype
struct lysp_ext_instance * exts
struct lysc_ext_instance * exts
struct lysc_ext_instance * exts
const char * units
char rev[11]
uint8_t fraction_digits
const char * ref
struct lysp_restr * musts
struct lysc_must * musts
struct lys_module *const char * name
struct lysc_when ** when
struct lysp_import * imports
struct lysp_ext_instance * exts
const struct lysp_module * mod
uint8_t version
LY_DATA_TYPE basetype
struct lysp_restr * musts
struct lysc_ident ** bases
const char * emsg
struct lysp_feature ** features
const char * dsc
const char * nodeid
struct lysp_ext_instance * exts
struct lysc_range::lysc_range_part * parts
uint16_t flags
struct lysc_prefix * prefixes
struct lysp_node_grp * groupings
struct lysp_deviate * next
struct lysp_node * child
const struct lys_module * mod
struct lysp_node_grp * groupings
struct lysc_prefix * prefixes
struct lysp_refine * refines
uint8_t fraction_digits
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 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 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_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.
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.
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
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 struct lyplg_type * lysc_get_type_plugin(uintptr_t plugin_ref)
Get a type plugin.
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 * 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 struct lyplg_ext * lysc_get_ext_plugin(uintptr_t plugin_ref)
Get an extension plugin.
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 const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
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).
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 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 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).
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 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 * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
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_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 const struct lysc_node * lysc_node_child(const struct lysc_node *node)
Get the children linked list of the given (compiled) schema node.
LYSC_PATH_TYPE
Types of the different schema paths.
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 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,...
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.
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 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 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 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 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.
LYS_VERSION
supported YANG schema version values
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 struct lysc_when ** lysc_node_when(const struct lysc_node *node)
Get the when 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.
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
@ LYSC_PATH_LOG
@ LYSC_PATH_DATA
@ LYSC_PATH_DATA_PATTERN
@ LYS_VERSION_UNDEF
@ LYS_VERSION_1_0
@ LYS_VERSION_1_1
Available YANG schema tree structures representing YANG module.
Compiled YANG extension-stmt.
YANG identity-stmt.
Compiled YANG if-feature-stmt.
Compiled YANG schema tree structure representing YANG module.
Compiled YANG data node.
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Compiled YANG revision statement.
Compiled YANG submodule with only some basic metadata required for generating ietf-yang-library data.
YANG when-stmt.
Generic deviate structure to get type and cast to lysp_deviate_* structure.
YANG extension-stmt.
YANG feature-stmt.
YANG identity-stmt.
YANG import-stmt.
YANG include-stmt.
Printable YANG schema tree structure representing YANG module.
Generic YANG data node.
YANG rpc-stmt and action-stmt.
YANG input-stmt and output-stmt.
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Extension structure of the lysp_node for YANG container.
YANG grouping-stmt.
YANG notification-stmt.
Qualified name (optional prefix followed by an identifier).
YANG refine-stmt.
Covers restrictions: range, length, pattern, must.
YANG revision-stmt.
YANG typedef-stmt.
YANG type-stmt.
Enumeration/Bit value definition.
YANG when-stmt.
LY_DATA_TYPE
YANG built-in types.
Definition tree.h:202
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
Definition tree.h:234
Logger manipulation routines and error definitions.
uint8_t ly_bool
Type to indicate boolean value.
Definition log.h:36
libyang generic macros and functions to work with YANG schema or data trees.