libyang 1.0.184
YANG data modeling language library
Loading...
Searching...
No Matches
tree_schema.h
Go to the documentation of this file.
1
14
15#ifndef LY_TREE_SCHEMA_H_
16#define LY_TREE_SCHEMA_H_
17
18#include <limits.h>
19#include <stddef.h>
20#include <stdint.h>
21#include <stdio.h>
22#include <sys/types.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
40#define LY_TREE_FOR(START, ELEM) \
41 for ((ELEM) = (START); \
42 (ELEM); \
43 (ELEM) = (ELEM)->next)
44
58#define LY_TREE_FOR_SAFE(START, NEXT, ELEM) \
59 for ((ELEM) = (START); \
60 (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
61 (ELEM) = (NEXT))
62
90#define LY_TREE_DFS_BEGIN(START, NEXT, ELEM) \
91 for ((ELEM) = (NEXT) = (START); \
92 (ELEM); \
93 (ELEM) = (NEXT))
94
113
114#ifdef __cplusplus
115#define TYPES_COMPATIBLE(type1, type2) typeid(*(type1)) == typeid(type2)
116#elif defined(__GNUC__) || defined(__clang__)
117#define TYPES_COMPATIBLE(type1, type2) __builtin_types_compatible_p(__typeof__(*(type1)), type2)
118#else
119#define TYPES_COMPATIBLE(type1, type2) _Generic(*(type1), type2: 1, default: 0)
120#endif
121
122#define LY_TREE_DFS_END(START, NEXT, ELEM) \
123 /* select element for the next run - children first */ \
124 if (TYPES_COMPATIBLE(ELEM, struct lyd_node)) { \
125 /* child exception for leafs, leaflists and anyxml without children */\
126 if (((struct lyd_node *)(ELEM))->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)) { \
127 (NEXT) = NULL; \
128 } else { \
129 (NEXT) = (ELEM)->child; \
130 } \
131 } else if (TYPES_COMPATIBLE(ELEM, struct lys_node)) { \
132 /* child exception for leafs, leaflists and anyxml without children */\
133 if (((struct lys_node *)(ELEM))->nodetype & (LYS_LEAF | LYS_LEAFLIST | LYS_ANYDATA)) { \
134 (NEXT) = NULL; \
135 } else { \
136 (NEXT) = (ELEM)->child; \
137 } \
138 } else { \
139 (NEXT) = (ELEM)->child; \
140 } \
141 \
142 if (!(NEXT)) { \
143 /* no children */ \
144 if ((ELEM) == (START)) { \
145 /* we are done, (START) has no children */ \
146 break; \
147 } \
148 /* try siblings */ \
149 (NEXT) = (ELEM)->next; \
150 } \
151 while (!(NEXT)) { \
152 /* parent is already processed, go to its sibling */ \
153 if (TYPES_COMPATIBLE(ELEM, struct lys_node) \
154 && (((struct lys_node *)(ELEM)->parent)->nodetype == LYS_AUGMENT)) { \
155 (ELEM) = (ELEM)->parent->prev; \
156 } else { \
157 (ELEM) = (ELEM)->parent; \
158 } \
159 /* no siblings, go back through parents */ \
160 if (TYPES_COMPATIBLE(ELEM, struct lys_node)) { \
161 /* due to possible augments */ \
162 if (lys_parent((struct lys_node *)(ELEM)) == lys_parent((struct lys_node *)(START))) { \
163 /* we are done, no next element to process */ \
164 break; \
165 } \
166 } else if ((ELEM)->parent == (START)->parent) { \
167 /* we are done, no next element to process */ \
168 break; \
169 } \
170 (NEXT) = (ELEM)->next; \
171 }
172
179
180#define LY_ARRAY_MAX(var) (sizeof(var) == 8 ? ULLONG_MAX : ((1ULL << (sizeof(var) * 8)) - 1))
181
182#define LY_REV_SIZE 11
183
192
204
211#define LYS_OUTOPT_TREE_RFC 0x01
212#define LYS_OUTOPT_TREE_GROUPING 0x02
213#define LYS_OUTOPT_TREE_USES 0x04
214#define LYS_OUTOPT_TREE_NO_LEAFREF 0x08
215
219
220/* shortcuts for common in and out formats */
221#define LYS_YANG 1
222#define LYS_YIN 2
223
229typedef enum lys_nodetype {
230 LYS_UNKNOWN = 0x0000,
231 LYS_CONTAINER = 0x0001,
232 LYS_CHOICE = 0x0002,
233 LYS_LEAF = 0x0004,
234 LYS_LEAFLIST = 0x0008,
235 LYS_LIST = 0x0010,
236 LYS_ANYXML = 0x0020,
237 LYS_CASE = 0x0040,
238 LYS_NOTIF = 0x0080,
239 LYS_RPC = 0x0100,
240 LYS_INPUT = 0x0200,
241 LYS_OUTPUT = 0x0400,
242 LYS_GROUPING = 0x0800,
243 LYS_USES = 0x1000,
244 LYS_AUGMENT = 0x2000,
245 LYS_ACTION = 0x4000,
246 LYS_ANYDATA = 0x8020,
247 LYS_EXT = 0x10000
249
250/* all nodes sharing the node namespace except RPCs and notifications */
251#define LYS_NO_RPC_NOTIF_NODE 0x807F
252
253#define LYS_ANY 0xFFFF
254
260
368
374typedef enum {
380
395
404#define LYEXT_OPT_INHERIT 0x01
410#define LYEXT_OPT_YANG 0x02
411#define LYEXT_OPT_CONTENT 0x04
413#define LYEXT_OPT_VALID 0x08
414#define LYEXT_OPT_VALID_SUBTREE 0x10
418#define LYEXT_OPT_PLUGIN1 0x0100
419#define LYEXT_OPT_PLUGIN2 0x0200
420#define LYEXT_OPT_PLUGIN3 0x0400
421#define LYEXT_OPT_PLUGIN4 0x0800
422#define LYEXT_OPT_PLUGIN5 0x1000
423#define LYEXT_OPT_PLUGIN6 0x2000
424#define LYEXT_OPT_PLUGIN7 0x4000
425#define LYEXT_OPT_PLUGIN8 0x8000
429
440
444struct lys_ext {
445 const char *name;
446 const char *dsc;
447 const char *ref;
448 uint16_t flags;
449 uint8_t ext_size;
450 uint8_t padding[5];
452 const char *argument;
455};
456
465 struct lys_ext *def;
468 void *parent;
470 const char *arg_value;
471 uint16_t flags;
472 uint8_t ext_size;
480 uint8_t insubstmt;
483 uint8_t parent_type;
484 uint8_t ext_type;
485 uint8_t padding;
487 void *priv;
490};
491
499 struct lys_ext *def;
500 void *parent;
502 const char *arg_value;
503 uint16_t flags;
504 uint8_t ext_size;
512 uint8_t insubstmt;
515 uint8_t parent_type;
516 uint8_t ext_type;
517 uint8_t padding;
519 void *priv;
522
523 /* to this point the structure is compatible with the generic ::lys_ext_instance structure */
525 char content[1];
526};
527
574const void *lys_ext_instance_substmt(const struct lys_ext_instance *ext);
575
584int lys_ext_instance_presence(struct lys_ext *def, struct lys_ext_instance **ext, uint8_t ext_size);
585
597
603const char * const *ly_get_loaded_plugins(void);
604
613
614/* don't need the contents of these types, just forward-declare them for the next 2 functions. */
615struct lyext_plugin_list;
616struct lytype_plugin_list;
617
626int ly_register_exts(struct lyext_plugin_list *plugin, const char *log_name);
627
633int ly_register_types(struct lytype_plugin_list *plugin, const char *log_name);
634
645
649
658
667 struct ly_ctx *ctx;
668 const char *name;
669 const char *prefix;
670 const char *dsc;
671 const char *ref;
672 const char *org;
673 const char *contact;
674 const char *filepath;
675 uint8_t type:1;
676 uint8_t version:3;
680 uint8_t deviated:2;
684 uint8_t disabled:1;
685 uint8_t implemented:1;
686 uint8_t latest_revision:1;
688 uint8_t padding1:7;
689 uint8_t padding2[2];
690
691 /* array sizes */
692 uint8_t rev_size;
693 uint8_t imp_size;
694 uint8_t inc_size;
695
696 uint16_t ident_size;
697 uint16_t tpdf_size;
698
700 uint8_t augment_size;
703 uint8_t ext_size;
704
707 struct lys_import *imp;
708 struct lys_include *inc;
709 struct lys_tpdf *tpdf;
710 struct lys_ident *ident;
716
717 /* specific module's items in comparison to submodules */
718 struct lys_node *data;
719 const char *ns;
720};
721
730 struct ly_ctx *ctx;
731 const char *name;
732 const char *prefix;
733 const char *dsc;
734 const char *ref;
735 const char *org;
736 const char *contact;
737 const char *filepath;
738 uint8_t type:1;
739 uint8_t version:3;
743 uint8_t deviated:2;
747 uint8_t disabled:1;
748 uint8_t implemented:1;
749 uint8_t padding[3];
750
751 /* array sizes */
752 uint8_t rev_size;
753 uint8_t imp_size;
754 uint8_t inc_size;
755
756 uint16_t ident_size;
757 uint16_t tpdf_size;
758
760 uint8_t augment_size;
763 uint8_t ext_size;
764
767 struct lys_import *imp;
768 struct lys_include *inc;
769 struct lys_tpdf *tpdf;
770 struct lys_ident *ident;
776
777 /* specific submodule's items in comparison to modules */
779};
780
807#define LY_DATA_TYPE_COUNT 20
808
816
821 const char *name;
822 const char *dsc;
823 const char *ref;
824 uint16_t flags;
826 uint8_t ext_size;
828
829 /* 32b padding for compatibility with ::lys_node */
830 uint32_t pos;
831
834};
835
841 unsigned int count;
842};
843
848 struct lys_restr *range;
850 uint8_t dig;
854 uint64_t div;
855};
856
861 const char *name;
862 const char *dsc;
863 const char *ref;
864 uint16_t flags;
866 uint8_t ext_size;
868
869 /* 32b padding for compatibility with ::lys_node */
870 int32_t value;
871
874};
875
881 unsigned int count;
882};
883
888 struct lys_ident **ref;
889 unsigned int count;
890};
891
896 int8_t req;
901};
902
907 struct lys_restr *range;
909};
910
915 const char *path;
918 int8_t req;
922};
923
936 unsigned int pat_count;
937#ifdef LY_ENABLED_CACHE
938 void **patterns_pcre;
941#endif
942};
943
948 struct lys_type *types;
949 unsigned int count;
952};
953
969
973struct lys_type {
975 uint8_t value_flags;
976 uint8_t ext_size;
978 struct lys_tpdf *der;
980 struct lys_tpdf *parent;
983 /*
984 * here is an overview of the info union:
985 * LY_TYPE_BINARY (binary)
986 * struct lys_restr *binary.length; length restriction (optional), see
987 * [RFC 6020 sec. 9.4.4](http://tools.ietf.org/html/rfc6020#section-9.4.4)
988 * -----------------------------------------------------------------------------------------------------------------
989 * LY_TYPE_BITS (bits)
990 * struct lys_type_bit *bits.bit; array of bit definitions
991 * const char *bits.bit[i].name; bit's name (mandatory)
992 * const char *bits.bit[i].dsc; bit's description (optional)
993 * const char *bits.bit[i].ref; bit's reference (optional)
994 * uint8_t bits.bit[i].flags; bit's flags, whether the position was auto-assigned
995 * and the status(one of LYS_NODE_STATUS_* values or 0 for default)
996 * uint8_t bits.bit[i].iffeature_size; number of elements in the bit's #iffeature array
997 * uint8_t bits.bit[i].ext_size; number of elements in the bit's #ext array
998 * uint32_t bits.bit[i].pos; bit's position (mandatory)
999 * struct lys_iffeature *bits.bit[i].iffeature; array of bit's if-feature expressions
1000 * struct lys_ext_instance **bits.bit[i].ext; array of pointers to the bit's extension instances (optional)
1001 * unsigned int bits.count; number of bit definitions in the bit array
1002 * -----------------------------------------------------------------------------------------------------------------
1003 * LY_TYPE_DEC64 (dec64)
1004 * struct lys_restr *dec64.range; range restriction (optional), see
1005 * [RFC 6020 sec. 9.2.4](http://tools.ietf.org/html/rfc6020#section-9.2.4)
1006 * struct lys_ext_instance **dec64.ext; array of pointers to the bit's extension instances (optional)
1007 * uint8_t dec64.ext_size; number of elements in the bit's #ext array
1008 * uint8_t dec64.dig; fraction-digits restriction (mandatory)
1009 * uint64_t dec64.div; auxiliary value for moving decimal point (dividing the stored value to get
1010 * the real value) (mandatory, corresponds to the fraction-digits)
1011 * -----------------------------------------------------------------------------------------------------------------
1012 * LY_TYPE_ENUM (enums)
1013 * struct lys_type_enum *enums.enm; array of enum definitions
1014 * const char *enums.enm[i].name; enum's name (mandatory)
1015 * const char *enums.enm[i].dsc; enum's description (optional)
1016 * const char *enums.enm[i].ref; enum's reference (optional)
1017 * uint8_t enums.enm[i].flags; enum's flags, whether the value was auto-assigned
1018 * and the status(one of LYS_NODE_STATUS_* values or 0 for default)
1019 * uint8_t enums.enum[i].iffeature_size; number of elements in the bit's #iffeature array
1020 * uint8_t enums.enum[i].ext_size; number of elements in the bit's #ext array
1021 * int32_t enums.enm[i].value; enum's value (mandatory)
1022 * struct lys_iffeature *enums.enum[i].iffeature; array of bit's if-feature expressions
1023 * struct lys_ext_instance **enums.enum[i].ext; array of pointers to the bit's extension instances (optional)
1024 * unsigned int enums.count; number of enum definitions in the enm array
1025 * -----------------------------------------------------------------------------------------------------------------
1026 * LY_TYPE_IDENT (ident)
1027 * struct lys_ident **ident.ref; array of pointers (reference) to the identity definition (mandatory)
1028 * unsigned int ident.count; number of base identity references
1029 * -----------------------------------------------------------------------------------------------------------------
1030 * LY_TYPE_INST (inst)
1031 * int8_t inst.req; require-identifier restriction, see
1032 * [RFC 6020 sec. 9.13.2](http://tools.ietf.org/html/rfc6020#section-9.13.2):
1033 * - -1 = false,
1034 * - 0 not defined,
1035 * - 1 = true
1036 * -----------------------------------------------------------------------------------------------------------------
1037 * LY_TYPE_*INT* (num)
1038 * struct lys_restr *num.range; range restriction (optional), see
1039 * [RFC 6020 sec. 9.2.4](http://tools.ietf.org/html/rfc6020#section-9.2.4)
1040 * -----------------------------------------------------------------------------------------------------------------
1041 * LY_TYPE_LEAFREF (lref)
1042 * const char *lref.path; path to the referred leaf or leaf-list node (mandatory), see
1043 * [RFC 6020 sec. 9.9.2](http://tools.ietf.org/html/rfc6020#section-9.9.2)
1044 * struct lys_node_leaf *lref.target; target schema node according to path
1045 * int8_t lref.req; require-instance restriction: -1 = false; 0 not defined (true); 1 = true
1046 * -----------------------------------------------------------------------------------------------------------------
1047 * LY_TYPE_STRING (str)
1048 * struct lys_restr *str.length; length restriction (optional), see
1049 * [RFC 6020 sec. 9.4.4](http://tools.ietf.org/html/rfc6020#section-9.4.4)
1050 * struct lys_restr *str.patterns; array of pattern restrictions (optional), see
1051 * [RFC 6020 sec. 9.4.6](http://tools.ietf.org/html/rfc6020#section-9.4.6)
1052 * unsigned int str.pat_count; number of pattern definitions in the patterns array
1053 * -----------------------------------------------------------------------------------------------------------------
1054 * LY_TYPE_UNION (uni)
1055 * struct lys_type *uni.types; array of union's subtypes
1056 * unsigned int uni.count; number of subtype definitions in types array
1057 * int uni.has_ptr_type; types recursively include an instance-identifier or leafref (union must always
1058 * be resolved after it is parsed)
1059 */
1060};
1061
1062#define LYS_IFF_NOT 0x00
1063#define LYS_IFF_AND 0x01
1064#define LYS_IFF_OR 0x02
1065#define LYS_IFF_F 0x03
1066
1071 uint8_t *expr;
1072 uint8_t ext_size;
1075};
1076
1135#define LYS_CONFIG_W 0x01
1136#define LYS_CONFIG_R 0x02
1137#define LYS_CONFIG_SET 0x04
1138#define LYS_CONFIG_MASK 0x03
1139#define LYS_STATUS_CURR 0x08
1140#define LYS_STATUS_DEPRC 0x10
1141#define LYS_STATUS_OBSLT 0x20
1142#define LYS_STATUS_MASK 0x38
1143#define LYS_RFN_MAXSET 0x08
1144#define LYS_RFN_MINSET 0x10
1145#define LYS_MAND_TRUE 0x40
1147#define LYS_MAND_FALSE 0x80
1149#define LYS_INCL_STATUS 0x80
1151#define LYS_MAND_MASK 0xc0
1152#define LYS_USERORDERED 0x100
1154#define LYS_FENABLED 0x100
1155#define LYS_UNIQUE 0x100
1156#define LYS_AUTOASSIGNED 0x01
1158#define LYS_USESGRP 0x01
1159#define LYS_IMPLICIT 0x40
1160#define LYS_XPCONF_DEP 0x200
1163#define LYS_XPSTATE_DEP 0x400
1166#define LYS_LEAFREF_DEP 0x800
1169#define LYS_DFLTJSON 0x1000
1173#define LYS_NOTAPPLIED 0x01
1174#define LYS_YINELEM 0x01
1175#define LYS_VALID_EXT 0x2000
1176#define LYS_VALID_EXT_SUBTREE 0x4000
1178
1182
1183#ifdef LY_ENABLED_CACHE
1184
1188#define LYS_NODE_HASH_COUNT 4
1189
1190#endif
1191
1209struct lys_node {
1210 const char *name;
1211 const char *dsc;
1212 const char *ref;
1213 uint16_t flags;
1214 uint8_t ext_size;
1216
1217 uint8_t padding[4];
1222
1226
1229 struct lys_node *child;
1233 struct lys_node *next;
1234 struct lys_node *prev;
1238
1239 void *priv;
1240
1241#ifdef LY_ENABLED_CACHE
1242 uint8_t hash[LYS_NODE_HASH_COUNT];
1243#endif
1244};
1245
1256 const char *name;
1257 const char *dsc;
1258 const char *ref;
1259 uint16_t flags;
1260 uint8_t ext_size;
1262
1263 /* non compatible 32b with ::lys_node */
1264 uint8_t padding[1];
1265 uint8_t must_size;
1266 uint16_t tpdf_size;
1267
1271
1274 struct lys_node *child;
1275 struct lys_node *next;
1276 struct lys_node *prev;
1280
1281 void *priv;
1282
1283#ifdef LY_ENABLED_CACHE
1284 uint8_t hash[LYS_NODE_HASH_COUNT];
1285#endif
1286
1287 /* specific container's data */
1288 struct lys_when *when;
1289 struct lys_restr *must;
1290 struct lys_tpdf *tpdf;
1291 const char *presence;
1292};
1293
1304 const char *name;
1305 const char *dsc;
1306 const char *ref;
1307 uint16_t flags;
1308 uint8_t ext_size;
1310
1311 /* non compatible 32b with ::lys_node */
1312 uint8_t padding[4];
1313
1317
1320 struct lys_node *child;
1321 struct lys_node *next;
1322 struct lys_node *prev;
1326
1327 void *priv;
1328
1329 /* specific choice's data */
1330 struct lys_when *when;
1331 struct lys_node *dflt;
1332};
1333
1346 const char *name;
1347 const char *dsc;
1348 const char *ref;
1349 uint16_t flags;
1350 uint8_t ext_size;
1352
1353 /* non compatible 32b with ::lys_node */
1354 uint8_t padding[3];
1355 uint8_t must_size;
1356
1360
1363 void *child;
1364 struct lys_node *next;
1365 struct lys_node *prev;
1369
1370 void *priv;
1371
1372#ifdef LY_ENABLED_CACHE
1373 uint8_t hash[LYS_NODE_HASH_COUNT];
1374#endif
1375
1376 /* specific leaf's data */
1377 struct lys_when *when;
1378 struct lys_restr *must;
1380 const char *units;
1381
1382 /* to this point, struct lys_node_leaf is compatible with struct lys_node_leaflist */
1383 const char *dflt;
1384};
1385
1397 const char *name;
1398 const char *dsc;
1399 const char *ref;
1400 uint16_t flags;
1401 uint8_t ext_size;
1403
1404 /* non compatible 32b with ::lys_node */
1405 uint8_t padding[2];
1406 uint8_t dflt_size;
1407 uint8_t must_size;
1408
1412
1418 struct lys_node *next;
1419 struct lys_node *prev;
1423
1424 void *priv;
1425
1426#ifdef LY_ENABLED_CACHE
1427 uint8_t hash[LYS_NODE_HASH_COUNT];
1428#endif
1429
1430 /* specific leaf-list's data */
1431 struct lys_when *when;
1432 struct lys_restr *must;
1434 const char *units;
1435
1436 /* to this point, struct lys_node_leaflist is compatible with struct lys_node_leaf
1437 * on the other hand, the min and max are compatible with struct lys_node_list */
1438 const char **dflt;
1439 uint32_t min;
1440 uint32_t max;
1441};
1442
1453 const char *name;
1454 const char *dsc;
1455 const char *ref;
1456 uint16_t flags;
1457 uint8_t ext_size;
1459
1460 /* non compatible 32b with ::lys_node */
1461 uint8_t must_size;
1462 uint8_t tpdf_size;
1463 uint8_t keys_size;
1464 uint8_t unique_size;
1465
1469
1472 struct lys_node *child;
1473 struct lys_node *next;
1474 struct lys_node *prev;
1478
1479 void *priv;
1480
1481#ifdef LY_ENABLED_CACHE
1482 uint8_t hash[LYS_NODE_HASH_COUNT];
1483#endif
1484
1485 /* specific list's data */
1486 struct lys_when *when;
1487 struct lys_restr *must;
1488 struct lys_tpdf *tpdf;
1491
1492 uint32_t min;
1493 uint32_t max;
1494
1495 const char *keys_str;
1497
1498};
1499
1512 const char *name;
1513 const char *dsc;
1514 const char *ref;
1515 uint16_t flags;
1516 uint8_t ext_size;
1518
1519 /* non compatible 32b with ::lys_node */
1520 uint8_t padding[3];
1521 uint8_t must_size;
1522
1526
1529 struct lys_node *child;
1530 struct lys_node *next;
1531 struct lys_node *prev;
1535
1536 void *priv;
1537
1538#ifdef LY_ENABLED_CACHE
1539 uint8_t hash[LYS_NODE_HASH_COUNT];
1540#endif
1541
1542 /* specific anyxml's data */
1543 struct lys_when *when;
1544 struct lys_restr *must;
1545};
1546
1560 const char *name;
1561 const char *dsc;
1562 const char *ref;
1563 uint16_t flags;
1565 uint8_t ext_size;
1567
1568 /* non compatible 32b with ::lys_node */
1569 uint8_t padding[2];
1570 uint8_t refine_size;
1572
1576
1579 struct lys_node *child;
1580 struct lys_node *next;
1581 struct lys_node *prev;
1585
1586 void *priv;
1587
1588 /* specific uses's data */
1589 struct lys_when *when;
1593};
1594
1607 const char *name;
1608 const char *dsc;
1609 const char *ref;
1610 uint16_t flags;
1611 uint8_t ext_size;
1613
1614 /* non compatible 32b with ::lys_node */
1615 uint16_t unres_count;
1616 uint16_t tpdf_size;
1617
1621
1624 struct lys_node *child;
1625 struct lys_node *next;
1626 struct lys_node *prev;
1630
1631 void *priv;
1632
1633 /* specific grouping's data */
1634 struct lys_tpdf *tpdf;
1635};
1636
1646 const char *name;
1647 const char *dsc;
1648 const char *ref;
1649 uint16_t flags;
1650 uint8_t ext_size;
1652
1653 /* non compatible 32b with ::lys_node */
1654 uint8_t padding[4];
1655
1659
1662 struct lys_node *child;
1663 struct lys_node *next;
1664 struct lys_node *prev;
1668
1669 void *priv;
1670
1671 /* specific case's data */
1672 struct lys_when *when;
1673};
1674
1691 const char *name;
1692 void *fill1[2];
1693 uint16_t flags;
1694 uint8_t ext_size;
1696
1697 /* non compatible 32b with ::lys_node */
1698 uint8_t padding[1];
1699 uint8_t must_size;
1700 uint16_t tpdf_size;
1701
1705
1708 struct lys_node *child;
1709 struct lys_node *next;
1710 struct lys_node *prev;
1714
1715 void *priv;
1716
1717 /* specific inout's data */
1718 struct lys_tpdf *tpdf;
1719 struct lys_restr *must;
1720};
1721
1729 const char *name;
1730 const char *dsc;
1731 const char *ref;
1732 uint16_t flags;
1733 uint8_t ext_size;
1735
1736 /* non compatible 32b with ::lys_node */
1737 uint8_t padding[1];
1738 uint8_t must_size;
1739 uint16_t tpdf_size;
1740
1744
1747 struct lys_node *child;
1748 struct lys_node *next;
1749 struct lys_node *prev;
1753
1754 void *priv;
1755
1756#ifdef LY_ENABLED_CACHE
1757 uint8_t hash[LYS_NODE_HASH_COUNT];
1758#endif
1759
1760 /* specific rpc's data */
1761 struct lys_tpdf *tpdf;
1762 struct lys_restr *must;
1763};
1764
1776 const char *name;
1777 const char *dsc;
1778 const char *ref;
1779 uint16_t flags;
1780 uint8_t ext_size;
1782
1783 /* non compatible 32b with ::lys_node */
1784 uint8_t padding[2];
1785 uint16_t tpdf_size;
1786
1790
1793 struct lys_node *child;
1794 struct lys_node *next;
1795 struct lys_node *prev;
1799
1800 void *priv;
1801
1802#ifdef LY_ENABLED_CACHE
1803 uint8_t hash[LYS_NODE_HASH_COUNT];
1804#endif
1805
1806 /* specific rpc's data */
1807 struct lys_tpdf *tpdf;
1808};
1809
1824 const char *target_name;
1826 const char *dsc;
1827 const char *ref;
1828 uint16_t flags;
1829 uint8_t ext_size;
1831
1832 /* non compatible 32b with ::lys_node */
1833 uint8_t padding[4];
1834
1838
1841 struct lys_node *child;
1846
1847 /* replaces #next and #prev members of ::lys_node */
1848 struct lys_when *when;
1850
1851 /* again compatible members with ::lys_node */
1852 void *priv;
1853};
1854
1859 uint32_t min;
1860 uint32_t max;
1861};
1862
1867 const char *presence;
1870};
1871
1876 const char *target_name;
1877 const char *dsc;
1878 const char *ref;
1879 uint16_t flags;
1880 uint8_t ext_size;
1882
1883 /* 32b padding for compatibility with ::lys_node */
1884 uint16_t target_type;
1887 uint8_t must_size;
1888 uint8_t dflt_size;
1889
1893
1894 struct lys_restr *must;
1895 const char **dflt;
1898
1900};
1901
1902
1912
1918
1919 uint8_t flags;
1920 uint8_t dflt_size;
1921 uint8_t ext_size;
1922
1923 uint8_t min_set;
1924 uint8_t max_set;
1925 uint8_t must_size;
1926 uint8_t unique_size;
1927
1928 uint32_t min;
1929 uint32_t max;
1930
1931 struct lys_restr *must;
1933 struct lys_type *type;
1934 const char *units;
1935 const char **dflt;
1938};
1939
1944 const char *target_name;
1946 const char *dsc;
1947 const char *ref;
1949
1951 uint8_t ext_size;
1954};
1955
1961 const char *prefix;
1963 uint8_t ext_size;
1965 const char *dsc;
1966 const char *ref;
1967};
1968
1975 uint8_t ext_size;
1977 const char *dsc;
1978 const char *ref;
1979};
1980
1986 uint8_t ext_size;
1988 const char *dsc;
1989 const char *ref;
1990};
1991
1995struct lys_tpdf {
1996 const char *name;
1997 const char *dsc;
1998 const char *ref;
1999 uint16_t flags;
2000 uint8_t ext_size;
2003
2004 /* 24b padding for compatibility with ::lys_node */
2005 uint8_t padding[3];
2006
2008 const char *units;
2011
2014 const char *dflt;
2015};
2016
2021 const char **expr;
2022 uint8_t expr_size;
2023 uint8_t trg_type;
2024};
2025
2030 const char *name;
2031 const char *dsc;
2032 const char *ref;
2033 uint16_t flags;
2035 uint8_t ext_size;
2037
2038 /* 32b padding for compatibility with ::lys_node */
2039 uint8_t padding[4];
2040
2045};
2046
2051 const char *expr;
2054 const char *dsc;
2055 const char *ref;
2056 const char *eapptag;
2057 const char *emsg;
2059 uint8_t ext_size;
2060 uint16_t flags;
2061};
2062
2066struct lys_when {
2067 const char *cond;
2068 const char *dsc;
2069 const char *ref;
2071 uint8_t ext_size;
2072 uint16_t flags;
2073};
2074
2081 const char *name;
2082 const char *dsc;
2083 const char *ref;
2084 uint16_t flags;
2085 uint8_t ext_size;
2087
2088 /* 32b padding for compatibility with ::lys_node */
2089 uint8_t padding[3];
2090 uint8_t base_size;
2091
2095
2096 struct lys_ident **base;
2097 struct ly_set *der;
2098};
2099
2109const struct lys_module *lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format);
2110
2122const struct lys_module *lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format);
2123
2132const struct lys_module *lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format);
2133
2149int lys_search_localfile(const char * const *searchpaths, int cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format);
2150
2164const char **lys_features_list(const struct lys_module *module, uint8_t **states);
2165
2176int lys_features_enable(const struct lys_module *module, const char *feature);
2177
2188int lys_features_disable(const struct lys_module *module, const char *feature);
2189
2197int lys_features_enable_force(const struct lys_module *module, const char *feature);
2198
2208int lys_features_disable_force(const struct lys_module *module, const char *feature);
2209
2222int lys_features_state(const struct lys_module *module, const char *feature);
2223
2235const struct lys_node *lys_is_disabled(const struct lys_node *node, int recursive);
2236
2243int lys_iffeature_value(const struct lys_iffeature *iff);
2244
2252const struct lys_node_list *lys_is_key(const struct lys_node_leaf *node, uint8_t *index);
2253
2275const struct lys_node *lys_getnext(const struct lys_node *last, const struct lys_node *parent,
2276 const struct lys_module *module, int options);
2277
2278#define LYS_GETNEXT_WITHCHOICE 0x01
2279#define LYS_GETNEXT_WITHCASE 0x02
2280#define LYS_GETNEXT_WITHGROUPING 0x04
2281#define LYS_GETNEXT_WITHINOUT 0x08
2283#define LYS_GETNEXT_WITHUSES 0x10
2284#define LYS_GETNEXT_INTOUSES 0x20
2286#define LYS_GETNEXT_INTONPCONT 0x40
2287#define LYS_GETNEXT_PARENTUSES 0x80
2289#define LYS_GETNEXT_NOSTATECHECK 0x100
2291
2299const struct lys_type *lys_getnext_union_type(const struct lys_type *last, const struct lys_type *type);
2300
2312struct ly_set *lys_find_path(const struct lys_module *cur_module, const struct lys_node *cur_node, const char *path);
2313
2318 /* XML document roots */
2319 LYXP_NODE_ROOT, /* access to all the data (node value first top-level node) */
2320 LYXP_NODE_ROOT_CONFIG, /* <running> data context, no state data (node value first top-level node) */
2321
2322 /* XML elements */
2323 LYXP_NODE_ELEM, /* XML element (most common) */
2324 LYXP_NODE_TEXT, /* XML text element (extremely specific use, unlikely to be ever needed) */
2325 LYXP_NODE_ATTR, /* XML attribute (in YANG cannot happen, do not use for the context node) */
2326
2327 LYXP_NODE_NONE /* invalid node type, do not use */
2328};
2329
2343struct ly_set *lys_xpath_atomize(const struct lys_node *ctx_node, enum lyxp_node_type ctx_node_type,
2344 const char *expr, int options);
2345
2346#define LYXP_MUST 0x01
2347#define LYXP_WHEN 0x02
2348
2356struct ly_set *lys_node_xpath_atomize(const struct lys_node *node, int options);
2357
2358#define LYXP_RECURSIVE 0x01
2359#define LYXP_NO_LOCAL 0x02
2360
2372char *lys_path(const struct lys_node *node, int options);
2373
2374#define LYS_PATH_FIRST_PREFIX 0x01
2377
2384char *lys_data_path(const struct lys_node *node);
2385
2399char *lys_data_path_pattern(const struct lys_node *node, const char *placeholder);
2400
2411struct lys_node *lys_parent(const struct lys_node *node);
2412
2422struct lys_module *lys_node_module(const struct lys_node *node);
2423
2433struct lys_module *lys_main_module(const struct lys_module *module);
2434
2451
2471int lys_set_implemented(const struct lys_module *module);
2472
2489int lys_set_disabled(const struct lys_module *module);
2490
2505int lys_set_enabled(const struct lys_module *module);
2506
2516void *lys_set_private(const struct lys_node *node, void *priv);
2517
2531int lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2532 int line_length, int options);
2533
2546int lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2547 int line_length, int options);
2548
2561int lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2562 int line_length, int options);
2563
2576int lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node,
2577 int line_length, int options);
2578
2592int lys_print_clb(ssize_t (*writeclb)(void *arg, const void *buf, size_t count), void *arg,
2593 const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options);
2594
2596
2597#ifdef __cplusplus
2598}
2599#endif
2600
2601#endif /* LY_TREE_SCHEMA_H_ */
libyang context handler.
struct lys_module * module
struct lys_ext * def
const char * arg_value
uint16_t flags
uint8_t insubstmt_index
struct lyext_plugin * plugin
uint8_t ext_size
const char * dsc
uint8_t padding[5]
struct lys_ext_instance ** ext
LY_STMT_CARD cardinality
const char * argument
const char * name
struct lyext_substmt * substmt
const char * ref
int lys_ext_instance_presence(struct lys_ext *def, struct lys_ext_instance **ext, uint8_t ext_size)
Get the position of the extension instance in the extensions list.
int ly_register_types(struct lytype_plugin_list *plugin, const char *log_name)
Directly register a YANG type by pointer.
const char *const * ly_get_loaded_plugins(void)
Get list of all the loaded plugins, both extension and user type ones.
void * lys_ext_complex_get_substmt(LY_STMT stmt, struct lys_ext_instance_complex *ext, struct lyext_substmt **info)
get pointer to the place where the specified extension's substatement is supposed to be stored in the...
void ly_load_plugins(void)
Load the available YANG extension and type plugins from the plugin directory (LIBDIR/libyang/).
const void * lys_ext_instance_substmt(const struct lys_ext_instance *ext)
Get address of the substatement structure to which the extension instance refers.
int ly_register_exts(struct lyext_plugin_list *plugin, const char *log_name)
Directly register a YANG extension by pointer.
LY_STMT_CARD
Possible cardinalities of the YANG statements.
LY_STMT
List of YANG statements.
int ly_clean_plugins(void)
Unload all the YANG extension and type plugins.
LYEXT_TYPE
Extension types.
@ LY_STMT_CARD_MAND
@ LY_STMT_CARD_ANY
@ LY_STMT_CARD_OPT
@ LY_STMT_CARD_SOME
@ LY_STMT_REVISION
@ LY_STMT_MUST
@ LY_STMT_ARGUMENT
@ LY_STMT_ENUM
@ LY_STMT_LEAF
@ LY_STMT_VERSION
@ LY_STMT_REVISIONDATE
@ LY_STMT_ERRTAG
@ LY_STMT_REFERENCE
@ LY_STMT_UNIQUE
@ LY_STMT_DEVIATION
@ LY_STMT_IMPORT
@ LY_STMT_CONTACT
@ LY_STMT_LENGTH
@ LY_STMT_NODE
@ LY_STMT_DIGITS
@ LY_STMT_ANYDATA
@ LY_STMT_ORDEREDBY
@ LY_STMT_CONTAINER
@ LY_STMT_PATTERN
@ LY_STMT_POSITION
@ LY_STMT_PREFIX
@ LY_STMT_WHEN
@ LY_STMT_ORGANIZATION
@ LY_STMT_AUGMENT
@ LY_STMT_SUBMODULE
@ LY_STMT_ANYXML
@ LY_STMT_ERRMSG
@ LY_STMT_NAMESPACE
@ LY_STMT_LEAFLIST
@ LY_STMT_MANDATORY
@ LY_STMT_PATH
@ LY_STMT_UNKNOWN
@ LY_STMT_MIN
@ LY_STMT_EXTENSION
@ LY_STMT_CASE
@ LY_STMT_MODULE
@ LY_STMT_REQINSTANCE
@ LY_STMT_OUTPUT
@ LY_STMT_REFINE
@ LY_STMT_IDENTITY
@ LY_STMT_TYPEDEF
@ LY_STMT_BELONGSTO
@ LY_STMT_DESCRIPTION
@ LY_STMT_CONFIG
@ LY_STMT_RANGE
@ LY_STMT_INCLUDE
@ LY_STMT_IFFEATURE
@ LY_STMT_BIT
@ LY_STMT_ACTION
@ LY_STMT_MODIFIER
@ LY_STMT_TYPE
@ LY_STMT_BASE
@ LY_STMT_FEATURE
@ LY_STMT_RPC
@ LY_STMT_DEVIATE
@ LY_STMT_UNITS
@ LY_STMT_GROUPING
@ LY_STMT_KEY
@ LY_STMT_NOTIFICATION
@ LY_STMT_CHOICE
@ LY_STMT_VALUE
@ LY_STMT_USES
@ LY_STMT_MAX
@ LY_STMT_PRESENCE
@ LY_STMT_STATUS
@ LY_STMT_INPUT
@ LY_STMT_YINELEM
@ LY_STMT_LIST
@ LY_STMT_DEFAULT
@ LYEXT_ERR
@ LYEXT_COMPLEX
@ LYEXT_FLAG
Description of the extension instance substatement.
YANG extension definition.
Generic extension instance structure.
Complex extension instance structure.
Structure to hold a set of (not necessary somehow connected) lyd_node or lys_node objects....
Definition libyang.h:1708
struct lys_module * module
struct lys_node * target
uint8_t tpdf_size
const char * eapptag
struct ly_set * depfeatures
struct lys_node_leaf ** keys
uint8_t unique_size
unsigned int count
const char * units
uint8_t type
uint16_t flags
uint8_t deviate_size
const char * presence
struct lys_feature * features
uint8_t padding_iffsize
struct lys_ident * ident
uint8_t deviated
uint8_t latest_revision
uint8_t deviation_size
const char ** dflt
uint8_t value_flags
struct lys_type_info_lref lref
struct lys_node * parent
struct lys_type_info_union uni
const char * ns
struct lys_node * prev
struct lys_type_info_num num
const char * path
uint8_t expr_size
uint8_t * expr
uint8_t padding1
struct lys_type_info_ident ident
struct lys_refine_mod_list list
void * padding_iff
struct lys_include * inc
struct lys_submodule * submodule
struct lys_ext * extensions
const char ** expr
uint8_t augment_size
struct lys_ident ** base
struct lys_node_augment * augment
struct lys_type_info_dec64 dec64
uint16_t unres_count
struct lys_revision * rev
const char * prefix
struct lys_tpdf * tpdf
struct lys_type * types
struct lys_when * when
struct lys_type_bit * bit
uint8_t ext_size
const char * emsg
struct lys_type * type
const char * dsc
struct lys_ext_instance ** ext
uint8_t base_size
const char * target_name
uint8_t padding[3]
struct lys_node_leaf * target
struct lys_refine * refine
uint16_t target_type
struct lys_node * data
struct lys_ident ** ref
struct lys_node * child
struct lys_type_info_str str
struct lys_restr * patterns
const char * contact
struct lys_restr * length
uint8_t iffeature_size
uint8_t keys_size
union lys_type_info info
struct lys_node_grp * grp
uint16_t ident_size
const char * cond
LYS_NODE nodetype
void * priv
const char * name
void * fill1[2]
uint8_t trg_type
const char * org
uint8_t features_size
const char * keys_str
struct lys_tpdf * der
struct lys_unique * unique
uint8_t has_union_leafref
struct lys_tpdf * parent
uint8_t flags
struct ly_set * der
struct lys_type_info_enums enums
struct lys_deviate * deviate
unsigned int pat_count
struct lys_node * orig_node
uint8_t version
struct lys_iffeature * iffeature
uint16_t tpdf_size
struct lys_feature ** features
uint8_t padding2[2]
uint8_t max_set
uint8_t min_set
struct lys_node * next
uint8_t implemented
uint8_t refine_size
struct lys_type_info_inst inst
uint8_t imp_size
uint8_t extensions_size
uint8_t disabled
LY_DATA_TYPE _PACKED base
union lys_refine_mod mod
uint8_t padding[4]
struct ly_set * backlinks
struct lys_type type
const char * filepath
const char * ref
struct lys_deviation * deviation
struct lys_restr * range
const char * expr
struct lys_type_info_binary binary
struct lys_type_enum * enm
struct lys_node * dflt
const char * dflt
struct lys_module * belongsto
struct lys_import * imp
uint32_t pos
LYS_DEVIATE_TYPE mod
uint8_t inc_size
char date[11]
char rev[11]
struct lys_type_info_bits bits
struct ly_ctx * ctx
uint8_t rev_size
struct lys_restr * must
struct lys_module * lys_main_module(const struct lys_module *module)
Return main module of the module.
struct ly_set * lys_find_path(const struct lys_module *cur_module, const struct lys_node *cur_node, const char *path)
Search for schema nodes matching the provided path.
LY_DATA_TYPE
YANG built-in types.
struct ly_set * lys_xpath_atomize(const struct lys_node *ctx_node, enum lyxp_node_type ctx_node_type, const char *expr, int options)
Get all the partial XPath nodes (atoms) that are required for expr to be evaluated.
char * lys_path(const struct lys_node *node, int options)
Build schema path (usable as path, see XPath Addressing) of the schema node.
struct ly_set * lys_node_xpath_atomize(const struct lys_node *node, int options)
Call lys_xpath_atomize() on all the when and must expressions of the node. This node must be a descen...
lyxp_node_type
Types of context nodes, LYXP_NODE_ROOT_CONFIG used only in when or must conditions.
int lys_features_disable_force(const struct lys_module *module, const char *feature)
Disable specified feature in the module disregarding dependant features.
int lys_set_disabled(const struct lys_module *module)
Disable module in its context to avoid its further usage (it will be hidden for module getters).
int lys_features_enable(const struct lys_module *module, const char *feature)
Enable specified feature in the module. In case its if-feature evaluates to false,...
const struct lys_type * lys_getnext_union_type(const struct lys_type *last, const struct lys_type *type)
Get next type of a union.
const struct lys_module * lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format)
Read a schema from file descriptor into the specified context.
const struct lys_module * lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format)
Load a schema into the specified context from a file.
char * lys_data_path(const struct lys_node *node)
Build data path (usable as path, see XPath Addressing) of the schema node.
int lys_print_clb(ssize_t(*writeclb)(void *arg, const void *buf, size_t count), void *arg, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format using a provided callback.
void * lys_set_private(const struct lys_node *node, void *priv)
Set a schema private pointer to a user pointer.
int lys_set_enabled(const struct lys_module *module)
Enable previously disabled module.
int lys_features_disable(const struct lys_module *module, const char *feature)
Disable specified feature in the module. If it causes some dependant features to be disabled,...
int lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file.
char * lys_data_path_pattern(const struct lys_node *node, const char *placeholder)
Build the data path pattern of a schema node.
int lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a memory block. It is up to caller to free the returne...
struct lys_node * lys_parent(const struct lys_node *node)
Return parent node in the schema tree.
const struct lys_node * lys_is_disabled(const struct lys_node *node, int recursive)
Check if the schema node is disabled in the schema tree, i.e. there is any disabled if-feature statem...
int lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file stream.
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
enum lys_deviate_type LYS_DEVIATE_TYPE
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2.
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
lys_nodetype
YANG schema node types.
lys_deviate_type
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2.
const char ** lys_features_list(const struct lys_module *module, uint8_t **states)
Get list of all the defined features in the module and its submodules.
struct lys_module * lys_node_module(const struct lys_node *node)
Return main module of the schema tree node.
const struct lys_node * lys_getnext(const struct lys_node *last, const struct lys_node *parent, const struct lys_module *module, int options)
Get next schema tree (sibling) node element that can be instantiated in a data tree....
int lys_iffeature_value(const struct lys_iffeature *iff)
Learn how the if-feature statement currently evaluates.
int lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a file descriptor.
int lys_search_localfile(const char *const *searchpaths, int cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format)
Search for the schema file in the specified searchpaths.
int lys_set_implemented(const struct lys_module *module)
Mark imported module as "implemented".
int lys_features_enable_force(const struct lys_module *module, const char *feature)
Enable specified feature in the module disregarding its if-features.
int lys_features_state(const struct lys_module *module, const char *feature)
Get the current status of the specified feature in the module. Even if the feature is enabled but som...
const struct lys_node_list * lys_is_key(const struct lys_node_leaf *node, uint8_t *index)
Check if the schema leaf node is used as a key for a list.
const struct lys_module * lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format)
Load a schema into the specified context.
LYS_VERSION
supported YANG schema version values
#define LY_REV_SIZE
struct lys_module * lys_implemented_module(const struct lys_module *mod)
Find the implemented revision of the given module in the context.
enum lys_nodetype LYS_NODE
YANG schema node types.
@ LY_TYPE_STRING
@ LY_TYPE_BITS
@ LY_TYPE_UNKNOWN
@ LY_TYPE_IDENT
@ LY_TYPE_UINT16
@ LY_TYPE_LEAFREF
@ LY_TYPE_INT16
@ LY_TYPE_UNION
@ LY_TYPE_BOOL
@ LY_TYPE_DER
@ LY_TYPE_INT32
@ LY_TYPE_ENUM
@ LY_TYPE_INST
@ LY_TYPE_UINT8
@ LY_TYPE_BINARY
@ LY_TYPE_INT64
@ LY_TYPE_INT8
@ LY_TYPE_UINT64
@ LY_TYPE_DEC64
@ LY_TYPE_UINT32
@ LY_TYPE_EMPTY
@ LYXP_NODE_ATTR
@ LYXP_NODE_ELEM
@ LYXP_NODE_ROOT
@ LYXP_NODE_ROOT_CONFIG
@ LYXP_NODE_NONE
@ LYXP_NODE_TEXT
@ LYS_OUT_YANG
@ LYS_OUT_JSON
@ LYS_OUT_TREE
@ LYS_OUT_UNKNOWN
@ LYS_OUT_INFO
@ LYS_OUT_YIN
@ LYS_IN_UNKNOWN
@ LYS_IN_YIN
@ LYS_IN_YANG
@ LYS_USES
@ LYS_AUGMENT
@ LYS_CASE
@ LYS_RPC
@ LYS_LEAF
@ LYS_OUTPUT
@ LYS_ANYDATA
@ LYS_LIST
@ LYS_ANYXML
@ LYS_UNKNOWN
@ LYS_EXT
@ LYS_CONTAINER
@ LYS_NOTIF
@ LYS_ACTION
@ LYS_INPUT
@ LYS_CHOICE
@ LYS_GROUPING
@ LYS_LEAFLIST
@ LY_DEVIATE_ADD
@ LY_DEVIATE_DEL
@ LY_DEVIATE_RPL
@ LY_DEVIATE_NO
@ LYS_VERSION_UNDEF
@ LYS_VERSION_1_1
@ LYS_VERSION_1
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2.
YANG deviation statement structure, see RFC 6020 sec. 7.18.3.
YANG feature definition structure.
Structure to hold information about identity, see RFC 6020 sec. 7.16.
Compiled if-feature expression structure.
YANG import structure used to reference other schemas (modules).
YANG include structure used to reference submodules.
Main schema node structure representing YANG module.
Common structure representing single YANG data statement describing.
Schema anydata (and anyxml) node structure.
YANG augment structure (covering both possibilities - uses's substatement as well as (sub)module's su...
Schema case node structure.
Schema choice node structure.
Schema container node structure.
Schema grouping node structure.
RPC input and output node structure.
Schema leaf node structure.
Schema leaf-list node structure.
Schema list node structure.
Schema notification node structure.
Schema rpc/action node structure.
Schema uses node structure.
YANG uses's refine substatement structure, see RFC 6020 sec. 7.12.2.
Container for list modifications in lys_refine_mod.
YANG validity restriction (must, length, etc.) structure providing information from the schema.
YANG revision statement for (sub)modules.
Submodule schema node structure that can be included into a YANG module.
YANG typedef structure providing information from the schema.
YANG type structure providing information from the schema.
Single bit value specification for lys_type_info_bits.
Single enumeration value specification for lys_type_info_enums.
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Container for information about instance-identifier types (LY_TYPE_INST), used in lys_type_info.
Container for information about leafref types (LY_TYPE_LEAFREF), used in lys_type_info.
Container for information about integer types, used in lys_type_info.
Container for information about string types (LY_TYPE_STRING), used in lys_type_info.
Container for information about union types (LY_TYPE_UNION), used in lys_type_info.
YANG list's unique statement structure, see RFC 6020 sec. 7.8.3.
YANG when restriction, see RFC 6020 sec. 7.19.5.
Union to hold target modification in lys_refine.
Union for holding type-specific information in lys_type.
#define _PACKED
Compiler flag for packed data types.
Definition libyang.h:38