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