libyang 2.1.148
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Loading...
Searching...
No Matches
Plugins

Enumerations

enum  LYPLG { LYPLG_TYPE , LYPLG_EXTENSION }
 Identifiers of the plugin type. More...
 

Functions

LIBYANG_API_DECL LY_ERR lyplg_add (const char *pathname)
 Manually load a plugin file.
 

Detailed Description

Enumeration Type Documentation

◆ LYPLG

enum LYPLG

Identifiers of the plugin type.

Enumerator
LYPLG_TYPE 

Specific type (typedef)

LYPLG_EXTENSION 

YANG extension

Definition at line 67 of file plugins.h.

Function Documentation

◆ lyplg_add()

LIBYANG_API_DECL LY_ERR lyplg_add ( const char * pathname)

Manually load a plugin file.

Note, that a plugin can be loaded only if there is at least one context. The loaded plugins are connected with the existence of a context. When all the contexts are destroyed, all the plugins are unloaded.

Parameters
[in]pathnamePath to the plugin file. It can contain types or extensions plugins, both are accepted and correctly loaded.
Returns
LY_SUCCESS if the file contains valid plugin compatible with the library version.
LY_EDENIED in case there is no context and the plugin cannot be loaded.
LY_EINVAL when pathname is NULL or the plugin contains invalid content for this libyang version.
LY_ESYS when the plugin file cannot be loaded.