yumapro  20.10-12
YumaPro SDK
cap.h File Reference

NETCONF protocol capabilities. More...

#include <xmlstring.h>
#include "ncxtypes.h"
#include "status.h"
#include "val.h"
Include dependency graph for cap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cap_list_t_
 one capabilities list More...
 
struct  cap_rec_t_
 queue of this structure for list of enterprise capabilities More...
 

Macros

#define CAP_BASE_URN
 NETCONF Base Protocol Capability String (base:1.0)
 
#define CAP_BASE_URN11
 NETCONF Base Protocol Capability String (base:1.1)
 
#define CAP_URN   ((const xmlChar *)"urn:ietf:params:netconf:capability:")
 NETCONF Capability Identifier Base String.
 
#define CAP_REST_URN   ((const xmlChar *)"urn:ietf:params:restconf:capability:")
 RESTCONF Capability Identifier Base String.
 
#define CAP_J_URN   (const xmlChar *)"urn:ietf:params:xml:ns:netconf:capability:"
 NETCONF Capability Identifier Base String Implemented by Juniper.
 

Enumerations

enum  cap_subjtyp_t_ { ,
  CAP_SUBJTYP_PROT,
  CAP_SUBJTYP_DM,
  CAP_SUBJTYP_OTHER,
  CAP_SUBJTYP_CONFID
}
 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
}
 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_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...
 
const 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...
 

Detailed Description

NETCONF protocol capabilities.