libyang
3.6.0
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
|
Macros | |
#define | _LYSC_TREE_DFS_NEXT(START, ELEM, NEXT) |
Helper macro for LYSC_TREE_DFS_END, should not be used directly! More... | |
#define | LY_REV_SIZE 11 |
#define | LYS_NODE_HASH_COUNT 4 |
Maximum number of hashes stored in a schema node. More... | |
#define | lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL) |
Same as lysc_data_node() but never returns the node itself. More... | |
#define | lysc_is_dup_inst_list(lysc_node) |
Examine whether a node is a key-less list or a non-configuration leaf-list. More... | |
#define | lysc_is_key(lysc_node) ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1) |
Examine whether a node is a list's key. More... | |
#define | lysc_is_np_cont(lysc_node) ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1) |
Examine whether a node is a non-presence container. More... | |
#define | lysc_is_userordered(lysc_node) ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1) |
Examine whether a node is user-ordered list or leaf-list. More... | |
#define | LYSC_TREE_DFS_BEGIN(START, ELEM) |
Macro to iterate via all elements in a schema (sub)tree including input and output. Note that actions and notifications of traversed nodes are ignored! To traverse on all the nodes including those, use lysc_tree_dfs_full() instead. More... | |
#define | LYSC_TREE_DFS_END(START, ELEM) |
Macro to iterate via all elements in a (sub)tree. This is the closing part to the LYSC_TREE_DFS_BEGIN - they always have to be used together. More... | |
#define | LYSP_MODULE_NAME(PMOD) (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name) |
Get the parsed module or submodule name. More... | |
Typedefs | |
typedef enum LYS_VERSION | LYS_VERSION |
supported YANG schema version values More... | |
typedef 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. More... | |
Enumerations | |
enum | LYS_INFORMAT { LYS_IN_UNKNOWN = 0, LYS_IN_YANG = 1, LYS_IN_YIN = 3 } |
Schema input formats accepted by libyang parser functions. More... | |
enum | LYS_OUTFORMAT { LYS_OUT_UNKNOWN = 0, LYS_OUT_YANG = 1, LYS_OUT_YANG_COMPILED = 2, LYS_OUT_YIN = 3, LYS_OUT_TREE } |
Schema output formats accepted by libyang printer functions. More... | |
enum | LYS_VERSION { LYS_VERSION_UNDEF = 0, LYS_VERSION_1_0 = 1, LYS_VERSION_1_1 = 2 } |
supported YANG schema version values More... | |
enum | LYSC_PATH_TYPE { LYSC_PATH_LOG, LYSC_PATH_DATA, LYSC_PATH_DATA_PATTERN } |
Types of the different schema paths. More... | |
Functions | |
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. More... | |
LIBYANG_API_DECL 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. More... | |
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). More... | |
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). More... | |
LIBYANG_API_DECL 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). More... | |
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). More... | |
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. More... | |
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). More... | |
LIBYANG_API_DECL 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. Returned node may be from an augment. More... | |
LIBYANG_API_DECL 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 in a data tree. More... | |
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. More... | |
LIBYANG_API_DECL const char * | lys_nodetype2str (uint16_t nodetype) |
Stringify schema nodetype. More... | |
LIBYANG_API_DECL LY_ERR | lys_parse (struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features, struct lys_module **module) |
Load a schema into the specified context. More... | |
LIBYANG_API_DECL LY_ERR | lys_parse_fd (struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module) |
Read a schema from file descriptor into the specified context. More... | |
LIBYANG_API_DECL LY_ERR | lys_parse_mem (struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module) |
Load a schema into the specified context. More... | |
LIBYANG_API_DECL LY_ERR | lys_parse_path (struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module) |
Load a schema into the specified context from a file. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_clb (ly_write_clb writeclb, void *user_data, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options) |
Print schema tree in the specified format using a provided callback. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_fd (int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options) |
Print schema tree in the specified format into a file descriptor. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_file (FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options) |
Print schema tree in the specified format into a file stream. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_mem (char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options) |
Print schema tree in the specified format into a memory block. It is up to caller to free the returned string by free(). More... | |
LIBYANG_API_DECL LY_ERR | lys_print_module (struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, size_t line_length, uint32_t options) |
Schema module printer. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_node (struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, size_t line_length, uint32_t options) |
Schema node printer. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_path (const char *path, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options) |
Print schema tree in the specified format into a file. More... | |
LIBYANG_API_DECL LY_ERR | lys_print_submodule (struct ly_out *out, const struct lysp_submodule *submodule, LYS_OUTFORMAT format, size_t line_length, uint32_t options) |
Schema submodule printer. More... | |
LIBYANG_API_DECL LY_ERR | lys_search_localfile (const char *const *searchpaths, ly_bool cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format) |
Search for the schema file in the specified searchpaths. More... | |
LIBYANG_API_DECL LY_ERR | lys_set_implemented (struct lys_module *mod, const char **features) |
Make the specific module implemented. More... | |
LIBYANG_API_DECL 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. More... | |
LIBYANG_API_DECL struct lysc_when * | lysc_has_when (const struct lysc_node *node) |
Check whether the schema node data instance existence depends on any when conditions. This node and any direct parent choice and case schema nodes are also examined for when conditions. More... | |
LIBYANG_API_DECL LY_ERR | lysc_iffeature_value (const struct lysc_iffeature *iff) |
Get how the if-feature statement currently evaluates. More... | |
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. More... | |
LIBYANG_API_DECL 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 case it has a actions/RPCs array, returns it. More... | |
LIBYANG_API_DECL struct lysc_node * | lysc_node_child (const struct lysc_node *node) |
Get the children linked list of the given (compiled) schema node. More... | |
LIBYANG_API_DECL struct lysc_node * | lysc_node_lref_target (const struct lysc_node *node) |
Get the target node of a leafref node. More... | |
LIBYANG_API_DECL struct lysc_must * | lysc_node_musts (const struct lysc_node *node) |
Get the must statements list if present in the node . More... | |
LIBYANG_API_DECL 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 case it has a Notifications array, returns it. More... | |
LIBYANG_API_DECL struct lysc_when ** | lysc_node_when (const struct lysc_node *node) |
Get the when statements list if present in the node . More... | |
LIBYANG_API_DECL 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, in case of augments it is the target module, recursively, otherwise it is the module where the node is defined. More... | |
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. More... | |
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. More... | |
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. More... | |
LIBYANG_API_DECL 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 case it has a actions/RPCs array, returns it. More... | |
LIBYANG_API_DECL 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 it has a children list, returns it. More... | |
LIBYANG_API_DECL 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 it has a groupings array, returns it. More... | |
LIBYANG_API_DECL 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 case it has a Notifications array, returns it. More... | |
LIBYANG_API_DECL 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 it has a typedefs array, returns it. More... | |
LIBYANG_API_DECL const char * | lyxp_get_expr (const struct lyxp_expr *path) |
Getter for original XPath expression from a parsed expression. More... | |
Data structures and functions to manipulate and access schema tree.
struct lys_module |
Available YANG schema tree structures representing YANG module.
Definition at line 2131 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lys_module ** | augmented_by |
List of modules that augment this module (sized array) |
struct lysc_module * | compiled |
Compiled and fully validated YANG schema tree for data parsing. Available only for implemented modules. |
const char * | contact |
contact information for the module |
struct ly_ctx * | ctx |
libyang context of the module (mandatory) |
struct lys_module ** | deviated_by |
List of modules that deviate this module (sized array) |
const char * | dsc |
description of the module |
const char * | filepath |
path, if the schema was read from a file, NULL in case of reading from memory |
struct lysc_ident * | identities |
List of compiled identities of the module (sized array) also contains the disabled identities when their if-feature(s) are evaluated to "false", and also the list is filled even if the module is not implemented. The list is located here because it avoids problems when the module became implemented in future (no matter if implicitly via augment/deviate or explicitly via lys_set_implemented()). Note that if the module is not implemented (compiled), the identities cannot be instantiated in data (in identityrefs). |
ly_bool | implemented |
flag if the module is implemented, not just imported |
uint8_t | latest_revision |
Flag to mark the latest available revision, see latest_revision options. |
const char * | name |
name of the module (mandatory) |
const char * | ns |
namespace of the module (module - mandatory) |
const char * | org |
party/company responsible for the module |
struct lysp_module * | parsed |
Simply parsed (unresolved) YANG schema tree |
const char * | prefix |
module prefix or submodule belongsto prefix of main module (mandatory) |
const char * | ref |
cross-reference for the module |
const char * | revision |
revision of the module (if present) |
ly_bool | to_compile |
flag marking a module that was changed but not (re)compiled, see LY_CTX_EXPLICIT_COMPILE. |
struct lysc_ext |
Compiled YANG extension-stmt.
Note that the compiled extension definition is created only in case the extension is instantiated. It is not available from the compiled schema, but from the parsed extension definition which is being searched when an extension instance is being compiled.
Definition at line 1204 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | argname |
argument name, NULL if not specified |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
LYS_STATUS_* value (Schema nodes flags) |
struct lys_module * | module |
module structure |
const char * | name |
extension name |
struct lyplg_ext * | plugin |
Plugin implementing the specific extension |
struct lysc_ident |
YANG identity-stmt.
Definition at line 1230 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysc_ident ** | derived |
list of (pointers to the) derived identities (sized array) It also contains references to identities located in unimplemented modules. |
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_ values are allowed |
struct lys_module * | module |
module structure |
const char * | name |
identity name (mandatory, no prefix) |
const char * | ref |
reference |
struct lysc_iffeature |
Compiled YANG if-feature-stmt.
Definition at line 329 of file tree_schema.h.
Data Fields | ||
---|---|---|
uint8_t * | expr |
2bits array describing the if-feature expression in prefix format, see if-feature expression tokens |
struct lysp_feature ** | features |
array of pointers to the features used in expression (sized array) |
struct lysc_module |
Compiled YANG schema tree structure representing YANG module.
Semantically validated YANG schema tree for data tree parsing. Contains only the necessary information for the data validation.
Definition at line 1762 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysc_node * | data |
list of module's top-level data nodes (linked list) |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lys_module * | mod |
covering module structure |
struct lysc_node_notif * | notifs |
first of notifications nodes (linked list) |
struct lysc_node_action * | rpcs |
first of actions nodes (linked list) |
struct lysc_must |
Definition at line 1291 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lyxp_expr * | cond |
XPath when condition |
const char * | dsc |
description |
const char * | eapptag |
error-app-tag value |
const char * | emsg |
error-message |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysc_prefix * | prefixes |
compiled used prefixes in the condition |
const char * | ref |
reference |
struct lysc_node |
Compiled YANG data node.
Definition at line 1439 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
type of the node (mandatory) |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_action |
Definition at line 1481 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_action | __unnamed__ | |
struct lysc_node_action_inout | input |
RPC's/action's input |
struct lysc_node_action_inout | output |
RPC's/action's output |
struct lysc_when ** | when |
list of pointers to when statements (sized array), the action/RPC nodes do not contain the when statement on their own, but they can inherit it from the parent's uses. |
union lysc_node_action.__unnamed__ |
Definition at line 1482 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_action.__unnamed__.__unnamed__ |
Definition at line 1485 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
action/RPC name (mandatory) |
struct lysc_node_action * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_RPC or LYS_ACTION |
struct lysc_node * | parent |
parent node (NULL in case of top level node - RPC) |
struct lysc_node_action * | prev |
pointer to the previous sibling node
|
void * | priv | |
const char * | ref |
reference |
struct lysc_node_action_inout |
Definition at line 1457 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_action_inout | __unnamed__ | |
struct lysc_node * | child |
first child node (linked list) |
struct lysc_must * | musts |
list of must restrictions (sized array) |
union lysc_node_action_inout.__unnamed__ |
Definition at line 1458 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_action_inout.__unnamed__.__unnamed__ |
Definition at line 1461 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
ALWAYS NULL, compatibility member with lysc_node |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
"input" or "output" |
struct lysc_node * | next |
next sibling node (output node for input, NULL for output) |
uint16_t | nodetype |
LYS_INPUT or LYS_OUTPUT |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node (input and output node pointing to each other) |
void * | priv | |
const char * | ref |
ALWAYS NULL, compatibility member with lysc_node |
struct lysc_node_anydata |
Definition at line 1729 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_anydata | __unnamed__ | |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_anydata.__unnamed__ |
Definition at line 1730 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_anydata.__unnamed__.__unnamed__ |
Definition at line 1733 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_ANYXML or LYS_ANYDATA |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_case |
Definition at line 1572 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_case | __unnamed__ | |
struct lysc_node * | child |
first child node of the case (linked list). Note that all the children of all the sibling cases are linked each other as siblings with the parent pointer pointing to appropriate case node. |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_case.__unnamed__ |
Definition at line 1573 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_case.__unnamed__.__unnamed__ |
Definition at line 1576 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser, unused |
struct lys_module * | module |
module structure |
const char * | name |
name of the case, including the implicit case |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CASE |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_choice |
Definition at line 1600 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_choice | __unnamed__ | |
struct lysc_node_case * | cases |
list of all the cases (linked list) |
struct lysc_node_case * | dflt |
default case of the choice, only a pointer into the cases array. |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_choice.__unnamed__ |
Definition at line 1601 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_choice.__unnamed__.__unnamed__ |
Definition at line 1604 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser, unused |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CHOICE |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_container |
Definition at line 1542 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_container | __unnamed__ | |
struct lysc_node_action * | actions |
first of actions nodes (linked list) |
struct lysc_node * | child |
first child node (linked list) |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_node_notif * | notifs |
first of notifications nodes (linked list) |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_container.__unnamed__ |
Definition at line 1543 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_container.__unnamed__.__unnamed__ |
Definition at line 1546 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CONTAINER |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_leaf |
Definition at line 1628 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_leaf | __unnamed__ | |
struct lyd_value * | dflt |
default value, use lyd_value_get_canonical() to get the canonical string |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_type * | type |
type of the leaf node (mandatory) |
const char * | units |
units of the leaf's type |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_leaf.__unnamed__ |
Definition at line 1629 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_leaf.__unnamed__.__unnamed__ |
Definition at line 1632 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LEAF |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_leaflist |
Definition at line 1659 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_leaflist | __unnamed__ | |
struct lyd_value ** | dflts |
list (sized array) of default values, use lyd_value_get_canonical() to get the canonical strings |
uint32_t | max |
max-elements constraint |
uint32_t | min |
min-elements constraint |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_type * | type |
type of the leaf node (mandatory) |
const char * | units |
units of the leaf's type |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_leaflist.__unnamed__ |
Definition at line 1660 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_leaflist.__unnamed__.__unnamed__ |
Definition at line 1663 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LEAFLIST |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_list |
Definition at line 1695 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_list | __unnamed__ | |
struct lysc_node_action * | actions |
first of actions nodes (linked list) |
struct lysc_node * | child |
first child node (linked list) |
uint32_t | max |
max-elements constraint |
uint32_t | min |
min-elements constraint |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_node_notif * | notifs |
first of notifications nodes (linked list) |
struct lysc_node_leaf *** | uniques |
list of sized arrays of pointers to the unique nodes (sized array) |
struct lysc_when ** | when |
list of pointers to when statements (sized array) |
union lysc_node_list.__unnamed__ |
Definition at line 1696 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_list.__unnamed__.__unnamed__ |
Definition at line 1699 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
node name (mandatory) |
struct lysc_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LIST |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node * | prev |
pointer to the previous sibling node
|
void * | priv |
private arbitrary user data, not used by libyang unless LY_CTX_SET_PRIV_PARSED is set |
const char * | ref |
reference |
struct lysc_node_notif |
Definition at line 1512 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_node_notif | __unnamed__ | |
struct lysc_node * | child |
first child node (linked list) |
struct lysc_must * | musts |
list of must restrictions (sized array) |
struct lysc_when ** | when |
list of pointers to when statements (sized array), the notification nodes do not contain the when statement on their own, but they can inherit it from the parent's uses. |
union lysc_node_notif.__unnamed__ |
Definition at line 1513 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysc_node | node |
implicit cast for the members compatible with lysc_node |
struct lysc_node_notif.__unnamed__.__unnamed__ |
Definition at line 1516 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | hash[4] |
schema hash required for LYB printer/parser |
struct lys_module * | module |
module structure |
const char * | name |
Notification name (mandatory) |
struct lysc_node_notif * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_NOTIF |
struct lysc_node * | parent |
parent node (NULL in case of top level node) |
struct lysc_node_notif * | prev |
pointer to the previous sibling node
|
void * | priv | |
const char * | ref |
reference |
struct lysc_pattern |
Definition at line 1279 of file tree_schema.h.
Data Fields | ||
---|---|---|
pcre2_code * | code |
compiled regular expression |
const char * | dsc |
description |
const char * | eapptag |
error-app-tag value |
const char * | emsg |
error-message |
const char * | expr |
original, not compiled, regular expression |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint32_t | inverted: 1 |
invert-match flag |
const char * | ref |
reference |
uint32_t | refcount: 31 |
reference counter |
struct lysc_prefix |
Compiled prefix data pair mapping of prefixes to modules. In case the format is LY_VALUE_SCHEMA_RESOLVED, the expected prefix data is a sized array of these structures.
Definition at line 1192 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lys_module * | mod |
mapping to a module |
char * | prefix |
used prefix |
struct lysc_range |
Definition at line 1261 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
const char * | eapptag |
error-app-tag value |
const char * | emsg |
error-message |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysc_range_part * | parts |
compiled range expression (sized array) |
const char * | ref |
reference |
struct lysc_revision |
Compiled YANG revision statement.
Definition at line 1256 of file tree_schema.h.
Data Fields | ||
---|---|---|
char | date[11] |
revision-date (mandatory) |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysc_type |
Definition at line 1301 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing, it may be accessed concurrently when creating/freeing data node values that reference it (instance-identifier) |
struct lysc_type_bin |
Definition at line 1421 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysc_range * | length |
optional length limitation |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_bitenum_item |
Definition at line 1342 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysc_type_bitenum_item | __unnamed__ | |
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_ and LYS_IS_ENUM values are allowed |
const char * | name |
enumeration identifier |
const char * | ref |
reference |
union lysc_type_bitenum_item.__unnamed__ |
Definition at line 1348 of file tree_schema.h.
Data Fields | ||
---|---|---|
uint32_t | position |
non-negative integer value associated with the bit |
int32_t | value |
integer value associated with the enumeration |
struct lysc_type_bits |
Definition at line 1366 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_type_bitenum_item * | bits |
bits list (sized array), mandatory (at least 1 item), the items are ordered by their position value. |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_dec |
Definition at line 1320 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint8_t | fraction_digits |
fraction digits specification |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
struct lysc_range * | range |
Optional range limitation |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_enum |
Definition at line 1356 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_type_bitenum_item * | enums |
enumerations list (sized array), mandatory (at least 1 item) |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_identityref |
Definition at line 1390 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysc_ident ** | bases |
list of pointers to the base identities (sized array), mandatory (at least 1 item) |
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_instanceid |
Definition at line 1401 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
uint8_t | require_instance |
require-instance flag |
struct lysc_type_leafref |
Definition at line 1377 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyxp_expr * | path |
parsed target path, compiled path cannot be stored because of type sharing |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
struct lysc_prefix * | prefixes |
resolved prefixes used in the path |
struct lysc_type * | realtype |
pointer to the real (first non-leafref in possible leafrefs chain) type. |
uint32_t | refcount |
reference counter for type sharing |
uint8_t | require_instance |
require-instance flag |
struct lysc_type_num |
Definition at line 1310 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
struct lysc_range * | range |
Optional range limitation |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_str |
Definition at line 1331 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysc_range * | length |
optional length limitation |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lysc_pattern ** | patterns |
optional list of pointers to pattern limitations (sized array) |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type_union |
Definition at line 1411 of file tree_schema.h.
Data Fields | ||
---|---|---|
LY_DATA_TYPE | basetype |
base type of the type |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | name |
referenced typedef name (without prefix, if any), NULL for built-in types |
struct lyplg_type * | plugin |
type's manipulation callbacks plugin |
uint32_t | refcount |
reference counter for type sharing |
struct lysc_type ** | types |
list of types in the union (sized array), mandatory (at least 1 item) |
struct lysc_when |
YANG when-stmt.
Definition at line 1216 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lyxp_expr * | cond |
XPath when condition |
struct lysc_node * | context |
context node for evaluating the expression, NULL if the context is root node |
const char * | dsc |
description |
struct lysc_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS is allowed |
struct lysc_prefix * | prefixes |
compiled used prefixes in the condition |
const char * | ref |
reference |
uint32_t | refcount |
reference counter since some of the when statements are shared among several nodes |
struct lysp_deviate |
Generic deviate structure to get type and cast to lysp_deviate_* structure.
Definition at line 481 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint8_t | mod |
type of the deviate modification |
struct lysp_deviate * | next |
next deviate structure in the list |
struct lysp_deviate_add |
Definition at line 487 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname * | dflts |
list of default values (sized array) |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint32_t | max |
max-elements constraint, 0 means unbounded |
uint32_t | min |
min-elements constraint |
uint8_t | mod |
type of the deviate modification |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_deviate * | next |
next deviate structure in the list |
struct lysp_qname * | uniques |
list of uniques specifications (sized array) |
const char * | units |
units of the values |
struct lysp_deviate_del |
Definition at line 500 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname * | dflts |
list of default values (sized array) |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint8_t | mod |
type of the deviate modification |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_deviate * | next |
next deviate structure in the list |
struct lysp_qname * | uniques |
list of uniques specifications (sized array) |
const char * | units |
units of the values |
struct lysp_deviate_rpl |
Definition at line 510 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname | dflt |
default value |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint32_t | max |
max-elements constraint, 0 means unbounded |
uint32_t | min |
min-elements constraint |
uint8_t | mod |
type of the deviate modification |
struct lysp_deviate * | next |
next deviate structure in the list |
struct lysp_type * | type |
type of the node |
const char * | units |
units of the values |
struct lysp_deviation |
Definition at line 522 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_deviate * | deviates |
list of deviate specifications (linked list) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | nodeid |
target absolute schema nodeid (mandatory) |
const char * | ref |
reference statement |
struct lysp_ext |
YANG extension-stmt.
Definition at line 296 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | argname |
argument name, NULL if not specified |
struct lysc_ext * | compiled |
pointer to the compiled extension definition. The extension definition is compiled only if there is compiled extension instance, otherwise this pointer remains NULL. The compiled extension definition is shared among all extension instances. |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
LYS_STATUS_* and LYS_YINELEM_* values (Schema nodes flags) |
const char * | name |
extension name |
const char * | ref |
reference statement |
struct lysp_feature |
YANG feature-stmt.
Definition at line 313 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_feature ** | depfeatures |
list of pointers to other features depending on this one (sized array) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_* values and LYS_FENABLED are allowed |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
struct lysc_iffeature * | iffeatures_c |
compiled if-features |
const char * | name |
feature name (mandatory) |
const char * | ref |
reference statement |
struct lysp_ident |
YANG identity-stmt.
Definition at line 348 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char ** | bases |
list of base identifiers (sized array) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_ values are allowed |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
identity name (mandatory), including possible prefix |
const char * | ref |
reference statement |
struct lysp_import |
YANG import-stmt.
Definition at line 265 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
LYS_INTERNAL value (Schema nodes flags) |
struct lys_module * | module |
pointer to the imported module (mandatory, but resolved when the referring module is completely parsed) |
const char * | name |
name of the imported module (mandatory) |
const char * | prefix |
prefix for the data from the imported schema (mandatory) |
const char * | ref |
reference |
char | rev[11] |
revision-date of the imported module |
struct lysp_include |
YANG include-stmt.
Definition at line 280 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
ly_bool | injected |
flag to mark includes copied into main module from submodules, only for backward compatibility with YANG 1.0, which does not require the main module to include all submodules. |
const char * | name |
name of the included submodule (mandatory) |
const char * | ref |
reference |
char | rev[11] |
revision-date of the included submodule |
struct lysp_submodule * | submodule |
pointer to the parsed submodule structure (mandatory, but resolved when the referring module is completely parsed) |
struct lysp_module |
Printable YANG schema tree structure representing YANG module.
Simple structure corresponding to the YANG format. The schema is only syntactically validated.
Definition at line 1120 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_node_augment * | augments |
list of augments (linked list) |
struct lysp_node * | data |
list of module's top-level data nodes (linked list) |
struct lysp_deviation * | deviations |
list of deviations (sized array) |
struct lysp_ext * | extensions |
list of extension statements (sized array) |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysp_feature * | features |
list of feature definitions (sized array) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_ident * | identities |
list of identities (sized array) |
struct lysp_import * | imports |
list of imported modules (sized array) |
struct lysp_include * | includes |
list of included submodules (sized array) |
uint8_t | is_submod: 1 |
always 0 |
struct lys_module * | mod |
covering module structure |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
uint8_t | parsing: 1 |
flag for circular check |
struct lysp_revision * | revs |
list of the module revisions (sized array), the first revision in the list is always the last (newest) revision of the module |
struct lysp_node_action * | rpcs |
list of RPCs (linked list) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
uint8_t | version |
yang-version (LYS_VERSION values) |
struct lysp_node |
Generic YANG data node.
Definition at line 752 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array), must be qname because of refines |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
next sibling node (NULL if there is no one) |
uint16_t | nodetype |
type of the node (mandatory) |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_action |
YANG rpc-stmt and action-stmt.
Definition at line 1000 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_action | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_node_action_inout | input |
RPC's/Action's input |
struct lysp_node_action_inout | output |
RPC's/Action's output |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
union lysp_node_action.__unnamed__ |
Definition at line 1001 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_action.__unnamed__.__unnamed__ |
Definition at line 1004 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
grouping name reference (mandatory) |
struct lysp_node_action * | next |
pointer to the next action (NULL if there is no one) |
uint16_t | nodetype |
LYS_RPC or LYS_ACTION |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_action_inout |
YANG input-stmt and output-stmt.
Definition at line 973 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_action_inout | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
union lysp_node_action_inout.__unnamed__ |
Definition at line 974 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_action_inout.__unnamed__.__unnamed__ |
Definition at line 977 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
ALWAYS NULL, compatibility member with lysp_node |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
ALWAYS NULL, compatibility member with lysp_node |
const char * | name |
empty string |
struct lysp_node * | next |
NULL |
uint16_t | nodetype |
LYS_INPUT or LYS_OUTPUT |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
ALWAYS NULL, compatibility member with lysp_node |
struct lysp_node_anydata |
Definition at line 925 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_anydata | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_when * | when |
when statement |
union lysp_node_anydata.__unnamed__ |
Definition at line 926 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_anydata.__unnamed__.__unnamed__ |
Definition at line 929 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_ANYXML or LYS_ANYDATA |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_augment |
YANG uses-augment-stmt and augment-stmt (compatible with struct lysp_node )
Definition at line 1083 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_augment | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_action * | actions |
list of actions (linked list) |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
struct lysp_when * | when |
when statement |
union lysp_node_augment.__unnamed__ |
Definition at line 1084 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_augment.__unnamed__.__unnamed__ |
Definition at line 1087 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_* values are allowed |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
struct lysp_node_augment * | next |
pointer to the next augment (NULL if there is no one) |
const char * | nodeid |
target schema nodeid (mandatory) - absolute for global augments, descendant for uses's augments |
uint16_t | nodetype |
LYS_AUGMENT |
struct lysp_node * | parent |
parent node (NULL if this is a top-level augment) |
const char * | ref |
reference statement |
struct lysp_node_case |
Definition at line 903 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_case | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_when * | when |
when statement |
union lysp_node_case.__unnamed__ |
Definition at line 904 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_case.__unnamed__.__unnamed__ |
Definition at line 907 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CASE |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_choice |
Definition at line 880 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_choice | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_qname | dflt |
default case |
struct lysp_when * | when |
when statement |
union lysp_node_choice.__unnamed__ |
Definition at line 881 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_choice.__unnamed__.__unnamed__ |
Definition at line 884 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CHOICE |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_container |
Extension structure of the lysp_node for YANG container.
Definition at line 768 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_container | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_action * | actions |
list of actions (linked list) |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
const char * | presence |
presence description |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
struct lysp_when * | when |
when statement |
union lysp_node_container.__unnamed__ |
Definition at line 769 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_container.__unnamed__.__unnamed__ |
Definition at line 772 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_CONTAINER |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_grp |
YANG grouping-stmt.
Definition at line 1055 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_grp | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_action * | actions |
list of actions (linked list) |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
union lysp_node_grp.__unnamed__ |
Definition at line 1056 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_grp.__unnamed__.__unnamed__ |
Definition at line 1059 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_* values are allowed |
struct lysp_qname * | iffeatures |
ALWAYS NULL, compatibility member with lysp_node |
const char * | name |
grouping name (mandatory) |
struct lysp_node_grp * | next |
pointer to the next grouping (NULL if there is no one) |
uint16_t | nodetype |
LYS_GROUPING |
struct lysp_node * | parent |
parent node (NULL if this is a top-level grouping) |
const char * | ref |
reference statement |
struct lysp_node_leaf |
Definition at line 796 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_leaf | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_qname | dflt |
default value, it may or may not be a qualified name |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_type | type |
type of the leaf node (mandatory) |
const char * | units |
units of the leaf's type |
struct lysp_when * | when |
when statement |
union lysp_node_leaf.__unnamed__ |
Definition at line 797 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_leaf.__unnamed__.__unnamed__ |
Definition at line 800 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LEAF |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_leaflist |
Definition at line 821 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_leaflist | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_qname * | dflts |
list of default values (sized array), they may or may not be qualified names |
uint32_t | max |
max-elements constraint, 0 means unbounded |
uint32_t | min |
min-elements constraint |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_type | type |
type of the leaf node (mandatory) |
const char * | units |
units of the leaf's type |
struct lysp_when * | when |
when statement |
union lysp_node_leaflist.__unnamed__ |
Definition at line 822 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_leaflist.__unnamed__.__unnamed__ |
Definition at line 825 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LEAFLIST |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_list |
Definition at line 849 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_list | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_action * | actions |
list of actions (linked list) |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
const char * | key |
keys specification |
uint32_t | max |
max-elements constraint, 0 means unbounded |
uint32_t | min |
min-elements constraint |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
struct lysp_qname * | uniques |
list of unique specifications (sized array) |
struct lysp_when * | when |
when statement |
union lysp_node_list.__unnamed__ |
Definition at line 850 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_list.__unnamed__.__unnamed__ |
Definition at line 853 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
node name (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_LIST |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_notif |
YANG notification-stmt.
Definition at line 1028 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_notif | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node * | child |
list of data nodes (linked list) |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
union lysp_node_notif.__unnamed__ |
Definition at line 1029 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_notif.__unnamed__.__unnamed__ |
Definition at line 1032 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_* values are allowed |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
grouping name reference (mandatory) |
struct lysp_node_notif * | next |
pointer to the next notification (NULL if there is no one) |
uint16_t | nodetype |
LYS_NOTIF |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_node_uses |
Definition at line 947 of file tree_schema.h.
Data Fields | ||
---|---|---|
union lysp_node_uses | __unnamed__ |
common part corresponding to lysp_node |
struct lysp_node_augment * | augments |
list of augments (linked list) |
struct lysp_refine * | refines |
list of uses's refines (sized array) |
struct lysp_when * | when |
when statement |
union lysp_node_uses.__unnamed__ |
Definition at line 948 of file tree_schema.h.
Data Fields | ||
---|---|---|
__unnamed__ | __unnamed__ | |
struct lysp_node | node |
implicit cast for the members compatible with lysp_node |
struct lysp_node_uses.__unnamed__.__unnamed__ |
Definition at line 951 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
grouping name reference (mandatory) |
struct lysp_node * | next |
pointer to the next sibling node (NULL if there is no one) |
uint16_t | nodetype |
LYS_USES |
struct lysp_node * | parent |
parent node (NULL if this is a top-level node) |
const char * | ref |
reference statement |
struct lysp_qname |
Qualified name (optional prefix followed by an identifier).
Definition at line 337 of file tree_schema.h.
Data Fields | ||
---|---|---|
uint16_t | flags |
schema node flags - only LYS_SINGLEQUOTED and LYS_DOUBLEQUOTED values allowed |
struct lysp_module * | mod |
module to resolve any prefixes found in the string, it must be stored explicitly because of deviations/refines |
const char * | str |
qualified name string |
struct lysp_refine |
YANG refine-stmt.
Definition at line 450 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname * | dflts |
list of default values (sized array) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
uint32_t | max |
max-elements constraint, 0 means unbounded |
uint32_t | min |
min-elements constraint |
struct lysp_restr * | musts |
list of must restrictions (sized array) |
const char * | nodeid |
target descendant schema nodeid (mandatory) |
const char * | presence |
presence description |
const char * | ref |
reference statement |
struct lysp_restr |
Covers restrictions: range, length, pattern, must.
Definition at line 361 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname | arg |
The restriction expression/value (mandatory); in case of pattern restriction, the first byte has a special meaning: 0x06 (ACK) for regular match and 0x15 (NACK) for invert-match |
const char * | dsc |
description |
const char * | eapptag |
error-app-tag value |
const char * | emsg |
error-message |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | ref |
reference |
struct lysp_revision |
YANG revision-stmt.
Definition at line 377 of file tree_schema.h.
Data Fields | ||
---|---|---|
char | date[11] |
revision date (madatory) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | ref |
reference statement |
struct lysp_submodule |
Definition at line 1144 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_node_augment * | augments |
list of augments (linked list) |
const char * | contact |
contact information for the module |
struct lysp_node * | data |
list of module's top-level data nodes (linked list) |
struct lysp_deviation * | deviations |
list of deviations (sized array) |
const char * | dsc |
description of the module |
struct lysp_ext * | extensions |
list of extension statements (sized array) |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
struct lysp_feature * | features |
list of feature definitions (sized array) |
const char * | filepath |
path, if the schema was read from a file, NULL in case of reading from memory |
struct lysp_node_grp * | groupings |
list of groupings (linked list) |
struct lysp_ident * | identities |
list of identities (sized array) |
struct lysp_import * | imports |
list of imported modules (sized array) |
struct lysp_include * | includes |
list of included submodules (sized array) |
uint8_t | is_submod: 1 |
always 1 |
uint8_t | latest_revision: 2 |
flag to mark the latest available revision: 1 - the latest revision in searchdirs was not searched yet and this is the latest revision in the current context 2 - searchdirs were searched and this is the latest available revision |
struct lys_module * | mod |
belongs to parent module (submodule - mandatory) |
const char * | name |
name of the module (mandatory) |
struct lysp_node_notif * | notifs |
list of notifications (linked list) |
const char * | org |
party/company responsible for the module |
uint8_t | parsing: 1 |
flag for circular check |
const char * | prefix |
submodule belongsto prefix of main module (mandatory) |
const char * | ref |
cross-reference for the module |
struct lysp_revision * | revs |
list of the module revisions (sized array), the first revision in the list is always the last (newest) revision of the module |
struct lysp_node_action * | rpcs |
list of RPCs (linked list) |
struct lysp_tpdf * | typedefs |
list of typedefs (sized array) |
uint8_t | version |
yang-version (LYS_VERSION values) |
struct lysp_tpdf |
YANG typedef-stmt.
Definition at line 426 of file tree_schema.h.
Data Fields | ||
---|---|---|
struct lysp_qname | dflt |
default value of the newly defined type, it may or may not be a qualified name |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
const char * | name |
name of the newly defined type (mandatory) |
const char * | ref |
reference statement |
struct lysp_type | type |
base type from which the typedef is derived (mandatory) |
const char * | units |
units of the newly defined type |
struct lysp_type |
YANG type-stmt.
Some of the items in the structure may be mandatory, but it is necessary to resolve the type's base type first
Definition at line 403 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char ** | bases |
list of base identifiers (sized array) - identityref |
struct lysp_type_enum * | bits |
list of bit-stmts (sized array) - bits |
struct lysc_type * | compiled |
pointer to the compiled custom type, not used for built-in types |
struct lysp_type_enum * | enums |
list of enum-stmts (sized array) - enum |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags | |
uint8_t | fraction_digits |
number of fraction digits - decimal64 |
struct lysp_restr * | length |
allowed length of the value - string, binary |
const char * | name |
name of the type (mandatory) |
struct lyxp_expr * | path |
parsed path - leafref |
struct lysp_restr * | patterns |
list of patterns (sized array) - string |
struct lysp_module * | pmod |
(sub)module where the type is defined (needed for deviations) |
struct lysp_restr * | range |
allowed values range - numerical, decimal64 |
uint8_t | require_instance |
require-instance flag - leafref, instance |
struct lysp_type * | types |
list of sub-types (sized array) - union |
struct lysp_type_enum |
Enumeration/Bit value definition.
Definition at line 387 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
uint16_t | flags |
schema node flags - only LYS_STATUS_ and LYS_SET_VALUE values are allowed |
struct lysp_qname * | iffeatures |
list of if-feature expressions (sized array) |
const char * | name |
name (mandatory) |
const char * | ref |
reference statement |
int64_t | value |
enum's value or bit's position |
struct lysp_when |
YANG when-stmt.
Definition at line 440 of file tree_schema.h.
Data Fields | ||
---|---|---|
const char * | cond |
specified condition (mandatory) |
const char * | dsc |
description statement |
struct lysp_ext_instance * | exts |
list of the extension instances (sized array) |
const char * | ref |
reference statement |
#define _LYSC_TREE_DFS_NEXT | ( | START, | |
ELEM, | |||
NEXT | |||
) |
Helper macro for LYSC_TREE_DFS_END, should not be used directly!
Definition at line 223 of file tree_schema.h.
#define LY_REV_SIZE 11 |
revision data string length (including terminating NULL byte)
Definition at line 232 of file tree_schema.h.
#define LYS_NODE_HASH_COUNT 4 |
Maximum number of hashes stored in a schema node.
Definition at line 1434 of file tree_schema.h.
#define lysc_data_parent | ( | SCHEMA | ) | lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL) |
Same as lysc_data_node() but never returns the node itself.
Definition at line 1819 of file tree_schema.h.
#define lysc_is_dup_inst_list | ( | lysc_node | ) |
Examine whether a node is a key-less list or a non-configuration leaf-list.
[in] | lysc_node | Schema node to examine. |
node
is a list with duplicate instances allowed. Definition at line 1804 of file tree_schema.h.
#define lysc_is_key | ( | lysc_node | ) | ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1) |
Examine whether a node is a list's key.
[in] | lysc_node | Schema node to examine. |
node
is a key or not. Definition at line 1786 of file tree_schema.h.
#define lysc_is_np_cont | ( | lysc_node | ) | ((!lysc_node || (lysc_node->nodetype != LYS_CONTAINER) || (lysc_node->flags & LYS_PRESENCE)) ? 0 : 1) |
Examine whether a node is a non-presence container.
[in] | lysc_node | Schema node to examine. |
node
is a NP container or not. Definition at line 1795 of file tree_schema.h.
#define lysc_is_userordered | ( | lysc_node | ) | ((!lysc_node || !(lysc_node->nodetype & (LYS_LEAFLIST | LYS_LIST)) || !(lysc_node->flags & LYS_ORDBY_USER)) ? 0 : 1) |
Examine whether a node is user-ordered list or leaf-list.
[in] | lysc_node | Schema node to examine. |
node
is user-ordered or not. Definition at line 1777 of file tree_schema.h.
#define LYSC_TREE_DFS_BEGIN | ( | START, | |
ELEM | |||
) |
Macro to iterate via all elements in a schema (sub)tree including input and output. Note that actions and notifications of traversed nodes are ignored! To traverse on all the nodes including those, use lysc_tree_dfs_full() instead.
This is the opening part to the LYSC_TREE_DFS_END - they always have to be used together.
The function follows deep-first search algorithm:
1 / \ 2 4 / / \ 3 5 6
Use the same parameters for LYSC_TREE_DFS_BEGIN and LYSC_TREE_DFS_END. While START can be any of the lysc_node* types (including lysc_node_action and lysc_node_notif), ELEM variable must be of the struct lysc_node* type.
To skip a particular subtree, instead of the continue statement, set LYSC_TREE_DFS_continue variable to non-zero value.
Use with opening curly bracket '{' after the macro.
START | Pointer to the starting element processed first. |
ELEM | Iterator intended for use in the block. |
Definition at line 184 of file tree_schema.h.
#define LYSC_TREE_DFS_END | ( | START, | |
ELEM | |||
) |
Macro to iterate via all elements in a (sub)tree. This is the closing part to the LYSC_TREE_DFS_BEGIN - they always have to be used together.
Use the same parameters for LYSC_TREE_DFS_BEGIN and LYSC_TREE_DFS_END. While START can be a pointer to any of the lysc_node* types (including lysc_node_action and lysc_node_notif), ELEM variable must be pointer to the lysc_node type.
Use with closing curly bracket '}' after the macro.
START | Pointer to the starting element processed first. |
ELEM | Iterator intended for use in the block. |
Definition at line 203 of file tree_schema.h.
#define LYSP_MODULE_NAME | ( | PMOD | ) | (PMOD->is_submod ? ((struct lysp_submodule *)PMOD)->name : ((struct lysp_module *)PMOD)->mod->name) |
Get the parsed module or submodule name.
[in] | PMOD | Parsed module or submodule. |
Definition at line 1186 of file tree_schema.h.
typedef enum LYS_VERSION LYS_VERSION |
supported YANG schema version values
Callback to be called for every schema node in a DFS traversal.
[in] | node | Current node. |
[in] | data | Arbitrary user data. |
[out] | dfs_continue | Set to true if the current subtree should be skipped and continue with siblings instead. |
Definition at line 1945 of file tree_schema.h.
enum LYS_INFORMAT |
Schema input formats accepted by libyang parser functions.
Enumerator | |
---|---|
LYS_IN_UNKNOWN |
unknown format, used as return value in case of error |
LYS_IN_YANG |
YANG schema input format |
LYS_IN_YIN |
YIN schema input format |
Definition at line 91 of file parser_schema.h.
enum LYS_OUTFORMAT |
Schema output formats accepted by libyang printer functions.
Definition at line 106 of file printer_schema.h.
enum LYS_VERSION |
supported YANG schema version values
Enumerator | |
---|---|
LYS_VERSION_UNDEF |
no specific version, YANG 1.0 as default |
LYS_VERSION_1_0 |
YANG 1 (1.0) |
LYS_VERSION_1_1 |
YANG 1.1 |
Definition at line 1109 of file tree_schema.h.
enum LYSC_PATH_TYPE |
Types of the different schema paths.
Enumerator | |
---|---|
LYSC_PATH_LOG |
Descriptive path format used in log messages |
LYSC_PATH_DATA |
Similar to LYSC_PATH_LOG except that schema-only nodes (choice, case) are skipped |
LYSC_PATH_DATA_PATTERN |
Similar to LYSC_PATH_DATA but there are predicates for all list keys added with "%s" where their values should be so that they can be printed there |
Definition at line 2108 of file tree_schema.h.
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.
If the feature is enabled, but some of its if-features are false, the feature is considered disabled.
[in] | module | Module where the feature is defined. |
[in] | feature | Name of the feature to inspect. |
LIBYANG_API_DECL 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.
[in] | parent | Optional parent of the node to find. If not specified, the module's top-level nodes are searched. |
[in] | module | module of the node to find. It is also limitation for the children node of the given parent. |
[in] | name | Name of the node to find. |
[in] | name_len | Optional length of the name in case it is not NULL-terminated string. |
[in] | nodetype | Optional criteria (to speedup) specifying nodetype(s) of the node to find. Used as a bitmask, so multiple nodetypes can be specified. |
[in] | options | ORed options. |
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).
[in] | ctx_node | XPath schema context node. Use NULL for the root node. |
[in] | cur_mod | Current module for the expression (where it was "instantiated"). |
[in] | expr | Parsed expression to use. |
[in] | prefixes | Sized array of compiled prefixes. |
[in] | options | Whether to apply some node access restrictions, see Atomize XPath options. |
[out] | set | Set of found atoms (schema nodes). |
set
is returned. Get all the schema nodes that are required for path
to be evaluated (atoms).
[in] | path | Compiled path to use. |
[out] | set | Set of found atoms (schema nodes). |
set
is returned. LIBYANG_API_DECL 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).
[in] | ctx | libyang context to use for absolute path . May be NULL if ctx_node is set. |
[in] | ctx_node | XPath schema context node for relative path . Use NULL for the root node. |
[in] | path | JSON path of the node to get. |
[in] | output | Search operation output instead of input. |
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).
[in] | ctx | libyang context to use for absolute path . May be NULL if ctx_node is set. |
[in] | ctx_node | XPath schema context node for relative path . Use NULL for the root node. |
[in] | path | JSON path to examine. |
[in] | output | Search operation output instead of input. |
[out] | set | Set of found atoms (schema nodes). |
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.
[in] | ctx | libyang context to use for absolute xpath . May be NULL if ctx_node is set. |
[in] | ctx_node | XPath schema context node for relative xpath . Use NULL for the root node. |
[in] | xpath | Data XPath expression filtering the matching nodes. LY_VALUE_JSON prefix format is expected. |
[in] | options | Whether to apply some node access restrictions, see Atomize XPath options. |
[out] | set | Set of found schema nodes. |
set
is returned. 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).
[in] | ctx | libyang context to use. May be NULL if ctx_node is set. |
[in] | ctx_node | XPath schema context node. Use NULL for the root node. |
[in] | xpath | Data XPath expression filtering the matching nodes. LY_VALUE_JSON prefix format is expected. |
[in] | options | Whether to apply some node access restrictions, see Atomize XPath options. |
[out] | set | Set of found atoms (schema nodes). |
set
is returned. LIBYANG_API_DECL 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. Returned node may be from an augment.
lys_getnext() is supposed to be called sequentially. In the first call, the last
parameter is usually NULL and function starts returning 1) the first parent
child (if it is set) or 2) the first top level element of module
. Consequent calls should provide the previously returned node as last
and the same parent
and module
parameters.
Without options, the function is used to traverse only the schema nodes that can be paired with corresponding data nodes in a data tree. By setting some options
the behavior can be modified to the extent that all the schema nodes are iteratively returned.
[in] | last | Previously returned schema tree node, or NULL in case of the first call. |
[in] | parent | Parent of the subtree to iterate over. If set, module is ignored. |
[in] | module | Module of the top level elements to iterate over. If parent is NULL, it must be specified. |
[in] | options | ORed options. |
LIBYANG_API_DECL 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 in a data tree.
It is just lys_getnext() for extensions.
[in] | last | Previously returned schema tree node, or NULL in case of the first call. |
[in] | parent | Parent of the subtree to iterate over. If set, ext is ignored. |
[in] | ext | Extension instance with schema nodes to iterate over. If parent is NULL, it must be specified. |
[in] | options | ORed options. |
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.
The function can be called even if the identity does not contain if-features, in which case LY_SUCCESS is returned.
[in] | ident | Compiled identity statement to evaluate. |
LIBYANG_API_DECL const char* lys_nodetype2str | ( | uint16_t | nodetype | ) |
Stringify schema nodetype.
[in] | nodetype | Nodetype to stringify. |
LIBYANG_API_DECL LY_ERR lys_parse | ( | struct ly_ctx * | ctx, |
struct ly_in * | in, | ||
LYS_INFORMAT | format, | ||
const char ** | features, | ||
struct lys_module ** | module | ||
) |
Load a schema into the specified context.
[in] | ctx | libyang context where to process the data model. |
[in] | in | The input handle to provide the dumped data model in the specified format. |
[in] | format | Format of the schema to parse. Can be 0 to try to detect format from the input handler. |
[in] | features | Array of features to enable ended with NULL. If NULL, no features are enabled. |
[out] | module | Optional parsed module. |
LIBYANG_API_DECL LY_ERR lys_parse_fd | ( | struct ly_ctx * | ctx, |
int | fd, | ||
LYS_INFORMAT | format, | ||
struct lys_module ** | module | ||
) |
Read a schema from file descriptor into the specified context.
This function is considered for a simple use, if you have a complex use-case, consider use of lys_parse() with a standalone input handler.
[in] | ctx | libyang context where to process the data model. |
[in] | fd | File descriptor of a regular file (e.g. sockets are not supported) containing the schema in the specified format. |
[in] | format | Format of the schema to parse. |
[out] | module | Optional parsed module. |
LIBYANG_API_DECL LY_ERR lys_parse_mem | ( | struct ly_ctx * | ctx, |
const char * | data, | ||
LYS_INFORMAT | format, | ||
struct lys_module ** | module | ||
) |
Load a schema into the specified context.
This function is considered for a simple use, if you have a complex use-case, consider use of lys_parse() with a standalone input handler.
[in] | ctx | libyang context where to process the data model. |
[in] | data | The string containing the dumped data model in the specified format. |
[in] | format | Format of the schema to parse. |
[out] | module | Optional parsed module. |
LIBYANG_API_DECL LY_ERR lys_parse_path | ( | struct ly_ctx * | ctx, |
const char * | path, | ||
LYS_INFORMAT | format, | ||
struct lys_module ** | module | ||
) |
Load a schema into the specified context from a file.
This function is considered for a simple use, if you have a complex use-case, consider use of lys_parse() with a standalone input handler.
[in] | ctx | libyang context where to process the data model. |
[in] | path | Path to the file with the model in the specified format. |
[in] | format | Format of the schema to parse. |
[out] | module | Optional parsed module. |
LIBYANG_API_DECL LY_ERR lys_print_clb | ( | ly_write_clb | writeclb, |
void * | user_data, | ||
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
uint32_t | options | ||
) |
Print schema tree in the specified format using a provided callback.
This is just a wrapper around lys_print_module() for simple use cases. In case of a complex use cases, use lys_print with ly_out output handler.
[in] | module | Schema tree to print. |
[in] | writeclb | Callback function to write the data (see write(1)). |
[in] | user_data | Optional caller-specific argument to be passed to the writeclb callback. |
[in] | format | Schema output format. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_fd | ( | int | fd, |
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
uint32_t | options | ||
) |
Print schema tree in the specified format into a file descriptor.
This is just a wrapper around lys_print_module() for simple use cases. In case of a complex use cases, use lys_print with ly_out output handler.
[in] | fd | File descriptor where to print the data. |
[in] | module | Schema tree to print. |
[in] | format | Schema output format. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_file | ( | FILE * | f, |
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
uint32_t | options | ||
) |
Print schema tree in the specified format into a file stream.
This is just a wrapper around lys_print_module() for simple use cases. In case of a complex use cases, use lys_print with ly_out output handler.
[in] | module | Schema tree to print. |
[in] | f | File stream where to print the schema. |
[in] | format | Schema output format. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_mem | ( | char ** | strp, |
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
uint32_t | options | ||
) |
Print schema tree in the specified format into a memory block. It is up to caller to free the returned string by free().
This is just a wrapper around lys_print_module() for simple use cases. In case of a complex use cases, use lys_print with ly_out output handler.
[out] | strp | Pointer to store the resulting dump. |
[in] | module | Schema tree to print. |
[in] | format | Schema output format. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_module | ( | struct ly_out * | out, |
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
size_t | line_length, | ||
uint32_t | options | ||
) |
Schema module printer.
[in] | out | Printer handler for a specific output. Use ly_out_*() functions to create and free the handler. |
[in] | module | Main module with the parsed schema to print. |
[in] | format | Output format. |
[in] | line_length | Maximum characters to be printed on a line, 0 for unlimited. Only for LYS_OUT_TREE printer. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_node | ( | struct ly_out * | out, |
const struct lysc_node * | node, | ||
LYS_OUTFORMAT | format, | ||
size_t | line_length, | ||
uint32_t | options | ||
) |
Schema node printer.
[in] | out | Printer handler for a specific output. Use ly_out_*() functions to create and free the handler. |
[in] | node | Schema node to print. |
[in] | format | Output format. |
[in] | line_length | Maximum characters to be printed on a line, 0 for unlimited. Only for LYS_OUT_TREE printer. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_path | ( | const char * | path, |
const struct lys_module * | module, | ||
LYS_OUTFORMAT | format, | ||
uint32_t | options | ||
) |
Print schema tree in the specified format into a file.
This is just a wrapper around lys_print_module() for simple use cases. In case of a complex use cases, use lys_print with ly_out output handler.
[in] | path | File where to print the schema. |
[in] | module | Schema tree to print. |
[in] | format | Schema output format. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_print_submodule | ( | struct ly_out * | out, |
const struct lysp_submodule * | submodule, | ||
LYS_OUTFORMAT | format, | ||
size_t | line_length, | ||
uint32_t | options | ||
) |
Schema submodule printer.
[in] | out | Printer handler for a specific output. Use ly_out_*() functions to create and free the handler. |
[in] | submodule | Parsed submodule to print. |
[in] | format | Output format (LYS_OUT_YANG_COMPILED is not supported). |
[in] | line_length | Maximum characters to be printed on a line, 0 for unlimited. Only for LYS_OUT_TREE printer. |
[in] | options | Schema output options (see Schema output options). |
LIBYANG_API_DECL LY_ERR lys_search_localfile | ( | const char *const * | searchpaths, |
ly_bool | cwd, | ||
const char * | name, | ||
const char * | revision, | ||
char ** | localfile, | ||
LYS_INFORMAT * | format | ||
) |
Search for the schema file in the specified searchpaths.
[in] | searchpaths | NULL-terminated array of paths to be searched (recursively). Current working directory is searched automatically (but non-recursively if not in the provided list). Caller can use result of the ly_ctx_get_searchdirs(). |
[in] | cwd | Flag to implicitly search also in the current working directory (non-recursively). |
[in] | name | Name of the schema to find. |
[in] | revision | Revision of the schema to find. If NULL, the newest found schema filepath is returned. |
[out] | localfile | Mandatory output variable containing absolute path of the found schema. If no schema complying the provided restriction is found, NULL is set. |
[out] | format | Optional output variable containing expected format of the schema document according to the file suffix. |
LIBYANG_API_DECL LY_ERR lys_set_implemented | ( | struct lys_module * | mod, |
const char ** | features | ||
) |
Make the specific module implemented.
If the module is already implemented but with a different set of features, the whole context is recompiled.
[in] | mod | Module to make implemented. It is not an error to provide already implemented module, it just does nothing. |
[in] | features | Optional array specifying the enabled features terminated with NULL overriding any previous feature setting. The feature string '*' enables all the features and array of length 1 with only the terminating NULL explicitly disables all the features. In case the parameter is NULL, the features are untouched - left disabled in a newly implemented module or with the current features settings in case the module is already implemented. |
Get nearest schema
parent (including the node itself) that can be instantiated in data.
[in] | schema | Schema node to get the nearest data node for. |
Check whether the schema node data instance existence depends on any when conditions. This node and any direct parent choice and case schema nodes are also examined for when conditions.
Be careful, this function is not recursive and checks only conditions that apply to this node directly. Meaning if there are any conditions associated with any data parent instance of node
, they are not returned.
[in] | node | Schema node to examine. |
LIBYANG_API_DECL LY_ERR lysc_iffeature_value | ( | const struct lysc_iffeature * | iff | ) |
Get how the if-feature statement currently evaluates.
[in] | iff | Compiled if-feature statement to evaluate. |
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.
For more details, see lysc_tree_dfs_full().
[in] | mod | Module to fully traverse. |
[in] | dfs_clb | Callback to call for each node. |
[in] | data | Arbitrary user data passed to dfs_clb . |
dfs_clb
. LIBYANG_API_DECL 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 case it has a actions/RPCs array, returns it.
[in] | node | Node to examine. |
Get the children linked list of the given (compiled) schema node.
Note that LYS_CHOICE has only LYS_CASE children. Also, LYS_RPC and LYS_ACTION have the first child LYS_INPUT, its sibling is LYS_OUTPUT.
[in] | node | Node to examine. |
Get the target node of a leafref node.
[in] | node | Leafref node. |
Get the must statements list if present in the node
.
[in] | node | Node to examine. |
LIBYANG_API_DECL 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 case it has a Notifications array, returns it.
[in] | node | Node to examine. |
Get the when statements list if present in the node
.
[in] | node | Node to examine. |
LIBYANG_API_DECL 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, in case of augments it is the target module, recursively, otherwise it is the module where the node is defined.
[in] | node | Schema node to examine. |
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.
[in] | node | Schema path of this node will be generated. |
[in] | pathtype | Format of the path to generate. |
[in,out] | buffer | Prepared buffer of the buflen length to store the generated path. If NULL, memory for the complete path is allocated. |
[in] | buflen | Size of the provided buffer . |
buffer
is NULL, the returned string is dynamically allocated and caller is responsible to free it. 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.
Node with children, actions, and notifications is traversed in this order: 1) each child subtree; 2) each action subtree; 3) each notification subtree.
For algorithm illustration or traversal with actions and notifications skipped, see LYSC_TREE_DFS_BEGIN.
[in] | root | Schema root to fully traverse. |
[in] | dfs_clb | Callback to call for each node. |
[in] | data | Arbitrary user data passed to dfs_clb . |
dfs_clb
. 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.
[in] | last | Last returned feature. |
[in] | pmod | Parsed module and submodules whose features to iterate over. |
[in,out] | idx | Submodule index, set to 0 on first call. |
LIBYANG_API_DECL 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 case it has a actions/RPCs array, returns it.
[in] | node | Node to examine. |
Get the children linked list of the given (parsed) schema node. Decides the node's type and in case it has a children list, returns it.
[in] | node | Node to examine. |
LIBYANG_API_DECL 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 it has a groupings array, returns it.
[in] | node | Node to examine. |
LIBYANG_API_DECL 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 case it has a Notifications array, returns it.
[in] | node | Node to examine. |
Get the typedefs sized array of the given (parsed) schema node. Decides the node's type and in case it has a typedefs array, returns it.
[in] | node | Node to examine. |
LIBYANG_API_DECL const char* lyxp_get_expr | ( | const struct lyxp_expr * | path | ) |
Getter for original XPath expression from a parsed expression.
[in] | path | Parsed expression. |