yumapro  21.10T-9
YumaPro SDK
ncxtypes.h File Reference

YANG module data structures Many internal representations of YANG module constructs. More...

#include <xmlstring.h>
#include <xmlregexp.h>
#include "dlq.h"
#include "xmlns.h"
Include dependency graph for ncxtypes.h:

Go to the source code of this file.

Data Structures

struct  ncx_dec64_t
 Decimal64 data type. More...
 
union  ncx_num_t
 union of all the basic number types if float not supported, then it is stored as an int64 More...
 
struct  ncx_enum_t
 one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms) More...
 
struct  ncx_bit_t
 one NCX_BT_BITS bit value More...
 
struct  ncx_lmem_t
 NCX list member: list of string or number Usually used within a val_value_t structure. More...
 
union  ncx_lmem_t::val_
 union of various data structures to represent different base types More...
 
struct  ncx_list_t
 header for a NCX List More...
 
struct  ncx_binary_t
 NCX base64 string node for YANG 'binary' built-in type. More...
 
struct  ncx_error_t
 struct to remember error info tkc->cur_err will be checked before tkc->cur for error information More...
 
struct  ncx_appinfo_t
 YANG extension usage entry A nested external statement will produce a tree of ncx_appinfo_t. More...
 
struct  ncx_revhist_t
 YANG revision entry. More...
 
struct  ncx_iff_ref_t
 YANG 1.1 identifier-ref-arg that within an if-feature expression. More...
 
struct  ncx_iffeature_t
 YANG if-feature entry. More...
 
struct  ncx_feature_t
 YANG feature entry. More...
 
struct  ncx_filptr_t
 struct for holding r/o pointer to generic internal node for filtering purposes More...
 
struct  ncx_idlink_t
 back pointer to a YANG identity used to create an inline tree of valid values for an identity used as a base More...
 
struct  ncx_identity_base_t
 YANG identity base. More...
 
struct  ncx_identity_t
 YANG identity entry. More...
 
struct  ncx_module_t
 representation of one module or submodule during and after parsing More...
 
struct  ncx_import_t
 One 'import' clause in YANG. More...
 
struct  ncx_include_t
 One 'include' clause, YANG only. More...
 
struct  ncx_errinfo_t
 YANG error info statement struct used to override default error handling in the server. More...
 
struct  ncx_typname_t
 keep track of the typenames used for local typedefs only used by ncxdump to generate XSDs OBSOLETE: DO NOT USE More...
 
struct  ncx_save_deviations_t
 used with obj_deviation_t to defer object lookups More...
 
struct  ncx_backptr_t
 used with various structs to cache back-ptrs the 'node' pointer may or may not be malloced! the ncx_free_backptr() function will not free the 'node' the ncx_free_mbackptr() function will free the 'node' More...
 
struct  ncx_modcache_t
 server module info cache record for def_reg_add_mod More...
 
struct  ncx_errmsg_t
 error message replacement record More...
 
struct  ncx_origin_filter_t
 internal NMDA origin filter (negate field stored separately) More...
 
struct  ncx_nmda_params_t
 internal NMDA get-data state parameters; rest of parameter are stored directly in the xml_msg_hdr_t using existing params More...
 
struct  ncx_prefix_info_t
 gather the prefix/nsid bindings used in an XPath string needed to generate the correct xmlns directives in XML JSON just loses all the namespace bindings in an XPath string More...
 

Macros

#define SET_MOD_ABORTED(M)   (M)->flags |= NCX_FL_MOD_ABORTED
 Set module aborted flag.
 
#define GET_MOD_ABORTED(M)   ((M)->flags & NCX_FL_MOD_ABORTED)
 Check module aborted flag.
 
#define SET_MOD_SIL_LOADED(M)   (M)->flags |= NCX_FL_MOD_SIL_LOADED
 set flag used by agt_sil_lib to make sure modules loaded by import do not get skipped when they are explicitly loaded later
 
#define GET_MOD_SIL_LOADED(M)   ((M)->flags & NCX_FL_MOD_SIL_LOADED)
 check flag used by agt_sil_lib to make sure modules loaded by import
 
#define SET_MOD_NO_SIL_CODE(M)   (M)->flags |= NCX_FL_MOD_NO_SIL_CODE
 set flag used by SIL-SA to know fi register-request really needed Only register if this bit is not set
 
#define GET_MOD_NO_SIL_CODE(M)   ((M)->flags & NCX_FL_MOD_NO_SIL_CODE)
 check flag used by SIL-SA to know fi register-request really needed
 
#define SET_MOD_SILSA_DONE(M)   (M)->flags |= NCX_FL_MOD_SILSA_DONE
 set flag used by agt_cb.c to make sure a <load-event> on SIL-SA does not cause a module to be registered multiple times A modhdr is not maintained if only rpc callbacks are used
 
#define GET_MOD_SILSA_DONE(M)   ((M)->flags & NCX_FL_MOD_SILSA_DONE)
 check flag used by agt_cb.c to make sure a <load-event> on SIL-SA
 
#define NCX_DEF_ACCESS   NCX_ACCESS_RC
 default max-access is all
 
#define NCX_CFGID_CNT   (NCX_CFGID_MAX+1)
 Should match CFG_NUM_STATIC.
 
#define TXID_T   long long unsigned int
 For convenience.
 

Typedefs

typedef uint64 ncx_transaction_id_t
 transaction is scoped to single session write operation on a config
 
typedef xmlChar * ncx_str_t
 string alias for data types: More...
 
typedef void(* ncx_load_cbfn_t) (ncx_module_t *mod)
 user function callback template when a module is loaded into the system More...
 
typedef void(* ncx_unload_cbfn_t) (ncx_module_t *mod)
 user function callback template when a module is unloaded from the system More...
 
typedef void(* ncx_yang_obj_cbfn_t) (ncx_module_t *mod, struct obj_template_t_ *obj)
 user function callback template when a YANG object is parsed by yang_obj.c. More...
 
typedef boolean(* ncx_feature_cbfn_t) (const ncx_module_t *mod, ncx_feature_t *feature, void *cookie)
 user function callback template to traverse all module features for a specified module More...
 
typedef boolean(* ncx_identity_cbfn_t) (ncx_identity_t *identity, void *cookie)
 user function callback template to traverse all module identities looking for matches for a specified base More...
 
typedef uint8 ncx_owner_id_t
 used as index into the agt_owner registry
 
typedef const xmlChar *(* ncx_get_owner_fn_t) (ncx_owner_id_t owner_id)
 get owner name callback function to check if a value node has an owner name; get the value if so More...
 
typedef status_t(* ncx_def_hook_cbfn_t) (struct val_value_t_ *parentval, struct obj_template_t_ *obj, xmlChar **buff)
 Typedef of the ncx_def_hook_cbfn_t callback. More...
 

Enumerations

enum  ncx_access_t {
  NCX_ACCESS_NONE,
  NCX_ACCESS_RO,
  NCX_ACCESS_RW,
  NCX_ACCESS_RC
}
 NCX Access Control 'max-access' enumeration values Note that access control is applied to the session and the max-access applies to the user max-access, not the agent max-access. More...
 
enum  ncx_data_class_t {
  NCX_DC_NONE,
  NCX_DC_CONFIG,
  NCX_DC_STATE
}
 NCX Persistence Control. More...
 
enum  ncx_btype_t {
  NCX_BT_NONE,
  NCX_BT_ANY,
  NCX_BT_BITS,
  NCX_BT_ENUM,
  NCX_BT_EMPTY,
  NCX_BT_BOOLEAN,
  NCX_BT_INT8,
  NCX_BT_INT16,
  NCX_BT_INT32,
  NCX_BT_INT64,
  NCX_BT_UINT8,
  NCX_BT_UINT16,
  NCX_BT_UINT32,
  NCX_BT_UINT64,
  NCX_BT_DECIMAL64,
  NCX_BT_FLOAT64,
  NCX_BT_STRING,
  NCX_BT_BINARY,
  NCX_BT_INSTANCE_ID,
  NCX_BT_UNION,
  NCX_BT_LEAFREF,
  NCX_BT_IDREF,
  NCX_BT_SLIST,
  NCX_BT_CONTAINER,
  NCX_BT_CHOICE,
  NCX_BT_CASE,
  NCX_BT_LIST,
  NCX_BT_ANYDATA,
  NCX_BT_EXTERN,
  NCX_BT_INTERN
}
 enumeration of the built-in NCX types These types cannot be overridden and cannot be imported More...
 
enum  ncx_tclass_t {
  NCX_CL_NONE,
  NCX_CL_BASE,
  NCX_CL_SIMPLE,
  NCX_CL_COMPLEX,
  NCX_CL_NAMED,
  NCX_CL_REF
}
 Enumeration of the basic value type classifications. More...
 
enum  ncx_indextyp_t {
  NCX_IT_NONE,
  NCX_IT_INLINE,
  NCX_IT_NAMED,
  NCX_IT_LOCAL,
  NCX_IT_SLOCAL,
  NCX_IT_REMOTE,
  NCX_IT_SREMOTE
}
 Enumeration of the different types of index components YANG ONLY SUPPORTS NCX_IT_LOCAL. More...
 
enum  ncx_node_t {
  NCX_NT_NONE,
  NCX_NT_TYP,
  NCX_NT_GRP,
  NCX_NT_VAL,
  NCX_NT_OBJ,
  NCX_NT_ERRINFO,
  NCX_NT_STRING,
  NCX_NT_CFG,
  NCX_NT_INDEX,
  NCX_NT_QNAME,
  NCX_NT_UINT32_PTR,
  NCX_NT_IMPORT_CB,
  NCX_NT_INCLUDE_CB,
  NCX_NT_REVISION_CB,
  NCX_NT_EXTENSION_CB,
  NCX_NT_FEATURE_CB,
  NCX_NT_IDENTITY_CB,
  NCX_NT_TYPDEF_CB
}
 NCX Internal Node Types. More...
 
enum  ncx_iqual_t {
  NCX_IQUAL_NONE,
  NCX_IQUAL_ONE,
  NCX_IQUAL_OPT,
  NCX_IQUAL_1MORE,
  NCX_IQUAL_ZMORE
}
 The instance qualifier types are borrowed from ABNF and RelaxNG. More...
 
enum  ncx_merge_t {
  NCX_MERGE_NONE,
  NCX_MERGE_FIRST,
  NCX_MERGE_LAST,
  NCX_MERGE_SORT
}
 The merge type for the NETCONF merge operation. More...
 
enum  ncx_squal_t {
  NCX_SQUAL_NONE,
  NCX_SQUAL_RANGE,
  NCX_SQUAL_VAL,
  NCX_SQUAL_META,
  NCX_SQUAL_APPINFO
}
 typdef search qualifier list (internal compiler modes) More...
 
enum  ncx_strrest_t {
  NCX_SR_NONE,
  NCX_SR_PATTERN,
  NCX_SR_ENUM,
  NCX_SR_BIT
}
 Enumeration of string restriction types. More...
 
enum  ncx_numfmt_t {
  NCX_NF_NONE,
  NCX_NF_OCTAL,
  NCX_NF_DEC,
  NCX_NF_HEX,
  NCX_NF_REAL
}
 Enumeration of number format types. More...
 
enum  ncx_layer_t {
  NCX_LAYER_NONE,
  NCX_LAYER_TRANSPORT,
  NCX_LAYER_RPC,
  NCX_LAYER_OPERATION,
  NCX_LAYER_CONTENT
}
 Enumeration of NETCONF protocol layers. More...
 
enum  ncx_agttarg_t {
  NCX_AGT_TARG_NONE,
  NCX_AGT_TARG_CANDIDATE,
  NCX_AGT_TARG_RUNNING,
  NCX_AGT_TARG_LOCAL,
  NCX_AGT_TARG_REMOTE,
  NCX_AGT_TARG_CAND_RUNNING
}
 enum to identify the agent native target More...
 
enum  ncx_agtstart_t {
  NCX_AGT_START_NONE,
  NCX_AGT_START_MIRROR,
  NCX_AGT_START_DISTINCT
}
 enum to identify the agent native startup mode More...
 
enum  ncx_shutdowntyp_t {
  NCX_SHUT_NONE,
  NCX_SHUT_RESET,
  NCX_SHUT_RELOAD,
  NCX_SHUT_RESTART ,
  NCX_SHUT_FALLBACK
}
 enumeration of the different program shutdown modes More...
 
enum  ncx_cfg_t {
  NCX_CFGID_RUNNING,
  NCX_CFGID_CANDIDATE,
  NCX_CFGID_STARTUP
}
 hardwire the 3 standard configs More...
 
enum  ncx_instfmt_t {
  NCX_IFMT_NONE,
  NCX_IFMT_C,
  NCX_IFMT_XPATH1,
  NCX_IFMT_XPATH2,
  NCX_IFMT_CLI,
  NCX_IFMT_CLI2,
  NCX_IFMT_YANGAPI,
  NCX_IFMT_RESTCONF
}
 instance identifier string format types More...
 
enum  ncx_msgtyp_t {
  NCX_MSGTYP_NONE,
  NCX_MSGTYP_HELLO,
  NCX_MSGTYP_RPCREQ,
  NCX_MSGTYP_RPCRPY,
  NCX_MSGTYP_NOTIF
}
 enumeration for different NETCONF message types More...
 
enum  ncx_status_t {
  NCX_STATUS_NONE,
  NCX_STATUS_CURRENT,
  NCX_STATUS_DEPRECATED,
  NCX_STATUS_OBSOLETE
}
 enumeration for different YANG data-def status values More...
 
enum  ncx_bad_data_t {
  NCX_BAD_DATA_NONE,
  NCX_BAD_DATA_IGNORE,
  NCX_BAD_DATA_WARN,
  NCX_BAD_DATA_CHECK,
  NCX_BAD_DATA_ERROR
}
 enumeration for CLI handling of bad input data used by yangcli, all others use NCX_BAD_DATA_ERROR More...
 
enum  ncx_display_mode_t {
  NCX_DISPLAY_MODE_NONE,
  NCX_DISPLAY_MODE_PLAIN,
  NCX_DISPLAY_MODE_PREFIX,
  NCX_DISPLAY_MODE_MODULE,
  NCX_DISPLAY_MODE_XML,
  NCX_DISPLAY_MODE_XML_NONS,
  NCX_DISPLAY_MODE_JSON,
  NCX_DISPLAY_MODE_CLI
}
 enumeration of val_dump_value display modes More...
 
enum  ncx_msg_encoding_t {
  NCX_MSG_ENCODING_NONE,
  NCX_MSG_ENCODING_XML,
  NCX_MSG_ENCODING_JSON,
  NCX_MSG_ENCODING_CBOR
}
 enumeration for message encoding formats More...
 
enum  ncx_xpath_axis_t {
  XP_AX_NONE,
  XP_AX_ANCESTOR,
  XP_AX_ANCESTOR_OR_SELF,
  XP_AX_ATTRIBUTE,
  XP_AX_CHILD,
  XP_AX_DESCENDANT,
  XP_AX_DESCENDANT_OR_SELF,
  XP_AX_FOLLOWING,
  XP_AX_FOLLOWING_SIBLING,
  XP_AX_NAMESPACE,
  XP_AX_PARENT,
  XP_AX_PRECEDING,
  XP_AX_PRECEDING_SIBLING,
  XP_AX_SELF
}
 XPath expression axis types. More...
 
enum  ncx_name_match_t {
  NCX_MATCH_NONE,
  NCX_MATCH_EXACT,
  NCX_MATCH_EXACT_NOCASE,
  NCX_MATCH_ONE,
  NCX_MATCH_ONE_NOCASE,
  NCX_MATCH_FIRST,
  NCX_MATCH_FIRST_NOCASE
}
 Node name match modes. More...
 
enum  ncx_result_format_t {
  NCX_RF_NONE,
  NCX_RF_TEXT,
  NCX_RF_XML,
  NCX_RF_JSON
}
 specify the requested result format type More...
 
enum  ncx_feature_code_t {
  NCX_FEATURE_CODE_NONE,
  NCX_FEATURE_CODE_STATIC,
  NCX_FEATURE_CODE_DYNAMIC
}
 Feature code generation type (deprecated) More...
 
enum  ncx_protocol_t {
  NCX_PROTO_NONE,
  NCX_PROTO_NETCONF10,
  NCX_PROTO_NETCONF11,
  NCX_PROTO_YUMA_YANGAPI,
  NCX_PROTO_YUMA_CLI,
  NCX_PROTO_YCONTROL,
  NCX_PROTO_RESTCONF
}
 NCX session protocol versions supported. More...
 
enum  ncx_yang_version_t
 enumeration for different YANG language versions
 
enum  ncx_cvttyp_t {
  NCX_CVTTYP_NONE,
  NCX_CVTTYP_XSD,
  NCX_CVTTYP_SQL,
  NCX_CVTTYP_SQLDB,
  NCX_CVTTYP_HTML,
  NCX_CVTTYP_YANG,
  NCX_CVTTYP_COPY,
  NCX_CVTTYP_H,
  NCX_CVTTYP_C,
  NCX_CVTTYP_CPP_TEST,
  NCX_CVTTYP_YIN,
  NCX_CVTTYP_TG2,
  NCX_CVTTYP_YH,
  NCX_CVTTYP_YC,
  NCX_CVTTYP_UH,
  NCX_CVTTYP_UC,
  NCX_CVTTYP_BC,
  NCX_CVTTYP_BH
}
 enumeration for different NCX module conversion output types More...
 
enum  ncx_withdefaults_t {
  NCX_WITHDEF_NONE,
  NCX_WITHDEF_REPORT_ALL,
  NCX_WITHDEF_REPORT_ALL_TAGGED,
  NCX_WITHDEF_TRIM,
  NCX_WITHDEF_EXPLICIT
}
 enum for with-defaults enum values More...
 
enum  ncx_xpath_type_t {
  NCX_XPATH_TYPE_NONE,
  NCX_XPATH_TYPE_MUST,
  NCX_XPATH_TYPE_WHEN,
  NCX_XPATH_TYPE_NACM,
  NCX_XPATH_TYPE_LEAFREF,
  NCX_XPATH_TYPE_OTHER
}
 enumeration for different XPath back pointer types More...
 
enum  ncx_opt_t {
  NCX_REQ,
  NCX_OPT
}
 enum for REQUIRED vs. More...
 
enum  ncx_strtyp_t {
  NCX_WSP,
  NCX_NO_WSP
}
 enum for WHITESPACE ALLOWED vs. More...
 
enum  ncx_modformat_t {
  NCX_MODFORMAT_NONE,
  NCX_MODFORMAT_XSD,
  NCX_MODFORMAT_YANG,
  NCX_MODFORMAT_YIN,
  NCX_MODFORMAT_RNG,
  NCX_MODFORMAT_RNC
}
 enum for get-schema format type enum values matches the schema-format identities in RFC 6022 More...
 
enum  ncx_confirm_event_t {
  NCX_CC_EVENT_NONE,
  NCX_CC_EVENT_START,
  NCX_CC_EVENT_CANCEL,
  NCX_CC_EVENT_TIMEOUT,
  NCX_CC_EVENT_EXTEND,
  NCX_CC_EVENT_COMPLETE
}
 type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well More...
 
enum  ncx_leafref_class_t { ,
  NCX_LEAFREF_CLASS_KEY,
  NCX_LEAFREF_CLASS_GLOBAL,
  NCX_LEAFREF_CLASS_LOCAL,
  NCX_LEAFREF_CLASS_INSTANCE
}
 Classification for the types of leafref path statements wrt/ how they can be cached. More...
 
enum  ncx_snmp_agt_role_t {
  NCX_SNMP_AGT_ROLE_NONE,
  NCX_SNMP_AGT_ROLE_MASTER,
  NCX_SNMP_AGT_ROLE_SUBAGENT
}
 enum to identify the SNMP agent native mode More...
 
enum  ncx_nmda_ds_t {
  NCX_NMDA_DS_NONE,
  NCX_NMDA_DS_CANDIDATE,
  NCX_NMDA_DS_RUNNING,
  NCX_NMDA_DS_STARTUP,
  NCX_NMDA_DS_INTENDED,
  NCX_NMDA_DS_OPERATIONAL
}
 internal enumerations for standard NMDA datastores More...
 
enum  ncx_nmda_origin_t {
  NCX_NMDA_ORIGIN_NONE,
  NCX_NMDA_ORIGIN_INTENDED,
  NCX_NMDA_ORIGIN_DYNAMIC,
  NCX_NMDA_ORIGIN_SYSTEM,
  NCX_NMDA_ORIGIN_LEARNED,
  NCX_NMDA_ORIGIN_DEFAULT,
  NCX_NMDA_ORIGIN_UNKNOWN
}
 internal enumerations for standard NMDA origins More...
 
enum  ncx_nmda_filtyp_t
 internal enumerations for NMDA filter types used in the /filters container NCX_NMDA_FILTYP_STREAM == list /filters/stream-filter NCX_NMDA_FILTYP_SELECTION == list /filters/selection-filter
 
enum  ncx_ses_event_t {
  NCX_SES_EVENT_NONE,
  NCX_SES_EVENT_START,
  NCX_SES_EVENT_END
}
 internal enumerations for session event types More...
 
enum  ncx_config_state_t {
  NCX_CFG_STATE_NONE,
  NCX_CFG_STATE_INIT,
  NCX_CFG_STATE_OK,
  NCX_CFG_STATE_BAD
}
 server config state Root Check More...
 
enum  ncx_bad_reply_enum {
  NCX_BAD_REPLY_NONE,
  NCX_BAD_REPLY_ADAPT,
  NCX_BAD_REPLY_PRUNE,
  NCX_BAD_REPLY_ERROR
}
 enumeration for CLI handling of bad nodes from RPC reply Controls the behavior of the MGR XML parser More...
 

Detailed Description

YANG module data structures Many internal representations of YANG module constructs.