154typedef struct val_getbulk_return_t_ {
369 time_t last_modified,
392 time_t last_modified,
640 boolean stop_at_root,
669 boolean stop_at_root,
698 const xmlChar *leaf_name,
699 boolean stop_at_root,
724 boolean force_quotes,
821 struct xpath_get2_cb_t_ *parent_cb,
937 const xmlChar *valstr,
959 const xmlChar *valstr);
974 const xmlChar *binstr,
1099 const xmlChar *fhs_logfile);
1620 dlq_hdr_t *keyptrQ);
1763 const xmlChar *value);
1962 boolean *isunknown);
2022 const xmlChar *modname,
2023 const xmlChar *name);
2104 const xmlChar *buff,
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
boolean(* val_walker_fn_t)(val_value_t *val, void *cookie1, void *cookie2)
child or descendant node search walker function
Definition: val.h:1171
void val_clear_partial_lock(val_value_t *val, plock_cb_t *plcb)
Clear the partial lock throughout the value tree.
Definition: val_util.c:6251
status_t val_remove_false_when_error(const xmlChar *name, val_value_t *val, obj_template_t *obj, boolean is_error, boolean real_delete, boolean *deleteme)
Remove false when-stmt nodes with error.
Definition: val_util.c:4685
status_t val_copy_xpathpcb(val_value_t *val, const xpath_pcb_t *xpathpcb)
Set the xpathpcb field with a clone of the parameter.
Definition: val_util.c:4741
val_value_t * val_make_binary_obj(obj_template_t *obj, const xmlChar *binstr, uint32 binstrlen, status_t *res)
Malloc and set a val_value_t as a NCX_BT_BINARY type.
Definition: val_util.c:4929
void val_purge_errors_from_root(val_value_t *val)
Remove any error nodes under a root container that were saved for error recording purposes.
Definition: val_util.c:3722
status_t val_cache_datarule(val_value_t *val, void *rule)
Set the data-rule back-ptr for this node.
Definition: val_util.c:6916
status_t val_set_errmsg_parm(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the errmsg parameter.
Definition: val_util.c:6054
void val_merge_return_vals(dlq_hdr_t *srcQ, dlq_hdr_t *dstQ)
Merge return values into a dest Q Remove duplicates.
Definition: val_util.c:8332
val_value_t * val_get_choice_first_set_ex(val_value_t *val, const obj_template_t *obj, boolean nondef)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3476
val_value_t * val_make_from_bitstring(obj_template_t *obj, typ_def_t *typdef, const xmlChar *buff, uint32 bufflen, status_t *res)
Make a val_value_t with the bits set in the octet string.
Definition: val_util.c:9132
status_t val_check_obj_when(val_value_t *val, val_value_t *valroot, val_value_t *objval, obj_template_t *obj, boolean *condresult, uint32 *whencount)
checks when-stmt only
Definition: val_util.c:4257
void val_set_origin(val_value_t *val, ncx_nmda_origin_t origin)
Set the NMDA value origin.
Definition: val_util.c:8525
status_t val_make_subtree(obj_template_t *obj, dlq_hdr_t *keyQ, val_value_t **topval, val_value_t **targetval)
Create a hierarchy from root to the target object.
Definition: val_util.c:8739
status_t val_remove_false_when(val_value_t *val, boolean *deleteme)
Remove false when-stmt nodes.
Definition: val_util.c:4655
status_t val_set_path_parms(val_value_t *parentval)
Set the main search paths for files.
Definition: val_util.c:5588
status_t val_add_fixed_value_attr(val_value_t *val)
Add the ywx:fixed-value attribute to a key value node Set it to true since false is the default.
Definition: val_util.c:7651
val_value_t * val_get_value(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, val_nodetest_fn_t testfn, boolean acmcheck, boolean *malloced, status_t *res)
Get the value for a node after lots of internal processing.
Definition: val_util.c:6660
void val_traverse_keys(val_value_t *val, void *cookie1, void *cookie2, val_walker_fn_t walkerfn)
Check ancestor-or-self nodes until root reached.
Definition: val_util.c:6801
val_value_t * val_make_from_enumval(obj_template_t *obj, int32 enumval, status_t *res)
Create an enumeration leaf from its enum value.
Definition: val_util.c:8923
status_t val_instance_check_ex(val_value_t *root, val_value_t *val, obj_template_t *obj, boolean check_when)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3219
void val_write_intern(ses_cb_t *scb, const val_value_t *val)
Write an internal buffer to the session.
Definition: val_util.c:6624
void val_set_children_load(val_value_t *val)
Flag the CLI parameters coming from the command line.
Definition: val_util.c:8299
status_t val_gen_index_comp(const obj_key_t *in, val_value_t *val)
Create an index component.
Definition: val_util.c:2840
status_t val_gen_index_chain(const obj_template_t *obj, val_value_t *val)
Create an index chain for the just-parsed table or container struct.
Definition: val_util.c:2983
status_t val_set_with_ocpattern_parm(val_value_t *parentval)
Handle the –with-ocpattern parameter.
Definition: val_util.c:6015
boolean(* val_nodetest_fn_t)(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
user function callback template to test output of a specified node.
Definition: val_util.h:132
val_value_t * val_make_simval_obj(obj_template_t *obj, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type from an object template instead of individual fields Ca...
Definition: val_util.c:4837
void val_force_dataclass_config(val_value_t *val)
Set the dataclass field to NCX_DC_CONFIG in the 'val' data tree
Definition: val_util.c:9270
val_value_t * val_find_notif(val_value_t *topval)
Check the 'topval' node for a nested notification node.
Definition: val_util.c:9236
status_t(* val_getbulk_cbfn_t)(obj_template_t *obj, uint32 start_idx, uint32 max_count, uint32 max_depth, val_nodetest_fn_t node_test_fn, val_getbulk_return_t *getbulk_return)
user function callback template to bulk get operational values of a specified node.
Definition: val_util.h:188
status_t val_write_ok(val_value_t *val, op_editop_t editop, ses_id_t sesid, boolean checkup, uint32 *lockid)
Check if there are any partial-locks owned by another session in the node that is going to be written...
Definition: val_util.c:6317
status_t val_set_partial_lock(val_value_t *val, plock_cb_t *plcb)
Set the partial lock throughout the value tree.
Definition: val_util.c:6190
status_t val_set_home_parms(val_value_t *parentval)
Handle the home and yumapro-home parameters.
Definition: val_util.c:5969
status_t val_gen_split_instance_id(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, xmlns_id_t leaf_nsid, const xmlChar *leaf_name, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node, Add the last node from the parameters...
Definition: val_util.c:3982
status_t val_validate_value(val_value_t *useval)
Verify that the value is valid and can be safely used later Used in the SIL code to ensure that the c...
Definition: val_util.c:8429
status_t val_add_one_operation_attr(val_value_t *val, op_editop_t op)
Add the nc:operation attribute to a value node.
Definition: val_util.c:7194
val_value_t * val_find_descendant_obj(val_value_t *val, obj_template_t *obj, val_value_t *testval)
Find the fist available descendant matching the name.
Definition: val_util.c:8842
boolean val_match_datarule(const val_value_t *val, void *rule)
Check if the data-rule back-ptr applies to this node.
Definition: val_util.c:6983
status_t val_check_deprecated_warning(val_value_t *val)
Check if any values in the val_value_t are deprecated YANG nodes.
Definition: val_util.c:9302
void val_set_canonical_order(val_value_t *val)
Set canonical order No longer used.
Definition: val_util.c:2817
status_t val_get_index_string(xml_msg_hdr_t *mhdr, ncx_instfmt_t format, boolean force_quotes, const val_value_t *val, xmlChar *buff, uint32 *len)
Get the index string for the specified table or container entry.
Definition: val_util.c:4089
val_value_t * val_make_external_binary_value(obj_template_t *obj, xmlChar *fname)
Make an external binary value node.
Definition: val_util.c:7940
status_t val_add_btype_attr(val_value_t *val, ncx_btype_t btype)
Add the ye:btype attribute to a <key> node for a SIL-SA edit.
Definition: val_util.c:7738
status_t val_set_warning_parms(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the common warning control par...
Definition: val_util.c:5132
status_t val_set_logging_parms_ex(val_value_t *parentval, const xmlChar *fhs_logfile)
Check the parent value struct (expected to be a container or list) for the full set of logging contro...
Definition: val_util.c:5272
boolean val_choice_is_set(val_value_t *val, obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3642
status_t val_gen_instance_id(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3807
val_value_t * val_new_child_val(xmlns_id_t nsid, const xmlChar *name, boolean copyname, val_value_t *parent, op_editop_t editop, obj_template_t *obj)
Internal function used by server to create a new child value.
Definition: val_util.c:3749
void val_check_swap_resnode(val_value_t *curval, val_value_t *newval)
Maintain partial locks; Used by server only.
Definition: val_util.c:6436
status_t val_set_tcp_connect_parms(val_value_t *parentval)
Set TCP Connect parameters.
Definition: val_util.c:9201
status_t val_set_logging_parms(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the common logging control par...
Definition: val_util.c:5230
status_t val_set_message_indent_parm(val_value_t *parentval)
Handle the message-indent parameter.
Definition: val_util.c:5931
void val_fixup_config_subtree(val_value_t *val, xmlns_id_t fixup_id)
Look for a config subtree (obj_is_root) and make sure all the value nodes in the subtree have proper ...
Definition: val_util.c:7417
status_t val_move_config_false(val_value_t *newval, val_value_t *curval)
Move the config false data nodes.
Definition: val_util.c:7142
val_value_t * val_make_from_num(obj_template_t *obj, typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num, status_t *res)
Create a numeric leaf from a ncx_num_t struct.
Definition: val_util.c:8979
val_value_t * val_get_choice_first_set_full(val_value_t *val, const obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3542
status_t val_gen_instance_id_ex(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3845
void val_dump_cli_valset(const char *progname, val_value_t *valset)
dump the parameter set with and without defaults
Definition: val_util.c:8672
status_t val_convert_anyxml_to_real(val_value_t *anyxml_val, val_value_t *real_val, val_value_t **error_val)
Convert anydata nodes to match a real template.
Definition: val_util.c:7798
void val_check_delete_resnode(val_value_t *curval)
Check if the curnode has any partial locks and if so, remove them from the final result.
Definition: val_util.c:6489
status_t val_set_subdirs_parm(val_value_t *parentval)
set the subdirs parameter
Definition: val_util.c:5645
status_t val_gen_instance_id_ex2(xml_msg_hdr_t *mhdr, const val_value_t *val, const val_value_t *stopval, ncx_instfmt_t format, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3886
status_t val_gen_keyclones(val_value_t *val, dlq_hdr_t *keyQ)
Get all the keys for the specified data node object.
Definition: val_util.c:7528
status_t val_ok_to_partial_lock(val_value_t *val, ses_id_t sesid, ses_id_t *lockowner)
Check if the specified root val could be locked right now by the specified session.
Definition: val_util.c:6110
status_t val_convert_anyxml_to_real2(val_value_t *anyxml_val, val_value_t *real_val, xml_msg_hdr_t *hdr, val_value_t **error_val)
Convert anydata nodes to match a real template FOR SCHEMA MOUNT SETUP.
Definition: val_util.c:7843
status_t val_set_feature_parms(val_value_t *parentval)
Handle the YANG feature parameter set.
Definition: val_util.c:5689
val_value_t * val_get_choice_next_set(const obj_template_t *obj, val_value_t *curchild)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3602
void val_clear_datarule(val_value_t *val, const void *rule)
Clear the datarule back-ptr for this node.
Definition: val_util.c:6953
status_t val_add_defaults_ex(val_value_t *val, boolean scriptmode, runstack_context_t *rcxt, time_t last_modified, ncx_etag_t etag)
add defaults to an initialized complex value (extended)
Definition: val_util.c:3089
val_value_t * val_make_external_value(obj_template_t *obj, xmlChar *fname)
Make an external value node.
Definition: val_util.c:7910
status_t val_expand_var_expr(val_value_t *val, xmlChar **retstr)
Expand the variable expression if found.
Definition: val_util.c:7296
status_t val_set_simval_obj(val_value_t *val, obj_template_t *obj, const xmlChar *valstr)
Set an initialized val_value_t as a simple type.
Definition: val_util.c:4895
void val_set_anyxml_tracking(val_value_t *val, obj_template_t *obj)
Set the anyxml tracking data for this node.
Definition: val_util.c:8575
val_value_t * val_get_value_ex(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, val_nodetest_fn_t testfn, boolean acmcheck, boolean *malloced, status_t *res, void *get2cb)
Get the value for a node after lots of internal processing (extended)
Definition: val_util.c:6707
status_t val_build_index_chains(val_value_t *val)
Build index chains for a value if needed.
Definition: val_util.c:6863
status_t val_add_npcons(val_value_t *val)
Check/Add empty NP containers.
Definition: val_util.c:3157
status_t val_set_binary_display_maxlen_parm(val_value_t *parentval)
Handle the –binary-display-maxlen parameter.
Definition: val_util.c:8388
status_t val_gen_keyptrs(val_value_t *val, dlq_hdr_t *keyptrQ)
Get all the keys for the specified data node object.
Definition: val_util.c:7468
val_value_t * val_find_list_from_keyvalQ(val_value_t *parentval, val_value_t *firstmatch, dlq_hdr_t *keyvalQ, status_t *res)
Find the list entry identified by the Q of yangapi_keyval_t strings.
Definition: val_util.c:7039
val_value_t * val_find_descendant(val_value_t *val, const xmlChar *modname, const xmlChar *name)
Find the fist available descendant matching the name also check self.
Definition: val_util.c:8792
void val_get_anyxml_tracking(const val_value_t *val, boolean *iskey, boolean *isconfig, boolean *isunknown)
Set the anyxml tracking data for this node.
Definition: val_util.c:8613
val_value_t * val_make_idref_obj(obj_template_t *obj, const val_idref_t *leafval, status_t *res)
make a val_value_t for a specified leaf or leaf-list identityref
Definition: val_util.c:4978
void val_write_extern(ses_cb_t *scb, const val_value_t *val)
Write an external file to the session.
Definition: val_util.c:6524
boolean val_simple_anyxml(const val_value_t *val)
Check if val_value node is a proper simple type ANYXML.
Definition: val_util.c:7976
val_value_t * val_get_choice_first_set(val_value_t *val, const obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3453
ncx_nmda_origin_t val_get_origin(const val_value_t *val)
Get the NMDA origin value for this node.
Definition: val_util.c:8494
xpath_pcb_t * val_get_xpathpcb(val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4713
val_value_t * val_make_config_root(void)
Make a <config> element.
Definition: val_util.c:7252
status_t val_add_datapath_attr(val_value_t *val, obj_template_t *obj)
Add the ye:datapath attribute to a node that is tagged as an ywx:datapath node.
Definition: val_util.c:7577
status_t val_add_node_defaults(obj_template_t *chobj, val_value_t *val, boolean scriptmode, time_t last_modified, ncx_etag_t etag)
Check/Add defaults for the specified node and descendant nodes.
Definition: val_util.c:3121
status_t val_apply_template(val_value_t *template_val, val_value_t *target_val)
Apply the specified template to the val_value_t node.
Definition: val_util.c:8003
xmlns_id_t val_get_idref_nsid(const val_value_t *val)
get the true namespace ID for the identityref value
Definition: val_util.c:8642
obj_template_t * val_get_casobj(val_value_t *val)
Get the case object for the value node.
Definition: val_util.c:8547
status_t val_set_ses_protocols_parm(ses_cb_t *scb, val_value_t *parentval)
Handle the -protocols parameter for a session.
Definition: val_util.c:5864
status_t val_add_defaults(val_value_t *val, boolean scriptmode)
Add defaults to an initialized complex value.
Definition: val_util.c:3043
status_t val_set_protocols_parm(val_value_t *parentval)
Handle the –protocols parameter.
Definition: val_util.c:5789
status_t val_set_xpathpcb(val_value_t *val, xpath_pcb_t *xpathpcb)
Set the xpathpcb field with passed field;.
Definition: val_util.c:4773
status_t val_instance_check_max(val_value_t *root, val_value_t *val, obj_template_t *obj, boolean check_when, boolean check_deep, ses_cb_t *scb, xml_msg_hdr_t *msg)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3253
val_value_t * val_make_identity_obj(obj_template_t *obj, typ_def_t *typdef, ncx_identity_t *ident, status_t *res)
make a val_value_t for a specified leaf or leaf-list from an identity
Definition: val_util.c:5045
status_t val_instance_check(val_value_t *root, val_value_t *val, obj_template_t *obj)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3189
boolean val_is_fixed_value(val_value_t *val)
Check if the specified value has a fixed-value=true attribute set in it.
Definition: val_util.c:7705
boolean val_type_is_any(const val_value_t *val)
Check if val_value node is a proper simple type ANYXML.
Definition: val_util.c:8467
const xpath_pcb_t * val_get_const_xpathpcb(const val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4802
val_value_t * val_make_internal_value(const xmlChar *name, const xmlChar *value)
Create an NCX_BT_INTERNAL value that contains the raw XML for the value node.
Definition: val_util.c:7875
status_t val_check_obj_when_ex(val_value_t *val, val_value_t *valroot, val_value_t *objval, obj_template_t *obj, xml_msg_hdr_t *mhdr, boolean configonly, boolean get_when, ses_cb_t *pcb_session, struct xpath_get2_cb_t_ *parent_cb, boolean *condresult, uint32 *whencount)
checks when-stmt only (extended)
status_t val_gen_key_entry(val_value_t *keyval)
Create a key record within an index comp.
Definition: val_util.c:2911
status_t
global error return code
Definition: status_enum.h:219
uint32 ses_id_t
Session ID.
Definition: ses.h:407
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
#define NCX_MAX_GETBULK_COUNT
size of the val_getbulk_array_t in val_util.h
Definition: ncxconst.h:192
uint32 ncx_etag_t
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t.
Definition: ncxtypes.h:750
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:213
ncx_nmda_origin_t
internal enumerations for standard NMDA origins
Definition: ncxtypes.h:1623
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1259
ncx_instfmt_t
instance identifier string format types
Definition: ncxtypes.h:562
YANG module data structures Many internal representations of YANG module constructs.
NETCONF protocol operations.
RFC 57517 partial lock support.
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
YANG identity entry.
Definition: ncxtypes.h:1084
One YANG list key component.
Definition: obj.h:838
One YANG data-def-stmt.
Definition: obj.h:1284
struct representing 1 configuration database
Definition: plock_cb.h:81
Main runstact context control block used by yangcli to process script input loops and conditional sta...
Definition: runstack.h:256
Session Control Block.
Definition: ses.h:759
Discriminated union for all data typedefs.
Definition: typ.h:458
return value for a getbulk callback function
Definition: val_util.h:154
uint32 retcount
actual return count
Definition: val_util.h:159
boolean retdone
flag to indicate return is complete
Definition: val_util.h:162
one QName for the NCX_BT_IDREF value
Definition: val.h:818
one value to match one type
Definition: val.h:939
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:417
XPath parser control block.
Definition: xpath.h:754
union of all the basic number types if float not supported, then it is stored as an int64
Definition: ncxtypes.h:763
Value Node Basic Support.
XML and JSON Message send and receive support.
Schema and data model Xpath search support.