15 #ifndef LY_PARSER_DATA_H_
16 #define LY_PARSER_DATA_H_
141 #define LYD_PARSE_ONLY 0x010000
145 #define LYD_PARSE_STRICT 0x020000
147 #define LYD_PARSE_OPAQ 0x040000
149 #define LYD_PARSE_NO_STATE 0x080000
151 #define LYD_PARSE_LYB_MOD_UPDATE 0x100000
154 #define LYD_PARSE_ORDERED 0x200000
161 #define LYD_PARSE_OPTS_MASK 0xFFFF0000
188 #define LYD_VALIDATE_NO_STATE 0x0001
190 #define LYD_VALIDATE_PRESENT 0x0002
192 #define LYD_VALIDATE_OPTS_MASK 0x0000FFFF
209 LY_ERR lyd_parse_data(const struct ly_ctx *ctx, struct lyd_node *parent, struct ly_in *in, LYD_FORMAT format,
210 uint32_t parse_options, uint32_t validate_options,
struct lyd_node **tree);
227 uint32_t validate_options,
struct lyd_node **tree);
245 uint32_t validate_options,
struct lyd_node **tree);
262 uint32_t validate_options,
struct lyd_node **tree);
284 uint32_t parse_options, uint32_t validate_options,
struct lyd_node **tree);
LY_ERR lyd_validate_module(struct lyd_node **tree, const struct lys_module *module, uint32_t val_opts, struct lyd_node **diff)
Fully validate a data tree of a module.
LY_ERR lyd_parse_ext_data(const struct lysc_ext_instance *ext, struct lyd_node *parent, struct ly_in *in, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree)
Parse (and validate) data from the input handler as an extension data tree following the schema tree ...
Generic structure for a data node.
struct lyd_node_inner * parent
LY_ERR lyd_parse_ext_op(const struct lysc_ext_instance *ext, struct lyd_node *parent, struct ly_in *in, LYD_FORMAT format, enum lyd_type data_type, struct lyd_node **tree, struct lyd_node **op)
Parse extension data into an operation data tree following only the specification from the given exte...
libyang representation of YANG data trees.
Parser input structure specifying where the data are read.
LYD_FORMAT
Data input/output formats supported by libyang parser and printer functions.
LY_ERR lyd_parse_op(const struct ly_ctx *ctx, struct lyd_node *parent, struct ly_in *in, LYD_FORMAT format, enum lyd_type data_type, struct lyd_node **tree, struct lyd_node **op)
Parse YANG data into an operation data tree.
LY_ERR lyd_validate_all(struct lyd_node **tree, const struct ly_ctx *ctx, uint32_t val_opts, struct lyd_node **diff)
Fully validate a data tree.
LY_ERR lyd_validate_op(struct lyd_node *op_tree, const struct lyd_node *dep_tree, enum lyd_type data_type, struct lyd_node **diff)
Validate an RPC/action request, reply, or notification.
LY_ERR lyd_parse_data_mem(const struct ly_ctx *ctx, const char *data, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree)
Parse (and validate) input data as a YANG data tree.
LY_ERR lyd_parse_data_fd(const struct ly_ctx *ctx, int fd, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree)
Parse (and validate) input data as a YANG data tree.
Available YANG schema tree structures representing YANG module.
LY_ERR lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree)
Parse (and validate) input data as a YANG data tree.
LY_ERR
libyang's error codes returned by the libyang functions.