libyang  1.0.184
YANG data modeling language library
Context options
Collaboration diagram for Context options:

Macros

#define LY_CTX_ALLIMPLEMENTED   0x01
 
#define LY_CTX_TRUSTED   0x02
 
#define LY_CTX_NOYANGLIBRARY   0x04
 
#define LY_CTX_DISABLE_SEARCHDIRS   0x08
 
#define LY_CTX_DISABLE_SEARCHDIR_CWD   0x10
 
#define LY_CTX_PREFER_SEARCHDIRS   0x20
 

Detailed Description

Options to change context behavior.

Macro Definition Documentation

◆ LY_CTX_ALLIMPLEMENTED

#define LY_CTX_ALLIMPLEMENTED   0x01

All the imports of the schema being parsed are treated implemented.

Definition at line 1129 of file libyang.h.

◆ LY_CTX_TRUSTED

#define LY_CTX_TRUSTED   0x02

Handle the schema being parsed as trusted and skip its validation tests. Note that while this option improves performance, it can lead to an undefined behavior if the schema is not correct.

Definition at line 1132 of file libyang.h.

◆ LY_CTX_NOYANGLIBRARY

#define LY_CTX_NOYANGLIBRARY   0x04

Do not internally implement ietf-yang-library module. The option causes that function ly_ctx_info() does not work (returns NULL) until the ietf-yang-library module is loaded manually. While any revision of this schema can be loaded with this option, note that the only revisions implemented by ly_ctx_info() are 2016-04-09 and 2018-01-17. This option cannot be used with ly_ctx_new_yl*() functions.

Definition at line 1138 of file libyang.h.

◆ LY_CTX_DISABLE_SEARCHDIRS

#define LY_CTX_DISABLE_SEARCHDIRS   0x08

Do not search for schemas in context's searchdirs neither in current working directory. It is entirely skipped and the only way to get schema data for imports or for ly_ctx_load_module() is to use the callbacks provided by caller via ly_ctx_set_module_imp_clb()

Definition at line 1142 of file libyang.h.

◆ LY_CTX_DISABLE_SEARCHDIR_CWD

#define LY_CTX_DISABLE_SEARCHDIR_CWD   0x10

Do not automatically search for schemas in current working directory, which is by default searched automatically (despite not recursively).

Definition at line 1145 of file libyang.h.

◆ LY_CTX_PREFER_SEARCHDIRS

#define LY_CTX_PREFER_SEARCHDIRS   0x20

When searching for schema, prefer searchdirs instead of user callback.

Definition at line 1146 of file libyang.h.