Loading...
Searching...
No Matches
tree_schema.h
Go to the documentation of this file.
#ifndef LY_TREE_SCHEMA_H_
#define LY_TREE_SCHEMA_H_
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
#include <stdint.h>
#include <stdio.h>
#include "log.h"
#include "ly_config.h"
#include "tree.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ly_ctx;
struct ly_path;
struct ly_set;
struct lys_module;
struct lysc_node;
struct lyxp_expr;
/* *INDENT-OFF* */
#define LYSC_TREE_DFS_BEGIN(START, ELEM) \
{ ly_bool LYSC_TREE_DFS_continue = 0; struct lysc_node *LYSC_TREE_DFS_next; \
for ((ELEM) = (LYSC_TREE_DFS_next) = (struct lysc_node *)(START); \
(ELEM); \
(ELEM) = (LYSC_TREE_DFS_next), LYSC_TREE_DFS_continue = 0)
#define LYSC_TREE_DFS_END(START, ELEM) \
/* select element for the next run - children first */ \
if (LYSC_TREE_DFS_continue) { \
(LYSC_TREE_DFS_next) = NULL; \
} else { \
(LYSC_TREE_DFS_next) = (struct lysc_node *)lysc_node_child(ELEM); \
} \
if (!(LYSC_TREE_DFS_next)) { \
/* no children, try siblings */ \
_LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
} \
while (!(LYSC_TREE_DFS_next)) { \
/* parent is already processed, go to its sibling */ \
(ELEM) = (ELEM)->parent; \
_LYSC_TREE_DFS_NEXT(START, ELEM, LYSC_TREE_DFS_next); \
} }
#define _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) \
if ((ELEM) == (struct lysc_node *)(START)) { \
/* we are done, no next element to process */ \
break; \
} \
(NEXT) = (ELEM)->next;
/* *INDENT-ON* */
#define LY_REV_SIZE 11
#define LYS_UNKNOWN 0x0000
#define LYS_CONTAINER 0x0001
#define LYS_CHOICE 0x0002
#define LYS_LEAF 0x0004
#define LYS_LEAFLIST 0x0008
#define LYS_LIST 0x0010
#define LYS_ANYXML 0x0020
#define LYS_ANYDATA 0x0060
#define LYS_CASE 0x0080
#define LYS_RPC 0x0100
#define LYS_ACTION 0x0200
#define LYS_NOTIF 0x0400
#define LYS_USES 0x0800
#define LYS_INPUT 0x1000
#define LYS_OUTPUT 0x2000
#define LYS_GROUPING 0x4000
#define LYS_AUGMENT 0x8000
#define LYS_NODETYPE_MASK 0xffff
struct lysp_import {
struct lys_module *module;
const char *name;
const char *prefix;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
uint16_t flags;
char rev[LY_REV_SIZE];
};
struct lysp_include {
struct lysp_submodule *submodule;
const char *name;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
char rev[LY_REV_SIZE];
ly_bool injected;
};
struct lysp_ext {
const char *name;
const char *argname;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
uint16_t flags;
struct lysc_ext *compiled;
};
struct lysp_feature {
const char *name;
struct lysp_qname *iffeatures;
struct lysc_iffeature *iffeatures_c;
struct lysp_feature **depfeatures;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
uint16_t flags;
};
struct lysc_iffeature {
uint8_t *expr;
struct lysp_feature **features;
};
struct lysp_qname {
const char *str;
const struct lysp_module *mod;
uint16_t flags;
};
struct lysp_ident {
const char *name;
struct lysp_qname *iffeatures;
const char **bases;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
uint16_t flags;
};
struct lysp_restr {
#define LYSP_RESTR_PATTERN_ACK 0x06
#define LYSP_RESTR_PATTERN_NACK 0x15
struct lysp_qname arg;
const char *emsg;
const char *eapptag;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
};
struct lysp_revision {
char date[LY_REV_SIZE];
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
};
struct lysp_type_enum {
const char *name;
const char *dsc;
const char *ref;
int64_t value;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
uint16_t flags;
};
struct lysp_type {
const char *name;
struct lysp_restr *range;
struct lysp_restr *length;
struct lysp_restr *patterns;
struct lysp_type_enum *enums;
struct lysp_type_enum *bits;
struct lyxp_expr *path;
const char **bases;
struct lysp_type *types;
struct lysp_ext_instance *exts;
const struct lysp_module *pmod;
struct lysc_type *compiled;
uint8_t fraction_digits;
uint8_t require_instance;
uint16_t flags;
};
struct lysp_tpdf {
const char *name;
const char *units;
struct lysp_qname dflt;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
struct lysp_type type;
uint16_t flags;
};
struct lysp_when {
const char *cond;
const char *dsc;
const char *ref;
struct lysp_ext_instance *exts;
};
struct lysp_refine {
const char *nodeid;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_restr *musts;
const char *presence;
struct lysp_qname *dflts;
uint32_t min;
uint32_t max;
struct lysp_ext_instance *exts;
uint16_t flags;
};
#define LYS_DEV_NOT_SUPPORTED 1
#define LYS_DEV_ADD 2
#define LYS_DEV_DELETE 3
#define LYS_DEV_REPLACE 4
struct lysp_deviate {
uint8_t mod;
struct lysp_deviate *next;
struct lysp_ext_instance *exts;
};
struct lysp_deviate_add {
uint8_t mod;
struct lysp_deviate *next;
struct lysp_ext_instance *exts;
const char *units;
struct lysp_restr *musts;
struct lysp_qname *uniques;
struct lysp_qname *dflts;
uint16_t flags;
uint32_t min;
uint32_t max;
};
struct lysp_deviate_del {
uint8_t mod;
struct lysp_deviate *next;
struct lysp_ext_instance *exts;
const char *units;
struct lysp_restr *musts;
struct lysp_qname *uniques;
struct lysp_qname *dflts;
};
struct lysp_deviate_rpl {
uint8_t mod;
struct lysp_deviate *next;
struct lysp_ext_instance *exts;
struct lysp_type *type;
const char *units;
struct lysp_qname dflt;
uint16_t flags;
uint32_t min;
uint32_t max;
};
struct lysp_deviation {
const char *nodeid;
const char *dsc;
const char *ref;
struct lysp_deviate *deviates;
struct lysp_ext_instance *exts;
};
#define LYS_CONFIG_W 0x01
#define LYS_CONFIG_R 0x02
#define LYS_CONFIG_MASK 0x03
#define LYS_STATUS_CURR 0x04
#define LYS_STATUS_DEPRC 0x08
#define LYS_STATUS_OBSLT 0x10
#define LYS_STATUS_MASK 0x1C
#define LYS_MAND_TRUE 0x20
#define LYS_MAND_FALSE 0x40
#define LYS_MAND_MASK 0x60
#define LYS_PRESENCE 0x80
#define LYS_UNIQUE 0x80
#define LYS_KEY 0x0100
#define LYS_KEYLESS 0x0200
#define LYS_DISABLED 0x0100
#define LYS_FENABLED 0x20
#define LYS_ORDBY_SYSTEM 0x80
#define LYS_ORDBY_USER 0x40
#define LYS_ORDBY_MASK 0xC0
#define LYS_YINELEM_TRUE 0x80
#define LYS_YINELEM_FALSE 0x0100
#define LYS_YINELEM_MASK 0x0180
#define LYS_USED_GRP 0x0400
#define LYS_SET_VALUE 0x0200
#define LYS_SET_MIN 0x0200
#define LYS_SET_MAX 0x0400
#define LYS_SET_BASE 0x0001
#define LYS_SET_BIT 0x0002
#define LYS_SET_ENUM 0x0004
#define LYS_SET_FRDIGITS 0x0008
#define LYS_SET_LENGTH 0x0010
#define LYS_SET_PATH 0x0020
#define LYS_SET_PATTERN 0x0040
#define LYS_SET_RANGE 0x0080
#define LYS_SET_TYPE 0x0100
#define LYS_SET_REQINST 0x0200
#define LYS_SET_DFLT 0x0200
#define LYS_SET_UNITS 0x0400
#define LYS_SET_CONFIG 0x0800
#define LYS_SINGLEQUOTED 0x0100
#define LYS_DOUBLEQUOTED 0x0200
#define LYS_YIN_ATTR 0x0400
#define LYS_YIN_ARGUMENT 0x0800
#define LYS_INTERNAL 0x1000
#define LYS_IS_ENUM 0x0200
#define LYS_IS_INPUT 0x1000
#define LYS_IS_OUTPUT 0x2000
#define LYS_IS_NOTIF 0x4000
#define LYS_FLAGS_COMPILED_MASK 0xff
struct lysp_node {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
struct lysp_node_container {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* container */
struct lysp_restr *musts;
struct lysp_when *when;
const char *presence;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *child;
struct lysp_node_action *actions;
struct lysp_node_notif *notifs;
};
struct lysp_node_leaf {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* leaf */
struct lysp_restr *musts;
struct lysp_when *when;
struct lysp_type type;
const char *units;
struct lysp_qname dflt;
};
struct lysp_node_leaflist {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* leaf-list */
struct lysp_restr *musts;
struct lysp_when *when;
struct lysp_type type;
const char *units;
struct lysp_qname *dflts;
uint32_t min;
uint32_t max;
};
struct lysp_node_list {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* list */
struct lysp_restr *musts;
struct lysp_when *when;
const char *key;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *child;
struct lysp_node_action *actions;
struct lysp_node_notif *notifs;
struct lysp_qname *uniques;
uint32_t min;
uint32_t max;
};
struct lysp_node_choice {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* choice */
struct lysp_node *child;
struct lysp_when *when;
struct lysp_qname dflt;
};
struct lysp_node_case {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* case */
struct lysp_node *child;
struct lysp_when *when;
};
struct lysp_node_anydata {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* anyxml/anydata */
struct lysp_restr *musts;
struct lysp_when *when;
};
struct lysp_node_uses {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* uses */
struct lysp_refine *refines;
struct lysp_node_augment *augments;
struct lysp_when *when;
};
struct lysp_node_action_inout {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* inout */
struct lysp_restr *musts;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *child;
};
struct lysp_node_action {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node_action *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* action */
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node_action_inout input;
struct lysp_node_action_inout output;
};
struct lysp_node_notif {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node_notif *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* notif */
struct lysp_restr *musts;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *child;
};
struct lysp_node_grp {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node_grp *next;
const char *name;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
/* grp */
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *child;
struct lysp_node_action *actions;
struct lysp_node_notif *notifs;
};
struct lysp_node_augment {
union {
struct lysp_node node;
struct {
struct lysp_node *parent;
uint16_t nodetype;
uint16_t flags;
struct lysp_node_augment *next;
const char *nodeid;
const char *dsc;
const char *ref;
struct lysp_qname *iffeatures;
struct lysp_ext_instance *exts;
};
};
struct lysp_node *child;
struct lysp_when *when;
struct lysp_node_action *actions;
struct lysp_node_notif *notifs;
};
typedef enum LYS_VERSION {
LYS_VERSION_UNDEF = 0,
LYS_VERSION_1_0 = 1,
LYS_VERSION_1_1 = 2
} LYS_VERSION;
struct lysp_module {
struct lys_module *mod;
struct lysp_revision *revs;
struct lysp_import *imports;
struct lysp_include *includes;
struct lysp_ext *extensions;
struct lysp_feature *features;
struct lysp_ident *identities;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *data;
struct lysp_node_augment *augments;
struct lysp_node_action *rpcs;
struct lysp_node_notif *notifs;
struct lysp_deviation *deviations;
struct lysp_ext_instance *exts;
uint8_t version;
uint8_t parsing : 1;
uint8_t is_submod : 1;
};
struct lysp_submodule {
struct lys_module *mod;
struct lysp_revision *revs;
struct lysp_import *imports;
struct lysp_include *includes;
struct lysp_ext *extensions;
struct lysp_feature *features;
struct lysp_ident *identities;
struct lysp_tpdf *typedefs;
struct lysp_node_grp *groupings;
struct lysp_node *data;
struct lysp_node_augment *augments;
struct lysp_node_action *rpcs;
struct lysp_node_notif *notifs;
struct lysp_deviation *deviations;
struct lysp_ext_instance *exts;
uint8_t version;
uint8_t parsing : 1;
uint8_t is_submod : 1;
uint8_t latest_revision : 2;
const char *name;
const char *filepath;
const char *prefix;
const char *org;
const char *contact;
const char *dsc;
const char *ref;
};
#define LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name)
struct lysc_prefix {
char *prefix;
const struct lys_module *mod;
};
struct lysc_ext {
const char *name;
const char *argname;
struct lysc_ext_instance *exts;
struct lyplg_ext *plugin;
struct lys_module *module;
uint16_t flags;
};
struct lysc_when {
struct lyxp_expr *cond;
struct lysc_node *context;
struct lysc_prefix *prefixes;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
uint32_t refcount;
uint16_t flags;
};
struct lysc_ident {
const char *name;
const char *dsc;
const char *ref;
struct lys_module *module;
struct lysc_ident **derived;
struct lysc_ext_instance *exts;
uint16_t flags;
};
#define LYS_IFF_NOT 0x00
#define LYS_IFF_AND 0x01
#define LYS_IFF_OR 0x02
#define LYS_IFF_F 0x03
struct lysc_revision {
char date[LY_REV_SIZE];
struct lysc_ext_instance *exts;
};
struct lysc_range {
struct lysc_range_part {
union {
int64_t min_64;
uint64_t min_u64;
};
union {
int64_t max_64;
uint64_t max_u64;
};
} *parts;
const char *dsc;
const char *ref;
const char *emsg;
const char *eapptag;
struct lysc_ext_instance *exts;
};
struct lysc_pattern {
const char *expr;
pcre2_code *code;
const char *dsc;
const char *ref;
const char *emsg;
const char *eapptag;
struct lysc_ext_instance *exts;
uint32_t inverted : 1;
uint32_t refcount : 31;
};
struct lysc_must {
struct lyxp_expr *cond;
struct lysc_prefix *prefixes;
const char *dsc;
const char *ref;
const char *emsg;
const char *eapptag;
struct lysc_ext_instance *exts;
};
struct lysc_type {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
};
struct lysc_type_num {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_range *range;
};
struct lysc_type_dec {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
uint8_t fraction_digits;
struct lysc_range *range;
};
struct lysc_type_str {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_range *length;
struct lysc_pattern **patterns;
};
struct lysc_type_bitenum_item {
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
union {
int32_t value;
uint32_t position;
};
uint16_t flags;
};
struct lysc_type_enum {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_type_bitenum_item *enums;
};
struct lysc_type_bits {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_type_bitenum_item *bits;
};
struct lysc_type_leafref {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lyxp_expr *path;
struct lysc_prefix *prefixes;
struct lysc_type *realtype;
uint8_t require_instance;
};
struct lysc_type_identityref {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_ident **bases;
};
struct lysc_type_instanceid {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
uint8_t require_instance;
};
struct lysc_type_union {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_type **types;
};
struct lysc_type_bin {
const char *name;
struct lysc_ext_instance *exts;
struct lyplg_type *plugin;
LY_DATA_TYPE basetype;
uint32_t refcount;
struct lysc_range *length;
};
#define LYS_NODE_HASH_COUNT 4
struct lysc_node {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
struct lysc_node_action_inout {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node *child;
struct lysc_must *musts;
};
struct lysc_node_action {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node_action *next;
struct lysc_node_action *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_when **when;
struct lysc_node_action_inout input;
struct lysc_node_action_inout output;
};
struct lysc_node_notif {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node_notif *next;
struct lysc_node_notif *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node *child;
struct lysc_must *musts;
struct lysc_when **when;
};
struct lysc_node_container {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node *child;
struct lysc_must *musts;
struct lysc_when **when;
struct lysc_node_action *actions;
struct lysc_node_notif *notifs;
};
struct lysc_node_case {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node *child;
struct lysc_when **when;
};
struct lysc_node_choice {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node_case *cases;
struct lysc_when **when;
struct lysc_node_case *dflt;
};
struct lysc_node_leaf {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_must *musts;
struct lysc_when **when;
struct lysc_type *type;
const char *units;
struct lyd_value *dflt;
};
struct lysc_node_leaflist {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_must *musts;
struct lysc_when **when;
struct lysc_type *type;
const char *units;
struct lyd_value **dflts;
uint32_t min;
uint32_t max;
};
struct lysc_node_list {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_node *child;
struct lysc_must *musts;
struct lysc_when **when;
struct lysc_node_action *actions;
struct lysc_node_notif *notifs;
struct lysc_node_leaf ***uniques;
uint32_t min;
uint32_t max;
};
struct lysc_node_anydata {
union {
struct lysc_node node;
struct {
uint16_t nodetype;
uint16_t flags;
uint8_t hash[LYS_NODE_HASH_COUNT];
struct lys_module *module;
struct lysc_node *parent;
struct lysc_node *next;
struct lysc_node *prev;
const char *name;
const char *dsc;
const char *ref;
struct lysc_ext_instance *exts;
void *priv;
};
};
struct lysc_must *musts;
struct lysc_when **when;
};
struct lysc_module {
struct lys_module *mod;
struct lysc_node *data;
struct lysc_node_action *rpcs;
struct lysc_node_notif *notifs;
struct lysc_ext_instance *exts;
};
#define lysc_is_userordered(lysc_node) \
((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1)
#define lysc_is_key(lysc_node) \
((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
#define lysc_is_np_cont(lysc_node) \
((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1)
#define lysc_is_dup_inst_list(lysc_node) \
((lysc_node && (((lysc_node->nodetype == LYS_LIST) && (lysc_node->flags & LYS_KEYLESS)) || \
((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
LIBYANG_API_DECL const struct lysc_when *lysc_has_when(const struct lysc_node *node);
LIBYANG_API_DECL const struct lys_module *lysc_owner_module(const struct lysc_node *node);
LIBYANG_API_DECL const struct lysp_node_grp *lysp_node_groupings(const struct lysp_node *node);
LIBYANG_API_DECL const struct lysp_tpdf *lysp_node_typedefs(const struct lysp_node *node);
LIBYANG_API_DECL const struct lysp_node_action *lysp_node_actions(const struct lysp_node *node);
LIBYANG_API_DECL const struct lysp_node_notif *lysp_node_notifs(const struct lysp_node *node);
LIBYANG_API_DECL const struct lysp_node *lysp_node_child(const struct lysp_node *node);
LIBYANG_API_DECL const struct lysc_node_action *lysc_node_actions(const struct lysc_node *node);
LIBYANG_API_DECL const struct lysc_node_notif *lysc_node_notifs(const struct lysc_node *node);
LIBYANG_API_DECL const struct lysc_node *lysc_node_child(const struct lysc_node *node);
LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node);
LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
LIBYANG_API_DECL const struct lysc_node *lysc_node_lref_target(const struct lysc_node *node);
LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set);
LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node,
ly_bool match_ancestors, struct ly_set **set);
typedef LY_ERR (*lysc_dfs_clb)(struct lysc_node *node, void *data, ly_bool *dfs_continue);
LIBYANG_API_DECL LY_ERR lysc_tree_dfs_full(const struct lysc_node *root, lysc_dfs_clb dfs_clb, void *data);
LIBYANG_API_DECL LY_ERR lysc_module_dfs_full(const struct lys_module *mod, lysc_dfs_clb dfs_clb, void *data);
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff);
LIBYANG_API_DECL LY_ERR lys_identity_iffeature_value(const struct lysc_ident *ident);
LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_feature *last, const struct lysp_module *pmod,
uint32_t *idx);
#define LYS_FIND_XP_SCHEMA 0x08
#define LYS_FIND_XP_OUTPUT 0x10
#define LYS_FIND_NO_MATCH_ERROR 0x40
#define LYS_FIND_SCHEMAMOUNT 0x0200
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);
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);
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);
LIBYANG_API_DECL LY_ERR lys_find_lypath_atoms(const struct ly_path *path, struct ly_set **set);
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);
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);
typedef enum {
LYSC_PATH_LOG,
LYSC_PATH_DATA,
LYSC_PATH_DATA_PATTERN
} LYSC_PATH_TYPE;
LIBYANG_API_DECL char *lysc_path(const struct lysc_node *node, LYSC_PATH_TYPE pathtype, char *buffer, size_t buflen);
struct lys_module {
struct ly_ctx *ctx;
const char *name;
const char *revision;
const char *ns;
const char *prefix;
const char *filepath;
const char *org;
const char *contact;
const char *dsc;
const char *ref;
struct lysp_module *parsed;
struct lysc_module *compiled;
struct lysc_ident *identities;
struct lys_module **augmented_by;
struct lys_module **deviated_by;
ly_bool implemented;
ly_bool to_compile;
uint8_t latest_revision;
};
#define LYS_MOD_LATEST_REV 0x01
#define LYS_MOD_LATEST_SEARCHDIRS 0x02
#define LYS_MOD_IMPORTED_REV 0x04
#define LYS_MOD_LATEST_IMPCLB 0x08
LIBYANG_API_DECL LY_ERR lys_feature_value(const struct lys_module *module, const char *feature);
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);
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);
#define LYS_GETNEXT_WITHCHOICE 0x01
#define LYS_GETNEXT_NOCHOICE 0x02
#define LYS_GETNEXT_WITHCASE 0x04
#define LYS_GETNEXT_INTONPCONT 0x08
#define LYS_GETNEXT_OUTPUT 0x10
#define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20
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);
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features);
LIBYANG_API_DECL const char *lys_nodetype2str(uint16_t nodetype);
LIBYANG_API_DECL const char *lyxp_get_expr(const struct lyxp_expr *path);
#ifdef __cplusplus
}
#endif
#endif /* LY_TREE_SCHEMA_H_ */
ly_ctx
libyang context handler.
LY_ERR
LY_ERR
libyang's error codes returned by the libyang functions.
Definition log.h:237
ly_set
Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node,...
Definition set.h:47
lyplg_ext
Extension plugin implementing various aspects of a YANG extension.
Definition plugins_exts.h:932
lysc_ext_instance
YANG extension compiled instance.
Definition plugins_exts.h:437
lysp_ext_instance
YANG extension parsed instance.
Definition plugins_exts.h:403
lyplg_type
Hold type-specific functions for various operations with the data values.
Definition plugins_types.h:621
lysc_node_case::child
struct lysc_node * child
Definition tree_schema.h:1577
lysp_ext::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:301
lysc_type_identityref::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1375
lysc_when::dsc
const char * dsc
Definition tree_schema.h:1202
lysc_node_leaf::dflt
struct lyd_value * dflt
Definition tree_schema.h:1638
lysp_module::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:1113
lysp_submodule::data
struct lysp_node * data
Definition tree_schema.h:1138
lysp_deviate_del::musts
struct lysp_restr * musts
Definition tree_schema.h:505
lysc_node_action::when
struct lysc_when ** when
Definition tree_schema.h:1486
lysp_restr::ref
const char * ref
Definition tree_schema.h:370
lysp_node_action::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:1000
lysp_refine::flags
uint16_t flags
Definition tree_schema.h:461
lysp_deviation::ref
const char * ref
Definition tree_schema.h:525
lysp_when::cond
const char * cond
Definition tree_schema.h:441
lysp_node_container::when
struct lysp_when * when
Definition tree_schema.h:769
lysp_type_enum::name
const char * name
Definition tree_schema.h:388
lysp_ext::ref
const char * ref
Definition tree_schema.h:300
lysp_deviation::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:527
lysp_node_list::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:856
lysp_submodule::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:1136
lysc_node_leaflist::dflts
struct lyd_value ** dflts
Definition tree_schema.h:1669
lysc_type_identityref::name
const char * name
Definition tree_schema.h:1373
lysp_node_augment::actions
struct lysp_node_action * actions
Definition tree_schema.h:1084
lysc_type_dec::refcount
uint32_t refcount
Definition tree_schema.h:1307
lysc_ext::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1189
lysc_node_list::musts
struct lysc_must * musts
Definition tree_schema.h:1701
lysc_node_case::when
struct lysc_when ** when
Definition tree_schema.h:1579
lysp_submodule::features
struct lysp_feature * features
Definition tree_schema.h:1134
lysc_module::rpcs
struct lysc_node_action * rpcs
Definition tree_schema.h:1748
lysc_type_instanceid::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1385
lysc_type_identityref::refcount
uint32_t refcount
Definition tree_schema.h:1377
lysp_import::rev
char rev[11]
Definition tree_schema.h:274
lysp_node_action_inout::child
struct lysp_node * child
Definition tree_schema.h:976
lys_module::to_compile
ly_bool to_compile
Definition tree_schema.h:2165
lysp_node_notif::musts
struct lysp_restr * musts
Definition tree_schema.h:1028
lysc_node_action::output
struct lysc_node_action_inout output
Definition tree_schema.h:1490
lysp_import::prefix
const char * prefix
Definition tree_schema.h:269
lysp_node_container::musts
struct lysp_restr * musts
Definition tree_schema.h:768
lysp_feature::ref
const char * ref
Definition tree_schema.h:320
lysp_import::dsc
const char * dsc
Definition tree_schema.h:270
lysc_type_num::range
struct lysc_range * range
Definition tree_schema.h:1299
lysp_module::includes
struct lysp_include * includes
Definition tree_schema.h:1108
lysc_type_dec::range
struct lysc_range * range
Definition tree_schema.h:1310
lysp_ext::compiled
struct lysc_ext * compiled
Definition tree_schema.h:304
lysp_node_list::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:853
lysp_node::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:744
lysp_when::ref
const char * ref
Definition tree_schema.h:443
lysc_node_leaf::units
const char * units
Definition tree_schema.h:1637
lysc_node_leaf::when
struct lysc_when ** when
Definition tree_schema.h:1634
lysp_deviate_add::mod
uint8_t mod
Definition tree_schema.h:488
lysc_node_container::when
struct lysc_when ** when
Definition tree_schema.h:1549
lysp_submodule::revs
struct lysp_revision * revs
Definition tree_schema.h:1129
lysc_node_notif::child
struct lysc_node * child
Definition tree_schema.h:1517
lysc_type_union::name
const char * name
Definition tree_schema.h:1394
lysp_deviate_add::dflts
struct lysp_qname * dflts
Definition tree_schema.h:494
lysc_node::nodetype
uint16_t nodetype
Definition tree_schema.h:1422
lys_module::augmented_by
struct lys_module ** augmented_by
Definition tree_schema.h:2161
lysc_type_bits::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1351
lysp_deviate_add::min
uint32_t min
Definition tree_schema.h:496
lysc_type_str::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1317
lys_module::name
const char * name
Definition tree_schema.h:2139
lysp_node_grp::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:1059
lysp_type::range
struct lysp_restr * range
Definition tree_schema.h:405
lysp_node_leaflist::dflts
struct lysp_qname * dflts
Definition tree_schema.h:825
lysc_type::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1285
lysp_revision::ref
const char * ref
Definition tree_schema.h:380
lysc_type_instanceid::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1387
lysc_pattern::code
pcre2_code * code
Definition tree_schema.h:1263
lysp_deviate_del::next
struct lysp_deviate * next
Definition tree_schema.h:502
lysp_restr::arg
struct lysp_qname arg
Definition tree_schema.h:364
lysc_node_list::actions
struct lysc_node_action * actions
Definition tree_schema.h:1703
lysc_type::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1287
lysp_node_list::child
struct lysp_node * child
Definition tree_schema.h:854
lysc_type_leafref::refcount
uint32_t refcount
Definition tree_schema.h:1364
lysp_deviate_rpl::next
struct lysp_deviate * next
Definition tree_schema.h:512
lysp_node_leaflist::units
const char * units
Definition tree_schema.h:824
lysp_submodule::imports
struct lysp_import * imports
Definition tree_schema.h:1131
lysc_type_leafref::path
struct lyxp_expr * path
Definition tree_schema.h:1366
lysp_type::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:413
lys_module::deviated_by
struct lys_module ** deviated_by
Definition tree_schema.h:2162
lysp_node_choice::dflt
struct lysp_qname dflt
Definition tree_schema.h:882
lysp_type::require_instance
uint8_t require_instance
Definition tree_schema.h:419
lysc_node_leaflist::when
struct lysc_when ** when
Definition tree_schema.h:1665
lysp_deviate_del::units
const char * units
Definition tree_schema.h:504
lysp_node_anydata::when
struct lysp_when * when
Definition tree_schema.h:926
lysc_must::eapptag
const char * eapptag
Definition tree_schema.h:1279
lysp_deviate_rpl::mod
uint8_t mod
Definition tree_schema.h:511
lysp_import::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:272
lysp_submodule::parsing
uint8_t parsing
Definition tree_schema.h:1146
lysp_tpdf::type
struct lysp_type type
Definition tree_schema.h:433
lysp_deviate_rpl::units
const char * units
Definition tree_schema.h:515
lysp_node_container::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:775
lysc_type_bin::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1406
lysc_type_num::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1296
lysc_type_enum::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1342
lysc_module::notifs
struct lysc_node_notif * notifs
Definition tree_schema.h:1749
lysc_must::cond
struct lyxp_expr * cond
Definition tree_schema.h:1274
lysc_node::hash
uint8_t hash[4]
Definition tree_schema.h:1424
lysc_pattern::refcount
uint32_t refcount
Definition tree_schema.h:1270
lysc_type_bin::name
const char * name
Definition tree_schema.h:1404
lysp_node_list::uniques
struct lysp_qname * uniques
Definition tree_schema.h:857
lysp_ident::ref
const char * ref
Definition tree_schema.h:353
lysc_node::dsc
const char * dsc
Definition tree_schema.h:1433
lysp_submodule::prefix
const char * prefix
Definition tree_schema.h:1155
lysc_node_list::notifs
struct lysc_node_notif * notifs
Definition tree_schema.h:1704
lysp_node_augment::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:1085
lysp_node::nodetype
uint16_t nodetype
Definition tree_schema.h:736
lysc_type_identityref::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1374
lysp_restr::emsg
const char * emsg
Definition tree_schema.h:367
lysc_when::flags
uint16_t flags
Definition tree_schema.h:1206
lys_module::compiled
struct lysc_module * compiled
Definition tree_schema.h:2150
lys_module::contact
const char * contact
Definition tree_schema.h:2145
lysp_ident::flags
uint16_t flags
Definition tree_schema.h:355
lysp_node_uses::when
struct lysp_when * when
Definition tree_schema.h:949
lysc_node_container::musts
struct lysc_must * musts
Definition tree_schema.h:1548
lysp_node_container::presence
const char * presence
Definition tree_schema.h:770
lysc_ident::name
const char * name
Definition tree_schema.h:1213
lysp_deviation::nodeid
const char * nodeid
Definition tree_schema.h:523
lysp_node_choice::when
struct lysp_when * when
Definition tree_schema.h:881
lysp_node_action_inout::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:974
lys_module::revision
const char * revision
Definition tree_schema.h:2140
lysp_module::is_submod
uint8_t is_submod
Definition tree_schema.h:1123
lysc_node_leaflist::type
struct lysc_type * type
Definition tree_schema.h:1666
lysc_ext::name
const char * name
Definition tree_schema.h:1187
lysp_deviation::dsc
const char * dsc
Definition tree_schema.h:524
lysp_node::next
struct lysp_node * next
Definition tree_schema.h:738
lysc_type_bits::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1352
lysp_type::patterns
struct lysp_restr * patterns
Definition tree_schema.h:407
lysp_revision::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:381
lysp_node_notif::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:1029
lysc_ident::derived
struct lys_module *struct lysc_ident ** derived
Definition tree_schema.h:1217
lysp_node_leaf::type
struct lysp_type type
Definition tree_schema.h:798
lysp_node_choice::child
struct lysp_node * child
Definition tree_schema.h:880
lys_module::identities
struct lysc_ident * identities
Definition tree_schema.h:2153
lysc_type_dec::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1304
lysp_type_enum::iffeatures
struct lysp_qname * iffeatures
Definition tree_schema.h:392
lysp_type_enum::ref
const char * ref
Definition tree_schema.h:390
lysp_ext::name
const char * name
Definition tree_schema.h:297
lysc_type_dec::name
const char * name
Definition tree_schema.h:1303
lysc_type_dec::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1306
lysc_type::name
const char * name
Definition tree_schema.h:1284
lysp_type_enum::flags
uint16_t flags
Definition tree_schema.h:394
lysp_node_list::actions
struct lysp_node_action * actions
Definition tree_schema.h:855
lysp_tpdf::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:432
lysc_pattern::expr
const char * expr
Definition tree_schema.h:1262
lysp_submodule::augments
struct lysp_node_augment * augments
Definition tree_schema.h:1139
lysc_type_num::refcount
uint32_t refcount
Definition tree_schema.h:1297
lysp_node::parent
struct lysp_node * parent
Definition tree_schema.h:735
lysc_pattern::dsc
const char * dsc
Definition tree_schema.h:1264
lysp_include::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:286
lysc_pattern::emsg
const char * emsg
Definition tree_schema.h:1266
lysp_submodule::rpcs
struct lysp_node_action * rpcs
Definition tree_schema.h:1140
lysp_node_container::actions
struct lysp_node_action * actions
Definition tree_schema.h:774
lysp_node_action_inout::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:975
lysp_feature::iffeatures
struct lysp_qname * iffeatures
Definition tree_schema.h:315
lysp_submodule::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:1137
lysp_ext::flags
uint16_t flags
Definition tree_schema.h:302
lysp_type::flags
uint16_t flags
Definition tree_schema.h:420
lysc_range::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1258
lysp_module::data
struct lysp_node * data
Definition tree_schema.h:1114
lysp_feature::depfeatures
struct lysp_feature ** depfeatures
Definition tree_schema.h:317
lysc_type_bits::bits
struct lysc_type_bitenum_item * bits
Definition tree_schema.h:1355
lysp_module::extensions
struct lysp_ext * extensions
Definition tree_schema.h:1109
lysp_refine::presence
const char * presence
Definition tree_schema.h:456
lysp_deviate::mod
uint8_t mod
Definition tree_schema.h:482
lysc_type_bitenum_item::flags
uint16_t flags
Definition tree_schema.h:1334
lysc_type_dec::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1305
lysp_restr::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:371
lys_module::latest_revision
uint8_t latest_revision
Definition tree_schema.h:2167
lysc_type_str::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1316
lysp_tpdf::name
const char * name
Definition tree_schema.h:427
lysc_type_bitenum_item::ref
const char * ref
Definition tree_schema.h:1327
lysc_when::refcount
uint32_t refcount
Definition tree_schema.h:1205
lysp_restr::dsc
const char * dsc
Definition tree_schema.h:369
lysc_node_list::max
uint32_t max
Definition tree_schema.h:1708
lys_module::dsc
const char * dsc
Definition tree_schema.h:2146
lysp_type::bits
struct lysp_type_enum * bits
Definition tree_schema.h:409
lysc_type_str::patterns
struct lysc_pattern ** patterns
Definition tree_schema.h:1321
lysp_node_action::output
struct lysp_node_action_inout output
Definition tree_schema.h:1004
lysp_module::identities
struct lysp_ident * identities
Definition tree_schema.h:1111
lysp_deviate_del::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:503
lysc_iffeature::expr
uint8_t * expr
Definition tree_schema.h:330
lysp_type::types
struct lysp_type * types
Definition tree_schema.h:412
lysc_type_identityref::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1376
lysp_submodule::ref
const char * ref
Definition tree_schema.h:1159
lysc_node_action_inout::child
struct lysc_node * child
Definition tree_schema.h:1459
lysc_ext::argname
const char * argname
Definition tree_schema.h:1188
lysp_when::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:444
lysp_tpdf::dflt
struct lysp_qname dflt
Definition tree_schema.h:429
lysp_node_augment::child
struct lysp_node * child
Definition tree_schema.h:1082
lysp_module::deviations
struct lysp_deviation * deviations
Definition tree_schema.h:1118
lysp_submodule::mod
struct lys_module * mod
Definition tree_schema.h:1127
lys_module::org
const char * org
Definition tree_schema.h:2144
lysp_deviate_rpl::dflt
struct lysp_qname dflt
Definition tree_schema.h:516
lysp_node_notif::child
struct lysp_node * child
Definition tree_schema.h:1031
lysp_refine::ref
const char * ref
Definition tree_schema.h:453
lysp_node::ref
const char * ref
Definition tree_schema.h:741
lysp_feature::iffeatures_c
struct lysc_iffeature * iffeatures_c
Definition tree_schema.h:316
lysp_type::pmod
const struct lysp_module * pmod
Definition tree_schema.h:415
lysp_revision::dsc
const char * dsc
Definition tree_schema.h:379
lysp_deviate_del::uniques
struct lysp_qname * uniques
Definition tree_schema.h:506
lysp_submodule::version
uint8_t version
Definition tree_schema.h:1145
lysp_refine::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:460
lysp_module::augments
struct lysp_node_augment * augments
Definition tree_schema.h:1115
lysp_submodule::contact
const char * contact
Definition tree_schema.h:1157
lys_module::implemented
ly_bool implemented
Definition tree_schema.h:2164
lysp_node_list::key
const char * key
Definition tree_schema.h:851
lysp_submodule::name
const char * name
Definition tree_schema.h:1153
lysp_module::mod
struct lys_module * mod
Definition tree_schema.h:1103
lysp_tpdf::flags
uint16_t flags
Definition tree_schema.h:434
lysc_node_choice::cases
struct lysc_node_case * cases
Definition tree_schema.h:1605
lys_module::ref
const char * ref
Definition tree_schema.h:2147
lysp_node::flags
uint16_t flags
Definition tree_schema.h:737
lysc_node::flags
uint16_t flags
Definition tree_schema.h:1423
lysp_node_action_inout::musts
struct lysp_restr * musts
Definition tree_schema.h:973
lysp_type_enum::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:393
lysp_import::ref
const char * ref
Definition tree_schema.h:271
lysp_submodule::filepath
const char * filepath
Definition tree_schema.h:1154
lysc_node_container::notifs
struct lysc_node_notif * notifs
Definition tree_schema.h:1551
lysp_refine::max
uint32_t max
Definition tree_schema.h:459
lysp_node_leaflist::max
uint32_t max
Definition tree_schema.h:828
lysp_ext::dsc
const char * dsc
Definition tree_schema.h:299
lysp_submodule::includes
struct lysp_include * includes
Definition tree_schema.h:1132
lysc_node_action_inout::musts
struct lysc_must * musts
Definition tree_schema.h:1460
lysp_refine::min
uint32_t min
Definition tree_schema.h:458
lysp_deviation::deviates
struct lysp_deviate * deviates
Definition tree_schema.h:526
lysc_when::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1204
lysc_type::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1286
lysp_include::injected
ly_bool injected
Definition tree_schema.h:288
lysp_deviate_add::units
const char * units
Definition tree_schema.h:491
lysp_node_leaf::dflt
struct lysp_qname dflt
Definition tree_schema.h:800
lysc_type_num::name
const char * name
Definition tree_schema.h:1293
lysc_node::priv
void * priv
Definition tree_schema.h:1436
lysc_type_enum::name
const char * name
Definition tree_schema.h:1339
lysp_deviate_add::flags
uint16_t flags
Definition tree_schema.h:495
lysc_node_container::actions
struct lysc_node_action * actions
Definition tree_schema.h:1550
lysp_type::name
const char * name
Definition tree_schema.h:404
lysp_module::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:1112
lysp_deviate_add::uniques
struct lysp_qname * uniques
Definition tree_schema.h:493
lysc_type_instanceid::name
const char * name
Definition tree_schema.h:1384
lysp_node_augment::when
struct lysp_when * when
Definition tree_schema.h:1083
lysc_type_bin::length
struct lysc_range * length
Definition tree_schema.h:1410
lysp_node_list::min
uint32_t min
Definition tree_schema.h:858
lysp_feature::name
const char * name
Definition tree_schema.h:314
lysp_node_leaflist::min
uint32_t min
Definition tree_schema.h:827
lysp_type::length
struct lysp_restr * length
Definition tree_schema.h:406
lysc_node_anydata::when
struct lysc_when ** when
Definition tree_schema.h:1735
lysc_range::eapptag
const char * eapptag
Definition tree_schema.h:1257
lysp_deviate_rpl::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:513
lysp_deviate_rpl::max
uint32_t max
Definition tree_schema.h:519
lysc_node_leaf::type
struct lysc_type * type
Definition tree_schema.h:1635
lysp_deviate_add::musts
struct lysp_restr * musts
Definition tree_schema.h:492
lysp_node_list::musts
struct lysp_restr * musts
Definition tree_schema.h:849
lysp_submodule::identities
struct lysp_ident * identities
Definition tree_schema.h:1135
lysp_node_leaf::units
const char * units
Definition tree_schema.h:799
lysc_type_instanceid::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1386
lysp_type::path
struct lyxp_expr * path
Definition tree_schema.h:410
lysp_refine::dflts
struct lysp_qname * dflts
Definition tree_schema.h:457
lysc_node::next
struct lysc_node * next
Definition tree_schema.h:1427
lysp_ident::dsc
const char * dsc
Definition tree_schema.h:352
lysc_type_union::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1395
lysp_refine::musts
struct lysp_restr * musts
Definition tree_schema.h:455
lysp_node_case::child
struct lysp_node * child
Definition tree_schema.h:903
lysp_node::iffeatures
struct lysp_qname * iffeatures
Definition tree_schema.h:742
lysp_submodule::latest_revision
uint8_t latest_revision
Definition tree_schema.h:1149
lysp_deviate_add::max
uint32_t max
Definition tree_schema.h:497
lysc_node::parent
struct lys_module *struct lysc_node * parent
Definition tree_schema.h:1426
lysp_submodule::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:1143
lysc_type_bits::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1350
lysc_ident::dsc
const char * dsc
Definition tree_schema.h:1214
lysp_module::revs
struct lysp_revision * revs
Definition tree_schema.h:1105
lysp_type::compiled
struct lysc_type * compiled
Definition tree_schema.h:416
lysc_node_container::child
struct lysc_node * child
Definition tree_schema.h:1547
lysc_ident::flags
uint16_t flags
Definition tree_schema.h:1220
lysc_type_bitenum_item::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1328
lysp_deviate_rpl::type
struct lysp_type * type
Definition tree_schema.h:514
lysc_node_list::uniques
struct lysc_node_leaf *** uniques
Definition tree_schema.h:1706
lysp_refine::iffeatures
struct lysp_qname * iffeatures
Definition tree_schema.h:454
lysp_node_case::when
struct lysp_when * when
Definition tree_schema.h:904
lysp_include::name
const char * name
Definition tree_schema.h:283
lysp_include::submodule
struct lysp_submodule * submodule
Definition tree_schema.h:281
lysp_feature::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:321
lysc_type_leafref::name
const char * name
Definition tree_schema.h:1360
lysp_module::features
struct lysp_feature * features
Definition tree_schema.h:1110
lysp_deviate_del::dflts
struct lysp_qname * dflts
Definition tree_schema.h:507
lysp_node_anydata::musts
struct lysp_restr * musts
Definition tree_schema.h:925
lysp_include::ref
const char * ref
Definition tree_schema.h:285
lysp_module::rpcs
struct lysp_node_action * rpcs
Definition tree_schema.h:1116
lysp_ident::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:354
lysc_node_list::min
uint32_t min
Definition tree_schema.h:1707
lysc_type_str::name
const char * name
Definition tree_schema.h:1314
lysp_ident::bases
const char ** bases
Definition tree_schema.h:351
lysc_type_leafref::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1363
lysc_range::dsc
const char * dsc
Definition tree_schema.h:1254
lysc_node::name
const char * name
Definition tree_schema.h:1432
lysc_module::mod
struct lys_module * mod
Definition tree_schema.h:1745
lysc_node_action::input
struct lysc_node_action_inout input
Definition tree_schema.h:1489
lysp_node_leaf::when
struct lysp_when * when
Definition tree_schema.h:797
lysp_refine::dsc
const char * dsc
Definition tree_schema.h:452
lysp_node_grp::actions
struct lysp_node_action * actions
Definition tree_schema.h:1058
lysc_ext::plugin
struct lyplg_ext * plugin
Definition tree_schema.h:1190
lysp_submodule::deviations
struct lysp_deviation * deviations
Definition tree_schema.h:1142
lysp_revision::date
char date[11]
Definition tree_schema.h:378
lysc_prefix::prefix
char * prefix
Definition tree_schema.h:1175
lysc_node_anydata::musts
struct lysc_must * musts
Definition tree_schema.h:1734
lysc_type_bin::refcount
uint32_t refcount
Definition tree_schema.h:1408
lysc_node::ref
const char * ref
Definition tree_schema.h:1434
lysc_type_leafref::prefixes
struct lysc_prefix * prefixes
Definition tree_schema.h:1367
lysc_type_enum::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1340
lysp_node::dsc
const char * dsc
Definition tree_schema.h:740
lysc_ident::ref
const char * ref
Definition tree_schema.h:1215
lysc_type_enum::enums
struct lysc_type_bitenum_item * enums
Definition tree_schema.h:1345
lysc_must::dsc
const char * dsc
Definition tree_schema.h:1276
lysc_node_leaf::musts
struct lysc_must * musts
Definition tree_schema.h:1633
lysp_node_container::child
struct lysp_node * child
Definition tree_schema.h:773
lysp_submodule::dsc
const char * dsc
Definition tree_schema.h:1158
lys_module::filepath
const char * filepath
Definition tree_schema.h:2143
lysp_node_action::input
struct lysp_node_action_inout input
Definition tree_schema.h:1003
lysp_node_grp::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:1055
lysc_node_choice::when
struct lysc_when ** when
Definition tree_schema.h:1606
lysc_type_union::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1396
lysp_node_list::when
struct lysp_when * when
Definition tree_schema.h:850
lys_module::ns
const char * ns
Definition tree_schema.h:2141
lysp_tpdf::dsc
const char * dsc
Definition tree_schema.h:430
lysc_node_leaflist::max
uint32_t max
Definition tree_schema.h:1673
lysc_when::ref
const char * ref
Definition tree_schema.h:1203
lysp_node_action::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:1001
lysc_type_str::length
struct lysc_range * length
Definition tree_schema.h:1320
lysc_type_bits::name
const char * name
Definition tree_schema.h:1349
lysc_when::prefixes
struct lysc_prefix * prefixes
Definition tree_schema.h:1201
lysp_node_list::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:852
lysc_node_notif::when
struct lysc_when ** when
Definition tree_schema.h:1519
lysc_type_enum::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1341
lysc_node_list::child
struct lysc_node * child
Definition tree_schema.h:1700
lysp_node_uses::augments
struct lysp_node_augment * augments
Definition tree_schema.h:948
lysc_type_bits::refcount
uint32_t refcount
Definition tree_schema.h:1353
lysc_type_enum::refcount
uint32_t refcount
Definition tree_schema.h:1343
lysp_node_container::typedefs
struct lysp_tpdf * typedefs
Definition tree_schema.h:771
lysp_deviate_rpl::flags
uint16_t flags
Definition tree_schema.h:517
lysc_must::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1280
lysp_type::enums
struct lysp_type_enum * enums
Definition tree_schema.h:408
lysp_node::name
const char * name
Definition tree_schema.h:739
lysc_type_leafref::realtype
struct lysc_type * realtype
Definition tree_schema.h:1368
lysp_restr::eapptag
const char * eapptag
Definition tree_schema.h:368
lysc_type_instanceid::refcount
uint32_t refcount
Definition tree_schema.h:1388
lysc_node_leaflist::min
uint32_t min
Definition tree_schema.h:1672
lysc_revision::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1240
lysp_node_container::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:772
lysp_deviate::next
struct lysp_deviate * next
Definition tree_schema.h:483
lysc_node::prev
struct lysc_node * prev
Definition tree_schema.h:1428
lysp_node_leaflist::type
struct lysp_type type
Definition tree_schema.h:823
lysc_must::ref
const char * ref
Definition tree_schema.h:1277
lysp_type_enum::dsc
const char * dsc
Definition tree_schema.h:389
lysc_type_str::refcount
uint32_t refcount
Definition tree_schema.h:1318
lysp_submodule::org
const char * org
Definition tree_schema.h:1156
lysc_ident::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1219
lysc_type_leafref::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1362
lysp_ident::name
const char * name
Definition tree_schema.h:349
lysc_pattern::ref
const char * ref
Definition tree_schema.h:1265
lysc_module::data
struct lysc_node * data
Definition tree_schema.h:1747
lysc_ext::flags
struct lys_module *uint16_t flags
Definition tree_schema.h:1191
lysp_when::dsc
const char * dsc
Definition tree_schema.h:442
lysp_submodule::is_submod
uint8_t is_submod
Definition tree_schema.h:1147
lysc_must::emsg
const char * emsg
Definition tree_schema.h:1278
lys_module::parsed
struct lysp_module * parsed
Definition tree_schema.h:2149
lysc_type::refcount
uint32_t refcount
Definition tree_schema.h:1288
lysc_node_notif::musts
struct lysc_must * musts
Definition tree_schema.h:1518
lysc_type_num::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1294
lysc_when::cond
struct lyxp_expr * cond
Definition tree_schema.h:1199
lysc_type_num::plugin
struct lyplg_type * plugin
Definition tree_schema.h:1295
lysp_qname::str
const char * str
Definition tree_schema.h:338
lys_module::prefix
const char * prefix
Definition tree_schema.h:2142
lysp_submodule::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:1141
lysc_pattern::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1268
lysc_pattern::eapptag
const char * eapptag
Definition tree_schema.h:1267
lysp_module::parsing
uint8_t parsing
Definition tree_schema.h:1122
lysp_ident::iffeatures
struct lysp_qname * iffeatures
Definition tree_schema.h:350
lysc_range::ref
const char * ref
Definition tree_schema.h:1255
lysc_node_choice::dflt
struct lysc_node_case * dflt
Definition tree_schema.h:1607
lysp_tpdf::units
const char * units
Definition tree_schema.h:428
lysc_type_str::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1315
lysp_deviate_del::mod
uint8_t mod
Definition tree_schema.h:501
lysp_node_leaflist::when
struct lysp_when * when
Definition tree_schema.h:822
lysc_type_union::types
struct lysc_type ** types
Definition tree_schema.h:1400
lysp_feature::flags
uint16_t flags
Definition tree_schema.h:322
lysc_type_bitenum_item::name
const char * name
Definition tree_schema.h:1325
lysp_ext::argname
const char * argname
Definition tree_schema.h:298
lysp_type::bases
const char ** bases
Definition tree_schema.h:411
lysp_feature::dsc
const char * dsc
Definition tree_schema.h:319
lysc_node::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1435
lysc_module::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1750
lys_module::ctx
struct ly_ctx * ctx
Definition tree_schema.h:2138
lysp_node_list::max
uint32_t max
Definition tree_schema.h:859
lysp_submodule::extensions
struct lysp_ext * extensions
Definition tree_schema.h:1133
lysp_module::notifs
struct lysp_node_notif * notifs
Definition tree_schema.h:1117
lysp_import::flags
uint16_t flags
Definition tree_schema.h:273
lysc_pattern::inverted
uint32_t inverted
Definition tree_schema.h:1269
lysc_when::context
struct lysc_node * context
Definition tree_schema.h:1200
lysc_type_bin::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1407
lysp_module::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:1119
lysc_type_bin::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1405
lysc_revision::date
char date[11]
Definition tree_schema.h:1239
lysc_type_leafref::exts
struct lysc_ext_instance * exts
Definition tree_schema.h:1361
lysc_node_leaflist::units
const char * units
Definition tree_schema.h:1668
lysp_include::rev
char rev[11]
Definition tree_schema.h:287
lysp_type::fraction_digits
uint8_t fraction_digits
Definition tree_schema.h:418
lysp_tpdf::ref
const char * ref
Definition tree_schema.h:431
lysp_node_leaf::musts
struct lysp_restr * musts
Definition tree_schema.h:796
lysp_type_enum::value
int64_t value
Definition tree_schema.h:391
lysc_node_leaflist::musts
struct lysc_must * musts
Definition tree_schema.h:1664
lysp_import::name
struct lys_module *const char * name
Definition tree_schema.h:266
lysc_node_list::when
struct lysc_when ** when
Definition tree_schema.h:1702
lysp_module::imports
struct lysp_import * imports
Definition tree_schema.h:1107
lysp_deviate::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:484
lysc_type_instanceid::require_instance
uint8_t require_instance
Definition tree_schema.h:1390
lysp_qname::mod
const struct lysp_module * mod
Definition tree_schema.h:339
lysp_module::version
uint8_t version
Definition tree_schema.h:1121
lysc_type_union::basetype
LY_DATA_TYPE basetype
Definition tree_schema.h:1397
lysp_node_leaflist::musts
struct lysp_restr * musts
Definition tree_schema.h:821
lysc_type_identityref::bases
struct lysc_ident ** bases
Definition tree_schema.h:1379
lysc_range::emsg
const char * emsg
Definition tree_schema.h:1256
lysc_iffeature::features
struct lysp_feature ** features
Definition tree_schema.h:331
lysp_include::dsc
const char * dsc
Definition tree_schema.h:284
lysp_refine::nodeid
const char * nodeid
Definition tree_schema.h:451
lysp_deviate_add::exts
struct lysp_ext_instance * exts
Definition tree_schema.h:490
lysc_type_union::refcount
uint32_t refcount
Definition tree_schema.h:1398
lysp_deviate_rpl::min
uint32_t min
Definition tree_schema.h:518
lysc_range::parts
struct lysc_range::lysc_range_part * parts
lysp_qname::flags
uint16_t flags
Definition tree_schema.h:341
lysc_must::prefixes
struct lysc_prefix * prefixes
Definition tree_schema.h:1275
lysp_node_notif::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:1030
lysc_type_leafref::require_instance
uint8_t require_instance
Definition tree_schema.h:1369
lysp_deviate_add::next
struct lysp_deviate * next
Definition tree_schema.h:489
lysp_node_grp::child
struct lysp_node * child
Definition tree_schema.h:1057
lysc_prefix::mod
const struct lys_module * mod
Definition tree_schema.h:1176
lysc_type_bitenum_item::dsc
const char * dsc
Definition tree_schema.h:1326
lysp_node_grp::groupings
struct lysp_node_grp * groupings
Definition tree_schema.h:1056
lysp_node_uses::refines
struct lysp_refine * refines
Definition tree_schema.h:947
lysc_type_dec::fraction_digits
uint8_t fraction_digits
Definition tree_schema.h:1309
lysc_tree_dfs_full
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.
lysc_has_when
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....
lysp_node_actions
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...
lys_find_child
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.
lysc_dfs_clb
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:1953
lysc_iffeature_value
LIBYANG_API_DECL LY_ERR lysc_iffeature_value(const struct lysc_iffeature *iff)
Get how the if-feature statement currently evaluates.
lysc_node_notifs
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...
lysc_node_lref_backlinks
LIBYANG_API_DECL LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *ctx, const struct lysc_node *node, ly_bool match_ancestors, struct ly_set **set)
Get all the leafref (or union with leafrefs) nodes that target a specific node.
lysc_node_lref_target
LIBYANG_API_DECL const struct lysc_node * lysc_node_lref_target(const struct lysc_node *node)
Get the target node of a leafref node. Function lysc_node_lref_targets() should be used instead to ge...
lys_find_path_atoms
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).
lyxp_get_expr
LIBYANG_API_DECL const char * lyxp_get_expr(const struct lyxp_expr *path)
Getter for original XPath expression from a parsed expression.
lys_find_expr_atoms
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).
lysc_node_musts
LIBYANG_API_DECL struct lysc_must * lysc_node_musts(const struct lysc_node *node)
Get the must statements list if present in the node.
lysp_node_notifs
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...
lysp_node_groupings
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 ...
lys_identity_iffeature_value
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.
lys_find_xpath_atoms
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).
lys_nodetype2str
LIBYANG_API_DECL const char * lys_nodetype2str(uint16_t nodetype)
Stringify schema nodetype.
lys_set_implemented
LIBYANG_API_DECL LY_ERR lys_set_implemented(struct lys_module *mod, const char **features)
Make the specific module implemented.
lysp_node_typedefs
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...
lysc_node_child
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
LYSC_PATH_TYPE
Types of the different schema paths.
Definition tree_schema.h:2114
lys_find_path
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).
lys_getnext_ext
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...
lysc_owner_module
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,...
lysc_node_lref_targets
LIBYANG_API_DECL LY_ERR lysc_node_lref_targets(const struct lysc_node *node, struct ly_set **set)
Get the target node(s) of a leafref node or union node with leafrefs.
LYS_NODE_HASH_COUNT
#define LYS_NODE_HASH_COUNT
Maximum number of hashes stored in a schema node.
Definition tree_schema.h:1416
lysc_path
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.
lys_feature_value
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.
lys_find_lypath_atoms
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).
lysc_module_dfs_full
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.
lysc_node_actions
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 ...
lysp_node_child
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...
lysp_feature_next
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
LYS_VERSION
supported YANG schema version values
Definition tree_schema.h:1091
lys_getnext
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....
lysc_node_when
LIBYANG_API_DECL struct lysc_when ** lysc_node_when(const struct lysc_node *node)
Get the when statements list if present in the node.
lysc_data_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.
lys_find_xpath
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.
LY_REV_SIZE
#define LY_REV_SIZE
Definition tree_schema.h:232
LYSC_PATH_LOG
@ LYSC_PATH_LOG
Definition tree_schema.h:2115
LYSC_PATH_DATA
@ LYSC_PATH_DATA
Definition tree_schema.h:2116
LYSC_PATH_DATA_PATTERN
@ LYSC_PATH_DATA_PATTERN
Definition tree_schema.h:2117
LYS_VERSION_UNDEF
@ LYS_VERSION_UNDEF
Definition tree_schema.h:1092
LYS_VERSION_1_0
@ LYS_VERSION_1_0
Definition tree_schema.h:1093
LYS_VERSION_1_1
@ LYS_VERSION_1_1
Definition tree_schema.h:1094
lys_module
Available YANG schema tree structures representing YANG module.
Definition tree_schema.h:2137
lysc_ext
Compiled YANG extension-stmt.
Definition tree_schema.h:1186
lysc_ident
YANG identity-stmt.
Definition tree_schema.h:1212
lysc_iffeature
Compiled YANG if-feature-stmt.
Definition tree_schema.h:329
lysc_module
Compiled YANG schema tree structure representing YANG module.
Definition tree_schema.h:1744
lysc_must
Definition tree_schema.h:1273
lysc_node
Compiled YANG data node.
Definition tree_schema.h:1421
lysc_node_action
Definition tree_schema.h:1463
lysc_node_action_inout
Definition tree_schema.h:1439
lysc_node_anydata
Definition tree_schema.h:1711
lysc_node_case
Definition tree_schema.h:1554
lysc_node_choice
Definition tree_schema.h:1582
lysc_node_container
Definition tree_schema.h:1524
lysc_node_leaf
Definition tree_schema.h:1610
lysc_node_leaflist
Definition tree_schema.h:1641
lysc_node_list
Definition tree_schema.h:1677
lysc_node_notif
Definition tree_schema.h:1494
lysc_pattern
Definition tree_schema.h:1261
lysc_prefix
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOL...
Definition tree_schema.h:1174
lysc_range
Definition tree_schema.h:1243
lysc_range::lysc_range_part
Definition tree_schema.h:1244
lysc_revision
Compiled YANG revision statement.
Definition tree_schema.h:1238
lysc_type
Definition tree_schema.h:1283
lysc_type_bin
Definition tree_schema.h:1403
lysc_type_bitenum_item
Definition tree_schema.h:1324
lysc_type_bits
Definition tree_schema.h:1348
lysc_type_dec
Definition tree_schema.h:1302
lysc_type_enum
Definition tree_schema.h:1338
lysc_type_identityref
Definition tree_schema.h:1372
lysc_type_instanceid
Definition tree_schema.h:1383
lysc_type_leafref
Definition tree_schema.h:1359
lysc_type_num
Definition tree_schema.h:1292
lysc_type_str
Definition tree_schema.h:1313
lysc_type_union
Definition tree_schema.h:1393
lysc_when
YANG when-stmt.
Definition tree_schema.h:1198
lysp_deviate
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition tree_schema.h:481
lysp_deviate_add
Definition tree_schema.h:487
lysp_deviate_del
Definition tree_schema.h:500
lysp_deviate_rpl
Definition tree_schema.h:510
lysp_deviation
Definition tree_schema.h:522
lysp_ext
YANG extension-stmt.
Definition tree_schema.h:296
lysp_feature
YANG feature-stmt.
Definition tree_schema.h:313
lysp_ident
YANG identity-stmt.
Definition tree_schema.h:348
lysp_import
YANG import-stmt.
Definition tree_schema.h:265
lysp_include
YANG include-stmt.
Definition tree_schema.h:280
lysp_module
Printable YANG schema tree structure representing YANG module.
Definition tree_schema.h:1102
lysp_node
Generic YANG data node.
Definition tree_schema.h:734
lysp_node_action
YANG rpc-stmt and action-stmt.
Definition tree_schema.h:982
lysp_node_action_inout
YANG input-stmt and output-stmt.
Definition tree_schema.h:955
lysp_node_anydata
Definition tree_schema.h:907
lysp_node_augment
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition tree_schema.h:1065
lysp_node_case
Definition tree_schema.h:885
lysp_node_choice
Definition tree_schema.h:862
lysp_node_container
Extension structure of the lysp_node for YANG container.
Definition tree_schema.h:750
lysp_node_grp
YANG grouping-stmt.
Definition tree_schema.h:1037
lysp_node_leaf
Definition tree_schema.h:778
lysp_node_leaflist
Definition tree_schema.h:803
lysp_node_list
Definition tree_schema.h:831
lysp_node_notif
YANG notification-stmt.
Definition tree_schema.h:1010
lysp_node_uses
Definition tree_schema.h:929
lysp_qname
Qualified name (optional prefix followed by an identifier).
Definition tree_schema.h:337
lysp_refine
YANG refine-stmt.
Definition tree_schema.h:450
lysp_restr
Covers restrictions: range, length, pattern, must.
Definition tree_schema.h:361
lysp_revision
YANG revision-stmt.
Definition tree_schema.h:377
lysp_submodule
Definition tree_schema.h:1126
lysp_tpdf
YANG typedef-stmt.
Definition tree_schema.h:426
lysp_type
YANG type-stmt.
Definition tree_schema.h:403
lysp_type_enum
Enumeration/Bit value definition.
Definition tree_schema.h:387
lysp_when
YANG when-stmt.
Definition tree_schema.h:440
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition tree.h:202
log.h
Logger manipulation routines and error definitions.
ly_bool
uint8_t ly_bool
Type to indicate boolean value.
Definition log.h:35
tree.h
libyang generic macros and functions to work with YANG schema or data trees.
lyd_value
YANG data representation.
Definition tree_data.h:567