libyang 2.0.231
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
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
91typedef enum {
94 LYS_IN_YIN = 3
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:244
const char * name
Definition: tree_schema.h:2343
const char * revision
Definition: tree_schema.h:2344
struct ly_ctx * ctx
Definition: tree_schema.h:2342
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.
Definition: parser_schema.h:91
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
Definition: parser_schema.h:92
@ LYS_IN_YIN
Definition: parser_schema.h:94
@ LYS_IN_YANG
Definition: parser_schema.h:93
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2341
Logger manipulation routines and error definitions.
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:34
Parser input structure specifying where the data are read.