yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches

SIL Load and Unload Library Support. More...

Collaboration diagram for SIL Library:

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...
 

Detailed Description

SIL Load and Unload Library Support.

Load and unload modules and bundles into the server. Supports 4 operations

Typedef Documentation

◆ agt_sil_cleanup_fn_t

typedef void(* agt_sil_cleanup_fn_t) (void)

SIL cleanup function template.

Usually unloads the module(s) and free any used memory

◆ agt_sil_init2_fn_t

typedef status_t(* agt_sil_init2_fn_t) (void)

SIL init2 function template.

Usually sets up post-startup-cfg configuration and monitoring

Returns
status

◆ agt_sil_init_fn_t

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

Parameters
modnamerequested module name to load
revisionrequested revision date of module to load
Returns
stats

Enumeration Type Documentation

◆ agt_siltype_t

SIL types.

Enumerator
AGT_SILTYP_NONE 

not set

AGT_SILTYP_MODULE 

SIL is a module.

AGT_SILTYP_BUNDLE 

SIL is a bundle.

Function Documentation

◆ agt_dynlib_loaded()

boolean agt_dynlib_loaded ( const xmlChar *  name)

Check a module of bundle name is in the dynlibQ.

Parameters
namemodule or bundle name to find
Returns
TRUE if specified name is found; FALSE otherwise
Here is the call graph for this function:

◆ agt_load_sil_code()

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.

Parameters
modnamename of the module to load
revisionrevision date of the module to load (may be NULL)
cfgloadedTRUE if running config has already been done
FALSE if running config not loaded yet
siltypSIL type to load (AGT_SILTYP_MODULE or AGT_SILTYP_BUNDLE)
is_sil_saTRUE for SIL-SA code; FALSE for SIL code
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_lib_call_init2()

status_t agt_sil_lib_call_init2 ( void  )

Call the available SIL init2 callbacks.

Called by server during agt_init2

Here is the call graph for this function:

◆ agt_sil_lib_cleanup()

void agt_sil_lib_cleanup ( void  )

Cleanup the module.

Called by the server during shutdown

Here is the call graph for this function:

◆ agt_sil_lib_init()

void agt_sil_lib_init ( void  )

Initialize the module.

Called by server during init1

Here is the call graph for this function:

◆ agt_sil_lib_register_statlib()

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

Parameters
modnamename of the module (only 1 statlib per module allowed)
init_fnSIL or SIL-SA init function
init2_fnSIL or SIL-SA init2 function
cleanup_fnSIL or SIL-SA cleanup function
Returns
status
Here is the call graph for this function:

◆ agt_sil_lib_support_save()

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

Parameters
scbsession to use to dump output
mhdrmessage header to hold XML state
parent_nsidparent namespace ID that was written to XML
indentindent amount
startindentstart indent amount
Here is the call graph for this function:

◆ agt_unload_sil_code()

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.

Parameters
modnamename of the module to unload
NULL to unload all SIL or SIL-SA code
Returns
status
Here is the call graph for this function:

◆ load_SIL()

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.

Parameters
modnamemodule name to load
revisionrevision date (may be NULL)
siltypSIL type to load
is_sil_saTRUE for SIL-SA code; FALSE for SIL code
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_SIL_loadpath()

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.

Parameters
modnamemodule name to load
revisionrevision date (may be NULL)
siltypSIL type to load
is_sil_saTRUE for SIL-SA code; FALSE for SIL code
is_loadpathTRUE is loadpath is being processed so OK to skip submodules and missing SIL
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function: