27#include "plugins_internal.h"
50 hints, ctx_node, storage, unres, err);
71 char *errmsg = NULL, *
path;
97LIBYANG_API_DEF
const void *
99 void *prefix_data,
ly_bool *dynamic,
size_t *value_len)
101 return value->
realtype->
plugin->
print(ctx, value, format, prefix_data, dynamic, value_len);
127 .name = LY_TYPE_LEAFREF_STR,
129 .plugin.id =
"libyang 2 - leafref, version 1",
137 .plugin.lyb_data_len = -1,
LY_ERR
libyang's error codes returned by the libyang functions.
Libyang full error structure.
lyplg_type_print_clb print
lyplg_type_store_clb store
lyplg_type_compare_clb compare
lyplg_type_dup_clb duplicate
LIBYANG_API_DECL LY_ERR ly_err_new(struct ly_err_item **err, LY_ERR ecode, LY_VECODE vecode, char *path, char *apptag, const char *err_format,...) _FORMAT_PRINTF(6
Create and fill error structure.
LIBYANG_API_DECL LY_ERR lyplg_type_resolve_leafref(const struct lysc_type_leafref *lref, const struct lyd_node *node, struct lyd_value *value, const struct lyd_node *tree, struct lyd_node **target, char **errmsg)
Find leafref target in data.
LIBYANG_API_DEF const void * lyplg_type_print_leafref(const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
Implementation of lyplg_type_print_clb for the built-in leafref type.
LIBYANG_API_DEF LY_ERR lyplg_type_store_leafref(const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
Implementation of lyplg_type_store_clb for the built-in leafref type.
LIBYANG_API_DEF LY_ERR lyplg_type_compare_leafref(const struct lyd_value *val1, const struct lyd_value *val2)
Implementation of lyplg_type_compare_clb for the built-in leafref type.
LIBYANG_API_DEF LY_ERR lyplg_type_dup_leafref(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
Implementation of lyplg_type_dup_clb for the built-in leafref type.
LIBYANG_API_DEF void lyplg_type_free_leafref(const struct ly_ctx *ctx, struct lyd_value *value)
Implementation of lyplg_type_free_clb for the built-in leafref type.
struct lyplg_type * plugin
struct lysc_type * realtype
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
const struct lyplg_type_record plugins_leafref[]
Plugin information for leafref type implementation.
LIBYANG_API_DEF LY_ERR lyplg_type_validate_leafref(const struct ly_ctx *UNUSED(ctx), const struct lysc_type *type, const struct lyd_node *ctx_node, const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
The main libyang public header.
uint8_t ly_bool
Type to indicate boolean value.
API for (user) types plugins.
LIBYANG_API_DECL char * lyd_path(const struct lyd_node *node, LYD_PATH_TYPE pathtype, char *buffer, size_t buflen)
Generate path of the given node in the requested format.
const struct lysc_type * realtype
Generic structure for a data node.
YANG data representation.