libyang
6.4.13
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Toggle main menu visibility
Loading...
Searching...
No Matches
parser_schema.h
Go to the documentation of this file.
1
15
16
#ifndef LY_PARSER_SCHEMA_H_
17
#define LY_PARSER_SCHEMA_H_
18
19
#include "
log.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
struct
ly_in
;
26
struct
lys_module
;
27
86
91
95
typedef
enum
{
96
LYS_IN_UNKNOWN
= 0,
97
LYS_IN_YANG
= 1,
98
LYS_IN_YIN
= 3
99
}
LYS_INFORMAT
;
100
111
LIBYANG_API_DECL
LY_ERR
lys_parse
(
struct
ly_ctx
*
ctx
,
struct
ly_in
*in,
LYS_INFORMAT
format,
const
char
**features,
112
struct
lys_module
**module);
113
126
LIBYANG_API_DECL
LY_ERR
lys_parse_mem
(
struct
ly_ctx
*
ctx
,
const
char
*data,
LYS_INFORMAT
format,
struct
lys_module
**module);
127
143
LIBYANG_API_DECL
LY_ERR
lys_parse_fd
(
struct
ly_ctx
*
ctx
,
int
fd,
LYS_INFORMAT
format,
struct
lys_module
**module);
144
157
LIBYANG_API_DECL
LY_ERR
lys_parse_path
(
struct
ly_ctx
*
ctx
,
const
char
*path,
LYS_INFORMAT
format,
struct
lys_module
**module);
158
174
LIBYANG_API_DECL
LY_ERR
lys_search_localfile
(
const
char
*
const
*searchpaths,
ly_bool
cwd,
const
char
*
name
,
const
char
*
revision
,
175
char
**localfile,
LYS_INFORMAT
*format);
176
182
LIBYANG_API_DECL
const
char
*
ly_yang_module_dir
(
void
);
183
185
186
#ifdef __cplusplus
187
}
188
#endif
189
190
#endif
/* LY_PARSER_SCHEMA_H_ */
ly_ctx
libyang context handler.
LY_ERR
LY_ERR
libyang's error codes returned by the libyang functions.
Definition
log.h:252
ly_in
Parser input structure specifying the type of data input.
lys_module::name
const char * name
Definition
tree_schema.h:2244
lys_module::revision
const char * revision
Definition
tree_schema.h:2245
lys_module::ctx
struct ly_ctx * ctx
Definition
tree_schema.h:2243
lys_parse
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.
lys_parse_fd
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.
lys_parse_path
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.
lys_search_localfile
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
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition
parser_schema.h:95
lys_parse_mem
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.
ly_yang_module_dir
LIBYANG_API_DECL const char * ly_yang_module_dir(void)
Get the directory with internal libyang YANG modules.
LYS_IN_UNKNOWN
@ LYS_IN_UNKNOWN
Definition
parser_schema.h:96
LYS_IN_YIN
@ LYS_IN_YIN
Definition
parser_schema.h:98
LYS_IN_YANG
@ LYS_IN_YANG
Definition
parser_schema.h:97
lys_module
Available YANG schema tree structures representing YANG module.
Definition
tree_schema.h:2242
log.h
Logger manipulation routines and error definitions.
ly_bool
uint8_t ly_bool
Type to indicate boolean value.
Definition
log.h:36
src
parser_schema.h
Privacy Policy
Generated on
for libyang by
1.17.0