yumapro
24.10-1
YumaPro SDK
|
C Data Structures used to represent YANG module constructs. More...
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... | |
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... | |
struct | ncx_sm_mpid_t |
Moint Point Instance This struct lives in a val_value_t.val_extra struct. More... | |
struct | ncx_yanglib_cb_t |
one context for a yang library. More... | |
struct | ncx_sm_rootcb_t |
Schema Mount Root Control Block used in the object template. 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_YANG_SID(X) (X)->yang_sid |
YANG SID access macro for ncx types All entries have the same form so the macro should work for each SID namespace. | |
#define | NCX_YANG_SID_TREE(X) (X)->yang_sid_tree |
YANG SID Tree access macros for ncx types All entries have the same form so the macro should work for each SID namespace. | |
#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 uint32 | ncx_sid_t |
Standard YANG SID is a 63-bit integer defined as uint64. More... | |
typedef uint32 | ncx_etag_t |
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t. | |
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_object_cbfn_t) (const ncx_module_t *mod, struct obj_template_t_ *object, void *cookie) |
user function callback template to traverse all module objects for a specified module 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... | |
C Data Structures used to represent YANG module constructs.
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.
The Dynamic Default Hook function is the user/system callback that is invoked before the server checks if the node has any defaults and if there is not any YANG defined defaults the server can update the node with custom "system" default value.
Run an instrumentation-defined function for val set default event
parentval | parent val_value node to use | |
obj | object template to use | |
[out] | *buff | malloced buffer that represents a new default value |
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
ncx_feature_cbfn_t
Run an instrumentation-defined function for each feature found in the module (enabled or not)
mod | module originally passed to the main function, which contains the 'feature' |
feature | feature being processed in the traversal |
cookie | cookie originally passed to the main function |
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
owner_id | owner ID to check |
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
ncx_identity_cbfn_t
Run an instrumentation-defined function for each feature found in the module (enabled or not)
identity | identity being processed in the traversal |
cookie | cookie originally passed to the main function |
typedef void(* ncx_load_cbfn_t) (ncx_module_t *mod) |
user function callback template when a module is loaded into the system
ncx_load_cbfn_t
Run an instrumentation-defined function for a 'module-loaded' event
mod | module that was added to the registry |
typedef boolean(* ncx_object_cbfn_t) (const ncx_module_t *mod, struct obj_template_t_ *object, void *cookie) |
user function callback template to traverse all module objects for a specified module
ncx_object_cbfn_t
Run an instrumentation-defined function for each object found in the module (enabled or not)
mod | module originally passed to the main function, which contains the 'feature' |
object | object being processed in the traversal |
cookie | cookie originally passed to the main function |
typedef uint32 ncx_sid_t |
Standard YANG SID is a 63-bit integer defined as uint64.
The LSID implementation allows 3 different SID sizes.
The default set in procdefs/platform.profile is YANG_SID32
typedef xmlChar* ncx_str_t |
string alias for data types:
NCX_BT_STRING NCX_BT_OSTRING NCX_BT_ENAME
typedef void(* ncx_unload_cbfn_t) (ncx_module_t *mod) |
user function callback template when a module is unloaded from the system
ncx_unload_cbfn_t
Run an instrumentation-defined function for a 'module-loaded' event
mod | module that is being removed |
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.
This API is invoked at the end of the resolve phase if the status is NO_ERR It is skipped if the object has errors detected at the time
ncx_yang_obj_cbfn_t
Run an instrumentation-defined function for a 'object parsed' event
mod | module that is being parsed now |
obj | object being parsed |
enum ncx_access_t |
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.
Only the agent may create or write an object which is classified as 'read-only'.
* Access is grouped into the following catagories. * * - none * - read-only * - read-write * - read-create * * Merge and Replace are handled as follows: * * * Requested operation Effective Access * * merge empty with no-cur-node --> no-op * merge empty with cur-node --> no-op * merge non-empty with no-cur-node --> create * merge non-empty with cur-node --> write * * replace empty into no-cur-node --> no-op * replace empty into cur-node --> delete * replace non-empty into no-cur-node --> create * replace non-empty into cur-node --> write * * Create and Delete are grouped together for access control * purposes, and called 'read-create' * * Obviously, the max-access of the ancestor nodes affect any * given nested node, but the enumerations are not purely hierarchical. * * * Access Nested Behavior * * [none] Check the ancestor chain until an explicit value * is found (or the parmset root is reached, where the * default is read-create) * * read-only User may only read this node and all child nodes. * All nested access is also read-only, overriding any * explicit setting of any child nodes * * read-write User may read and write this node and all child nodes, * depending on the max-access of the child node. * Any type of nested access may appear in any child * nodes. A read-write container may have child nodes * which are read-create objects. This implies the agent * must create the object in order for the user to write it. * * read-create User may have unrestricted access to this node and all * child nodes, depending on the max-access of the child * nodes. Any type of nested access may appear in any * child nodes. *
Enumerator | |
---|---|
NCX_ACCESS_NONE | enum not explicitly set |
NCX_ACCESS_RO | read-only |
NCX_ACCESS_RW | read-write (create/delete not allowed) |
NCX_ACCESS_RC | read-create (all access) |
enum ncx_agtstart_t |
enum ncx_agttarg_t |
enum ncx_bad_data_t |
enumeration for CLI handling of bad input data used by yangcli, all others use NCX_BAD_DATA_ERROR
enum ncx_bad_reply_enum |
enum ncx_btype_t |
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Enumerator | |
---|---|
NCX_BT_NONE | No type has been set yet.
|
NCX_BT_ANY | The node is a YANG 1.0 'anyxml' node.
|
NCX_BT_BITS | YANG bits data type.
|
NCX_BT_ENUM | YANG enumeration data type.
|
NCX_BT_EMPTY | YANG empty data type.
|
NCX_BT_BOOLEAN | YANG boolean data type.
|
NCX_BT_INT8 | YANG int8 data type.
|
NCX_BT_INT16 | YANG int16 data type.
|
NCX_BT_INT32 | YANG int32 data type.
|
NCX_BT_INT64 | YANG int64 data type.
|
NCX_BT_UINT8 | YANG uint8 data type.
|
NCX_BT_UINT16 | YANG uint16 data type.
|
NCX_BT_UINT32 | YANG uint32 data type.
|
NCX_BT_UINT64 | YANG uint64 data type.
|
NCX_BT_DECIMAL64 | YANG decimal64 data type.
|
NCX_BT_FLOAT64 | Hidden double type, used just for XPath.
|
NCX_BT_STRING | YANG 'string' type.
|
NCX_BT_BINARY | YANG binary data type.
|
NCX_BT_INSTANCE_ID | YANG instance-identifier data type.
|
NCX_BT_UNION | YANG 'union' data type.
|
NCX_BT_LEAFREF | YANG 'leafref' data type.
|
NCX_BT_IDREF | YANG identityref data type.
|
NCX_BT_SLIST | ncx:xsdlist extension (internal, deprecated)
|
NCX_BT_CONTAINER | YANG container node.
|
NCX_BT_CHOICE | YANG choice.
|
NCX_BT_CASE | YANG case.
|
NCX_BT_LIST | YANG list instance node.
|
NCX_BT_ANYDATA | The node is a YANG 1.1 'anydata' node.
|
NCX_BT_EXTERN | Internal 'external' data type, used in server and yangcli-pro.
|
NCX_BT_INTERN | Internal 'buffer' data type, used in server and yangcli-pro.
|
enum ncx_cfg_t |
enum ncx_config_state_t |
enum ncx_confirm_event_t |
type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well
enum ncx_cvttyp_t |
enumeration for different NCX module conversion output types
enum ncx_data_class_t |
NCX Persistence Control.
Enum mapping of 'data-class' field in the 'parm' and 'type' clauses
This data type controls NV-storage and whether a node is returned in the 'get-config' operation and stored in the startup config.
Enumerator | |
---|---|
NCX_DC_NONE | not set |
NCX_DC_CONFIG | persistent config |
NCX_DC_STATE | state or statistics |
enum ncx_display_mode_t |
enumeration of val_dump_value display modes Some RESTCONF code uses this field incorrectly for message encoding instead of the intended logging display Must update the ncx_get_display_mode_enum and ncx_get_display_mode_str functions if this typedef is changed!
enum ncx_feature_code_t |
enum ncx_indextyp_t |
Enumeration of the different types of index components YANG ONLY SUPPORTS NCX_IT_LOCAL.
enum ncx_instfmt_t |
instance identifier string format types
enum ncx_iqual_t |
enum ncx_layer_t |
enum ncx_leafref_class_t |
Classification for the types of leafref path statements wrt/ how they can be cached.
enum ncx_merge_t |
enum ncx_modformat_t |
enum for get-schema format type enum values matches the schema-format identities in RFC 6022
enum ncx_msg_encoding_t |
enum ncx_msgtyp_t |
enum ncx_name_match_t |
Node name match modes.
enum ncx_nmda_ds_t |
enum ncx_nmda_origin_t |
internal enumerations for standard NMDA origins
enum ncx_node_t |
NCX Internal Node Types.
nodes in the value trees can be different types These enums are used to generate instance IDs and classify data passed to the agt_record_*error functions
Enumerator | |
---|---|
NCX_NT_NONE | not set |
NCX_NT_TYP | |
NCX_NT_GRP | |
NCX_NT_VAL | |
NCX_NT_OBJ | |
NCX_NT_ERRINFO | ncx_errinfo_t, error only |
NCX_NT_STRING | xmlChar *, error only |
NCX_NT_CFG | cfg_template_t *, error only |
NCX_NT_INDEX | obj_key_t *, error only |
NCX_NT_QNAME | xmlns_qname_t *, error only |
NCX_NT_UINT32_PTR | session ID, error only |
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 |
enum ncx_numfmt_t |
enum ncx_opt_t |
enum ncx_protocol_t |
NCX session protocol versions supported.
enum ncx_result_format_t |
enum ncx_ses_event_t |
enum ncx_shutdowntyp_t |
enumeration of the different program shutdown modes
enum ncx_sid_ns_t |
enum ncx_sm_state_t |
enum ncx_snmp_agt_role_t |
enum ncx_sort_type_t |
enum ncx_squal_t |
enum ncx_status_t |
enum ncx_strrest_t |
enum ncx_strtyp_t |
enum ncx_tclass_t |
enum ncx_withdefaults_t |
enum ncx_xpath_axis_t |
XPath expression axis types.
enum ncx_xpath_type_t |
enum ncx_yang_sid_mode_t |