16 #ifndef LY_PARSER_DATA_H_
17 #define LY_PARSER_DATA_H_
137 #define LYD_PARSE_ONLY 0x010000
142 #define LYD_PARSE_STRICT 0x020000
144 #define LYD_PARSE_OPAQ 0x040000
146 #define LYD_PARSE_NO_STATE 0x080000
147 #define LYD_PARSE_LYB_SKIP_MODULE_CHECK 0x100000
152 #define LYD_PARSE_ORDERED 0x200000
158 #define LYD_PARSE_WHEN_TRUE 0x400000
161 #define LYD_PARSE_NO_NEW 0x800000
164 #define LYD_PARSE_STORE_ONLY 0x01010000
168 #define LYD_PARSE_JSON_NULL 0x02000000
171 #define LYD_PARSE_JSON_STRING_DATATYPES 0x04000000
175 #define LYD_PARSE_ANYDATA_STRICT 0x08000000
179 #define LYD_PARSE_OPTS_MASK 0xFFFF0000
206 #define LYD_VALIDATE_NO_STATE 0x0001
208 #define LYD_VALIDATE_PRESENT 0x0002
209 #define LYD_VALIDATE_MULTI_ERROR 0x0004
210 #define LYD_VALIDATE_OPERATIONAL 0x0008
212 #define LYD_VALIDATE_NO_DEFAULTS 0x0010
215 #define LYD_VALIDATE_NOT_FINAL 0x0020
220 #define LYD_VALIDATE_OPTS_MASK 0x0000FFFF
243 LIBYANG_API_DECL LY_ERR lyd_parse_data(const struct ly_ctx *ctx, struct lyd_node *parent, struct ly_in *in, LYD_FORMAT format,
244 uint32_t parse_options, uint32_t validate_options,
struct lyd_node **tree);
261 uint32_t validate_options,
struct lyd_node **tree);
279 uint32_t validate_options,
struct lyd_node **tree);
296 uint32_t parse_options, uint32_t validate_options,
struct lyd_node **tree);
313 LYD_FORMAT format, uint32_t new_val_options, uint32_t parse_options, uint32_t validate_options,
440 uint32_t val_opts,
struct lyd_node **diff);
Generic structure for a data node.
YANG extension compiled instance.
LIBYANG_API_DECL 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
libyang's error codes returned by the libyang functions.
LIBYANG_API_DECL 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, uint32_t parse_options, struct lyd_node **tree, struct lyd_node **op)
Parse YANG data into an operation data tree. Specific parsing flags LYD_PARSE_ONLY, LYD_PARSE_STRICT and no validation flags are used.
LIBYANG_API_DECL 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. Only the operation data tree (input/output/no...
LIBYANG_API_DECL 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.
libyang representation of YANG data trees.
LYD_FORMAT
Data input/output formats supported by libyang parser and printer functions.
LIBYANG_API_DECL LY_ERR lyd_parse_value_fragment(const struct ly_ctx *ctx, const char *path, struct ly_in *in, LYD_FORMAT format, uint32_t new_val_options, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree)
Parse data from the input handler as a bare JSON value and connect it to the node parsed from the pat...
Available YANG schema tree structures representing YANG module.
LIBYANG_API_DECL 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.
LIBYANG_API_DECL LY_ERR lyd_validate_module_final(struct lyd_node *tree, const struct lys_module *module, uint32_t val_opts)
Finish validation of a module data that have previously been validated with LYD_VALIDATE_NOT_FINAL fl...
LIBYANG_API_DECL LY_ERR lyd_validate_ext(struct lyd_node **ext_tree, const struct lysc_ext_instance *ext, uint32_t val_opts, struct lyd_node **diff)
Validate a data subtree of an extension instance, which is assumed to be a separate data tree indepen...
LIBYANG_API_DECL 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.
LIBYANG_API_DECL 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.