yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
Search the YANG Library

Manage queues of ncx_module_t_ data stuctures. More...

Collaboration diagram for Search the YANG Library:

Functions

ncx_module_tncx_find_module (const xmlChar *modname, const xmlChar *revision)
 Find a ncx_module_t in the ncx_sesmodQ. More...
 
ncx_module_tncx_find_module_ex (const xmlChar *modname, const xmlChar *revision)
 Find an ncx_module_t in the ncx_sesmodQ. More...
 
ncx_module_tncx_find_module_by_prefix (const xmlChar *prefix)
 Find an ncx_module_t in the ncx_sesmodQ by prefix. More...
 
ncx_module_tncx_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_tncx_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_tncx_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_tncx_find_first_rpc (const xmlChar *rpcname)
 Find the specified RPC Method in any module. More...
 
obj_template_tncx_match_any_rpc (const xmlChar *module, const xmlChar *rpcname, uint32 *retcount)
 Match the specified module name in any module. More...
 
obj_template_tncx_find_any_object (const xmlChar *objname)
 Find any top-level object in any YANG module. More...
 
obj_template_tncx_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_tncx_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_tncx_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_tncx_get_first_module (void)
 Get the first module in the ncx_modQ. More...
 
ncx_module_tncx_get_prev_module (const ncx_module_t *mod)
 Get the previous module. More...
 
ncx_module_tncx_get_next_module_all (const ncx_module_t *mod)
 Get the first module entry in the ncx_modQ. More...
 
ncx_module_tncx_get_next_module (const ncx_module_t *mod)
 Get the next module in the ncx_modQ. More...
 
ncx_module_tncx_get_first_session_module (void)
 Get the first module in the ncx_sesmodQ. More...
 
ncx_module_tncx_get_next_session_module (const ncx_module_t *mod)
 Get the next module in the ncx_sesmodQ. More...
 
ncx_module_tncx_find_first_importer (const xmlChar *module)
 Search all modules importQs for a specified module name. More...
 
ncx_module_tncx_find_next_importer (const xmlChar *module, ncx_module_t *curmod)
 Search all modules importQs for a specified module name. More...
 
ncx_module_tncx_find_deviation_module (const xmlChar *modname)
 Find a deviation module ncx_module_t in the deviation_moduleQ;. More...
 
obj_template_tncx_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_tncx_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_tncx_first_deviation_module (void)
 Get the first deviation module. More...
 
ncx_module_tncx_next_deviation_module (ncx_module_t *curmod)
 Get the next deviation module after curmod. More...
 

Detailed Description

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

Function Documentation

◆ ncx_find_any_object()

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

Parameters
objnameobject name to match
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_find_any_object_que()

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

Parameters
modQQ of modules to check
objnameobject name to match
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_find_deviation_module()

ncx_module_t * ncx_find_deviation_module ( const xmlChar *  modname)

Find a deviation module ncx_module_t in the deviation_moduleQ;.

Parameters
modnamemodule name with no path prefix or file extension
Returns
module pointer if found or NULL if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_first_importer()

ncx_module_t * ncx_find_first_importer ( const xmlChar *  module)

Search all modules importQs for a specified module name.

Parameters
modulemodule name to find
Returns
pointer to the importer module
Here is the call graph for this function:

◆ ncx_find_first_rpc()

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.

Parameters
rpcnameRPC name to find exact match
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_find_module()

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

Parameters
modnamemodule name for the new module
revisionmodule revision date for the new module (may be NULL)
Returns
module pointer if found or NULL if not found
Here is the call graph for this function:

◆ ncx_find_module_by_prefix()

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

Parameters
prefixprefix value to search for matching module
Returns
module pointer if found or NULL if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_module_ex()

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

Parameters
modnamemodule or submodule name to find
revisionmodule revision date (may be NULL to find any revision)
Returns
module pointer if found or NULL if not
See also
ncx_find_module
Here is the call graph for this function:

◆ ncx_find_module_que()

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.

Parameters
modQmodule Q to search
modnamemodule name to find
revisionmodule revision date to find (may be NULL to find any revision)
Returns
module pointer if found or NULL if not
See also
ncx_find_module
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_module_que_by_prefix()

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.

Parameters
modQmodule Q to search by prefix
prefixprefix value to find matching module
Returns
module pointer if found or NULL if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_find_module_que_nsid()

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.

Parameters
modQmodule Q of ncx_module_t to search
nsiddynamic xmlns ID assigned by xmlns to find
Returns
module pointer if found or NULL if not

◆ ncx_find_next_importer()

ncx_module_t * ncx_find_next_importer ( const xmlChar *  module,
ncx_module_t curmod 
)

Search all modules importQs for a specified module name.

Parameters
modulemodule name to find
curmodcurrent module that was checked; start with next
Returns
pointer to the importer module
Here is the call graph for this function:

◆ ncx_first_data_node()

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.

Parameters
cfgonlytrue if config only; false for all
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_first_deviation_module()

ncx_module_t * ncx_first_deviation_module ( void  )

Get the first deviation module.

Returns
pointer to first deviation module; NULL if none found

◆ ncx_get_first_module()

ncx_module_t * ncx_get_first_module ( void  )

Get the first module in the ncx_modQ.

Returns
pointer to the first entry or NULL if empty Q
See also
ncx_get_next_module
Here is the caller graph for this function:

◆ ncx_get_first_session_module()

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.

Returns
pointer to the first entry or NULL if empty Q
See also
ncx_get_next_session_module
Here is the caller graph for this function:

◆ ncx_get_next_module()

ncx_module_t * ncx_get_next_module ( const ncx_module_t mod)

Get the next module in the ncx_modQ.

Parameters
modcurrent module to find next
Returns
pointer to the first entry or NULL if empty Q
See also
ncx_get_first_module
Here is the caller graph for this function:

◆ ncx_get_next_module_all()

ncx_module_t * ncx_get_next_module_all ( const ncx_module_t mod)

Get the first module entry in the ncx_modQ.

Parameters
modcurrent module to find next
Returns
pointer to the first entry or NULL if empty Q
Here is the caller graph for this function:

◆ ncx_get_next_session_module()

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.

Returns
pointer to the first entry or NULL if empty Q
See also
ncx_get_first_session_module
Here is the caller graph for this function:

◆ ncx_get_prev_module()

ncx_module_t * ncx_get_prev_module ( const ncx_module_t mod)

Get the previous module.

Get the previous module in the queue

Parameters
modcurrent module to find next
Returns
pointer to the previous entry or NULL if empty Q
Here is the caller graph for this function:

◆ ncx_match_any_object()

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.

Parameters
objnameobject name to match
name_matchname match mode enumeration
alt_namesTRUE if alternate names should be checked after regular names; FALSE if not
[out]retresaddress of return status; *retres return status
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_match_any_object_ex()

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

Parameters
modnamemodule name of object (may be NULL to search all)
objnameobject name to match
dataonlyTRUE for data nodes only; FALSE for any object type
name_matchname match mode enumeration
alt_namesTRUE if alternate names should be checked after regular names; FALSE if not
[out]retresaddress of return status; *retres return status
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_match_any_rpc()

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

Parameters
modulemodule name to check (NULL == check all)
rpcnameRPC name to match
[out]retcountaddress of return count of matches
  • retcount number of matches found
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_next_data_node()

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.

Parameters
curnodenode to find next from
Returns
pointer to struct if present, NULL otherwise
Here is the call graph for this function:

◆ ncx_next_deviation_module()

ncx_module_t * ncx_next_deviation_module ( ncx_module_t curmod)

Get the next deviation module after curmod.

Parameters
curmodcurrent module to search from
Returns
pointer to next deviation module