![]()  | 
  
    yumapro
    25.10-1
    
   YumaPro SDK 
   | 
 
The capabilities module constructs two versions. More...

Data Structures | |
| struct | cap_list_t | 
| one capabilities list  More... | |
| struct | cap_rec_t | 
| queue of this structure for list of enterprise capabilities  More... | |
Enumerations | |
| enum | cap_subjtyp_t {  }  | 
| NETCONF capability subject types.  More... | |
| enum | cap_change_t | 
| Capability Change Type.  | |
| enum | cap_stdid_t {  CAP_STDID_V1 , CAP_STDID_WRITE_RUNNING , CAP_STDID_CANDIDATE , CAP_STDID_CONF_COMMIT , CAP_STDID_ROLLBACK_ERR , CAP_STDID_VALIDATE , CAP_STDID_STARTUP , CAP_STDID_URL , CAP_STDID_XPATH , CAP_STDID_NOTIFICATION , CAP_STDID_INTERLEAVE , CAP_STDID_PARTIAL_LOCK , CAP_STDID_WITH_DEFAULTS , CAP_STDID_V11 , CAP_STDID_VALIDATE11 , CAP_STDID_CONF_COMMIT11 , CAP_STDID_DEPTH , CAP_STDID_FIELDS , CAP_STDID_FILTER , CAP_STDID_REPLAY , CAP_STDID_DEFAULTS , CAP_STDID_YANGPATCH , CAP_STDID_YANGLIB , CAP_STDID_YANGLIB11 , CAP_STDID_LAST_MARKER }  | 
| enumerated list of standard capability IDs  More... | |
| enum | cap_yanglib_ver_t {  CAP_YANGLIB_VER_NONE , CAP_YANGLIB_VER_10 , CAP_YANGLIB_VER_11 }  | 
| YANG library URI to use.  More... | |
Functions | |
| cap_list_t * | cap_new_caplist (void) | 
| Malloc and initialize the fields in a cap_list_t struct.  More... | |
| void | cap_init_caplist (cap_list_t *caplist) | 
| Initialize the fields in a pre-allocated cap_list_t struct memory for caplist already allocated – this just inits fields.  More... | |
| void | cap_clean_caplist (cap_list_t *caplist) | 
| Clean the fields in a pre-allocated cap_list_t struct Memory for caplist not deallocated – this just cleans fields.  More... | |
| void | cap_free_caplist (cap_list_t *caplist) | 
| Clean the fields in a pre-allocated cap_list_t struct Then free the caplist memory.  More... | |
| status_t | cap_add_std (cap_list_t *caplist, cap_stdid_t capstd) | 
| Add a standard protocol capability to the list.  More... | |
| status_t | cap_add_stdval (val_value_t *caplist, cap_stdid_t capstd, boolean is_restconf) | 
| Add a standard protocol capability to the list (val_value_t version)  More... | |
| status_t | cap_add_std_string (cap_list_t *caplist, const xmlChar *uri, boolean is_restconf) | 
| Add a standard protocol capability to the list by URI string.  More... | |
| boolean | cap_is_module_string (const xmlChar *uri) | 
| Check if the capability URI is a YANG module identifier.  More... | |
| status_t | cap_add_module_string (cap_list_t *caplist, const xmlChar *uri) | 
| Add a standard protocol capability to the list by URI string.  More... | |
| status_t | cap_add_module_string2 (cap_list_t *caplist, const xmlChar *uri, boolean implemented) | 
| Add a standard protocol capability to the list by URI string and set the implemented flag.  More... | |
| status_t | cap_add_module_string_sorted (cap_list_t *caplist, const xmlChar *uri) | 
| Add a standard protocol capability to the list by URI string and set the implemented flag AND SORT THE URIS.  More... | |
| status_t | cap_add_url (cap_list_t *caplist, const xmlChar *scheme_list) | 
| Add the #url capability to the list.  More... | |
| status_t | cap_add_urlval (val_value_t *caplist, const xmlChar *scheme_list, boolean is_restconf) | 
| Add the :url capability to the list; value struct version.  More... | |
| status_t | cap_add_withdef (cap_list_t *caplist, const xmlChar *defstyle) | 
| Add the :with-defaults capability to the list.  More... | |
| status_t | cap_add_withdefval (val_value_t *caplist, const xmlChar *defstyle, uint8 withdef_enabled, boolean is_restconf) | 
| Add the :with-defaults capability to the list; value struct version.  More... | |
| status_t | cap_add_restdefval (val_value_t *caplist, const xmlChar *defstyle) | 
| Add the :defaults capability to the RESTCONF caplist value struct version.  More... | |
| status_t | cap_add_ent (cap_list_t *caplist, const xmlChar *uristr) | 
| Add an enterprise capability to the list.  More... | |
| status_t | cap_add_entval (val_value_t *caplist, const xmlChar *urival) | 
| Add an enterprise capability to the list (val_value_t version)  More... | |
| status_t | cap_add_modval (val_value_t *caplist, ncx_module_t *mod) | 
| Add a module capability to the list (val_value_t version)  More... | |
| status_t | cap_add_mod (cap_list_t *caplist, ncx_module_t *mod) | 
| Add a module capability to the list.  More... | |
| void | cap_remove_mod (cap_list_t *caplist, ncx_module_t *mod) | 
| Remove a module capability from the list.  More... | |
| status_t | cap_remove_modval (val_value_t *caplist, ncx_module_t *mod) | 
| Remove a module capability from the list (val_value_t version)  More... | |
| status_t | cap_add_netconf_modval (val_value_t *caplist, ncx_module_t *mod) | 
| Add a module capability to the list (val_value_t version)  More... | |
| status_t | cap_add_devmodval (val_value_t *caplist, ncx_save_deviations_t *savedev) | 
| Add a deviation module capability to the list (val_value_t version)  More... | |
| boolean | cap_std_set (const cap_list_t *caplist, cap_stdid_t capstd) | 
| fast search of standard protocol capability set  More... | |
| boolean | cap_set (const cap_list_t *caplist, const xmlChar *capuri) | 
| Check if the capability URI is set in the capslist linear search of capability list, will check for std uris as well.  More... | |
| cap_rec_t * | cap_match (const cap_list_t *caplist, const xmlChar *capuri) | 
| Check if the capability URI is set in the capslist.  More... | |
| val_value_t * | cap_match_val (val_value_t *caplist, const xmlChar *capuri) | 
| Check if the capability URI is set in the capslist value_t tree.  More... | |
| const xmlChar * | cap_get_protos (cap_list_t *caplist) | 
| get the #url capability protocols list if it exists get the protocols field for the :url capability  More... | |
| void | cap_dump_stdcaps (const cap_list_t *caplist, log_debug_t lvl, FILE *outfile) | 
| debug function Printf the standard protocol capabilities list  More... | |
| void | cap_dump_modcaps (const cap_list_t *caplist, log_debug_t lvl, FILE *outfile) | 
| Printf the standard data model module capabilities list debug function.  More... | |
| void | cap_fix_modcaps_modules (const cap_list_t *caplist) | 
| Fix the modules loaded from the modcaps.  More... | |
| cap_rec_t * | cap_find_modcap (const cap_list_t *caplist, const xmlChar *modname) | 
| Find a specified module in the caplist.  More... | |
| void | cap_dump_entcaps (const cap_list_t *caplist, log_debug_t lvl, FILE *outfile) | 
| Printf the enterprise capabilities list debug function.  More... | |
| cap_rec_t * | cap_first_modcap (cap_list_t *caplist) | 
| Get the first module capability in the list.  More... | |
| cap_rec_t * | cap_next_modcap (cap_rec_t *curcap) | 
| Get the next module capability in the list.  More... | |
| void | cap_split_modcap (cap_rec_t *cap, const xmlChar **module, const xmlChar **revision, const xmlChar **namespacestr) | 
| Split the modcap string into 3 parts.  More... | |
| xmlChar * | cap_make_moduri (ncx_module_t *mod) | 
| Malloc and construct a module URI for the specified module make the module URI string (for sysCapabilityChange event)  More... | |
| status_t | cap_add_config_id (cap_list_t *caplist) | 
| Add the :config-id capability to the list.  More... | |
| status_t | cap_add_ids_val (val_value_t *caplist, boolean is_module_id, cap_yanglib_ver_t yanglib_ver) | 
| Add the :config-id capability to the list.  More... | |
| status_t | cap_add_yanglib (cap_list_t *caplist, cap_yanglib_ver_t yanglib_ver) | 
| Add the :yang-library capability to the list.  More... | |
The capabilities module constructs two versions.
The cap_list_t version is the internal struct used by the agent or manager.
The val_value_t version is used to cache the capabilities that will actually be used within an rpc_msg_t when the manager or agent actually sends a hello message.
Debugging and schema-discovery module support is also provided.
| enum cap_stdid_t | 
enumerated list of standard capability IDs
| enum cap_subjtyp_t | 
| enum cap_yanglib_ver_t | 
| status_t cap_add_config_id | ( | cap_list_t * | caplist | ) | 
Add the :config-id capability to the list.
Identifies the current etag for the running datastore resource
Add the :yang-library?module-set-id capability to the list. Identifies the current module ID
| caplist | capability list that will contain the cap | 


| status_t cap_add_devmodval | ( | val_value_t * | caplist, | 
| ncx_save_deviations_t * | savedev | ||
| ) | 
Add a deviation module capability to the list (val_value_t version)
| caplist | capability list that will contain the deviation cap | 
| savedev | save_deviations struct to use | 


| status_t cap_add_ent | ( | cap_list_t * | caplist, | 
| const xmlChar * | uristr | ||
| ) | 
Add an enterprise capability to the list.
| caplist | capability list that will contain the module caps | 
| uristr | URI string to add | 


| status_t cap_add_entval | ( | val_value_t * | caplist, | 
| const xmlChar * | urival | ||
| ) | 
Add an enterprise capability to the list (val_value_t version)
| caplist | capability list that will contain the enterprise cap | 
| urival | capability URI value to add | 


| status_t cap_add_ids_val | ( | val_value_t * | caplist, | 
| boolean | is_module_id, | ||
| cap_yanglib_ver_t | yanglib_ver | ||
| ) | 
Add the :config-id capability to the list.
Identifies the current etag for the running datastore resource value struct version
Add the :yang-library?module-set-id capability to the list. Identifies the current module ID
| caplist | capability list that will contain the cap | 
| is_module_id | TRUE if this is add for module-set-id | 
| yanglib_ver | YANG library version enum (ignored if is_module_id == FALSE) | 


| status_t cap_add_mod | ( | cap_list_t * | caplist, | 
| ncx_module_t * | mod | ||
| ) | 
Add a module capability to the list.
| caplist | capability list that will contain the module cap | 
| mod | module to add | 


| status_t cap_add_module_string | ( | cap_list_t * | caplist, | 
| const xmlChar * | uri | ||
| ) | 
Add a standard protocol capability to the list by URI string.
for adding a new last entry to caplist->capQ; used by server
| caplist | capability list that will contain the standard cap | 
| uri | the URI string holding the capability identifier | 

| status_t cap_add_module_string2 | ( | cap_list_t * | caplist, | 
| const xmlChar * | uri, | ||
| boolean | implemented | ||
| ) | 
Add a standard protocol capability to the list by URI string and set the implemented flag.
| caplist | capability list that will contain the standard cap | 
| uri | the URI string holding the capability identifier | 
| implemented | TRUE if the capability is a module and it is flagged as implemented; default is TRUE for backwards-compatibility | 
| status_t cap_add_module_string_sorted | ( | cap_list_t * | caplist, | 
| const xmlChar * | uri | ||
| ) | 
Add a standard protocol capability to the list by URI string and set the implemented flag AND SORT THE URIS.
| caplist | capability list that will contain the standard cap | 
| uri | the URI string holding the capability identifier | 
| status_t cap_add_modval | ( | val_value_t * | caplist, | 
| ncx_module_t * | mod | ||
| ) | 
Add a module capability to the list (val_value_t version)
| caplist | capability list that will contain the module cap | 
| mod | module to add | 


| status_t cap_add_netconf_modval | ( | val_value_t * | caplist, | 
| ncx_module_t * | mod | ||
| ) | 
Add a module capability to the list (val_value_t version)
| caplist | capability list that will contain the module cap | 
| mod | NETCONF module to use | 

| status_t cap_add_restdefval | ( | val_value_t * | caplist, | 
| const xmlChar * | defstyle | ||
| ) | 
Add the :defaults capability to the RESTCONF caplist value struct version.
| caplist | capability list that will contain the standard cap | 
| defstyle | the basic-mode with-default style | 


| status_t cap_add_std | ( | cap_list_t * | caplist, | 
| cap_stdid_t | capstd | ||
| ) | 
Add a standard protocol capability to the list.
| caplist | capability list that will contain the standard cap | 
| capstd | the standard capability ID | 

| status_t cap_add_std_string | ( | cap_list_t * | caplist, | 
| const xmlChar * | uri, | ||
| boolean | is_restconf | ||
| ) | 
Add a standard protocol capability to the list by URI string.
| caplist | capability list that will contain the standard cap | 
| uri | the string holding the capability URI | 
| is_restconf | True is this is restconf capability set up | 

| status_t cap_add_stdval | ( | val_value_t * | caplist, | 
| cap_stdid_t | capstd, | ||
| boolean | is_restconf | ||
| ) | 
Add a standard protocol capability to the list (val_value_t version)
| caplist | capability list that will contain the standard cap | 
| capstd | the standard capability ID | 
| is_restconf | == TRUE if add RESTCONF capability; FALSE if NETCONF | 


| status_t cap_add_url | ( | cap_list_t * | caplist, | 
| const xmlChar * | scheme_list | ||
| ) | 
Add the #url capability to the list.
| caplist | capability list that will contain the standard cap | 
| scheme_list | the scheme list for the :url capability | 


| status_t cap_add_urlval | ( | val_value_t * | caplist, | 
| const xmlChar * | scheme_list, | ||
| boolean | is_restconf | ||
| ) | 
Add the :url capability to the list; value struct version.
| caplist | capability list that will contain the standard cap | 
| scheme_list | the list of schemes supported | 
| is_restconf | == TRUE if add RESTCONF capability; FALSE if NETCONF | 


| status_t cap_add_withdef | ( | cap_list_t * | caplist, | 
| const xmlChar * | defstyle | ||
| ) | 
Add the :with-defaults capability to the list.
| caplist | capability list that will contain the standard cap | 
| defstyle | the basic-mode with-default style | 


| status_t cap_add_withdefval | ( | val_value_t * | caplist, | 
| const xmlChar * | defstyle, | ||
| uint8 | withdef_enabled, | ||
| boolean | is_restconf | ||
| ) | 
Add the :with-defaults capability to the list; value struct version.
| caplist | capability list that will contain the standard cap | 
| defstyle | the basic-mode with-default style | 
| withdef_enabled | == bitmask of enabled with-defaults modes | 
| is_restconf | == TRUE if add RESTCONF capability FALSE if NETCONF | 


| status_t cap_add_yanglib | ( | cap_list_t * | caplist, | 
| cap_yanglib_ver_t | yanglib_ver | ||
| ) | 
Add the :yang-library capability to the list.
| caplist | capability list that will contain the standard cap | 
| yanglib_ver | enum for the YANG library to use | 


| void cap_clean_caplist | ( | cap_list_t * | caplist | ) | 
Clean the fields in a pre-allocated cap_list_t struct Memory for caplist not deallocated – this just cleans fields.
| caplist | struct to clean | 


| void cap_dump_entcaps | ( | const cap_list_t * | caplist, | 
| log_debug_t | lvl, | ||
| FILE * | outfile | ||
| ) | 
Printf the enterprise capabilities list debug function.
| caplist | capability list to print | 
| lvl | log-level to dump capability list | 
| outfile | file for output | 
| void cap_dump_modcaps | ( | const cap_list_t * | caplist, | 
| log_debug_t | lvl, | ||
| FILE * | outfile | ||
| ) | 
Printf the standard data model module capabilities list debug function.
| caplist | capability list to print | 
| lvl | debug output level | 
| outfile | file for output | 

| void cap_dump_stdcaps | ( | const cap_list_t * | caplist, | 
| log_debug_t | lvl, | ||
| FILE * | outfile | ||
| ) | 
debug function Printf the standard protocol capabilities list
| caplist | capability list to print | 
| lvl | debug output level | 
| outfile | file for output | 

| cap_rec_t * cap_find_modcap | ( | const cap_list_t * | caplist, | 
| const xmlChar * | modname | ||
| ) | 
Find a specified module in the caplist.
| caplist | capability list to check | 
| modname | module name to find | 

| cap_rec_t * cap_first_modcap | ( | cap_list_t * | caplist | ) | 
Get the first module capability in the list.
| caplist | capability list to check | 
| void cap_fix_modcaps_modules | ( | const cap_list_t * | caplist | ) | 
Fix the modules loaded from the modcaps.
some modules may need to be treated as import-only This is needed in yangcli because it is not clear processing a module list entry if it should be top or just imported This can cause unsupported nodes to show up because of mod->supported getting forced to true due to augments
Only called by yangcli_session_cb!!!
INPUTS: caplist == capability list to check and fix

| void cap_free_caplist | ( | cap_list_t * | caplist | ) | 
Clean the fields in a pre-allocated cap_list_t struct Then free the caplist memory.
| caplist | == struct to free | 


| const xmlChar * cap_get_protos | ( | cap_list_t * | caplist | ) | 
get the #url capability protocols list if it exists get the protocols field for the :url capability
| caplist | capability list to check | 
| void cap_init_caplist | ( | cap_list_t * | caplist | ) | 
Initialize the fields in a pre-allocated cap_list_t struct memory for caplist already allocated – this just inits fields.
| caplist | struct to initialize | 


| boolean cap_is_module_string | ( | const xmlChar * | uri | ) | 
Check if the capability URI is a YANG module identifier.
| uri | the URI string to check | 
| xmlChar * cap_make_moduri | ( | ncx_module_t * | mod | ) | 
Malloc and construct a module URI for the specified module make the module URI string (for sysCapabilityChange event)
| mod | module to use | 

| cap_rec_t * cap_match | ( | const cap_list_t * | caplist, | 
| const xmlChar * | capuri | ||
| ) | 
Check if the capability URI is set in the capslist.
Return the entry if found;
!!! NOT FOR NETCONF STANDARD CAPS SET WITH BITS!!!
| caplist | capability list to check | 
| capuri | the capability URI to find | 


| val_value_t * cap_match_val | ( | val_value_t * | caplist, | 
| const xmlChar * | capuri | ||
| ) | 
Check if the capability URI is set in the capslist value_t tree.
Return the entry if found;
!!! NOT FOR NETCONF STANDARD CAPS SET WITH BITS!!!
| caplist | capability YANG list to check | 
| capuri | the capability URI to find | 


| cap_list_t * cap_new_caplist | ( | void | ) | 
Malloc and initialize the fields in a cap_list_t struct.


Get the next module capability in the list.
| curcap | current mod_cap entry | 
| void cap_remove_mod | ( | cap_list_t * | caplist, | 
| ncx_module_t * | mod | ||
| ) | 
Remove a module capability from the list.
| caplist | capability list that will contain the module cap | 
| mod | == module to remove | 


| status_t cap_remove_modval | ( | val_value_t * | caplist, | 
| ncx_module_t * | mod | ||
| ) | 
Remove a module capability from the list (val_value_t version)
| caplist | capability list that will contain the module cap | 
| mod | module to remove | 


| boolean cap_set | ( | const cap_list_t * | caplist, | 
| const xmlChar * | capuri | ||
| ) | 
Check if the capability URI is set in the capslist linear search of capability list, will check for std uris as well.
| caplist | capability list to check | 
| capuri | the capability URI to set | 


| void cap_split_modcap | ( | cap_rec_t * | cap, | 
| const xmlChar ** | module, | ||
| const xmlChar ** | revision, | ||
| const xmlChar ** | namespacestr | ||
| ) | 
Split the modcap string into 3 parts.
| cap | capability rec to parse | |
| [out] | module | address of return module name
  | 
| [out] | revision | address of return module revision date string
  | 
| [out] | namespacestr | address of return module namespace
  | 
| boolean cap_std_set | ( | const cap_list_t * | caplist, | 
| cap_stdid_t | capstd | ||
| ) | 
fast search of standard protocol capability set
| caplist | capability list to check | 
| capstd | the standard capability ID | 
