yumapro
24.10-2
YumaPro SDK
|
YANG module utility functions. More...
#include <xmlstring.h>
#include "dlq.h"
#include "getcb.h"
#include "grp.h"
#include "log.h"
#include "ncxconst.h"
#include "ncxtypes.h"
#include "obj.h"
#include "rpc.h"
#include "tk.h"
#include "typ.h"
#include "val.h"
#include "xmlns.h"
#include "yang.h"
Go to the source code of this file.
Macros | |
#define | MOD_NAME(M) (M)->name |
macro to access a module name | |
#define | ROOTCB_CAPLIST(R) (R)->caplist |
access the caplist field for yangcli | |
Functions | |
status_t | ncx_init (boolean netconfd, boolean savestr, log_debug_t dlevel, boolean logtstamps, boolean collapse_submods, boolean xpath_backptrs, const char *startmsg, int argc, char *argv[]) |
Initialize the NCX library. More... | |
void | ncx_cleanup (void) |
Cleanup the NCX library. More... | |
ncx_module_t * | ncx_new_module (void) |
Malloc and initialize the fields in a ncx_module_t. More... | |
void | ncx_free_module (ncx_module_t *mod) |
Free a YANG module. More... | |
status_t | ncx_add_namespace_to_registry (ncx_module_t *mod, boolean tempmod) |
Add the namespace and prefix to the registry or retrieve it if already set. More... | |
status_t | ncx_add_to_registry (ncx_module_t *mod) |
Add all the definitions stored in an ncx_module_t to the registry. More... | |
status_t | ncx_add_to_modQ (ncx_module_t *mod, dlq_hdr_t *modQ) |
Add module to the current module Q. More... | |
status_t | ncx_add_to_root_modQ (ncx_module_t *mod) |
Add module to the current module Q. More... | |
status_t | ncx_setup_mounted_mod (ncx_module_t *mod) |
Setup a module for yangcli in parsemode in SM mode. More... | |
void | ncx_match_rpc_error (ncx_module_t *mod, const xmlChar *modname, const xmlChar *rpcname, boolean match, boolean firstmsg) |
Generate an error for multiple matches. More... | |
const xmlChar * | ncx_get_name_segment (const xmlChar *str, xmlChar *buff, uint32 buffsize) |
Get the name string between the dots. More... | |
status_t | ncx_check_yang_status (ncx_status_t mystatus, ncx_status_t depstatus) |
Check the backward compatibility of the 2 YANG status fields. More... | |
void | ncx_free_node (ncx_node_t nodetyp, void *node) |
Delete a node based on its type. More... | |
ncx_tclass_t | ncx_get_tclass (ncx_btype_t btyp) |
Get the token class. More... | |
status_t | ncx_parse_name (const xmlChar *str, uint32 *len) |
Check if the next N chars represent a valid NcxName. More... | |
status_t | ncx_consume_tstring (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *name, ncx_opt_t opt) |
Consume a TK_TT_TSTRING with the specified value. More... | |
status_t | ncx_consume_name (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *name, xmlChar **namebuff, ncx_opt_t opt, tk_type_t ctyp) |
Consume a TK_TSTRING that matches the 'name', then retrieve the next TK_TSTRING token into the namebuff. More... | |
status_t | ncx_consume_token (tk_chain_t *tkc, ncx_module_t *mod, tk_type_t ttyp) |
Consume the next token which should be a 1 or 2 char token without any value. More... | |
ncx_save_deviations_t * | ncx_new_save_deviations (ncx_module_t *devmod, boolean annotation) |
Create a deviation save structure. More... | |
void | ncx_free_save_deviations (ncx_save_deviations_t *savedev) |
Free a deviation save struct. More... | |
void | ncx_clean_save_deviationsQ (dlq_hdr_t *savedevQ) |
Clean a Q of deviation save structs. More... | |
void | ncx_set_error (ncx_error_t *tkerr, ncx_module_t *mod, uint32 linenum, uint32 linepos) |
Set the fields in an ncx_error_t struct. More... | |
void | ncx_inc_warnings (ncx_module_t *mod) |
Increment the module warning count for mod . More... | |
boolean | ncx_need_modchecks (const xmlChar *modname) |
Check if xpath_backptr and obj commit tests needed. More... | |
status_t | ncx_init_user_types (void) |
Initialize the user types after ietf-inet-types module loaded. More... | |
boolean | ncx_check_any_object_nolock_get (const xmlChar *objname) |
Check if the object name will match any config=true nodes. More... | |
boolean | ncx_any_mod_errors (void) |
Check if any of the loaded modules are loaded with non-fatal errors. More... | |
boolean | ncx_save_descr (void) |
Get the value of the save description strings variable. More... | |
uint32 | ncx_mod_revision_count (xml_msg_hdr_t *msg, const xmlChar *modname) |
Find all the ncx_module_t structs in the ncx_modQ that have the same module name. More... | |
uint32 | ncx_mod_revision_count_que (xml_msg_hdr_t *msg, dlq_hdr_t *modQ, const xmlChar *modname) |
Find all the ncx_module_t structs in the specified queue that have the same module name. More... | |
void | dump_modQ (dlq_hdr_t *modQ) |
dump module Q contents [name, revision] for debugging More... | |
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... | |
obj_template_t * | ncx_match_rpc (ncx_module_t *mod, const xmlChar *rpcname, uint32 *retcount) |
Check if a rpc_template_t in the mod->rpcQ. More... | |
typ_template_t * | ncx_find_type (ncx_module_t *mod, const xmlChar *typname, boolean useall) |
Check if a typ_template_t in the mod->typeQ. More... | |
typ_template_t * | ncx_find_type_que (const dlq_hdr_t *typeQ, const xmlChar *typname) |
ncx_find_type_que More... | |
grp_template_t * | ncx_find_grouping (ncx_module_t *mod, const xmlChar *grpname, boolean useall) |
Find the YANG grouping. More... | |
grp_template_t * | ncx_find_grouping_que (const dlq_hdr_t *groupingQ, const xmlChar *grpname) |
Check if a grp_template_t in the specified Q. More... | |
obj_template_t * | ncx_find_rpc (const ncx_module_t *mod, const xmlChar *rpcname) |
Check if a rpc_template_t in the mod->rpcQ. More... | |
obj_template_t * | ncx_match_any_rpc_mod (ncx_module_t *mod, const xmlChar *rpcname, uint32 *retcount) |
Check if a rpc_template_t is in the specified module. More... | |
obj_template_t * | ncx_get_first_data_object (ncx_module_t *mod) |
Get the first datastore object in the module. More... | |
obj_template_t * | ncx_find_next_data_object (ncx_module_t *mod, obj_template_t *obj) |
Check the next obj_template_t in in any module that matches the object name string. More... | |
obj_template_t * | ncx_find_object (ncx_module_t *mod, const xmlChar *objname) |
Find a top level module object. More... | |
obj_template_t * | ncx_find_object_nsid (xmlns_id_t nsid, const xmlChar *objname) |
Find a top level module object by module NSID. More... | |
obj_template_t * | ncx_get_first_object (ncx_module_t *mod) |
Get the first object in the datadefQs for the specified module. More... | |
obj_template_t * | ncx_get_first_object_ex (ncx_module_t *mod, boolean augment_ok) |
Get the first object in the datadefQs for the specified module. More... | |
obj_template_t * | ncx_get_last_object (ncx_module_t *mod, boolean augment_ok) |
Find the last data node. More... | |
obj_template_t * | ncx_get_next_object (ncx_module_t *mod, obj_template_t *curobj) |
Get the next object in the specified module. More... | |
obj_template_t * | ncx_get_next_object_ex (ncx_module_t *mod, obj_template_t *curobj, boolean augment_ok) |
Get the next object in the specified module. More... | |
obj_template_t * | ncx_get_prev_object (ncx_module_t *mod, obj_template_t *curobj, boolean augment_ok) |
Find the previous object node. More... | |
obj_template_t * | ncx_get_next_data_object (ncx_module_t *mod, obj_template_t *curobj) |
Get the next database object in the specified module. More... | |
obj_template_t * | ncx_get_first_data_object_pick (ncx_module_t *mod, boolean config) |
Get the first database object in the datadefQs for the specified module. More... | |
obj_template_t * | ncx_get_next_data_object_same (ncx_module_t *mod, obj_template_t *curobj) |
Get the next database object in the specified module. More... | |
boolean | ncx_any_dependency_errors (const ncx_module_t *mod) |
Check if any of the imports that this module relies on were loadeds are loaded with non-fatal errors. More... | |
boolean | ncx_is_duplicate (ncx_module_t *mod, const xmlChar *defname) |
Check if a module definition name is a duplicate. More... | |
const xmlChar * | ncx_get_modname (const ncx_module_t *mod) |
Get the main module name. More... | |
xmlns_id_t | ncx_get_mod_nsid (const ncx_module_t *mod) |
Get the main module namespace ID. More... | |
const xmlChar * | ncx_get_modversion (const ncx_module_t *mod) |
Get the [sub]module version. More... | |
const xmlChar * | ncx_get_modnamespace (const ncx_module_t *mod) |
Get the module namespace URI. More... | |
const xmlChar * | ncx_get_modsource (const ncx_module_t *mod) |
Get the module filespec source string. More... | |
ncx_module_t * | ncx_get_mainmod (ncx_module_t *mod) |
Get the main module. More... | |
const xmlChar * | ncx_get_mod_prefix (const ncx_module_t *mod) |
Get the module prefix for the specified module. More... | |
const xmlChar * | ncx_get_mod_xmlprefix (const ncx_module_t *mod) |
Get the module XML prefix for the specified module. More... | |
const xmlChar * | ncx_get_mod_source (const ncx_module_t *mod) |
Get the module file source string for the specified module. More... | |
const xmlChar * | ncx_get_mod_revision (const ncx_module_t *mod) |
Get the module revision string for the specified module. More... | |
const xmlChar * | ncx_get_mod_ocversion (const ncx_module_t *mod) |
Get the module openconfig-version string for the specified module. More... | |
status_t | ncx_set_mod_ocversion (ncx_module_t *mod, const xmlChar *ocversion) |
Set the module openconfig-version string for the specified module. More... | |
dlq_hdr_t * | ncx_get_allincQ (ncx_module_t *mod) |
Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value. More... | |
const dlq_hdr_t * | ncx_get_const_allincQ (const ncx_module_t *mod) |
Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value (const version) More... | |
ncx_module_t * | ncx_get_parent_mod (ncx_module_t *mod) |
Find the correct module by checking mod->parent nodes. More... | |
boolean | ncx_mod_has_rpcs (ncx_module_t *mod) |
Check if the module has any RPC operation definitions. More... | |
boolean | ncx_mod_has_data_nodes (ncx_module_t *mod, boolean check_config, boolean check_operational) |
Check if the module has any datastore definitions. More... | |
boolean | ncx_mod_has_augment_data_nodes (ncx_module_t *mod, boolean check_config, boolean check_operational) |
Check if the module has any augment datastore definitions. More... | |
boolean | ncx_mod_unloadable (ncx_module_t *mod) |
Check if this module can be unloaded. More... | |
void | ncx_set_mod_unloadable (ncx_module_t *mod) |
Set this module so it can be unloaded. More... | |
ncx_module_t * | ncx_first_submodule (ncx_module_t *mod) |
Get the first submodule in the specified main module. More... | |
ncx_module_t * | ncx_next_submodule (ncx_module_t *mod, ncx_module_t *submod) |
Get the next submodule in the specified main module. More... | |
void | ncx_set_module_supported (ncx_module_t *mod, boolean supported) |
Set the module supported field. More... | |
ncx_yang_version_t | ncx_get_yang_version (const ncx_module_t *mod) |
Get the yang-version used in the module. More... | |
void | ncx_number_all_objects (ncx_module_t *mod) |
Number all objects for internal ordering comparisons. More... | |
boolean | ncx_mod_is_hidden (const ncx_module_t *mod) |
Check if the module is forced no advertise (e.g. More... | |
void | ncx_set_mod_hidden (ncx_module_t *mod) |
Force the module to be hidden from advertisement. More... | |
status_t | ncx_check_yang_identity (ncx_module_t *impmod, const xmlChar *idstr) |
Check if an identity string is available in the module. More... | |
void | ncx_set_ocpattern_mode (ncx_module_t *mod, boolean mode) |
Set the openconfig pattern mode. More... | |
void | ncx_force_ocpattern_mode (ncx_module_t *mod) |
Force the openconfig pattern mode to TRUE. More... | |
boolean | ncx_get_ocpattern_mode (const ncx_module_t *mod) |
Get the openconfig pattern mode. More... | |
boolean | ncx_modname_is_ocpattern (const xmlChar *modname) |
Check if the module name is an openconfig file. More... | |
boolean | ncx_skip_child_node_warn (const xmlChar *modname) |
Internal compiler check to suppress warnings. More... | |
void | ncx_clr_enable_chk (ncx_module_t *mod) |
Clear the enable check test done flag in all objects in the specified module. More... | |
void | ncx_set_yangmap_type (ncx_module_t *mod, boolean is_src) |
Set the yangmap type flags. More... | |
boolean | ncx_is_yangmap_type (ncx_module_t *mod, boolean is_src) |
Check the yangmap type flags. More... | |
boolean | ncx_mod_has_submodules (const ncx_module_t *mod) |
Check if this is a main module with submodules. More... | |
void | ncx_delete_mod_obsolete_objects (ncx_module_t *mod) |
Delete all obsolete objects in mod . More... | |
void | ncx_remove_augment_data_nodes (ncx_module_t *mod) |
Check if YANG objects related to this augment need to be removed. More... | |
void | ncx_collapse_submod_defs (ncx_module_t *mod) |
Collapse submodule definitions into the main module. More... | |
status_t | ncx_set_obj_xpath_backptrs (ncx_module_t *mod) |
Add Xpath back pointers to the data-db objects in the database for 1 module. More... | |
void | ncx_clear_mod_xpath_backptrs (ncx_module_t *mod) |
Clear Xpath back pointers for the data-db objects in the database for 1 module. More... | |
void | ncx_unload_and_free_module (ncx_module_t *mod) |
Clear out the xmlns, def_ref, and modQ entries for a module and then delete the module. More... | |
void | ncx_soft_unload_and_free_module (ncx_module_t *mod) |
Clear out the modQ entries for a module and then delete the module. More... | |
ncx_import_t * | ncx_new_import (void) |
Malloc and initialize the fields in a ncx_import_t. More... | |
void | ncx_free_import (ncx_import_t *import) |
Free an ncx_import_t. More... | |
ncx_import_t * | ncx_find_import (const ncx_module_t *mod, const xmlChar *module) |
Search the importQ for a specified module name. More... | |
ncx_import_t * | ncx_find_import_que (const dlq_hdr_t *importQ, const xmlChar *module) |
Search the specified importQ for a specified module name. More... | |
ncx_import_t * | ncx_find_import_test (const ncx_module_t *mod, const xmlChar *module) |
Search the importQ for a specified module name. More... | |
ncx_import_t * | ncx_find_pre_import (const ncx_module_t *mod, const xmlChar *prefix) |
Search the importQ for a specified prefix value. More... | |
ncx_import_t * | ncx_find_pre_import_que (const dlq_hdr_t *importQ, const xmlChar *prefix) |
Search the specified importQ for a specified prefix value. More... | |
ncx_import_t * | ncx_find_pre_import_test (const ncx_module_t *mod, const xmlChar *prefix) |
Search the importQ for a specified prefix value. More... | |
boolean | ncx_import_match_mod (const ncx_import_t *imp, const xmlChar *module, const xmlChar *revision) |
Check if the import matches the specified module. More... | |
void * | ncx_locate_modqual_import (yang_pcb_t *pcb, ncx_import_t *imp, const xmlChar *defname, ncx_node_t *deftyp) |
Search the specific module for the specified definition name. More... | |
ncx_include_t * | ncx_new_include (void) |
Malloc and initialize the fields in a ncx_include_t. More... | |
void | ncx_free_include (ncx_include_t *inc) |
Free a ncx_include_t. More... | |
ncx_include_t * | ncx_find_include (const ncx_module_t *mod, const xmlChar *submodule) |
Search the includeQ for a specified submodule name. More... | |
ncx_binary_t * | ncx_new_binary (void) |
Malloc and fill in a new ncx_binary_t struct. More... | |
void | ncx_init_binary (ncx_binary_t *binary) |
Init the memory of a ncx_binary_t struct. More... | |
void | ncx_clean_binary (ncx_binary_t *binary) |
Scrub the memory of a ncx_binary_t but do not delete it. More... | |
void | ncx_free_binary (ncx_binary_t *binary) |
Free all the memory in a ncx_binary_t struct. More... | |
ncx_identity_t * | ncx_new_identity (void) |
Get a new ncx_identity_t struct. More... | |
ncx_identity_base_t * | ncx_new_identity_base (void) |
Get a new ncx_identity_base_t struct. More... | |
void | ncx_free_identity_base (ncx_identity_base_t *identity_base) |
Free a malloced ncx_identity_base_t struct. More... | |
ncx_identity_base_t * | ncx_first_identity_base (ncx_identity_t *identity) |
Get the first base record for an identity. More... | |
ncx_identity_base_t * | ncx_next_identity_base (ncx_identity_base_t *idbase) |
Get the next base record for an identity. More... | |
void | ncx_free_identity (ncx_identity_t *identity) |
Free a malloced ncx_identity_t struct. More... | |
ncx_identity_t * | ncx_find_identity (ncx_module_t *mod, const xmlChar *name, boolean useall) |
Find a ncx_identity_t struct in the module and perhaps any of its submodules. More... | |
void | ncx_for_all_identities (ncx_module_t *mod, ncx_identity_cbfn_t cbfn, void *cookie) |
Iterate all the YANG identities in the module. More... | |
ncx_identity_t * | ncx_find_identity_que (dlq_hdr_t *identityQ, const xmlChar *name) |
Find a ncx_identity_t struct in the specified Q. More... | |
xmlns_id_t | ncx_get_identity_nsid (const ncx_identity_t *identity) |
Get the namespace ID for an identity. More... | |
boolean | ncx_get_identity_conditional (const ncx_identity_t *identity) |
Check if the identity is conditional on if-feature. More... | |
void | ncx_find_all_identities (ncx_identity_t *base, ncx_identity_cbfn_t cbfn, void *cookie) |
Invoke callback for all the found identities. More... | |
ncx_filptr_t * | ncx_new_filptr (void) |
Get a new ncx_filptr_t struct. More... | |
void | ncx_free_filptr (ncx_filptr_t *filptr) |
Free a new ncx_filptr_t struct or add to the cache if room. More... | |
ncx_revhist_t * | ncx_new_revhist (void) |
Create a revision history entry. More... | |
void | ncx_free_revhist (ncx_revhist_t *revhist) |
Free a revision history entry. More... | |
ncx_revhist_t * | ncx_find_revhist (const ncx_module_t *mod, const xmlChar *ver) |
Search the revhistQ for a specified revision. More... | |
void | ncx_init_enum (ncx_enum_t *enu) |
Init the memory of a ncx_enum_t. More... | |
void | ncx_clean_enum (ncx_enum_t *enu) |
Scrub the memory of a ncx_enum_t but do not delete it. More... | |
int32 | ncx_compare_enums (const ncx_enum_t *enu1, const ncx_enum_t *enu2) |
Compare 2 enum values. More... | |
status_t | ncx_set_enum (const xmlChar *enum_name, const int32 enum_val, ncx_enum_t *retenu) |
Parse an enumerated integer string into an ncx_enum_t without matching it against any typdef. More... | |
void | ncx_init_bit (ncx_bit_t *bit) |
Init the memory of a ncx_bit_t. More... | |
void | ncx_clean_bit (ncx_bit_t *bit) |
Scrub the memory of a ncx_bit_t but do not delete it. More... | |
int32 | ncx_compare_bits (const ncx_bit_t *bitone, const ncx_bit_t *bittwo) |
Compare 2 bit values by their schema order position. More... | |
ncx_typname_t * | ncx_new_typname (void) |
Malloc and init a typname struct. More... | |
void | ncx_free_typname (ncx_typname_t *typnam) |
Free a typname struct. More... | |
const xmlChar * | ncx_find_typname (const typ_template_t *typ, const dlq_hdr_t *que) |
Find a typname struct in the specified Q for a typ pointer. More... | |
const typ_template_t * | ncx_find_typname_type (const dlq_hdr_t *que, const xmlChar *typname) |
Find a typ_template_t pointer in a typename mapping, in the specified Q. More... | |
void | ncx_clean_typnameQ (dlq_hdr_t *que) |
Delete all the Q entries, of typname mapping structs. More... | |
ncx_errinfo_t * | ncx_new_errinfo (void) |
Malloc and init a new ncx_errinfo_t. More... | |
void | ncx_init_errinfo (ncx_errinfo_t *err) |
Init the fields in an ncx_errinfo_t struct. More... | |
void | ncx_clean_errinfo (ncx_errinfo_t *err) |
Scrub the memory in a ncx_errinfo_t by freeing all the sub-fields. More... | |
void | ncx_free_errinfo (ncx_errinfo_t *err) |
Scrub the memory in a ncx_errinfo_t by freeing all the sub-fields, then free the errinfo struct. More... | |
boolean | ncx_errinfo_set (const ncx_errinfo_t *errinfo) |
Check if error-app-tag or error-message set. More... | |
status_t | ncx_copy_errinfo (const ncx_errinfo_t *src, ncx_errinfo_t *dest) |
Copy the fields from one errinfo to a blank errinfo. More... | |
obj_template_t * | ncx_get_gen_anyxml (void) |
Get the object template for the NCX generic anyxml container. More... | |
obj_template_t * | ncx_get_gen_container (void) |
Get the object template for the NCX generic container. More... | |
obj_template_t * | ncx_get_gen_string (void) |
Get the object template for the NCX generic string leaf. More... | |
obj_template_t * | ncx_get_gen_empty (void) |
Get the object template for the NCX generic empty leaf. More... | |
obj_template_t * | ncx_get_gen_root (void) |
Get the object template for the NCX generic root container. More... | |
obj_template_t * | ncx_get_gen_binary (void) |
Get the object template for the NCX generic binary leaf. More... | |
obj_template_t * | ncx_get_gen_leaflist (void) |
Get the object template for the NCX generic leaf-list string. More... | |
obj_template_t * | ncx_get_yang_insert (void) |
Get the object template for the YANG insert attribute. More... | |
obj_template_t * | ncx_get_yang_key (void) |
Get the object template for the YANG key attribute. More... | |
obj_template_t * | ncx_get_yang_value (void) |
Get the object template for the YANG value attribute. More... | |
obj_template_t * | ncx_get_nc_operation (void) |
Get the cached operation meta-object template used to contruct a metaval for the attribute. More... | |
obj_template_t * | ncx_get_datapath_obj (void) |
Get the cached datapath meta-object template used to contruct a metaval for the attribute. More... | |
obj_template_t * | ncx_get_fixed_value_obj (void) |
Get the cached fixed-value meta-object template used to contruct a metaval for the attribute. More... | |
obj_template_t * | ncx_get_btype_obj (void) |
Get the cached datapath meta-object template used to contruct a metaval for the attribute. More... | |
boolean | ncx_obj_is_generic (const obj_template_t *obj) |
Check if the object is 1 of the gen_foo object templates. More... | |
ncx_display_mode_t | ncx_get_display_mode (void) |
Get the current default display mode. More... | |
uint32 | ncx_get_vtimeout_value (void) |
Get the virtual node cache timeout value. More... | |
boolean | ncx_get_useprefix (void) |
Get the use_prefix value. More... | |
void | ncx_set_useprefix (boolean val) |
Set the use_prefix value. More... | |
boolean | ncx_get_system_sorted (void) |
Get the system_sorted value. More... | |
void | ncx_set_system_sorted (boolean val) |
Set the system_sorted value. More... | |
ncx_sort_type_t | ncx_get_system_sort_type (void) |
Get the system_sort_type value. More... | |
void | ncx_set_system_sort_type (ncx_sort_type_t val) |
Set the system_sort_type value. More... | |
boolean | ncx_get_cwd_subdirs (void) |
Get the CLI parameter value whether to search for modules in subdirs of the CWD by default. More... | |
boolean | ncx_protocol_enabled (ncx_protocol_t proto) |
Check if the specified protocol version is enabled. More... | |
void | ncx_set_protocol_enabled (ncx_protocol_t proto) |
Set the specified protocol version to be enabled. More... | |
void | ncx_set_protocol_disabled (ncx_protocol_t proto) |
Set the specified protocol version to be disabled. More... | |
void | ncx_set_use_deadmodQ (void) |
Set the usedeadmodQ flag. More... | |
int8 | ncx_get_message_indent (void) |
Get the protoco9l output indent amount. More... | |
void | ncx_set_message_indent (int8 msg_indent) |
Set the protocol output message indent amount. More... | |
boolean | ncx_use_xpath_backptrs (void) |
Check if it is OK to use XPath back pointers or not. More... | |
status_t | ncx_set_all_obj_xpath_backptrs (void) |
Add Xpath back pointers to the data-db objects in the database. More... | |
boolean | ncx_fastpath_enabled (void) |
Check if fast path value tree comparisons enabled. More... | |
boolean | ncx_netconfd_running (void) |
Check if netconfd running. More... | |
void | ncx_use_data_templates (boolean enabled) |
Set the use-data-templates flag. More... | |
boolean | ncx_data_templates_ok (void) |
Get the use-data-templates flag. More... | |
void | ncx_ignore_missing_vars (boolean enabled) |
Set the ignore-missing-vars flag. More... | |
boolean | ncx_missing_vars_ok (void) |
Get the ignore-missing-vars flag. More... | |
void | ncx_set_ycontrol_running (void) |
Set the ycontrol_running flag to TRUE. | |
void | ncx_set_search_modQ_ok (void) |
Set the search_modQ_ok flag to TRUE. | |
boolean | ncx_get_search_modQ_ok (void) |
Get the search_modQ_ok flag. More... | |
status_t | ncx_set_subsys_id (const xmlChar *id) |
Set the subsys_id parameter for this subsystem. More... | |
const xmlChar * | ncx_get_subsys_id (void) |
Get the subsys_id value; NULL if not set. More... | |
void | ncx_set_use_objptrs (void) |
Set the use_objptrs flag. More... | |
boolean | ncx_use_objptrs (void) |
Get the use_objptrs flag. More... | |
ncx_backptr_t * | ncx_first_objptr (void) |
Get the first object pointer. More... | |
ncx_backptr_t * | ncx_next_objptr (ncx_backptr_t *curptr) |
Get the next object pointer. More... | |
void | ncx_set_getbulk_max (uint32 max_entries) |
Set the max_entries parameter for GET2 callbacks. More... | |
uint32 | ncx_get_getbulk_max (void) |
Get the max_entries parameter for GET2 callbacks. More... | |
void | ncx_set_sil_priority_used (void) |
Flag that an object set a non-default SIL priority. More... | |
boolean | ncx_get_sil_priority_used (void) |
Get the sil_priority_used flag. More... | |
void | ncx_set_secondary_sil_priority_used (void) |
Flag that a value node set a non-default secondary SIL priority. More... | |
boolean | ncx_get_secondary_sil_priority_used (void) |
Get the secondary_sil_priority_used flag. More... | |
boolean | ncx_base_schema_set (void) |
Check if the base schema features have been set yet. More... | |
void | ncx_set_base_schema (void) |
Set the base_schema_set flag to true. More... | |
boolean | ncx_need_get2_xpath (void) |
Check if GET2 callback support needed in XPath. More... | |
void | ncx_set_with_ocpattern (boolean mode) |
Set the openconfig pattern mode for the entire system. More... | |
boolean | ncx_is_add_toplevel_default_mode (void) |
Get the add_toplevel_default_mode value. More... | |
void | ncx_set_add_toplevel_default_mode (boolean val) |
Set the add_toplevel_default_mode value. More... | |
boolean | ncx_is_with_snmp (void) |
Get the with_snmp value. More... | |
void | ncx_set_with_snmp (boolean val) |
Set the with_snmp value. More... | |
void | ncx_enable_bestmatch (void) |
Enable the bestmatch import processing feature. More... | |
status_t | ncx_set_bestmatch (void) |
Setup the bestmatch module versions, if enabled. More... | |
void | ncx_allow_get_when_check (void) |
Allow server get retrievals to test for false when-stmt during retrieval operations on YANG data. | |
boolean | ncx_use_get_when_check (void) |
Check server get retrievals to test for false when-stmt during retrieval operations on YANG data. More... | |
boolean | ncx_get_sethook_registered (void) |
Check if the Set-Hook callbacks were registered. More... | |
void | ncx_set_sethook_registered (boolean val) |
Set the sethook_registered value. More... | |
void | ncx_set_binary_display_maxlen (uint32 val) |
Set the binary_display_maxlen parameter. More... | |
uint32 | ncx_get_binary_display_maxlen (void) |
Get the binary_display_maxlen parameter. More... | |
boolean | ncx_is_with_dblock (void) |
Get the is_with_dblock value. More... | |
void | ncx_set_with_dblock (boolean val) |
Set the is_with_dblock value. More... | |
boolean | ncx_is_db_lock_init_done (void) |
Check if the <db-lock-init> message was processed by the server. More... | |
void | ncx_set_db_lock_init_done (boolean val) |
Set if the <db-lock-init> message was processed by the server. More... | |
void | ncx_set_max_strlen (int32 num) |
Set the –max-strlen parameter. More... | |
int32 | ncx_get_max_strlen (void) |
Get the –max-strlen parameter. More... | |
void | ncx_set_ypwatcher_running (void) |
Set the ypwatcher running flag. More... | |
boolean | ncx_get_ypwatcher_running (void) |
Get the ypwatcher running flag. More... | |
void | ncx_set_pidfile_cleaned (void) |
Set the pidfile cleaned flag. More... | |
boolean | ncx_get_pidfile_cleaned (void) |
Get the PID file cleaned flag. More... | |
void | ncx_set_trim_whitespace (boolean val) |
Set the trim_whitespace flag. More... | |
boolean | ncx_get_trim_whitespace (void) |
Get the trim_whitespace flag. More... | |
void | ncx_set_startup_prune (boolean val) |
Set the startup_prune flag. More... | |
boolean | ncx_get_startup_prune (void) |
Get the startup_prune flag. More... | |
boolean | ncx_check_startup_prune (ses_cb_t *scb) |
Check if the namespace error can be skipped. More... | |
void | ncx_set_config_state (ncx_config_state_t val) |
Set the config_state flag. More... | |
ncx_config_state_t | ncx_get_config_state (void) |
Get the config_state flag. More... | |
void | ncx_set_xmlorder (boolean val) |
Set the xmlorder flag. More... | |
boolean | ncx_get_xmlorder (void) |
Get the xmlorder flag. More... | |
void | ncx_set_list_deleteall_ok (boolean val) |
Set the list_deleteall_ok flag. More... | |
boolean | ncx_get_list_deleteall_ok (void) |
Get the list_deleteall_ok flag. More... | |
void | ncx_set_leaflist_deleteall_ok (boolean val) |
Set the leaflist_deleteall_ok flag. More... | |
boolean | ncx_get_leaflist_deleteall_ok (void) |
Get the leaflist_deleteall_ok flag. More... | |
boolean | ncx_check_delete_all_allowed (obj_template_t *testobj) |
Check if the delete-all or remove-all operation is enabled for for specified object. More... | |
void | ncx_set_with_canonical (boolean val) |
Set the with_canonical flag. More... | |
boolean | ncx_get_with_canonical (void) |
Get the with_canonical flag. More... | |
void | ncx_set_save_owners (boolean val) |
Set the save_owners flag. More... | |
boolean | ncx_get_save_owners (void) |
Get the save_owners flag. More... | |
const xmlChar * | ncx_get_layer (ncx_layer_t layer) |
Translate ncx_layer_t enum to a string. More... | |
ncx_cvttyp_t | ncx_get_cvttyp_enum (const char *str) |
Get the enum for the string name of a ncx_cvttyp_t enum. More... | |
ncx_status_t | ncx_get_status_enum (const xmlChar *str) |
Get the enum for the string name of a ncx_status_t enum. More... | |
const xmlChar * | ncx_get_status_string (ncx_status_t status) |
Get the string for the enum value of a ncx_status_t enum. More... | |
ncx_data_class_t | ncx_get_data_class_enum (const xmlChar *str) |
Get the enum for the string name of a ncx_data_class_t enum. More... | |
const xmlChar * | ncx_get_data_class_str (ncx_data_class_t dataclass) |
Get the string value for the ncx_data_class_t enum. More... | |
const xmlChar * | ncx_get_access_str (ncx_access_t max_access) |
Get the string name of a ncx_access_t enum. More... | |
ncx_access_t | ncx_get_access_enum (const xmlChar *str) |
Get the enum for the string name of a ncx_access_t enum. More... | |
boolean | ncx_is_true (const xmlChar *str) |
Check if an xmlChar string is a string OK for XSD boolean. More... | |
boolean | ncx_is_false (const xmlChar *str) |
Check if an xmlChar string is a string OK for XSD boolean. More... | |
ncx_bad_data_t | ncx_get_baddata_enum (const xmlChar *valstr) |
Check if the specified string matches an ncx_baddata_t enum. More... | |
const xmlChar * | ncx_get_baddata_string (ncx_bad_data_t baddata) |
Get the string for the specified enum value. More... | |
const xmlChar * | ncx_get_withdefaults_string (ncx_withdefaults_t withdef) |
Get the string for the specified enum value. More... | |
ncx_withdefaults_t | ncx_get_withdefaults_enum (const xmlChar *withdefstr) |
Get the enum for the specified string value. More... | |
int32 | ncx_get_withdefaults_value (const xmlChar *withdefstr) |
Get the YANG integer value for the enum for the specified string value. More... | |
ncx_display_mode_t | ncx_get_display_mode_enum (const xmlChar *dmstr) |
Get the enum for the specified string value. More... | |
const xmlChar * | ncx_get_display_mode_str (ncx_display_mode_t dmode) |
Get the string for the specified enum value. More... | |
const xmlChar * | ncx_get_confirm_event_str (ncx_confirm_event_t event) |
Get the string for the specified enum value. More... | |
const xmlChar * | ncx_get_protocols_enabled (uint16 flags) |
Get the string for the NETCONF protocols enabled in the flags. More... | |
const xmlChar * | ncx_get_protocol_name (ncx_protocol_t proto) |
Get the name string for the protocol. More... | |
ncx_name_match_t | ncx_get_name_match_enum (const xmlChar *str) |
Get the enum for the string name of a ncx_name_match_t enum. More... | |
const xmlChar * | ncx_get_name_match_string (ncx_name_match_t match) |
Get the string for the ncx_name_match_t enum. More... | |
int32 | ncx_get_name_match_value (ncx_name_match_t match) |
Get the YANG integer value for the ncx_name_match_t enum. More... | |
status_t | ncx_str2txid (const xmlChar *str, ncx_transaction_id_t *txid) |
Convert a string to a ncx_transaction_id_t. More... | |
status_t | ncx_txid2str (ncx_transaction_id_t *txid, xmlChar **retbuff) |
Convert a transaction ID to a string. More... | |
const xmlChar * | ncx_get_btyp_string (ncx_btype_t btyp) |
Get the enumeration string to the base type enum. More... | |
const xmlChar * | ncx_cvt_encoding_enum (ncx_msg_encoding_t msg_encoding) |
Convert an ncx_msg_encoding_t enum to a string. More... | |
ncx_msg_encoding_t | ncx_cvt_encoding_str (const xmlChar *msg_encoding) |
Convert a ncx_msg_encoding_t string to its enum. More... | |
const xmlChar * | ncx_get_yang_version_str (ncx_yang_version_t langver) |
Get the yang-version string value for the enum. More... | |
const xmlChar * | ncx_get_ses_event_str (ncx_ses_event_t ses_event) |
Get the session event string for the enum. More... | |
void | ncx_print_errormsg (tk_chain_t *tkc, ncx_module_t *mod, status_t res) |
Print an parse error message to STDOUT. More... | |
void | ncx_print_errormsg_ex (tk_chain_t *tkc, ncx_module_t *mod, status_t res, const char *filename, uint32 linenum, boolean fineoln) |
Print an parse error message to STDOUT (Extended) More... | |
void | ncx_conf_exp_err (tk_chain_t *tkc, status_t result, const char *expstr) |
Print an error for wrong token, expected a different token. More... | |
void | ncx_mod_exp_err (tk_chain_t *tkc, ncx_module_t *mod, status_t result, const char *expstr) |
Print an error for wrong token, expected a different token. More... | |
void | ncx_mod_missing_err (tk_chain_t *tkc, ncx_module_t *mod, const char *stmtstr, const char *expstr) |
Print an error for wrong token, mandatory sub-statement is missing. More... | |
ncx_errmsg_t * | ncx_new_errmsg (status_t res, const xmlChar *str) |
Malloc and init an ncx_errmsg_t struct. More... | |
void | ncx_free_errmsg (ncx_errmsg_t *msg) |
Clean and free an ncx_errmsg_t struct. More... | |
boolean | ncx_valid_name_ch (uint32 ch) |
Check if the character is a valid YANG identifier chara. More... | |
boolean | ncx_valid_fname_ch (uint32 ch) |
Check if an xmlChar is a valid NCX name string first char. More... | |
boolean | ncx_valid_name (const xmlChar *str, uint32 len) |
Check if an xmlChar string is a valid YANG identifier value. More... | |
boolean | ncx_valid_name2 (const xmlChar *str) |
Check if an xmlChar string is a valid NCX name. More... | |
xmlChar * | ncx_get_source_ex (const xmlChar *fspec, boolean expand_cwd, status_t *res) |
Expand a filespec into an absolute path. More... | |
xmlChar * | ncx_get_source (const xmlChar *fspec, status_t *res) |
Expand a filespec into an absolute path. More... | |
boolean | ncx_prefix_different (const xmlChar *prefix1, const xmlChar *prefix2, const xmlChar *modprefix) |
Check if the specified prefix pair reference different modules. More... | |
status_t | ncx_get_version (xmlChar *buffer, uint32 buffsize) |
Get the the Yuma version ID string. More... | |
status_t | ncx_get_semver (xmlChar *buffer, uint32 buffsize) |
Get the the Yuma SEMVER version ID string. More... | |
status_t | ncx_get_full_version (xmlChar *buffer, uint32 buffsize) |
Get the the Yuma version ID string and SEMVER added. More... | |
const char * | ncx_get_build_date (void) |
Get the build date string encoded into this C file. More... | |
status_t | ncx_get_feature_code (xmlChar *buffer, uint32 buffsize) |
Get the the Feature Code String. More... | |
int32 | ncx_compare_base_uris (const xmlChar *str1, const xmlChar *str2) |
Compare the base part of 2 URI strings. More... | |
boolean | ncx_val_protocol_enabled (ncx_protocol_t proto, uint16 flags) |
Check if the specified protocol version is enabled. More... | |
void | ncx_set_val_protocol_enabled (ncx_protocol_t proto, uint16 *flags) |
Set the specified protocol version to be enabled in a uint16 bits val. More... | |
void | ncx_set_val_protocol_disabled (ncx_protocol_t proto, uint16 *flags) |
Set the specified protocol version to be disabled in a uint16 bits val. More... | |
boolean | ncx_protocol_is_netconf (ncx_protocol_t proto) |
Check if the protocol is a NETCONF protocol. More... | |
void | ncx_write_tracefile (const char *buff, uint32 count) |
Write a byte to the tracefile. More... | |
status_t | ncx_decode_url_string (const xmlChar *urlstr, uint32 urlstrlen, xmlChar *buffer, uint32 *cnt) |
Fill buffer with a plain string from a URL string. More... | |
status_t | ncx_create_pidfile (const xmlChar *progname, boolean fileloc_fhs) |
Create the pidfile for the specified program. More... | |
status_t | ncx_add_ydtrace (const xmlChar *fspec) |
Add the filespec of a yangdump file being processed. More... | |
boolean | ncx_find_ydtrace (const xmlChar *fspec) |
Find the filespec of a yangdump file being processed. More... | |
ncx_result_format_t | ncx_get_file_result_format (const xmlChar *filespec) |
Check the filespec string for a file assignment statement to see if it is text, XML, or JSON. More... | |
boolean | ncx_library_mode_ok (const xmlChar *modname, const xmlChar *rpcname) |
Check if RPC OK to use in library mode. More... | |
const char * | ncx_get_progname (void) |
Get the progname buffer. More... | |
boolean | ncx_ok_for_inline_data (obj_template_t *obj) |
Check if the object is OK for inline data. More... | |
boolean | ncx_check_inline_data_state (const xmlChar *line, boolean curstate) |
Check the input line for Start or End of data tags. More... | |
void | ncx_set_cur_modQ (dlq_hdr_t *que) |
Set the current module Q to an alternate (for yangdiff) More... | |
void | ncx_reset_modQ (void) |
Set the current module Q to the original ncx_modQ. | |
void | ncx_set_session_modQ (dlq_hdr_t *que) |
Get the session module Q. More... | |
dlq_hdr_t * | ncx_get_session_modQ (void) |
Get the current session modQ. More... | |
void | ncx_clear_session_modQ (void) |
Clear the current session modQ. More... | |
void | ncx_set_temp_modQ (dlq_hdr_t *modQ) |
Set the temp_modQ for yangcli session-specific module list. More... | |
dlq_hdr_t * | ncx_get_temp_modQ (void) |
Get the temp_modQ for yangcli session-specific module list. More... | |
void | ncx_clear_temp_modQ (void) |
Clear the temp_modQ for yangcli session-specific module list. More... | |
status_t | ncx_set_load_callback (ncx_load_cbfn_t cbfn) |
Set the callback function for a load-module event. More... | |
void | ncx_clear_load_callback (ncx_load_cbfn_t cbfn) |
Clear the callback function for a load-module event. More... | |
status_t | ncx_set_unload_callback (ncx_unload_cbfn_t cbfn) |
Set the callback function for an unload-module event. More... | |
void | ncx_clear_unload_callback (ncx_unload_cbfn_t cbfn) |
Clear the callback function for an unload-module event. More... | |
status_t | ncx_set_yang_obj_callback (ncx_yang_obj_cbfn_t cbfn) |
Set the callback function for a YANG object parse event. More... | |
void | ncx_clear_yang_obj_callback (ncx_yang_obj_cbfn_t cbfn) |
Clear the callback function for a parse-object event. More... | |
void | ncx_invoke_yang_obj_callbacks (ncx_module_t *mod, obj_template_t *obj) |
Invoke all the callback functions for a parse-object event. More... | |
void | ncx_register_get_owner_fn (ncx_get_owner_fn_t cbfn) |
Register a callback to get the owner name. More... | |
const xmlChar * | ncx_get_owner_name (ncx_owner_id_t owner_id) |
Get the registered YANG library owner namefor owner_id . More... | |
void | ncx_set_warn_idlen (uint32 warnlen) |
Set the warning length for identifiers. More... | |
uint32 | ncx_get_warn_idlen (void) |
Get the warning length for identifiers. More... | |
void | ncx_set_warn_linelen (uint32 warnlen) |
Set the warning length for YANG file lines. More... | |
uint32 | ncx_get_warn_linelen (void) |
Get the warning length for YANG file lines. More... | |
void | ncx_check_warn_idlen (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *id) |
Check if the identifier length is greater than the specified amount. More... | |
void | ncx_check_warn_linelen (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *line) |
Check if the line display length is greater than the specified amount. More... | |
status_t | ncx_turn_off_warning (status_t res) |
Add a warning suppression entry. More... | |
status_t | ncx_turn_on_warning (status_t res) |
Remove a warning suppression entry if it exists. More... | |
status_t | ncx_turn_up_warning (status_t res) |
Add a warning elevation entry. More... | |
void | ncx_set_warn_error (boolean val) |
Set the warn_error flag. More... | |
void | ncx_set_warn_off_yang (boolean val) |
Set the warn_off_yang flag. More... | |
boolean | ncx_get_warn_off_yang (void) |
Get the warn_off_yang flag. More... | |
boolean | ncx_warning_enabled (status_t res) |
Check if a specific status_t code is enabled. More... | |
boolean | ncx_warning_elevated (status_t res) |
Check if a specific status_t code is elevated. More... | |
void | ncx_delete_all_obsolete_objects (void) |
Go through all the modules and delete the obsolete nodes. More... | |
void | ncx_set_top_mandatory_allowed (boolean allowed) |
Allow or disallow modules with top-level mandatory object to be loaded; used by the server when agt_running_error is TRUE. More... | |
boolean | ncx_get_top_mandatory_allowed (void) |
Check if top-level mandatory objects are allowed or not. More... | |
boolean | ncx_collapse_submodules_ok (void) |
Check if it is OK to collapse submodule definitions into the main module. More... | |
void | ncx_set_module_setid (uint32 new_setid) |
Update YANG-LIBRARY module set ID. More... | |
uint32 | ncx_get_module_setid (void) |
GET YANG-LIBRARY module set ID. More... | |
status_t | ncx_sprintf_module_setid (uint32 id, xmlChar *buff, int32 buffsize) |
Write the module set ID for the yang-library to the specified buffer. More... | |
boolean | ncx_get_empty_npcon_presence (void) |
Get the empty_npcon_presence value. More... | |
void | ncx_set_empty_npcon_presence (boolean val) |
Set the empty_npcon_presence value. More... | |
boolean | ncx_get_empty_npcon_presence_ro (void) |
Get the empty_npcon_presence value READ-ONLY check. More... | |
void | ncx_set_empty_npcon_presence_ro (boolean val) |
Set the empty_npcon_presence value READ-ONLY check. More... | |
ncx_backptr_t * | ncx_new_backptr (void *node) |
Malloc and initialize a new ncx_backptr_t struct. More... | |
void | ncx_free_backptr (ncx_backptr_t *ptr) |
Free an ncx_backptr_t struct. More... | |
void | ncx_free_mbackptr (ncx_backptr_t *ptr) |
Free an ncx_backptr_t struct; Free the 'node' pointer first. More... | |
void | ncx_clean_backptrQ (dlq_hdr_t *backptrQ) |
Clean an entire Q of ncx_backptr_t structs. More... | |
void | ncx_clean_mbackptrQ (dlq_hdr_t *backptrQ) |
Clean an entire Q of ncx_backptr_t structs Use ncx_free_mbackptr to free node pointers. More... | |
ncx_backptr_t * | ncx_first_backptr (dlq_hdr_t *que) |
Get first back pointer struct. More... | |
const ncx_backptr_t * | ncx_first_const_backptr (const dlq_hdr_t *que) |
Get first back pointer struct CONST. More... | |
ncx_backptr_t * | ncx_last_backptr (dlq_hdr_t *que) |
Get last back pointer struct. More... | |
ncx_backptr_t * | ncx_next_backptr (ncx_backptr_t *curptr) |
Get next back pointer struct. More... | |
const ncx_backptr_t * | ncx_next_const_backptr (const ncx_backptr_t *curptr) |
Get next back pointer struct CONST. More... | |
ncx_backptr_t * | ncx_prev_backptr (ncx_backptr_t *curptr) |
Get previous back pointer struct. More... | |
void * | ncx_get_backptr_node (ncx_backptr_t *backptr) |
Get the back pointer node pointer. More... | |
const void * | ncx_get_const_backptr_node (const ncx_backptr_t *backptr) |
Get the back pointer node pointer CONST. More... | |
void | ncx_remove_backptr (ncx_backptr_t *ptr) |
Remove the specified backptr for deletion. More... | |
ncx_backptr_t * | ncx_find_backptr (const dlq_hdr_t *que, void *node) |
Find the specified back pointer struct. More... | |
ncx_save_deviations_t * | ncx_find_save_deviations (const xmlChar *deviname, dlq_hdr_t *deviationQ) |
Find the specified deviname in the deviationQ . More... | |
void | ncx_save_deviation_module (ncx_module_t *mod) |
Save the deviations for the YANG module. More... | |
boolean | ncx_ok_skip_deviation_module (const xmlChar *modname, dlq_hdr_t *save_deviationsQ) |
Check if it is OK to skip this YANG module for deviations. More... | |
void | ncx_socket_close (int fd) |
Close a socket; check result. More... | |
void | ncx_socket_close_noerr (int fd) |
Close a socket; check result; SUPPRESS ERROR MESSAGE. More... | |
void | ncx_file_close (FILE *fp) |
Close a file; check result. More... | |
status_t | ncx_file_remove (const xmlChar *filespec, boolean do_warn) |
Close a file; check result. More... | |
status_t | ncx_file_rename (const xmlChar *old_filespec, const xmlChar *new_filespec, boolean do_warn) |
Rename a file; check result. More... | |
status_t | ncx_file_copy (const xmlChar *src_filespec, const xmlChar *dst_filespec) |
Copy a file; check result. More... | |
status_t | ncx_file_buffcopy (const xmlChar *src_buff, uint32 src_bufflen, const xmlChar *dst_filespec) |
Copy a buffer to a file; check result. More... | |
status_t | ncx_file_size (const char *filespec, uint32 *siz) |
Get a file size. More... | |
status_t | ncx_file_to_buffer (const char *filespec, xmlChar **outbuff) |
Read a text file into a malloced buffer. More... | |
status_t | ncx_buffer_to_file (const char *filespec, const xmlChar *inbuff) |
Write a buffer to a text file. More... | |
status_t | ncx_get_temp_filespec (xmlChar *buff, uint32 bufflen, const xmlChar *rootpart, const xmlChar *ext) |
Generate a temporary filespec. More... | |
ncx_modcache_t * | ncx_new_modcache (const xmlChar *modname, boolean hidemod) |
New ncx_modcache_t record. More... | |
void | ncx_free_modcache (ncx_modcache_t *mc) |
Free a ncx_modcache_t record. More... | |
void | ncx_set_use_return_status (void) |
Enable the return_status parameter. More... | |
boolean | ncx_use_return_status (void) |
Check if the return_status should be returned. More... | |
ncx_bad_reply_enum | ncx_get_handle_badreply_enum (const xmlChar *valstr) |
Check if the specified string matches an ncx_bad_reply_enum enum. More... | |
const xmlChar * | ncx_get_handle_badreply_string (ncx_bad_reply_enum badreply) |
Get the string for the specified enum value. More... | |
void | ncx_set_handle_badreply (ncx_bad_reply_enum enumval) |
Set the enum value for the Bad Reply handling option. More... | |
ncx_bad_reply_enum | ncx_get_handle_badreply (void) |
Get the enum for the Bad Reply Handling option. More... | |
boolean | ncx_conf_env_vars_enabled (void) |
Get the Config Environment Variable Replacement flag. More... | |
ncx_etag_t | ncx_txid2etag (ncx_transaction_id_t txid) |
Cast ncx_txid_t to ncx_etag_t. More... | |
const xmlChar * | ncx_get_xpath_type_str (ncx_xpath_type_t xpath_typ) |
Get the string for the ncx_xpath_type_t enum. More... | |
uint16 | ncx_get_curQ_mod_count (void) |
Get the total count of the currently fully loaded modules in the ncx_curQ. More... | |
dlq_hdr_t * | ncx_get_rootQ (void) |
Get the Root control block queue. More... | |
ncx_sm_rootcb_t * | ncx_first_rootcb (void) |
Get the first Mount Point Control Block Entry in the rootcbQ. More... | |
ncx_sm_rootcb_t * | ncx_next_rootcb (ncx_sm_rootcb_t *rootcb) |
Get the next Mount Point Entry in the rootcbQ. More... | |
boolean | ncx_is_sm_mode (void) |
Check if the Schema Mount mode is enabled. More... | |
void | ncx_set_sm_mode (boolean val) |
Set the Schema Mount mode. More... | |
ncx_sm_rootcb_t * | ncx_get_cur_rootcb (void) |
Gte the current root control block value. More... | |
void | ncx_set_cur_rootcb (ncx_sm_rootcb_t *rootcb) |
Set the current root control block. More... | |
obj_template_t * | ncx_get_cur_rootcb_obj (void) |
Get the current root control block object. More... | |
boolean | ncx_get_sm_enabled (void) |
Get schema mount enabled flag. More... | |
void | ncx_set_sm_enabled (boolean val) |
Set schema mount enabled flag. More... | |
boolean | ncx_yang_cbor_enabled (void) |
Get the YANG to CBOR Code enabled flag. More... | |
unsigned short | ncx_get_tcp_connect_timeout (void) |
Get the configured TCP connect timeout value. More... | |
void | ncx_set_tcp_connect_timeout (unsigned short timeout_sec) |
Set the configured TCP connect timeout value. More... | |
ncx_module_t * | ncx_find_module_que_all (dlq_hdr_t *modQ, const xmlChar *modname, const xmlChar *revision) |
Find a ncx_module_t in the specified Q and check the namespace ID check submodules, not just modules. More... | |
void | ncx_invoke_load_callbacks (ncx_module_t *mod) |
ncx_invoke_load_callbacks More... | |
void | ncx_redo_loadmod_all (void) |
Set the redo_loadmod flag for all modules. More... | |
void | ncx_set_disable_imported (void) |
Allow the obj_is_enabled funtion to disable all import-only modules. More... | |
boolean | ncx_disable_imported_ok (void) |
Check if disable all import-only modules OK. More... | |
void | ncx_set_mod_augmented (ncx_module_t *mod) |
Set the module as supported because it is being augmented. More... | |
YANG module utility functions.
Original NCX language grew from this file into libncx and later YANG was added. Many queue of module access functions are managed with APIs in this file