yumapro
24.10-1
YumaPro SDK
|
SIL Load and Unload Library Support. More...
Typedefs | |
typedef status_t(* | agt_sil_init_fn_t) (const xmlChar *modname, const xmlChar *revision) |
SIL init function template. More... | |
typedef status_t(* | agt_sil_init2_fn_t) (void) |
SIL init2 function template. More... | |
typedef void(* | agt_sil_cleanup_fn_t) (void) |
SIL cleanup function template. More... | |
Enumerations | |
enum | agt_siltype_t { AGT_SILTYP_NONE , AGT_SILTYP_MODULE , AGT_SILTYP_BUNDLE } |
SIL types. More... | |
Functions | |
status_t | agt_load_sil_code (const xmlChar *modname, const xmlChar *revision, boolean cfgloaded, agt_siltype_t siltyp, boolean is_sil_sa) |
Load the Server Instrumentation Library for the specified module. More... | |
status_t | agt_unload_sil_code (const xmlChar *modname) |
Unload the Server Instrumentation Library for the specified module. More... | |
boolean | agt_dynlib_loaded (const xmlChar *name) |
Check a module of bundle name is in the dynlibQ. More... | |
void | agt_sil_lib_init (void) |
Initialize the module. More... | |
void | agt_sil_lib_cleanup (void) |
Cleanup the module. More... | |
status_t | load_SIL (const xmlChar *modname, const xmlChar *revision, agt_siltype_t siltyp, boolean is_sil_sa) |
Load the SIL code or load the YANG module. More... | |
status_t | load_SIL_loadpath (const xmlChar *modname, const xmlChar *revision, agt_siltype_t siltyp, boolean is_sil_sa, boolean is_loadpath) |
Load the SIL code or load the YANG module. More... | |
status_t | agt_sil_lib_call_init2 (void) |
Call the available SIL init2 callbacks. More... | |
void | agt_sil_lib_support_save (ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t parent_nsid, int32 indent, int32 startindent) |
Dump the XML support-save info for the <sils> container. More... | |
status_t | agt_sil_lib_register_statlib (const xmlChar *modname, agt_sil_init_fn_t init_fn, agt_sil_init2_fn_t init2_fn, agt_sil_cleanup_fn_t cleanup_fn) |
Register a static SIL or SIL-SA library for a module or a bundle. More... | |
SIL Load and Unload Library Support.
Load and unload modules and bundles into the server. Supports 4 operations
typedef void(* agt_sil_cleanup_fn_t) (void) |
SIL cleanup function template.
Usually unloads the module(s) and free any used memory
typedef status_t(* agt_sil_init2_fn_t) (void) |
SIL init2 function template.
Usually sets up post-startup-cfg configuration and monitoring
typedef status_t(* agt_sil_init_fn_t) (const xmlChar *modname, const xmlChar *revision) |
SIL init function template.
Usually loads the module(s) and registers the callbacks
modname | requested module name to load |
revision | requested revision date of module to load |
enum agt_siltype_t |
boolean agt_dynlib_loaded | ( | const xmlChar * | name | ) |
Check a module of bundle name is in the dynlibQ.
name | module or bundle name to find |
status_t agt_load_sil_code | ( | const xmlChar * | modname, |
const xmlChar * | revision, | ||
boolean | cfgloaded, | ||
agt_siltype_t | siltyp, | ||
boolean | is_sil_sa | ||
) |
Load the Server Instrumentation Library for the specified module.
modname | name of the module to load |
revision | revision date of the module to load (may be NULL) |
cfgloaded | TRUE if running config has already been done FALSE if running config not loaded yet |
siltyp | SIL type to load (AGT_SILTYP_MODULE or AGT_SILTYP_BUNDLE) |
is_sil_sa | TRUE for SIL-SA code; FALSE for SIL code |
status_t agt_sil_lib_call_init2 | ( | void | ) |
Call the available SIL init2 callbacks.
Called by server during agt_init2
void agt_sil_lib_cleanup | ( | void | ) |
Cleanup the module.
Called by the server during shutdown
void agt_sil_lib_init | ( | void | ) |
Initialize the module.
Called by server during init1
status_t agt_sil_lib_register_statlib | ( | const xmlChar * | modname, |
agt_sil_init_fn_t | init_fn, | ||
agt_sil_init2_fn_t | init2_fn, | ||
agt_sil_cleanup_fn_t | cleanup_fn | ||
) |
Register a static SIL or SIL-SA library for a module or a bundle.
This will only be used if the module is requested via load, load-bundle,–module or –bundle paramters
modname | name of the module (only 1 statlib per module allowed) |
init_fn | SIL or SIL-SA init function |
init2_fn | SIL or SIL-SA init2 function |
cleanup_fn | SIL or SIL-SA cleanup function |
void agt_sil_lib_support_save | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | mhdr, | ||
xmlns_id_t | parent_nsid, | ||
int32 | indent, | ||
int32 | startindent | ||
) |
Dump the XML support-save info for the <sils> container.
Generate a <sil> container for each SIL record
scb | session to use to dump output |
mhdr | message header to hold XML state |
parent_nsid | parent namespace ID that was written to XML |
indent | indent amount |
startindent | start indent amount |
status_t agt_unload_sil_code | ( | const xmlChar * | modname | ) |
Unload the Server Instrumentation Library for the specified module.
NOTE: dlerror() is not thread-safe. Invoked only during initialization, or as a side effect of "load module". In the first case, only the single (main) thread is running so there is no contention issue. In the second case, (exclusive) write access to the module DB RWLOCK has been granted.
modname | name of the module to unload NULL to unload all SIL or SIL-SA code |
status_t load_SIL | ( | const xmlChar * | modname, |
const xmlChar * | revision, | ||
agt_siltype_t | siltyp, | ||
boolean | is_sil_sa | ||
) |
Load the SIL code or load the YANG module.
modname | module name to load |
revision | revision date (may be NULL) |
siltyp | SIL type to load |
is_sil_sa | TRUE for SIL-SA code; FALSE for SIL code |
status_t load_SIL_loadpath | ( | const xmlChar * | modname, |
const xmlChar * | revision, | ||
agt_siltype_t | siltyp, | ||
boolean | is_sil_sa, | ||
boolean | is_loadpath | ||
) |
Load the SIL code or load the YANG module.
modname | module name to load |
revision | revision date (may be NULL) |
siltyp | SIL type to load |
is_sil_sa | TRUE for SIL-SA code; FALSE for SIL code |
is_loadpath | TRUE is loadpath is being processed so OK to skip submodules and missing SIL |