libyang 2.1.148
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Loading...
Searching...
No Matches
parser_schema.h
Go to the documentation of this file.
1
15#ifndef LY_PARSER_SCHEMA_H_
16#define LY_PARSER_SCHEMA_H_
17
18#include "log.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24struct ly_in;
25struct lys_module;
26
96
107LIBYANG_API_DECL LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features,
108 struct lys_module **module);
109
122LIBYANG_API_DECL LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module);
123
139LIBYANG_API_DECL LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module);
140
153LIBYANG_API_DECL LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module);
154
170LIBYANG_API_DECL LY_ERR lys_search_localfile(const char * const *searchpaths, ly_bool cwd, const char *name, const char *revision,
171 char **localfile, LYS_INFORMAT *format);
172
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* LY_PARSER_SCHEMA_H_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition log.h:248
const char * name
const char * revision
struct ly_ctx * ctx
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.
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.
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.
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.
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
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.
@ LYS_IN_UNKNOWN
@ LYS_IN_YIN
@ LYS_IN_YANG
Available YANG schema tree structures representing YANG module.
Logger manipulation routines and error definitions.
uint8_t ly_bool
Type to indicate boolean value.
Definition log.h:35
Parser input structure specifying where the data are read.