yumapro
24.10-1
YumaPro SDK
|
Manage queues of ncx_module_t_ data stuctures. More...
Functions | |
ncx_module_t * | ncx_find_module (const xmlChar *modname, const xmlChar *revision) |
Find a ncx_module_t in the ncx_sesmodQ . More... | |
ncx_module_t * | ncx_find_module_ex (const xmlChar *modname, const xmlChar *revision) |
Find an ncx_module_t in the ncx_sesmodQ . More... | |
ncx_module_t * | ncx_find_module_by_prefix (const xmlChar *prefix) |
Find an ncx_module_t in the ncx_sesmodQ by prefix. More... | |
ncx_module_t * | ncx_find_module_que (dlq_hdr_t *modQ, const xmlChar *modname, const xmlChar *revision) |
Find a ncx_module_t in the specified Q of ncx_module_t. More... | |
ncx_module_t * | ncx_find_module_que_by_prefix (dlq_hdr_t *modQ, const xmlChar *prefix) |
Find a ncx_module_t in the specified Q by prefix value. More... | |
ncx_module_t * | ncx_find_module_que_nsid (dlq_hdr_t *modQ, xmlns_id_t nsid) |
Find a ncx_module_t in the specified Q by namespace ID. More... | |
obj_template_t * | ncx_find_first_rpc (const xmlChar *rpcname) |
Find the specified RPC Method in any module. More... | |
obj_template_t * | ncx_match_any_rpc (const xmlChar *module, const xmlChar *rpcname, uint32 *retcount) |
Match the specified module name in any module. More... | |
obj_template_t * | ncx_find_any_object (const xmlChar *objname) |
Find any top-level object in any YANG module. More... | |
obj_template_t * | ncx_match_any_object (const xmlChar *objname, ncx_name_match_t name_match, boolean alt_names, status_t *retres) |
Match any object in any YANG module with extra search options. More... | |
obj_template_t * | ncx_match_any_object_ex (const xmlChar *modname, const xmlChar *objname, boolean dataonly, ncx_name_match_t name_match, boolean alt_names, status_t *retres) |
Match any object in any YANG module with double extra search options. More... | |
obj_template_t * | ncx_find_any_object_que (dlq_hdr_t *modQ, const xmlChar *objname) |
Find any top-level YANG object in a module in the modQ . More... | |
ncx_module_t * | ncx_get_first_module (void) |
Get the first module in the ncx_modQ. More... | |
ncx_module_t * | ncx_get_prev_module (const ncx_module_t *mod) |
Get the previous module. More... | |
ncx_module_t * | ncx_get_next_module_all (const ncx_module_t *mod) |
Get the first module entry in the ncx_modQ. More... | |
ncx_module_t * | ncx_get_next_module (const ncx_module_t *mod) |
Get the next module in the ncx_modQ. More... | |
ncx_module_t * | ncx_get_first_session_module (void) |
Get the first module in the ncx_sesmodQ. More... | |
ncx_module_t * | ncx_get_next_session_module (const ncx_module_t *mod) |
Get the next module in the ncx_sesmodQ. More... | |
ncx_module_t * | ncx_find_first_importer (const xmlChar *module) |
Search all modules importQs for a specified module name. More... | |
ncx_module_t * | ncx_find_next_importer (const xmlChar *module, ncx_module_t *curmod) |
Search all modules importQs for a specified module name. More... | |
ncx_module_t * | ncx_find_deviation_module (const xmlChar *modname) |
Find a deviation module ncx_module_t in the deviation_moduleQ;. More... | |
obj_template_t * | ncx_first_data_node (boolean cfgonly) |
Check if an obj_template_t in in any module that matches a data node either config or all. More... | |
obj_template_t * | ncx_next_data_node (obj_template_t *curnode) |
Check if an obj_template_t in in any module that matches a data node either config or all. More... | |
ncx_module_t * | ncx_first_deviation_module (void) |
Get the first deviation module. More... | |
ncx_module_t * | ncx_next_deviation_module (ncx_module_t *curmod) |
Get the next deviation module after curmod . More... | |
Manage queues of ncx_module_t_ data stuctures.
Usually created only by the YANG parser and freed by ncx_cleanup
The YANG programs that use the NCX Library load modules into ncx_module_t_ structures stores in queues.
The YANG parser will create this structure and store it in the ncx_sesmodQ (or other queue) Note that these functions are not thread-safe!
The multi-threaded server will take care to alter the queues of modules in a critical section that blocks all other threads
obj_template_t * ncx_find_any_object | ( | const xmlChar * | objname | ) |
Find any top-level object in any YANG module.
Check if an obj_template_t in in any module that matches the object name string
objname | object name to match |
obj_template_t * ncx_find_any_object_que | ( | dlq_hdr_t * | modQ, |
const xmlChar * | objname | ||
) |
Find any top-level YANG object in a module in the modQ
.
Check if an obj_template_t in in any module that matches the object name string
modQ | Q of modules to check |
objname | object name to match |
ncx_module_t * ncx_find_deviation_module | ( | const xmlChar * | modname | ) |
Find a deviation module ncx_module_t in the deviation_moduleQ;.
modname | module name with no path prefix or file extension |
ncx_module_t * ncx_find_first_importer | ( | const xmlChar * | module | ) |
Search all modules importQs for a specified module name.
module | module name to find |
obj_template_t * ncx_find_first_rpc | ( | const xmlChar * | rpcname | ) |
Find the specified RPC Method in any module.
Check if a rpc_template_t is in any module that matches the rpc name string.
rpcname | RPC name to find exact match |
ncx_module_t * ncx_find_module | ( | const xmlChar * | modname, |
const xmlChar * | revision | ||
) |
Find a ncx_module_t in the ncx_sesmodQ
.
These are the modules that are already loaded Does not look for submodule names if no module name found
modname | module name for the new module |
revision | module revision date for the new module (may be NULL) |
NULL
if not found ncx_module_t * ncx_find_module_by_prefix | ( | const xmlChar * | prefix | ) |
Find an ncx_module_t in the ncx_sesmodQ by prefix.
These are the modules that are already loaded Find first match of prefix. Will check the ncx_curQ if nothing found in the ncx_sesmodQ
prefix | prefix value to search for matching module |
ncx_module_t * ncx_find_module_ex | ( | const xmlChar * | modname, |
const xmlChar * | revision | ||
) |
Find an ncx_module_t in the ncx_sesmodQ
.
These are the modules that are already loaded Check submodule names if no main module found
modname | module or submodule name to find |
revision | module revision date (may be NULL to find any revision) |
ncx_module_t * ncx_find_module_que | ( | dlq_hdr_t * | modQ, |
const xmlChar * | modname, | ||
const xmlChar * | revision | ||
) |
Find a ncx_module_t in the specified Q of ncx_module_t.
modQ | module Q to search |
modname | module name to find |
revision | module revision date to find (may be NULL to find any revision) |
ncx_module_t * ncx_find_module_que_by_prefix | ( | dlq_hdr_t * | modQ, |
const xmlChar * | prefix | ||
) |
Find a ncx_module_t in the specified Q by prefix value.
modQ | module Q to search by prefix |
prefix | prefix value to find matching module |
ncx_module_t * ncx_find_module_que_nsid | ( | dlq_hdr_t * | modQ, |
xmlns_id_t | nsid | ||
) |
Find a ncx_module_t in the specified Q by namespace ID.
The namespace ID is assigned by xmlns when the module is loaded.
modQ | module Q of ncx_module_t to search |
nsid | dynamic xmlns ID assigned by xmlns to find |
ncx_module_t * ncx_find_next_importer | ( | const xmlChar * | module, |
ncx_module_t * | curmod | ||
) |
Search all modules importQs for a specified module name.
module | module name to find |
curmod | current module that was checked; start with next |
obj_template_t * ncx_first_data_node | ( | boolean | cfgonly | ) |
Check if an obj_template_t in in any module that matches a data node either config or all.
cfgonly | true if config only; false for all |
ncx_module_t * ncx_first_deviation_module | ( | void | ) |
Get the first deviation module.
ncx_module_t * ncx_get_first_module | ( | void | ) |
Get the first module in the ncx_modQ.
ncx_module_t * ncx_get_first_session_module | ( | void | ) |
Get the first module in the ncx_sesmodQ.
Only used by yangcli-pro and yp-shell to maintain a YANG library for each connected session.
ncx_module_t * ncx_get_next_module | ( | const ncx_module_t * | mod | ) |
Get the next module in the ncx_modQ.
mod | current module to find next |
ncx_module_t * ncx_get_next_module_all | ( | const ncx_module_t * | mod | ) |
Get the first module entry in the ncx_modQ.
mod | current module to find next |
ncx_module_t * ncx_get_next_session_module | ( | const ncx_module_t * | mod | ) |
Get the next module in the ncx_sesmodQ.
Only used by yangcli-pro and yp-shell to maintain a YANG library for each connected session.
ncx_module_t * ncx_get_prev_module | ( | const ncx_module_t * | mod | ) |
Get the previous module.
Get the previous module in the queue
mod | current module to find next |
obj_template_t * ncx_match_any_object | ( | const xmlChar * | objname, |
ncx_name_match_t | name_match, | ||
boolean | alt_names, | ||
status_t * | retres | ||
) |
Match any object in any YANG module with extra search options.
Check if an obj_template_t in any module that matches the object name string (objname
).
Use name_match
to specify the type of name match desired Use alt_names
to check objname
as the alt-name for the object. This is usually only used in the CLI.
objname | object name to match | |
name_match | name match mode enumeration | |
alt_names | TRUE if alternate names should be checked after regular names; FALSE if not | |
[out] | retres | address of return status; *retres return status |
obj_template_t * ncx_match_any_object_ex | ( | const xmlChar * | modname, |
const xmlChar * | objname, | ||
boolean | dataonly, | ||
ncx_name_match_t | name_match, | ||
boolean | alt_names, | ||
status_t * | retres | ||
) |
Match any object in any YANG module with double extra search options.
Check if an obj_template_t in in any module that matches the object name string; extended parameters
Use name_match
to specify the type of name match desired Use alt_names
to check objname
as the alt-name for the object. This is usually only used in the CLI. Use dataonly
to search only for datastore objects
modname | module name of object (may be NULL to search all) | |
objname | object name to match | |
dataonly | TRUE for data nodes only; FALSE for any object type | |
name_match | name match mode enumeration | |
alt_names | TRUE if alternate names should be checked after regular names; FALSE if not | |
[out] | retres | address of return status; *retres return status |
obj_template_t * ncx_match_any_rpc | ( | const xmlChar * | module, |
const xmlChar * | rpcname, | ||
uint32 * | retcount | ||
) |
Match the specified module name in any module.
Check if a rpc_template_t in in any module that matches the rpc name string and maybe the owner
module | module name to check (NULL == check all) | |
rpcname | RPC name to match | |
[out] | retcount | address of return count of matches
|
obj_template_t * ncx_next_data_node | ( | obj_template_t * | curnode | ) |
Check if an obj_template_t in in any module that matches a data node either config or all.
curnode | node to find next from |
ncx_module_t * ncx_next_deviation_module | ( | ncx_module_t * | curmod | ) |
Get the next deviation module after curmod
.
curmod | current module to search from |