yumapro
24.10-3
YumaPro SDK
|
Core data access functions to create and use YANG data. More...
Macros | |
#define | val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE) |
Check if the value is a wildcard string. More... | |
Functions | |
val_value_t * | val_new_value (void) |
Malloc and initialize the fields in a val_value_t. More... | |
void | val_init_value (val_value_t *val) |
Initialize the generic fields in a val_value_t so it is ready for use. More... | |
void | val_init_complex (val_value_t *val, ncx_btype_t btyp) |
Initialize the fields in a complex val_value_t this is deprecated and should only be called by val_init_from_template. More... | |
void | val_init_virtual (val_value_t *val, void *cbfn, struct obj_template_t_ *obj) |
Special function to initialize a virtual value node. More... | |
void | val_init_from_template (val_value_t *val, struct obj_template_t_ *obj) |
Initialize a value node from its object template. More... | |
void | val_reinit_from_template (val_value_t *val, struct obj_template_t_ *obj) |
Re-Initialize a value node from its object template. More... | |
void | val_free_value (val_value_t *val) |
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct itself. More... | |
void | val_set_name (val_value_t *val, const xmlChar *name, uint32 namelen) |
Set (or reset) the name of a value struct. More... | |
status_t | val_force_dname (val_value_t *val) |
Set (or reset) the name of a value struct. More... | |
void | val_set_qname (val_value_t *val, xmlns_id_t nsid, const xmlChar *name, uint32 namelen) |
Set (or reset) the name and namespace ID of a value struct. More... | |
status_t | val_string_ok (typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval) |
Check a string to make sure the value is valid based on the restrictions in the specified typdef. More... | |
status_t | val_string_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo) |
retrieve the YANG custom error info if any More... | |
status_t | val_binary_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, val_value_t *val, ncx_errinfo_t **errinfo) |
retrieve the YANG custom error info for binary val, if any More... | |
status_t | val_string_ok_ex (ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors) |
retrieve the YANG custom error info if any (extended) More... | |
status_t | val_string_ok_ex2 (ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors, boolean is_defval) |
retrieve the YANG custom error info if any More... | |
status_t | val_list_ok (typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list) |
Check a list to make sure the all the strings are valid based on the specified typdef. More... | |
status_t | val_list_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list, ncx_errinfo_t **errinfo) |
Check a list to make sure the all the strings are valid based on the specified typdef. More... | |
status_t | val_enum_ok (typ_def_t *typdef, const xmlChar *enumval, int32 *retval, const xmlChar **retstr) |
Check an enumerated integer string to make sure the value is valid based on the specified typdef. More... | |
status_t | val_bit_ok (typ_def_t *typdef, const xmlChar *bitname, uint32 *position) |
Check a bit name is valid for the typedef. More... | |
status_t | val_bitpos_ok (typ_def_t *typdef, uint32 position, const xmlChar **name) |
Check a bit position is valid for the typedef. More... | |
status_t | val_idref_ok (typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, const xmlChar **name, ncx_identity_t **id) |
Check if an identityref QName is valid for the typedef. More... | |
status_t | val_idref_ok_ex (typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, boolean is_json, ncx_module_t *impmod, boolean or_self, const xmlChar **name, ncx_identity_t **id) |
Check if an identityref QName is valid for the typedef. More... | |
status_t | val_parse_idref (ncx_module_t *mod, const xmlChar *qname, xmlns_id_t *nsid, const xmlChar **name, ncx_identity_t **id) |
Parse a CLI BASED identityref QName into its various parts. More... | |
status_t | val_parse_idref_rootcb (ncx_module_t *mod, const xmlChar *qname, xmlns_id_t *nsid, const xmlChar **name, ncx_identity_t **id, ncx_sm_rootcb_t *rootcb) |
Parse a CLI BASED identityref QName into its various parts. More... | |
status_t | val_range_ok (typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num) |
Check a number to see if it is in range or not Could be a number or size range. More... | |
status_t | val_range_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num, ncx_errinfo_t **errinfo) |
Check a number to see if it is in range or not; get errinfo Could be a number or size range. More... | |
status_t | val_pattern_ok (typ_def_t *typdef, const xmlChar *strval) |
Check a string against all the patterns in a big AND expression. More... | |
status_t | val_pattern_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, ncx_errinfo_t **errinfo) |
Check a string against all the patterns in a big AND expression Get errinfo if any. More... | |
status_t | val_simval_ok (typ_def_t *typdef, const xmlChar *simval) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_simval_ok_errinfo (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_simval_ok_ex (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_simval_ok_max (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_simval_ok_max2 (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_simval_ok_max3 (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond, boolean is_defval) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More... | |
status_t | val_union_ok (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More... | |
status_t | val_union_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More... | |
status_t | val_union_ok_ex (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo, ncx_module_t *mod, typ_def_t **match_typdef) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More... | |
status_t | val_union_ok_binary (typ_def_t *typdef, const xmlChar *binstr, uint32 binstrlen, val_value_t *retval, ncx_errinfo_t **errinfo, typ_def_t **match_typdef) |
Check a union to make sure the buffer is valid based on the specified typdef, and convert the buffer to an NCX internal format. More... | |
status_t | val_union_ok_full (typ_def_t *typdef, const xmlChar *strval, val_value_t *contextval, val_value_t *rootval, val_value_t *retval, ncx_errinfo_t **errinfo) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More... | |
dlq_hdr_t * | val_get_metaQ (val_value_t *val) |
Get the meta Q header for the value. More... | |
val_value_t * | val_get_first_meta (dlq_hdr_t *queue) |
Get the first metaQ entry from the specified Queue. More... | |
val_value_t * | val_get_first_meta_val (val_value_t *val) |
Get the first metaQ entry from the specified Queue. More... | |
val_value_t * | val_get_next_meta (val_value_t *curnode) |
Get the next metaQ entry from the specified entry. More... | |
boolean | val_meta_empty (val_value_t *val) |
Check if the metaQ is empty for the value node. More... | |
val_value_t * | val_find_meta (val_value_t *val, xmlns_id_t nsid, const xmlChar *name) |
Get the corresponding meta data node. More... | |
boolean | val_meta_match (val_value_t *val, val_value_t *metaval) |
Return true if the corresponding attribute exists and has the same value. More... | |
uint32 | val_metadata_inst_count (val_value_t *val, xmlns_id_t nsid, const xmlChar *name) |
Get the number of instances of the specified attribute. More... | |
void | val_dump_value (val_value_t *val, int32 startindent, log_debug_t lvl) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More... | |
void | val_dump_value_config (val_value_t *val, int32 startindent, log_debug_t lvl) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) CONFIG ONLY. More... | |
void | val_dump_value_ex (val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More... | |
void | val_dump_alt_value (val_value_t *val, int32 startindent, log_debug_t lvl) |
Printf the specified val_value_t struct to the alternate logfile Uses conf file format (see ncx/conf.h) More... | |
void | val_stdout_value (val_value_t *val, int32 startindent, log_debug_t lvl) |
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h) More... | |
void | val_stdout_value_ex (val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl) |
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h) More... | |
void | val_dump_value_max (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, log_debug_t lvl) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More... | |
void | val_dump_value_full (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, log_debug_t lvl, logfns_t *overrideOutput) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More... | |
void | val_dump_value_full2 (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, boolean withdef, log_debug_t lvl, logfns_t *overrideOutput) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More... | |
status_t | val_set_string (val_value_t *val, const xmlChar *valname, const xmlChar *valstr) |
set a generic string using the builtin string typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! use after calling val_new_value More... | |
status_t | val_set_string2 (val_value_t *val, const xmlChar *valname, typ_def_t *typdef, const xmlChar *valstr, uint32 valstrlen) |
set a string with any typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! More... | |
status_t | val_set_string3 (val_value_t *val, const xmlChar *valname, typ_def_t *typdef, const xmlChar *valstr, uint32 valstrlen, boolean is_dblquote) |
set a string with any typdef (handle double-quoted) Set an initialized val_value_t as a simple type namespace set to 0 !!! More... | |
status_t | val_set_binary (const xmlChar *valstr, uint32 valstrlen, val_value_t *val) |
set and decode base64 value. More... | |
status_t | val_reset_empty (val_value_t *val) |
Recast an already initialized value as an NCX_BT_EMPTY clean a value and set it to empty type used by yangcli to delete leafs. More... | |
status_t | val_set_simval (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr) |
set any simple value with any typdef Set an initialized val_value_t as a simple type More... | |
status_t | val_set_simval_str (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr) |
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type More... | |
status_t | val_set_simval_binary (val_value_t *val, const xmlChar *binstr, uint32 binstrlen) |
set a binary type either in a type binary, or type within 1 or more unions More... | |
status_t | val_set_simval_max (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr, uint32 valstrlen) |
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type More... | |
val_value_t * | val_make_simval (typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, status_t *res) |
Create and set a val_value_t as a simple type same as val_set_simval, but malloc the value first. More... | |
val_value_t * | val_make_string (xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr) |
Malloc and set a val_value_t as a generic NCX_BT_STRING namespace set to 0 !!! More... | |
val_value_t * | val_make_binary (xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, uint32 valstrlen) |
Malloc and set a val_value_t as a NCX_BT_BINARY type Uses the generic binary object from ncx_get_gen_binary. More... | |
status_t | val_merge (const val_value_t *src, val_value_t *dest) |
Merge src val into dest val (! MUST be same type !) Any meta vars in src are also merged into dest. More... | |
val_value_t * | val_clone (const val_value_t *val) |
Clone a specified val_value_t struct and sub-trees. More... | |
val_value_t * | val_clone2 (const val_value_t *val) |
Clone a specified val_value_t struct and sub-trees but not the editvars. More... | |
val_value_t * | val_clone_config_data (const val_value_t *val, status_t *res) |
Clone a specified val_value_t struct and sub-trees with config=true only. More... | |
val_value_t * | val_clone_config_newval (const val_value_t *val, status_t *res) |
Clone a specified val_value_t struct and sub-trees with config=true only. More... | |
val_value_t * | val_clone_config_newval_keys_only (const val_value_t *val, status_t *res) |
Clone a specified val_value_t struct and sub-trees with config=true only. More... | |
val_value_t * | val_clone_config_save (const val_value_t *val, status_t *res) |
Clone a specified val_value_t struct and sub-trees filter for config only for saving to NVRAM. More... | |
status_t | val_replace (val_value_t *val, val_value_t *copy) |
Replace a specified val_value_t struct and sub-trees. More... | |
status_t | val_replace_str (const xmlChar *str, uint32 stringlen, val_value_t *copy) |
Replace a specified val_value_t struct with a string type. More... | |
status_t | val_fast_replace_string (const xmlChar *str, uint32 stringlen, val_value_t *copy) |
Replace a specified val_value_t struct with a string type Reuse everything – just set the val->v.str field. More... | |
void | val_replace_stringval (val_value_t *val, const xmlChar *str) |
Replace the string value, not the entire value. More... | |
void | val_add_child (val_value_t *child, val_value_t *parent) |
Add a child (deprecated): use val_child_add instead. More... | |
void | val_add_child_sorted (val_value_t *child, val_value_t *parent) |
Add a child value node to a parent value node in the proper place (deprecated: use val_child_add instead) More... | |
void | val_insert_child (val_value_t *child, val_value_t *current, val_value_t *parent) |
Insert a child value node to a parent value node. More... | |
void | val_remove_child (val_value_t *child) |
Remove a child value node from its parent value node. More... | |
void | val_swap_child (val_value_t *newchild, val_value_t *curchild) |
Swap a child value node with a current value node. More... | |
val_value_t * | val_first_child_match (const val_value_t *parent, const val_value_t *child) |
Get the first instance of the corresponding child node. More... | |
val_value_t * | val_first_child_match_fast (const val_value_t *parent, const val_value_t *child, val_value_t *lastmatch) |
Get the first instance of the corresponding child node Object pointers must be from the same tree!!! More... | |
val_value_t * | val_next_child_match (val_value_t *parent, val_value_t *child, val_value_t *curmatch) |
Get the next instance of the corresponding child node. More... | |
val_value_t * | val_next_child_same (val_value_t *curchild) |
Get the next instance of the corresponding child node. More... | |
val_value_t * | val_get_first_child (const val_value_t *parent) |
Get the first child node. More... | |
val_value_t * | val_get_next_child (const val_value_t *curchild) |
Get the next child node. More... | |
val_value_t * | val_get_first_terminal_child (const val_value_t *parent) |
Get the child node only if obj_is_terminal(val->obj) is true. More... | |
val_value_t * | val_get_next_terminal_child (const val_value_t *curchild) |
Get the next child node only if obj_is_terminal(val->obj) is true. More... | |
val_value_t * | val_find_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname) |
Find the first instance of the specified child node. More... | |
val_value_t * | val_find_child_fast (const val_value_t *parent, xmlns_id_t nsid, const xmlChar *childname) |
Find the first instance of the specified child node. More... | |
val_value_t * | val_find_child_obj (const val_value_t *parent, const struct obj_template_t_ *chobj) |
Find the first instance of the specified child node Use the object template pointer to match the object. More... | |
val_value_t * | val_find_child_que (const dlq_hdr_t *childQ, xmlns_id_t nsid, const xmlChar *childname) |
Find the first instance of the specified child node in the specified child Q. More... | |
val_value_t * | val_match_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname) |
Match the first instance of the specified child node. More... | |
val_value_t * | val_match_child_count (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, uint32 *matchcount) |
Match the first instance of the specified child node Return the total number of matches. More... | |
val_value_t * | val_find_next_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, const val_value_t *curchild) |
Find the next instance of the specified child node. More... | |
val_value_t * | val_find_next_child_fast (const val_value_t *parent, const val_value_t *curchild) |
Find the next instance of the specified child node. More... | |
val_value_t * | val_first_child_name (val_value_t *parent, const xmlChar *name) |
Get the first corresponding child node instance, by name find first – really for resolve index function. More... | |
val_value_t * | val_first_child_qname (val_value_t *parent, xmlns_id_t nsid, const xmlChar *name) |
Get the first corresponding child node instance, by QName. More... | |
val_value_t * | val_next_child_qname (val_value_t *parent, xmlns_id_t nsid, const xmlChar *name, val_value_t *curchild) |
Get the next corresponding child node instance, by QName. More... | |
val_value_t * | val_first_child_string (val_value_t *parent, const xmlChar *name, const xmlChar *strval) |
find first name value pair More... | |
uint32 | val_child_cnt (val_value_t *parent) |
Get the number of child nodes present. More... | |
uint32 | val_child_inst_cnt (const val_value_t *parent, const xmlChar *modname, const xmlChar *name) |
Get the corresponding child instance count by name get instance count – for instance qualifer checking. More... | |
uint32 | val_get_child_inst_id (const val_value_t *parent, const val_value_t *child) |
Get the instance ID for this child node within the parent context. More... | |
uint32 | val_liststr_count (const val_value_t *val) |
Get the number of strings in the list type. More... | |
boolean | val_index_match (const val_value_t *val1, const val_value_t *val2) |
Check 2 val_value structs for the same instance ID. More... | |
int | val_index_compare (const val_value_t *val1, const val_value_t *val2) |
Check 2 val_value structs for the same instance ID. More... | |
int32 | val_compare_max (const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing) |
Compare 2 val_value_t struct value contents. More... | |
int32 | val_compare_max_def (const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing, boolean ignore_defaults) |
Compare 2 val_value_t struct value contents. More... | |
int32 | val_compare_ex (const val_value_t *val1, const val_value_t *val2, boolean configonly) |
Compare 2 val_value_t struct value contents Check all or config only. More... | |
int32 | val_compare (const val_value_t *val1, const val_value_t *val2) |
Compare 2 val_value_t struct value contents. More... | |
int32 | val_compare_to_string (const val_value_t *val1, const xmlChar *strval2, status_t *res) |
Compare a val_value_t struct value contents to a string. More... | |
int32 | val_compare_to_string_len (const val_value_t *val1, const xmlChar *strval2, uint32 strval2len, status_t *res) |
Compare a val_value_t struct value contents to a string Provide a max-length to compare. More... | |
int32 | val_compare_for_edit (const val_value_t *val1, const val_value_t *val2, boolean ismerge) |
Compare 2 val_value_t struct value contents for the nc:operation=replace procedures. More... | |
int32 | val_compare_as_string (const val_value_t *val1, const val_value_t *val2, status_t *res) |
Compare 2 val_value_t structs Convert each value to a string and compare as strings Needed to compare a value if a UNION type is used. More... | |
status_t | val_sprintf_simval_nc (xmlChar *buff, const val_value_t *val, uint32 *len) |
Sprintf the xmlChar string NETCONF representation of a simple value. More... | |
status_t | val_sprintf_simval_nc_ex (xmlChar *buff, const val_value_t *val, boolean url_encode, uint32 *len) |
Sprintf the xmlChar string NETCONF representation of a simple value. More... | |
status_t | val_sprintf_simval_xpath (xmlChar *buff, const val_value_t *val, boolean url_encode, xmlChar quot_char, uint32 *len) |
Sprintf the xmlChar string XPATH representation of a simple value. More... | |
xmlChar * | val_make_sprintf_string (const val_value_t *val) |
Malloc a buffer and then sprintf the xmlChar string NETCONF representation of a simple value. More... | |
status_t | val_resolve_scoped_name (val_value_t *val, const xmlChar *name, val_value_t **chval) |
Find the scoped identifier in the specified complex value. More... | |
ncx_iqual_t | val_get_iqualval (const val_value_t *val) |
Get the effective instance qualifier value for this value. More... | |
boolean | val_duplicates_allowed (val_value_t *val) |
Determine if duplicates are allowed for the given val type The entire definition chain is checked to see if a 'no-duplicates'. More... | |
boolean | val_has_content (const val_value_t *val) |
Determine if there is a value or any child nodes for this val. More... | |
boolean | val_has_content_ex (const val_value_t *val) |
Determine if there is a value or any child nodes for this val. More... | |
boolean | val_has_index (const val_value_t *val) |
Determine if this value has an index. More... | |
val_index_t * | val_get_first_index (const val_value_t *val) |
Get the first index entry, if any for this value node. More... | |
val_index_t * | val_get_next_index (const val_index_t *valindex) |
Get the next index entry, if any for this value node. More... | |
uint32 | val_get_index_count (const val_value_t *val) |
Get the number of index nodes in this val. More... | |
status_t | val_parse_meta (ses_cb_t *scb, typ_def_t *typdef, xml_attr_t *attr, val_value_t *retval) |
Parse the metadata descriptor against the typdef Check only that the value is ok, not instance count. More... | |
void | val_set_extern (val_value_t *val, xmlChar *fname) |
Setup an NCX_BT_EXTERN value. More... | |
void | val_set_intern (val_value_t *val, xmlChar *intbuff) |
Setup an NCX_BT_INTERN value. More... | |
boolean | val_fit_oneline (const val_value_t *val, uint32 linesize, boolean isxml) |
Check if the XML encoding for the specified val_value_t should take one line or more than one line. More... | |
boolean | val_create_allowed (const val_value_t *val) |
Check if the specified value is allowed to have a create edit-config operation attribute. More... | |
boolean | val_delete_allowed (const val_value_t *val) |
Check if the specified value is allowed to have a delete edit-config operation attribute. More... | |
boolean | val_is_config_data (const val_value_t *val) |
Check if the specified value is a config DB object instance. More... | |
boolean | val_is_config_save (const val_value_t *val) |
Check if the specified value is a config DB object instance Check for config-save mode. More... | |
boolean | val_is_virtual (const val_value_t *val) |
Check if the specified value is a virtual value such that a 'get' callback function is required to access the real value contents. More... | |
val_value_t * | val_get_virtual_value (ses_cb_t *scb, val_value_t *val, status_t *res) |
Get the value of a virtual value node. More... | |
boolean | val_is_default (val_value_t *val) |
Check if the specified value is set to the YANG default value. More... | |
boolean | val_is_real (const val_value_t *val) |
Check if the specified value is a real value. More... | |
xmlns_id_t | val_get_parent_nsid (const val_value_t *val) |
Try to get the parent namespace ID. More... | |
uint32 | val_instance_count (val_value_t *val, const xmlChar *modname, const xmlChar *objname) |
Count the number of instances of the specified object name in the parent value struct. More... | |
uint32 | val_instance_count_fast (val_value_t *val, xmlns_id_t nsid, const xmlChar *objname, val_value_t **firstval) |
Count the number of instances of the specified object name in the parent value struct. More... | |
uint32 | val_instance_count_fast2 (val_value_t *val, val_value_t *startval) |
Count the number of instances of the specified object name in the parent value struct. More... | |
void | val_set_extra_instance_errors (val_value_t *val, const xmlChar *modname, const xmlChar *objname, uint32 maxelems) |
mark ERR_NCX_EXTRA_VAL_INST errors for nodes > 'maxelems' More... | |
boolean | val_need_quotes (const xmlChar *str) |
Check if a string needs to be single-quoted to be output within a conf file or ncxcli stdout output. More... | |
boolean | val_has_dquotes (const xmlChar *str) |
Check if a string has any double-quotes in it. More... | |
boolean | val_need_dquotes (const xmlChar *str) |
Check if a string needs to be double-quoted to be output within a conf file or ncxcli stdout output. More... | |
boolean | val_all_whitespace (const xmlChar *str) |
Check if a string is all whitespace. More... | |
boolean | val_any_whitespace (const xmlChar *str, uint32 len) |
Check if a string has any whitespace chars. More... | |
boolean | val_match_metaval (const xml_attr_t *attr, xmlns_id_t nsid, const xmlChar *name) |
Match the specific attribute value and namespace ID. More... | |
boolean | val_get_dirty_flag (const val_value_t *val) |
Get the dirty flag for this value node. More... | |
boolean | val_get_subtree_dirty_flag (const val_value_t *val) |
Get the subtree dirty flag for this value node. More... | |
void | val_set_subtree_dirty_up (val_value_t *val) |
Set the dirty flag for this value node. More... | |
void | val_set_dirty_flag (val_value_t *val, boolean clear_def) |
Set the dirty flag for this value node. More... | |
void | val_set_child_deleted_flag (val_value_t *val) |
Set the child_deleted flag for this value node. More... | |
boolean | val_get_child_deleted_flag (val_value_t *val) |
Get the child_deleted flag for this value node. More... | |
void | val_clear_dirty_flag (val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid, boolean is_delete, boolean do_clear_default) |
Clear the dirty flag for this value node. More... | |
void | val_clear_child_dirty_flag (val_value_t *val) |
Clear the dirty flag for all nodes within a value struct. More... | |
boolean | val_dirty_subtree (const val_value_t *val) |
Check the dirty or subtree_dirty flag. More... | |
void | val_clean_tree (val_value_t *val) |
Clear the dirty flag and the operation for all nodes within a value struct. More... | |
uint32 | val_get_nest_level (val_value_t *val) |
Get the next level of the value. More... | |
val_value_t * | val_get_first_leaf (val_value_t *val) |
Get the first leaf or leaflist node in the specified value tree. More... | |
const xmlChar * | val_get_mod_name (const val_value_t *val) |
Get the module name associated with this value node. More... | |
const xmlChar * | val_get_mod_prefix (const val_value_t *val) |
Get the module prefix associated with this value node. More... | |
xmlns_id_t | val_get_nsid (const val_value_t *val) |
Get the namespace ID for the specified value node. More... | |
ncx_sid_t | val_get_yang_sid (const val_value_t *val) |
Get the YANG SID for the specified value node. More... | |
void | val_change_nsid (val_value_t *val, xmlns_id_t nsid) |
Change the namespace ID for a value node and all its descendants. More... | |
void | val_change_nsid2 (val_value_t *val, xmlns_id_t nsid) |
Change the namespace ID for the descendant nodes of the value node. More... | |
void | val_change_nsid3 (val_value_t *val, xmlns_id_t nsid) |
Change the namespace ID for a value node only. More... | |
val_value_t * | val_make_from_insertxpcb (val_value_t *sourceval, status_t *res) |
Make a val_value_t for a list, with the child nodes for key leafs, specified in the key attribute string given to the insert operation. More... | |
const typ_def_t * | val_get_typdef (const val_value_t *val) |
Get the typdef field for a value struct. More... | |
boolean | val_set_by_default (const val_value_t *val) |
Check if the value was set by val_add_defaults. More... | |
boolean | val_has_withdef_default (const val_value_t *val) |
Check if the value contained the wd:default attribute. More... | |
void | val_set_withdef_default (val_value_t *val) |
Set the value flags as having the wd:default attribute. More... | |
boolean | val_is_metaval (const val_value_t *val) |
Check if the value is a meta-val (XML attribute) More... | |
void | val_move_children (val_value_t *srcval, val_value_t *destval) |
Move all the child nodes from src to dest Source and dest must both be containers! More... | |
void | val_move_nonconfig_children (val_value_t *srcval, val_value_t *destval) |
Move all the config=false child nodes from src to dest Source and dest must both be containers! More... | |
status_t | val_cvt_generic (val_value_t *val) |
Convert all the database object pointers to generic object pointers. More... | |
status_t | val_set_pcookie (val_value_t *val, void *pcookie) |
Set the SIL pointer cookie in the editvars for the specified value node. More... | |
status_t | val_set_icookie (val_value_t *val, int icookie) |
Set the SIL integer cookie in the editvars for the specified value node. More... | |
void * | val_get_pcookie (val_value_t *val) |
Get the SIL pointer cookie in the editvars for the specified value node. More... | |
int | val_get_icookie (val_value_t *val) |
Get the SIL integer cookie in the editvars for the specified value node. More... | |
status_t | val_delete_default_leaf (val_value_t *val) |
Do the internal work to setup a delete of a default leaf. More... | |
status_t | val_delete_default_leaf_list (val_value_t *val) |
Do the internal work to convert a leaf-list to its YANG default value(s) More... | |
void | val_force_empty (val_value_t *val) |
Convert a simple node to an empty type. More... | |
status_t | val_delete_default_npcon (val_value_t *val) |
Do the internal work to convert an NP-container to its subtree of YANG default values. More... | |
void | val_move_fields_for_xml (val_value_t *srcval, val_value_t *destval, boolean movemeta) |
Move or copy the internal fields from one val to another for xml_wr purposes. More... | |
void | val_move_metadata (val_value_t *srcval, val_value_t *destval) |
Move the attribute fields from one val to another for xml_wr purposes. More... | |
val_index_t * | val_get_first_key (val_value_t *val) |
Get the first key record if this is a list with a key-stmt. More... | |
val_index_t * | val_get_last_key (val_value_t *val) |
Get the last key record if this is a list with a key-stmt. More... | |
val_index_t * | val_get_next_key (val_index_t *curkey) |
Get the next key record if this is a list with a key-stmt. More... | |
val_index_t * | val_get_prev_key (val_index_t *curkey) |
Get the previous key record if this is a list with a key-stmt. More... | |
void | val_remove_key (val_value_t *keyval) |
Remove a key pointer because the key is invalid Free the key pointer. More... | |
val_value_t * | val_new_deleted_value (void) |
Malloc and initialize the fields in a val_value_t to be used as a deleted node marker. More... | |
status_t | val_new_editvars (val_value_t *val) |
Malloc and initialize the val->editvars field. More... | |
void | val_free_editvars (val_value_t *val) |
Free the editing variables for the value node. More... | |
void | val_free_solo_editvars (val_editvars_t *editvars) |
Free the editing variables removed from a val_value_t. More... | |
boolean | val_all_np_containers (val_value_t *val) |
Check if the value tree is all NP containers and nothing else. More... | |
status_t | val_sprintf_etag (val_value_t *val, xmlChar *buff, int32 buffsize) |
Write the Entity Tag for the value to the specified buffer. More... | |
time_t * | val_get_last_modified (val_value_t *val) |
Get the last_modified field. More... | |
void | val_force_default (val_value_t *val) |
Set a node created by the server as a default node. More... | |
void | val_set_all_tags (val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid) |
Set the etag and last_modified field for the node and all config sub-children. More... | |
const xmlChar * | val_get_owner (val_value_t *val) |
Get the owner string for the specified value node. More... | |
ncx_owner_id_t | val_get_owner_id (val_value_t *val) |
Get the owner ID for the specified value node. More... | |
boolean | val_need_owner_string (val_value_t *val) |
Check if the owner string is needed when generating ywx:owner attrs. More... | |
void | val_delete_children (val_value_t *val) |
Check if the value is a complex type and if so then delete all child nodes. More... | |
void | val_clean_value (val_value_t *val) |
Clean a static val_value_t struct. More... | |
boolean | val_find_bit (val_value_t *val, const xmlChar *bitname) |
Find the specified bit name in the NCX_BT_BITS value. More... | |
boolean | val_has_children (const val_value_t *val) |
Determine if there are any child nodes for this val. More... | |
status_t | val_add_test_valindex (val_value_t *parentval, val_value_t *keyval) |
Make a dummy val_index_t for the getcg acmtest. More... | |
const xmlChar * | val_get_yang_typename (val_value_t *val) |
Get the YANG type name for this value node if there is one. More... | |
void | val_set_force_config (val_value_t *val, boolean is_config) |
Set the force config flags for the object. More... | |
void | val_clear_defvalset_flag (val_value_t *val) |
Clear the defvalset flag so the server will re-check this node the next time the client does a get request. More... | |
status_t | val_clone_valQ (dlq_hdr_t *valQ, dlq_hdr_t *return_valQ) |
Clone all values in 1 valQ into the return_valQ. More... | |
void | val_clean_valQ (dlq_hdr_t *valQ) |
Clean a queue of val_value_t. More... | |
boolean | val_is_value_set (val_value_t *val) |
Check if a value has been set by a client It has to be initialized and not set by default to return true. More... | |
uint32 | val_url_encode_string (const xmlChar *str, xmlChar *buff) |
Fill in a buffer with the URL-encoded string. More... | |
status_t | val_quote_encode_string (const xmlChar *str, xmlChar quot_char, xmlChar *buff, uint32 *retlen) |
Fill in a buffer with the quote-encoded string Check for the quote char and escape it. More... | |
void | val_convert_any_to_container (val_value_t *val) |
Convert the extern parameter to a container instead of extern. More... | |
void | val_clean_index_chain (val_value_t *val) |
Clean out any indexQ entries. More... | |
boolean | val_pattern_match (const xmlRegexpPtr pattern, const xmlChar *strval) |
Check the specified string against the specified pattern. More... | |
boolean | val_ocpattern_match (const regex_t *ocpattern, const xmlChar *strval) |
Check the specified string against the specified pattern Use POSIX format for openconfig pattern. More... | |
boolean | val_idref_derived_from (ncx_module_t *impmod, val_value_t *testval, const xmlChar *qname, boolean or_self) |
Check the specified valnode is derived from the specified identity. More... | |
status_t | val_set_sil_priority (val_value_t *val, uint8 silprio) |
Set the secondary SIL priority. More... | |
uint8 | val_get_sil_priority (val_value_t *val) |
Get the secondary SIL priority; zero if not found. More... | |
const xmlChar * | val_find_bit_name (val_value_t *val, uint32 bitpos) |
Find the specified bit name in the NCX_BT_BITS value. More... | |
const xmlChar * | val_find_enum_name (val_value_t *val, int32 enunum) |
Find the specified enum name for the value field that matches for NCX_BT_ENUM value. More... | |
const xmlChar * | val_find_enum_name2 (ncx_btype_t btyp, typ_def_t *typdef, int32 enunum) |
Find the specified enum name for the value field that matches for NCX_BT_ENUM value Do not use val_value value. More... | |
void | val_mark_deleted (val_value_t *val) |
mark the value node as deleted May have to really delete from val_tree More... | |
void | val_mark_undeleted (val_value_t *val) |
mark the value node as un-deleted More... | |
boolean | val_has_conditional_value (val_value_t *val) |
Check if the value is conditional. More... | |
val_value_t * | val_convert_leafref (const val_value_t *val) |
Convert a value of type NCX_BT_LEAFREF to the value that the final leafref is pointing at. More... | |
int32 | val_compare_for_topreplace (const val_value_t *val1, const val_value_t *val2) |
Compare 2 val_value_t struct value contents. More... | |
int32 | val_compare_for_topreplace_simple (const val_value_t *val1, const val_value_t *val2) |
Compare 2 val_value_t struct value contents. More... | |
boolean | val_has_complex_child (const val_value_t *val) |
Check if the value has complex children nodes. More... | |
status_t | val_add_meta (val_value_t *metaval, val_value_t *val) |
Add a meta value to a value node. More... | |
val_value_t * | val_find_root (val_value_t *val) |
Find the root value node or top-val if no ncx:root found. More... | |
status_t | val_set_canonical (val_value_t *val) |
Invoke the canonical callback for the data type (if any) More... | |
typ_def_t * | val_get_leafref_typdef (val_value_t *val) |
Return a base typedef of type NCX_BT_LEAFREF. More... | |
boolean | val_ascendant_compare (val_value_t *val1, val_value_t *val2) |
Special compare function for edit compares. More... | |
const xmlChar * | val_get_dname (const val_value_t *val) |
Get the dname field if set; NULL if not set. More... | |
status_t | val_set_dname (val_value_t *val, const xmlChar *dname) |
Set the dname field. More... | |
status_t | val_set_dname2 (val_value_t *val, const xmlChar *dname, uint32 dnamelen) |
Set the dname field. More... | |
status_t | val_new_extra (val_value_t *val) |
Create the val_extra struct if it does not exist. More... | |
const xmlChar * | val_get_varexpr (const val_value_t *val) |
Get the varexpr field if set; NULL if not set. More... | |
status_t | val_set_varexpr (val_value_t *val, const xmlChar *varexpr) |
Set the varexpr field in the value node. More... | |
void | val_clear_varexpr (val_value_t *val) |
Clear the varexpr field in the value node. More... | |
void | val_set_wildcard_string (val_value_t *val) |
Set the value as a wildcard string. More... | |
status_t | val_copy_editvars (const val_value_t *val, val_value_t *copy) |
Copy the editvars struct contents into the value node. More... | |
status_t | val_set_skip_sil_partial (val_value_t *val) |
Set the skip_sil_partial flag for this value in an edit. More... | |
boolean | val_get_skip_sil_partial (const val_value_t *val) |
Get the skip_sil_partial flag. More... | |
typ_def_t * | val_get_leafref_typdef_ex (val_value_t *val, boolean union_check) |
Return a base typedef of type NCX_BT_LEAFREF. More... | |
boolean | val_is_default_npcon (val_value_t *val) |
Check if the value node is a default NP container. More... | |
status_t | val_identity_ok (typ_def_t *typdef, ncx_identity_t *ident) |
Check if an identity is OK for the specified object typedef. More... | |
status_t | val_highest_bit_set (const val_value_t *val, uint32 *count, uint32 *pos) |
Get the bit count highest bit set in a bits value. More... | |
status_t | val_first_bit_set (const val_value_t *val, const ncx_lmem_t **lmem, uint32 *pos) |
Get the first bit set in a bits value. More... | |
status_t | val_next_bit_set (const val_value_t *val, const ncx_lmem_t *lmem, const ncx_lmem_t **nextlmem, uint32 *pos) |
Get the next bit set in a bits value. More... | |
struct xpath_aio_cb_t_ * | val_get_aiocb (const val_value_t *val) |
Get the aiocb field if set; NULL if not set. More... | |
status_t | val_set_aiocb (val_value_t *val, struct xpath_aio_cb_t_ *aiocb) |
Set the aiocb field in the value node. More... | |
ncx_sm_mpid_t * | val_get_mpid (const val_value_t *val) |
Get the MPI. More... | |
status_t | val_set_mpid (val_value_t *val, struct ncx_sm_mpid_t_ *mpid) |
Set the MPID. More... | |
status_t | val_set_deleted_from_commit_deletes (val_value_t *val, boolean deleted) |
Set deleted from check_commit_deletes. More... | |
boolean | val_get_deleted_from_commit_deletes (const val_value_t *val) |
Set deleted from check_commit_deletes. More... | |
Core data access functions to create and use YANG data.
Some functions are used internally but most can be used by SIL and SIL-SA code. All functionality is the same on SIL and SIL-SA platforms.
#define val_is_wildcard_string | ( | V | ) | (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE) |
Check if the value is a wildcard string.
V | value to check |
void val_add_child | ( | val_value_t * | child, |
val_value_t * | parent | ||
) |
Add a child (deprecated): use val_child_add instead.
Add a child value node to a parent value node Simply makes a new last child!!! Does not check siblings!!! Relies on val_set_canonical_order
To modify existing extries, use val_add_child_sorted instead!!
child | node to store in the parent |
parent | complex value node with a childQ |
void val_add_child_sorted | ( | val_value_t * | child, |
val_value_t * | parent | ||
) |
Add a child value node to a parent value node in the proper place (deprecated: use val_child_add instead)
child | node to store in the parent |
parent | complex value node with a childQ |
status_t val_add_meta | ( | val_value_t * | metaval, |
val_value_t * | val | ||
) |
Add a meta value to a value node.
metaval | node to store in the parent |
val | complex value node with a metaQ |
status_t val_add_test_valindex | ( | val_value_t * | parentval, |
val_value_t * | keyval | ||
) |
Make a dummy val_index_t for the getcg acmtest.
parentval | parent to add the val_index |
keyval | keyval to use |
boolean val_all_np_containers | ( | val_value_t * | val | ) |
Check if the value tree is all NP containers and nothing else.
This is needed by yangcli to prune these edits from the config mode editing process
val | val_value_t data structure to check |
boolean val_all_whitespace | ( | const xmlChar * | str | ) |
Check if a string is all whitespace.
str | string to check |
boolean val_any_whitespace | ( | const xmlChar * | str, |
uint32 | len | ||
) |
Check if a string has any whitespace chars.
str | string to check |
len | length of str to check |
boolean val_ascendant_compare | ( | val_value_t * | val1, |
val_value_t * | val2 | ||
) |
Special compare function for edit compares.
YPW-1348: Add_Edit API problem in case of identical edit value names from different modules
Compare 2 val_value_t struct node contents 1) Check if the current node is the same (do not check children) 2) Check if all the parents nodes are the same
Does NOT check values, only nodes names and modules
val1 | test node value to compare |
val2 | test node value to compare |
status_t val_binary_ok_errinfo | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
val_value_t * | val, | ||
ncx_errinfo_t ** | errinfo | ||
) |
retrieve the YANG custom error info for binary val, if any
Check a binary string to make sure the value is valid base64 if the value came from raw RPC XML, and if its CLI input then do validation as for binary sting Retrieve the configured error info struct if any error
typdef | typ_def_t for the designated string type | |
strval | string value to check | |
val | data node that has the binary value | |
[out] | errinfo | address of return errinfo block (may be NULL)
|
Check a bit name is valid for the typedef.
typdef | typ_def_t for the designated bits type | |
bitname | bit name value to check | |
[out] | position | address of return bit struct position value
|
Check a bit position is valid for the typedef.
typdef | typ_def_t for the designated bits type | |
position | bit position value to check | |
[out] | name | address of return bit struct name value
|
void val_change_nsid | ( | val_value_t * | val, |
xmlns_id_t | nsid | ||
) |
Change the namespace ID for a value node and all its descendants.
val | value node to change |
nsid | new namespace ID to use |
void val_change_nsid2 | ( | val_value_t * | val, |
xmlns_id_t | nsid | ||
) |
Change the namespace ID for the descendant nodes of the value node.
val | value node to change |
nsid | new namespace ID to use |
void val_change_nsid3 | ( | val_value_t * | val, |
xmlns_id_t | nsid | ||
) |
Change the namespace ID for a value node only.
val | value node to change |
nsid | new namespace ID to use |
uint32 val_child_cnt | ( | val_value_t * | parent | ) |
Get the number of child nodes present.
get number of child nodes present – for choice checking
parent | parent complex type to check |
uint32 val_child_inst_cnt | ( | const val_value_t * | parent, |
const xmlChar * | modname, | ||
const xmlChar * | name | ||
) |
Get the corresponding child instance count by name get instance count – for instance qualifer checking.
parent | parent complex type to check |
modname | module name defining the child (may be NULL) |
name | child name to find and count |
void val_clean_index_chain | ( | val_value_t * | val | ) |
Clean out any indexQ entries.
[in,out] | val | list containing the indexQ to clean
|
void val_clean_tree | ( | val_value_t * | val | ) |
Clear the dirty flag and the operation for all nodes within a value struct.
[in,out] | val | value node to clean
|
void val_clean_valQ | ( | dlq_hdr_t * | valQ | ) |
Clean a queue of val_value_t.
Deque and free with val_free_value
valQ | que of val_value_t to clean and free |
void val_clean_value | ( | val_value_t * | val | ) |
Clean a static val_value_t struct.
val | value node to clean |
void val_clear_child_dirty_flag | ( | val_value_t * | val | ) |
Clear the dirty flag for all nodes within a value struct.
val | value node to clear |
void val_clear_defvalset_flag | ( | val_value_t * | val | ) |
Clear the defvalset flag so the server will re-check this node the next time the client does a get request.
val | pointer to the value node to set |
void val_clear_dirty_flag | ( | val_value_t * | val, |
time_t * | timestamp, | ||
ncx_transaction_id_t | txid, | ||
boolean | is_delete, | ||
boolean | do_clear_default | ||
) |
Clear the dirty flag for this value node.
val | value node to clear |
timestamp | new last-modified timestamp to set |
txid | transaction id for this edit |
is_delete | TRUE if the descendant nodes of the 'val' node should be skipped (delete or remove operation) FALSE to stamp the descendant nodes |
do_clear_default | TRUE to clear_default or FALSE to leave VAL_FL_DEFVAL untouched |
void val_clear_varexpr | ( | val_value_t * | val | ) |
Clear the varexpr field in the value node.
val | value to clear |
val_value_t * val_clone | ( | const val_value_t * | val | ) |
Clone a specified val_value_t struct and sub-trees.
val | value to clone |
val_value_t * val_clone2 | ( | const val_value_t * | val | ) |
Clone a specified val_value_t struct and sub-trees but not the editvars.
val | == value to clone |
val_value_t * val_clone_config_data | ( | const val_value_t * | val, |
status_t * | res | ||
) |
Clone a specified val_value_t struct and sub-trees with config=true only.
Filter with the val_is_config_data callback function pass in a config node, such as "<config>" root will call val_clone_test with the val_is_config_data callback function
val | config data value to clone | |
[out] | res | address of return status
|
val_value_t * val_clone_config_newval | ( | const val_value_t * | val, |
status_t * | res | ||
) |
Clone a specified val_value_t struct and sub-trees with config=true only.
Also remove any delete operation nodes.
Filter with the val_is_config_data callback function pass in a config node, such as "<config>" root will call val_clone_test with the val_is_config_data callback function
YPW-1806: incorporate patch from DZS
val | config data value to clone | |
[out] | res | address of return status
|
val_value_t * val_clone_config_newval_keys_only | ( | const val_value_t * | val, |
status_t * | res | ||
) |
Clone a specified val_value_t struct and sub-trees with config=true only.
Also remove any delete operation nodes.
Filter with the val_is_config_data callback function pass in a config node, such as <config> root will call val_clone_test with the val_is_config_data callback function
Copy only keys nodes if list If container do not copy any children
YPW-2162: Newval for EDIT2 callbacks is not consistent across candidate and running processing
val | config data value to clone |
res | address of return status |
*res | return status |
val_value_t * val_clone_config_save | ( | const val_value_t * | val, |
status_t * | res | ||
) |
Clone a specified val_value_t struct and sub-trees filter for config only for saving to NVRAM.
Filter with the val_is_config_data callback function pass in a config node, such as "<config>" root will call clone_test with the val_is_config_data callback function
DOES NOT CLONE THE EDITVARS!!!! DOES NOT CLONE THE DEFAULT NODES!!!!
val | config data value to clone | |
[out] | res | address of return status
|
status_t val_clone_valQ | ( | dlq_hdr_t * | valQ, |
dlq_hdr_t * | return_valQ | ||
) |
Clone all values in 1 valQ into the return_valQ.
valQ | source of val_value_t value queue to clone | |
[out] | return_valQ | destination valQ for clones
|
int32 val_compare | ( | const val_value_t * | val1, |
const val_value_t * | val2 | ||
) |
Compare 2 val_value_t struct value contents.
Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
Handle NCX_CL_COMPLEX by checking the index if needed and then checking all the child nodes recursively
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check |
val2 | second value to check |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_as_string | ( | const val_value_t * | val1, |
const val_value_t * | val2, | ||
status_t * | res | ||
) |
Compare 2 val_value_t structs Convert each value to a string and compare as strings Needed to compare a value if a UNION type is used.
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check | |
val2 | second value to check | |
[out] | res | address of return status
|
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_ex | ( | const val_value_t * | val1, |
const val_value_t * | val2, | ||
boolean | configonly | ||
) |
Compare 2 val_value_t struct value contents Check all or config only.
Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
Handle NCX_CL_COMPLEX by checking the index if needed and then checking all the child nodes recursively
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check |
val2 | second value to check |
configonly | TRUE to compare config=true nodes only FALSE to compare all nodes |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_for_edit | ( | const val_value_t * | val1, |
const val_value_t * | val2, | ||
boolean | ismerge | ||
) |
Compare 2 val_value_t struct value contents for the nc:operation=replace procedures.
Removed API, use val_compare() instead
Compare 2 val_value_t struct value contents from an editing POV; compare for merge or delete!
Check just the nodes present in val1 against val2
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check |
val2 | second value to check |
ismerge | TRUE for a merge operation; FALSE for delete operation |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_for_topreplace | ( | const val_value_t * | val1, |
const val_value_t * | val2 | ||
) |
Compare 2 val_value_t struct value contents.
Check just the nodes present in val1 against val2 Ignores nodes that are set to default in val2
defaults values in val1 can be absent, it will not affect comparison
!!! Always Skips over all default completely for both values
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check |
val2 | second value to check |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_for_topreplace_simple | ( | const val_value_t * | val1, |
const val_value_t * | val2 | ||
) |
Compare 2 val_value_t struct value contents.
Check just the nodes present in val1 against val2 Ignores nodes that are set to default in val2
defaults values in val1 can be absent, it will not affect comparison
!!!! NB: Simplified version, only checks the simple children, does NOT dive into complex children. (Used to identify if the current level node is dirty for agt_apply_this_node_ex() call)
!!! Always Skips over all default completely for both values
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to compare |
val2 | second value to compare |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_max | ( | const val_value_t * | val1, |
const val_value_t * | val2, | ||
boolean | configonly, | ||
boolean | childonly, | ||
boolean | editing | ||
) |
Compare 2 val_value_t struct value contents.
Check all or config only Check just child nodes or all descendant nodes Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
Handle NCX_CL_COMPLEX by checking the index if needed and then checking all the child nodes recursively
!!!! Skips over all default completely in val1 and val2 !!!! Does not skip over config false nodes in the vals !!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check |
val2 | second value to check |
configonly | TRUE to compare config=true nodes only FALSE to compare all nodes |
childonly | TRUE to look just 1 level for comparison FALSE to compare all descendant nodes of complex types |
editing | TRUE to compare for editing FALSE to compare just the values, so a set by default and value=default are the same value |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_max_def | ( | const val_value_t * | val1, |
const val_value_t * | val2, | ||
boolean | configonly, | ||
boolean | childonly, | ||
boolean | editing, | ||
boolean | ignore_defaults | ||
) |
Compare 2 val_value_t struct value contents.
Check all or config only Check just child nodes or all descendant nodes Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
Handle NCX_CL_COMPLEX by checking the index if needed and then checking all the child nodes recursively
!!!! Skips over all default completely if the ignore_defaults = TRUE !!!! Skips over config false nodes in the vals if configonly = TRUE !!!! Meta-value contents are ignored for this test
val1 | first value to check |
val2 | second value to check |
configonly | TRUE to compare config=true nodes only FALSE to compare all nodes |
childonly | TRUE to look just 1 level for comparison FALSE to compare all descendant nodes of complex types |
editing | TRUE to compare for editing FALSE to compare just the values, so a set by default and value=default are the same value |
ignore_defaults | TRUE to ignore defaults; expect defaults to be set in both nodes FALSE to compensate for defaults missing in val1; try to skip past missing default containers and leafs !!!! TBD: NOT USED FOR FALSE !!!! |
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_to_string | ( | const val_value_t * | val1, |
const xmlChar * | strval2, | ||
status_t * | res | ||
) |
Compare a val_value_t struct value contents to a string.
Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check | |
strval2 | second value to check | |
[out] | res | address of return status
|
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
int32 val_compare_to_string_len | ( | const val_value_t * | val1, |
const xmlChar * | strval2, | ||
uint32 | strval2len, | ||
status_t * | res | ||
) |
Compare a val_value_t struct value contents to a string Provide a max-length to compare.
Handles NCX_CL_BASE and NCX_CL_SIMPLE data classes by comparing the simple value.
!!!! Meta-value contents are ignored for this test !!!!
val1 | first value to check | |
strval2 | second value to check | |
strval2len | length of strval2 | |
[out] | res | address of return status
|
-1: val1 is less than val2 (if complex just different or error) 0: val1 is the same as val2 1: val1 is greater than val2
void val_convert_any_to_container | ( | val_value_t * | val | ) |
Convert the extern parameter to a container instead of extern.
The caller will add child nodes into this container of val_value_t representing the nodes found in the external file
val | pointer to the value node to convert |
val_value_t * val_convert_leafref | ( | const val_value_t * | val | ) |
Convert a value of type NCX_BT_LEAFREF to the value that the final leafref is pointing at.
val | value to convert; this must be an NCX_BT_LEAFREF |
status_t val_copy_editvars | ( | const val_value_t * | val, |
val_value_t * | copy | ||
) |
Copy the editvars struct contents into the value node.
val | value to copy from |
copy | value to copy to |
boolean val_create_allowed | ( | const val_value_t * | val | ) |
Check if the specified value is allowed to have a create edit-config operation attribute.
val | value to check |
status_t val_cvt_generic | ( | val_value_t * | val | ) |
Convert all the database object pointers to generic object pointers.
Needed to decouple a user variable in yangcli from the server-specific object definition (which goes away when the session is terminated)
!!! Need to assume the val->obj pointer is already !!! invalid. This can happen to yangcli when a !!! session is dropped and there are vars that !!! reference YANG objects from the session
val | val_value_t struct to convert to generic |
boolean val_delete_allowed | ( | const val_value_t * | val | ) |
Check if the specified value is allowed to have a delete edit-config operation attribute.
val | value to check |
void val_delete_children | ( | val_value_t * | val | ) |
Check if the value is a complex type and if so then delete all child nodes.
val | value node to clean |
status_t val_delete_default_leaf | ( | val_value_t * | val | ) |
Do the internal work to setup a delete of a default leaf.
val | val_value_t struct to use |
status_t val_delete_default_leaf_list | ( | val_value_t * | val | ) |
Do the internal work to convert a leaf-list to its YANG default value(s)
[in,out] | val | val_value_t struct to use
|
status_t val_delete_default_npcon | ( | val_value_t * | val | ) |
Do the internal work to convert an NP-container to its subtree of YANG default values.
val | val_value_t struct to use |
boolean val_dirty_subtree | ( | const val_value_t * | val | ) |
Check the dirty or subtree_dirty flag.
val | value node to check |
void val_dump_alt_value | ( | val_value_t * | val, |
int32 | startindent, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to the alternate logfile Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
void val_dump_value | ( | val_value_t * | val, |
int32 | startindent, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
void val_dump_value_config | ( | val_value_t * | val, |
int32 | startindent, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) CONFIG ONLY.
val | value to printf |
startindent | start indent char count |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
void val_dump_value_ex | ( | val_value_t * | val, |
int32 | startindent, | ||
ncx_display_mode_t | display_mode, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
display_mode | display mode to use |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
void val_dump_value_full | ( | val_value_t * | val, |
int32 | startindent, | ||
int32 | indent_amount, | ||
val_dumpvalue_mode_t | dumpmode, | ||
ncx_display_mode_t | display_mode, | ||
boolean | with_meta, | ||
boolean | configonly, | ||
boolean | conf_mode, | ||
boolean | expand_varexpr, | ||
log_debug_t | lvl, | ||
logfns_t * | overrideOutput | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
indent_amount | number of spaces for each indent |
dumpmode | logging mode to use |
display_mode | display mode enumeration to use |
with_meta | TRUE if metaQ should be printed FALSE to skip meta data |
configonly | TRUE if config only nodes should be displayed FALSE if all nodes should be displayed |
conf_mode | true if .conf file mode |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
overrideOutput | alternate functions to send to, use NULL normally |
void val_dump_value_full2 | ( | val_value_t * | val, |
int32 | startindent, | ||
int32 | indent_amount, | ||
val_dumpvalue_mode_t | dumpmode, | ||
ncx_display_mode_t | display_mode, | ||
boolean | with_meta, | ||
boolean | configonly, | ||
boolean | conf_mode, | ||
boolean | expand_varexpr, | ||
boolean | withdef, | ||
log_debug_t | lvl, | ||
logfns_t * | overrideOutput | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
indent_amount | number of spaces for each indent |
dumpmode | logging mode to use |
display_mode | display mode enumeration to use |
with_meta | TRUE if metaQ should be printed FALSE to skip meta data |
configonly | TRUE if config only nodes should be displayed FALSE if all nodes should be displayed |
conf_mode | true if .conf file mode |
expand_varexpr | TRUE if expanding variable expressions FALSE if not expanding variable expressions |
withdef | TRUE to generate leafy defaults; FALSE to skip |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
overrideOutput | alternate functions to send to, use NULL normally |
void val_dump_value_max | ( | val_value_t * | val, |
int32 | startindent, | ||
int32 | indent_amount, | ||
val_dumpvalue_mode_t | dumpmode, | ||
ncx_display_mode_t | display_mode, | ||
boolean | with_meta, | ||
boolean | configonly, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
indent_amount | number of spaces for each indent |
dumpmode | logging mode to use |
display_mode | display mode enumeration to use |
with_meta | TRUE if metaQ should be printed FALSE to skip meta data |
configonly | TRUE if config only nodes should be displayed FALSE if all nodes should be displayed |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
boolean val_duplicates_allowed | ( | val_value_t * | val | ) |
Determine if duplicates are allowed for the given val type The entire definition chain is checked to see if a 'no-duplicates'.
The default is config, so some sort of named type or parameter must be declared to create a non-config data element
Fishing order: 1) typdef chain 2) parm definition 3) parmset definition
val | value node to check |
status_t val_enum_ok | ( | typ_def_t * | typdef, |
const xmlChar * | enumval, | ||
int32 * | retval, | ||
const xmlChar ** | retstr | ||
) |
Check an enumerated integer string to make sure the value is valid based on the specified typdef.
typdef | typ_def_t for the designated enum type | |
enumval | enum string value to check | |
[out] | retval | pointer to return integer variable
|
[out] | retstr | pointer to return string name variable
|
status_t val_fast_replace_string | ( | const xmlChar * | str, |
uint32 | stringlen, | ||
val_value_t * | copy | ||
) |
Replace a specified val_value_t struct with a string type Reuse everything – just set the val->v.str field.
str | value to clone from; may be NULL | |
stringlen | number of chars to use from str, if not NULL | |
[out] | copy | address of value to replace str.v string value
|
boolean val_find_bit | ( | val_value_t * | val, |
const xmlChar * | bitname | ||
) |
Find the specified bit name in the NCX_BT_BITS value.
val | value node to check |
bitname | name of bit to find |
const xmlChar * val_find_bit_name | ( | val_value_t * | val, |
uint32 | bitpos | ||
) |
Find the specified bit name in the NCX_BT_BITS value.
val | value node to check |
bitpos | position value for the bit to find |
val_value_t * val_find_child | ( | const val_value_t * | parent, |
const xmlChar * | modname, | ||
const xmlChar * | childname | ||
) |
Find the first instance of the specified child node.
parent | parent complex type to check |
modname | module name; the first match in this module namespace will be returned NULL: the first match in any namespace will be returned; |
childname | name of child node to find |
val_value_t * val_find_child_fast | ( | const val_value_t * | parent, |
xmlns_id_t | nsid, | ||
const xmlChar * | childname | ||
) |
Find the first instance of the specified child node.
parent | parent complex type to check |
nsid | module namespace ID the first match in this module namespace will be returned == 0: the first match in any namespace will be returned; |
childname | name of child node to find |
val_value_t * val_find_child_obj | ( | const val_value_t * | parent, |
const struct obj_template_t_ * | chobj | ||
) |
Find the first instance of the specified child node Use the object template pointer to match the object.
parent | parent complex type to check |
chobj | child object type to check |
val_value_t * val_find_child_que | ( | const dlq_hdr_t * | childQ, |
xmlns_id_t | nsid, | ||
const xmlChar * | childname | ||
) |
Find the first instance of the specified child node in the specified child Q.
childQ | Q of val_value_t to search |
nsid | module namespace ID the first match in this module namespace will be returned == 0: the first match in any namespace will be returned; |
childname | name of child node to find |
const xmlChar * val_find_enum_name | ( | val_value_t * | val, |
int32 | enunum | ||
) |
Find the specified enum name for the value field that matches for NCX_BT_ENUM value.
val | value node to check |
enunum | 'value' value for the enum to find |
const xmlChar * val_find_enum_name2 | ( | ncx_btype_t | btyp, |
typ_def_t * | typdef, | ||
int32 | enunum | ||
) |
Find the specified enum name for the value field that matches for NCX_BT_ENUM value Do not use val_value value.
btyp | base type to use check |
typdef | default typdef for the specified base type |
enunum | 'value' value for the enum to find |
val_value_t * val_find_meta | ( | val_value_t * | val, |
xmlns_id_t | nsid, | ||
const xmlChar * | name | ||
) |
Get the corresponding meta data node.
val | value to check for metadata |
nsid | namespace ID of 'name'; 0 == don't use |
name | name of metadata variable name |
val_value_t * val_find_next_child | ( | const val_value_t * | parent, |
const xmlChar * | modname, | ||
const xmlChar * | childname, | ||
const val_value_t * | curchild | ||
) |
Find the next instance of the specified child node.
Use val_child_next_same instead of this function
parent | parent complex type to check |
modname | module name; the first match in this module namespace will be returned == NULL: the first match in any namespace will be returned; |
childname | name of child node to find |
curchild | current child of this object type to start search |
val_value_t * val_find_next_child_fast | ( | const val_value_t * | parent, |
const val_value_t * | curchild | ||
) |
Find the next instance of the specified child node.
Deprecated : Use val_child_next_same instead
Use the curchild->obj pointer to find next child of this type Assumes childQ is sorted and all instances of 'curchild' are already grouped together.
parent | parent complex type to check |
curchild | current child of this object type to start search |
val_value_t * val_find_root | ( | val_value_t * | val | ) |
Find the root value node or top-val if no ncx:root found.
val | node to check |
status_t val_first_bit_set | ( | const val_value_t * | val, |
const ncx_lmem_t ** | lmem, | ||
uint32 * | pos | ||
) |
Get the first bit set in a bits value.
Check if the node is a NCX_BT_BITS and if so get the first bit set. Used by cbor_wr to generate byte array
val | value node to check | |
[out] | lmem | address of return list member (for next only)
|
[out] | pos | address of return bit position
|
val_value_t * val_first_child_match | ( | const val_value_t * | parent, |
const val_value_t * | child | ||
) |
Get the first instance of the corresponding child node.
parent | parent value to check |
child | child value to find (e.g., from a NETCONF PDU) |
val_value_t * val_first_child_match_fast | ( | const val_value_t * | parent, |
const val_value_t * | child, | ||
val_value_t * | lastmatch | ||
) |
Get the first instance of the corresponding child node Object pointers must be from the same tree!!!
parent | parent value to check |
child | child value to find (e.g., from a NETCONF PDU) |
lastmatch | last child to start search from; (may be NULL) |
val_value_t * val_first_child_name | ( | val_value_t * | parent, |
const xmlChar * | name | ||
) |
Get the first corresponding child node instance, by name find first – really for resolve index function.
parent | parent complex type to check |
name | child name to find |
val_value_t * val_first_child_qname | ( | val_value_t * | parent, |
xmlns_id_t | nsid, | ||
const xmlChar * | name | ||
) |
Get the first corresponding child node instance, by QName.
parent | parent complex type to check |
nsid | namespace ID to use, 0 for any |
name | child name to find |
val_value_t * val_first_child_string | ( | val_value_t * | parent, |
const xmlChar * | name, | ||
const xmlChar * | strval | ||
) |
find first name value pair
Get the first corresponding child node instance, by name and by string value. Child node must be a base type of
NCX_BT_STRING NCX_BT_INSTANCE_ID NCX_BT_LEAFREF
parent | parent complex type to check |
name | child name to find |
strval | string value to find |
boolean val_fit_oneline | ( | const val_value_t * | val, |
uint32 | linesize, | ||
boolean | isxml | ||
) |
Check if the XML encoding for the specified val_value_t should take one line or more than one line.
Simple types should not use more than one line or introduce any extra whitespace in any simple content element
!!!The calculation includes the XML start and end tags!!!
totalsize: <foo:node>value</foo:node> == 26
val | value to check |
linesize | length of line to check against |
isxml | TRUE to account for XML start and end tags FALSE to account for config file formatting |
void val_force_default | ( | val_value_t * | val | ) |
Set a node created by the server as a default node.
val | value node to change |
status_t val_force_dname | ( | val_value_t * | val | ) |
Set (or reset) the name of a value struct.
Set all descendant nodes as well
Force dname to be used, not object name backptr
val | val_value_t data structure to change |
void val_force_empty | ( | val_value_t * | val | ) |
Convert a simple node to an empty type.
val | val_value_t struct to use |
void val_free_editvars | ( | val_value_t * | val | ) |
Free the editing variables for the value node.
[in,out] | val | val_value_t data structure to use
|
void val_free_solo_editvars | ( | val_editvars_t * | editvars | ) |
Free the editing variables removed from a val_value_t.
editvars | edit var struct to clean and free |
void val_free_value | ( | val_value_t * | val | ) |
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct itself.
The struct must be removed from any queue it is in before this function is called.
val | val_value_t to delete |
struct xpath_aio_cb_t_ * val_get_aiocb | ( | const val_value_t * | val | ) |
Get the aiocb field if set; NULL if not set.
val | value to check |
boolean val_get_child_deleted_flag | ( | val_value_t * | val | ) |
Get the child_deleted flag for this value node.
val | value node to check |
uint32 val_get_child_inst_id | ( | const val_value_t * | parent, |
const val_value_t * | child | ||
) |
Get the instance ID for this child node within the parent context.
parent | parent complex type to check |
child | child node to find ID for |
boolean val_get_deleted_from_commit_deletes | ( | const val_value_t * | val | ) |
Set deleted from check_commit_deletes.
Get the flag that the value is deleted from check_commit_deletes or not
INTERNAL API
val | value to check |
boolean val_get_dirty_flag | ( | const val_value_t * | val | ) |
Get the dirty flag for this value node.
val | value node to check |
const xmlChar * val_get_dname | ( | const val_value_t * | val | ) |
Get the dname field if set; NULL if not set.
val | value to check |
val_value_t * val_get_first_child | ( | const val_value_t * | parent | ) |
Get the first child node.
parent | parent complex type to check |
val_index_t * val_get_first_index | ( | const val_value_t * | val | ) |
Get the first index entry, if any for this value node.
val | value node to check |
val_index_t * val_get_first_key | ( | val_value_t * | val | ) |
Get the first key record if this is a list with a key-stmt.
val | value node to check |
val_value_t * val_get_first_leaf | ( | val_value_t * | val | ) |
Get the first leaf or leaflist node in the specified value tree.
val | value node to check |
val_value_t * val_get_first_meta | ( | dlq_hdr_t * | queue | ) |
Get the first metaQ entry from the specified Queue.
queue | == queue of val_value_t meta-vals to check |
val_value_t * val_get_first_meta_val | ( | val_value_t * | val | ) |
Get the first metaQ entry from the specified Queue.
val | value node to get the metaQ from |
val_value_t * val_get_first_terminal_child | ( | const val_value_t * | parent | ) |
Get the child node only if obj_is_terminal(val->obj) is true.
parent | parent complex type to check |
int val_get_icookie | ( | val_value_t * | val | ) |
Get the SIL integer cookie in the editvars for the specified value node.
val | val_value_t struct to set |
uint32 val_get_index_count | ( | const val_value_t * | val | ) |
Get the number of index nodes in this val.
val | value node to check |
ncx_iqual_t val_get_iqualval | ( | const val_value_t * | val | ) |
Get the effective instance qualifier value for this value.
val | value construct to check |
val_index_t * val_get_last_key | ( | val_value_t * | val | ) |
Get the last key record if this is a list with a key-stmt.
val | value node to check |
time_t * val_get_last_modified | ( | val_value_t * | val | ) |
Get the last_modified field.
val | val_value_t data structure to use |
typ_def_t * val_get_leafref_typdef | ( | val_value_t * | val | ) |
Return a base typedef of type NCX_BT_LEAFREF.
The value that the final leafref is pointing at.
val | value to use; this must be an NCX_BT_LEAFREF |
typ_def_t * val_get_leafref_typdef_ex | ( | val_value_t * | val, |
boolean | union_check | ||
) |
Return a base typedef of type NCX_BT_LEAFREF.
The value that the final leafref is pointing at if UNION then return a real typdef of that union that matches the VAL.
val | value to use; this must be an NCX_BT_LEAFREF |
union_check | TRUE if check if the leafref is union and return a real typdef not the union |
dlq_hdr_t * val_get_metaQ | ( | val_value_t * | val | ) |
Get the meta Q header for the value.
val | value node to check |
const xmlChar * val_get_mod_name | ( | const val_value_t * | val | ) |
Get the module name associated with this value node.
val | value node to check |
const xmlChar * val_get_mod_prefix | ( | const val_value_t * | val | ) |
Get the module prefix associated with this value node.
val | value node to check |
ncx_sm_mpid_t * val_get_mpid | ( | const val_value_t * | val | ) |
Get the MPI.
Get the back-ptr to the Moint Point ID struct
val | value to check |
uint32 val_get_nest_level | ( | val_value_t * | val | ) |
Get the next level of the value.
val | value node to check |
val_value_t * val_get_next_child | ( | const val_value_t * | curchild | ) |
Get the next child node.
curchild | current child node |
val_index_t * val_get_next_index | ( | const val_index_t * | valindex | ) |
Get the next index entry, if any for this value node.
valindex | current value index struct to check |
val_index_t * val_get_next_key | ( | val_index_t * | curkey | ) |
Get the next key record if this is a list with a key-stmt.
curkey | current key node |
val_value_t * val_get_next_meta | ( | val_value_t * | curnode | ) |
Get the next metaQ entry from the specified entry.
curnode | current meta-var node |
val_value_t * val_get_next_terminal_child | ( | const val_value_t * | curchild | ) |
Get the next child node only if obj_is_terminal(val->obj) is true.
curchild | current child node |
xmlns_id_t val_get_nsid | ( | const val_value_t * | val | ) |
Get the namespace ID for the specified value node.
val | value node to check |
const xmlChar * val_get_owner | ( | val_value_t * | val | ) |
Get the owner string for the specified value node.
val | value node to check |
ncx_owner_id_t val_get_owner_id | ( | val_value_t * | val | ) |
Get the owner ID for the specified value node.
val | value node to check |
xmlns_id_t val_get_parent_nsid | ( | const val_value_t * | val | ) |
Try to get the parent namespace ID.
val | == value to check |
void * val_get_pcookie | ( | val_value_t * | val | ) |
Get the SIL pointer cookie in the editvars for the specified value node.
val | val_value_t struct to set |
val_index_t * val_get_prev_key | ( | val_index_t * | curkey | ) |
Get the previous key record if this is a list with a key-stmt.
curkey | == current key node |
uint8 val_get_sil_priority | ( | val_value_t * | val | ) |
Get the secondary SIL priority; zero if not found.
val | value to check |
boolean val_get_skip_sil_partial | ( | const val_value_t * | val | ) |
Get the skip_sil_partial flag.
val | value to check |
boolean val_get_subtree_dirty_flag | ( | const val_value_t * | val | ) |
Get the subtree dirty flag for this value node.
val | value node to check |
const typ_def_t * val_get_typdef | ( | const val_value_t * | val | ) |
Get the typdef field for a value struct.
val | val_value_t struct to use |
const xmlChar * val_get_varexpr | ( | const val_value_t * | val | ) |
Get the varexpr field if set; NULL if not set.
val | value to check |
val_value_t * val_get_virtual_value | ( | ses_cb_t * | scb, |
val_value_t * | val, | ||
status_t * | res | ||
) |
Get the value of a virtual value node.
The top-level value is provided by the caller and must be malloced with val_new_value before calling this function
must free the return val; not cached
If the val->getcb is NULL, then an error will be returned
Caller should check for *res == ERR_NCX_SKIPPED This will be returned if virtual value has no instance at this time.
!!! DO NOT SAVE THE RETURN VALUE LONGER THAN THE !!! VIRTUAL VALUE CACHE TIMEOUT VALUE
scb | session CB ptr cast as void * that is getting the virtual value | |
[in,out] | val | virtual value to get value for
|
[out] | res | pointer to output function return status value
|
ncx_sid_t val_get_yang_sid | ( | const val_value_t * | val | ) |
Get the YANG SID for the specified value node.
val | value node to check |
const xmlChar * val_get_yang_typename | ( | val_value_t * | val | ) |
Get the YANG type name for this value node if there is one.
val | pointer to the value node to check |
boolean val_has_children | ( | const val_value_t * | val | ) |
Determine if there are any child nodes for this val.
val | value node to check |
boolean val_has_complex_child | ( | const val_value_t * | val | ) |
Check if the value has complex children nodes.
val | value to check; |
boolean val_has_conditional_value | ( | val_value_t * | val | ) |
Check if the value is conditional.
YANG 1.1:: Check the value that must be properly set to see if it is conditional on any if-feature-stmts
val | value to check |
boolean val_has_content | ( | const val_value_t * | val | ) |
Determine if there is a value or any child nodes for this val.
val | value node to check |
boolean val_has_content_ex | ( | const val_value_t * | val | ) |
Determine if there is a value or any child nodes for this val.
Also checks if the complex nodes have any GET2 children
val | value node to check |
boolean val_has_dquotes | ( | const xmlChar * | str | ) |
Check if a string has any double-quotes in it.
str | string to check |
boolean val_has_index | ( | const val_value_t * | val | ) |
Determine if this value has an index.
val | value node to check |
boolean val_has_withdef_default | ( | const val_value_t * | val | ) |
Check if the value contained the wd:default attribute.
val | val_value_t struct to check |
status_t val_highest_bit_set | ( | const val_value_t * | val, |
uint32 * | count, | ||
uint32 * | pos | ||
) |
Get the bit count highest bit set in a bits value.
Check if the node is a NCX_BT_BITS and if so get the highest bit set. Used by cbor_wr to determine which encoding form for bits data type is needed.
val | value node to check | |
[out] | count | address of return bit count
|
[out] | pos | address of return bit position
|
status_t val_identity_ok | ( | typ_def_t * | typdef, |
ncx_identity_t * | ident | ||
) |
Check if an identity is OK for the specified object typedef.
typdef | typedef for the designated identityref type |
ident | identity to check |
boolean val_idref_derived_from | ( | ncx_module_t * | impmod, |
val_value_t * | testval, | ||
const xmlChar * | qname, | ||
boolean | or_self | ||
) |
Check the specified valnode is derived from the specified identity.
impmod | module to use for prefix-to-import matching |
testval | value node to test |
qname | identity string to check |
or_self | TRUE if SELF OK; FALSE if NORMAL MODE |
status_t val_idref_ok | ( | typ_def_t * | typdef, |
const xmlChar * | qname, | ||
xmlns_id_t | nsid, | ||
const xmlChar ** | name, | ||
ncx_identity_t ** | id | ||
) |
Check if an identityref QName is valid for the typedef.
The QName must match an identity that has the same base as specified in the typdef
typdef | typ_def_t for the designated identityref type | |
qname | QName or local-name string to check | |
nsid | namespace ID from XML node for NS of QName this NSID will be used and not the prefix in qname it was parsed in the XML node and is not a module prefix | |
[out] | name | address of return local name part of QName
|
[out] | id | address of return identity, if found
|
status_t val_idref_ok_ex | ( | typ_def_t * | typdef, |
const xmlChar * | qname, | ||
xmlns_id_t | nsid, | ||
boolean | is_json, | ||
ncx_module_t * | impmod, | ||
boolean | or_self, | ||
const xmlChar ** | name, | ||
ncx_identity_t ** | id | ||
) |
Check if an identityref QName is valid for the typedef.
The QName must match an identity that has the same base as specified in the typdef
typdef | typ_def_t for the designated identityref type | |
qname | QName or local-name string to check | |
nsid | namespace ID from XML node for NS of QName this NSID will be used and not the prefix in qname it was parsed in the XML node and is not a module prefix | |
is_json | TRUE if YANG JSON encoded string (modname:name) FALSE if YANG prefixes expected (modprefix:name) | |
impmod | module to use to find prefix-to-import mappings this will be used if for prefixes in qname NULL if not used | |
or_self | TRUE if SELF OK; FALSE if NORMAL MODE | |
[out] | name | address of return local name part of QName
|
[out] | id | address of return identity, if found
|
int val_index_compare | ( | const val_value_t * | val1, |
const val_value_t * | val2 | ||
) |
Check 2 val_value structs for the same instance ID.
The node data types must match, and must be NCX_BT_LIST
val1 | first value to index match |
val2 | second value to index match |
boolean val_index_match | ( | const val_value_t * | val1, |
const val_value_t * | val2 | ||
) |
Check 2 val_value structs for the same instance ID.
The node data types must match, and must be NCX_BT_LIST
All index components must exactly match.
val1 | first value to index match |
val2 | second value to index match |
void val_init_complex | ( | val_value_t * | val, |
ncx_btype_t | btyp | ||
) |
Initialize the fields in a complex val_value_t this is deprecated and should only be called by val_init_from_template.
MUST CALL val_new_value FIRST
val | pointer to the malloced struct to initialize |
btyp | base type for this value; expect NCX_BT_CONTAINER or NCX_BT_LIST |
void val_init_from_template | ( | val_value_t * | val, |
struct obj_template_t_ * | obj | ||
) |
Initialize a value node from its object template.
This is the normal init function to call MUST CALL val_new_value FIRST
val | pointer to the initialized value struct to bind |
obj | object template to use |
void val_init_value | ( | val_value_t * | val | ) |
Initialize the generic fields in a val_value_t so it is ready for use.
MUST BE USED with val_value_t structs inside other malloced data
val | value struct to initialize |
void val_init_virtual | ( | val_value_t * | val, |
void * | cbfn, | ||
struct obj_template_t_ * | obj | ||
) |
Special function to initialize a virtual value node.
MUST CALL val_new_value FIRST
val | pointer to the malloced struct to initialize |
cbfn | GET1 callback function to use cast as void * |
obj | object template to use |
void val_insert_child | ( | val_value_t * | child, |
val_value_t * | current, | ||
val_value_t * | parent | ||
) |
Insert a child value node to a parent value node.
child | node to store in the parent |
current | current node to insert after; NULL to make new first entry |
parent | complex value node with a childQ |
uint32 val_instance_count | ( | val_value_t * | val, |
const xmlChar * | modname, | ||
const xmlChar * | objname | ||
) |
Count the number of instances of the specified object name in the parent value struct.
This only checks the first level under the parent, not the entire subtree
val | value to check |
modname | name of module which defines the object to count NULL (do not check module names) |
objname | name of object to count |
uint32 val_instance_count_fast | ( | val_value_t * | val, |
xmlns_id_t | nsid, | ||
const xmlChar * | objname, | ||
val_value_t ** | firstval | ||
) |
Count the number of instances of the specified object name in the parent value struct.
This only checks the first level under the parent, not the entire subtree
Try to use val_child_count instead of this function
val | value to check | |
nsid | module namespace or zero to skip | |
objname | name of object to count | |
[out] | firstval | pointer to return first found instance
|
uint32 val_instance_count_fast2 | ( | val_value_t * | val, |
val_value_t * | startval | ||
) |
Count the number of instances of the specified object name in the parent value struct.
This only checks the first level under the parent, not the entire subtree Starts with the startval passed in
Try to use val_child_count instead of this function
val | value to check |
startval | first found instance |
boolean val_is_config_data | ( | const val_value_t * | val | ) |
Check if the specified value is a config DB object instance.
val | value to check |
boolean val_is_config_save | ( | const val_value_t * | val | ) |
Check if the specified value is a config DB object instance Check for config-save mode.
val | value to check |
boolean val_is_default | ( | val_value_t * | val | ) |
Check if the specified value is set to the YANG default value.
This is not the same as val_set_by_default. Use that function instead to avoid differences between trim, explicit, and report-all default-style settings
[in,out] | val | value to check
|
boolean val_is_default_npcon | ( | val_value_t * | val | ) |
Check if the value node is a default NP container.
NP container is empty or has only default child nodes
val | value to check |
boolean val_is_metaval | ( | const val_value_t * | val | ) |
Check if the value is a meta-val (XML attribute)
val | val_value_t struct to check |
boolean val_is_real | ( | const val_value_t * | val | ) |
Check if the specified value is a real value.
return TRUE if not virtual or NCX_BT_EXTERN or NCX_BT_INTERN)
val | value to check |
boolean val_is_value_set | ( | val_value_t * | val | ) |
Check if a value has been set by a client It has to be initialized and not set by default to return true.
val | value to check |
boolean val_is_virtual | ( | const val_value_t * | val | ) |
Check if the specified value is a virtual value such that a 'get' callback function is required to access the real value contents.
val | value to check |
status_t val_list_ok | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
ncx_list_t * | list | ||
) |
Check a list to make sure the all the strings are valid based on the specified typdef.
validate all the ncx_lmem_t entries in the list against the specified typdef. Mark any errors in the ncx_lmem_t flags field of each member in the list with an error
typdef | typ_def_t for the designated list type | |
btyp | base type (NCX_BT_SLIST or NCX_BT_BITS) | |
[in,out] | list | list struct with ncx_lmem_t structs to check
|
NCX_FL_RANGE_ERR: size out of range NCX_FL_VALUE_ERR value not permitted by value set, or pattern
status_t val_list_ok_errinfo | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
ncx_list_t * | list, | ||
ncx_errinfo_t ** | errinfo | ||
) |
Check a list to make sure the all the strings are valid based on the specified typdef.
typdef | typ_def_t for the designated list type | |
btyp | base type (NCX_BT_SLIST or NCX_BT_BITS) | |
[in,out] | list | list struct with ncx_lmem_t structs to check
|
[out] | errinfo | address of return rpc-error info struct
|
NCX_FL_RANGE_ERR: size out of range NCX_FL_VALUE_ERR value not permitted by value set, or pattern
uint32 val_liststr_count | ( | const val_value_t * | val | ) |
Get the number of strings in the list type.
val | value to check |
val_value_t * val_make_binary | ( | xmlns_id_t | nsid, |
const xmlChar * | valname, | ||
const xmlChar * | valstr, | ||
uint32 | valstrlen | ||
) |
Malloc and set a val_value_t as a NCX_BT_BINARY type Uses the generic binary object from ncx_get_gen_binary.
nsid | namespace ID to use |
valname | name of simple value |
valstr | simple value encoded as a binary buffer |
valstrlen | length of valstr (not zero-terminated) |
val_value_t * val_make_from_insertxpcb | ( | val_value_t * | sourceval, |
status_t * | res | ||
) |
Make a val_value_t for a list, with the child nodes for key leafs, specified in the key attribute string given to the insert operation.
sourceval | list val_value_t from the PDU with the insertxpcb to process | |
[out] | res | address of return status (may be NULL, ignored)
|
val_value_t * val_make_simval | ( | typ_def_t * | typdef, |
xmlns_id_t | nsid, | ||
const xmlChar * | valname, | ||
const xmlChar * | valstr, | ||
status_t * | res | ||
) |
Create and set a val_value_t as a simple type same as val_set_simval, but malloc the value first.
typdef | typdef of expected type | |
nsid | namespace ID of this field | |
valname | name of simple value | |
valstr | simple value encoded as a string | |
[out] | res | address of return status
|
xmlChar * val_make_sprintf_string | ( | const val_value_t * | val | ) |
Malloc a buffer and then sprintf the xmlChar string NETCONF representation of a simple value.
SIL code should use this function to generate the val_value_t simple value into a buffer for external use
val | value to print |
val_value_t * val_make_string | ( | xmlns_id_t | nsid, |
const xmlChar * | valname, | ||
const xmlChar * | valstr | ||
) |
Malloc and set a val_value_t as a generic NCX_BT_STRING namespace set to 0 !!!
This function uses the generic string object in ncx.c! Do not use for SIL code! Use val_make_simval_obj in val_util.h instead!
nsid | namespace ID to use |
valname | name of simple value |
valstr | simple value encoded as a string |
void val_mark_deleted | ( | val_value_t * | val | ) |
mark the value node as deleted May have to really delete from val_tree
val | value node to mark deleted |
void val_mark_undeleted | ( | val_value_t * | val | ) |
mark the value node as un-deleted
May have to really delete from val_tree
val | value node to mark un-deleted |
val_value_t * val_match_child | ( | const val_value_t * | parent, |
const xmlChar * | modname, | ||
const xmlChar * | childname | ||
) |
Match the first instance of the specified child node.
parent | parent complex type to check |
modname | module name; the first match in this module namespace will be returned == NULL: the first match in any namespace will be returned; |
childname | name of child node to find |
val_value_t * val_match_child_count | ( | const val_value_t * | parent, |
const xmlChar * | modname, | ||
const xmlChar * | childname, | ||
uint32 * | matchcount | ||
) |
Match the first instance of the specified child node Return the total number of matches.
parent | parent complex type to check | |
modname | module name; the first match in this module namespace will be returned == NULL: the first match in any namespace will be returned; | |
childname | name of child node to find | |
[out] | matchcount | address of return match count
|
boolean val_match_metaval | ( | const xml_attr_t * | attr, |
xmlns_id_t | nsid, | ||
const xmlChar * | name | ||
) |
Match the specific attribute value and namespace ID.
attr | attr to check |
nsid | mamespace ID to match against |
name | attribute name to match against |
status_t val_merge | ( | const val_value_t * | src, |
val_value_t * | dest | ||
) |
Merge src val into dest val (! MUST be same type !) Any meta vars in src are also merged into dest.
This function is not used to merge complex objects !!! For typ_is_simple() only !!!
src | val to merge from |
dest | val to merge into |
boolean val_meta_empty | ( | val_value_t * | val | ) |
Check if the metaQ is empty for the value node.
val | value to check |
boolean val_meta_match | ( | val_value_t * | val, |
val_value_t * | metaval | ||
) |
Return true if the corresponding attribute exists and has the same value.
val | value to check for metadata |
metaval | value to match in the val->metaQ |
uint32 val_metadata_inst_count | ( | val_value_t * | val, |
xmlns_id_t | nsid, | ||
const xmlChar * | name | ||
) |
Get the number of instances of the specified attribute.
val | value to check for metadata instance count |
nsid | namespace ID of the meta data variable |
name | name of the meta data variable |
void val_move_children | ( | val_value_t * | srcval, |
val_value_t * | destval | ||
) |
Move all the child nodes from src to dest Source and dest must both be containers!
srcval | source val_value_t struct to move |
destval | destination value struct ot use |
void val_move_fields_for_xml | ( | val_value_t * | srcval, |
val_value_t * | destval, | ||
boolean | movemeta | ||
) |
Move or copy the internal fields from one val to another for xml_wr purposes.
srcval | source val_value_t struct to move from |
destval | destination val to move to |
movemeta | TRUE if metaQ should be transferred |
void val_move_metadata | ( | val_value_t * | srcval, |
val_value_t * | destval | ||
) |
Move the attribute fields from one val to another for xml_wr purposes.
srcval | source val_value_t struct to move from |
destval | destination val to move to |
void val_move_nonconfig_children | ( | val_value_t * | srcval, |
val_value_t * | destval | ||
) |
Move all the config=false child nodes from src to dest Source and dest must both be containers!
srcval | source val_value_t struct to move |
destval | destination value struct ot use |
boolean val_need_dquotes | ( | const xmlChar * | str | ) |
Check if a string needs to be double-quoted to be output within a conf file or ncxcli stdout output.
str | string to check |
boolean val_need_owner_string | ( | val_value_t * | val | ) |
Check if the owner string is needed when generating ywx:owner attrs.
val | value node to check |
boolean val_need_quotes | ( | const xmlChar * | str | ) |
Check if a string needs to be single-quoted to be output within a conf file or ncxcli stdout output.
str | string to check |
val_value_t * val_new_deleted_value | ( | void | ) |
Malloc and initialize the fields in a val_value_t to be used as a deleted node marker.
status_t val_new_editvars | ( | val_value_t * | val | ) |
Malloc and initialize the val->editvars field.
[in,out] | val | val_value_t data structure to use
|
status_t val_new_extra | ( | val_value_t * | val | ) |
Create the val_extra struct if it does not exist.
[in,out] | val | value to change
|
val_value_t * val_new_value | ( | void | ) |
Malloc and initialize the fields in a val_value_t.
status_t val_next_bit_set | ( | const val_value_t * | val, |
const ncx_lmem_t * | lmem, | ||
const ncx_lmem_t ** | nextlmem, | ||
uint32 * | pos | ||
) |
Get the next bit set in a bits value.
Check if the node is a NCX_BT_BITS and if so get the first bit set. Used by cbor_wr to generate byte array
val | value node to check | |
lmem | current entry to get next of | |
[out] | nextlmem | address of return next entry
|
[out] | pos | address of return bit position
|
val_value_t * val_next_child_match | ( | val_value_t * | parent, |
val_value_t * | child, | ||
val_value_t * | curmatch | ||
) |
Get the next instance of the corresponding child node.
Match the keys from curchild to siblings of child if they are keys; match same value if they are leaf-lists.
parent | parent value to check |
child | child value to find (e.g., from a NETCONF PDU) |
curmatch | current child of parent that matched |
val_value_t * val_next_child_qname | ( | val_value_t * | parent, |
xmlns_id_t | nsid, | ||
const xmlChar * | name, | ||
val_value_t * | curchild | ||
) |
Get the next corresponding child node instance, by QName.
parent | parent complex type to check |
nsid | namespace ID to use, 0 for any |
name | child name to find |
curchild | current child match to start from |
val_value_t * val_next_child_same | ( | val_value_t * | curchild | ) |
Get the next instance of the corresponding child node.
curchild | child type to find next instance of |
boolean val_ocpattern_match | ( | const regex_t * | ocpattern, |
const xmlChar * | strval | ||
) |
Check the specified string against the specified pattern Use POSIX format for openconfig pattern.
ocpattern | compiled pattern to use |
strval | string to check |
status_t val_parse_idref | ( | ncx_module_t * | mod, |
const xmlChar * | qname, | ||
xmlns_id_t * | nsid, | ||
const xmlChar ** | name, | ||
ncx_identity_t ** | id | ||
) |
Parse a CLI BASED identityref QName into its various parts.
mod | module containing the default-stmt (or NULL if N/A) | |
qname | QName or local-name string to parse | |
[out] | nsid | address of return namespace ID of the module indicated by the prefix.
|
[out] | name | address of return local name part of QName
|
[out] | id | address of return identity, if found
|
status_t val_parse_idref_rootcb | ( | ncx_module_t * | mod, |
const xmlChar * | qname, | ||
xmlns_id_t * | nsid, | ||
const xmlChar ** | name, | ||
ncx_identity_t ** | id, | ||
ncx_sm_rootcb_t * | rootcb | ||
) |
Parse a CLI BASED identityref QName into its various parts.
mod | module containing the default-stmt (or NULL if N/A) | |
qname | QName or local-name string to parse | |
[out] | nsid | address of return namespace ID of the module indicated by the prefix.
|
[out] | name | address of return local name part of QName
|
[out] | id | address of return identity, if found
|
rootcb | SM root control block if getting mounted module |
status_t val_parse_meta | ( | ses_cb_t * | scb, |
typ_def_t * | typdef, | ||
xml_attr_t * | attr, | ||
val_value_t * | retval | ||
) |
Parse the metadata descriptor against the typdef Check only that the value is ok, not instance count.
scb | session control block or NULL if none | |
typdef | typdef to check | |
attr | XML attribute to check | |
[in,out] | retval | initialized val_value_t to fill in
|
boolean val_pattern_match | ( | const xmlRegexpPtr | pattern, |
const xmlChar * | strval | ||
) |
Check the specified string against the specified pattern.
pattern | compiled pattern to use |
strval | string to check |
Check a string against all the patterns in a big AND expression.
typdef | typ_def_t for the designated enum type |
strval | string value to check |
status_t val_pattern_ok_errinfo | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
ncx_errinfo_t ** | errinfo | ||
) |
Check a string against all the patterns in a big AND expression Get errinfo if any.
typdef | typ_def_t for the designated enum type | |
strval | string value to check | |
[out] | errinfo | address of return errinfo struct for err-pattern
|
status_t val_quote_encode_string | ( | const xmlChar * | str, |
xmlChar | quot_char, | ||
xmlChar * | buff, | ||
uint32 * | retlen | ||
) |
Fill in a buffer with the quote-encoded string Check for the quote char and escape it.
str | string to quote encode | |
quot_char | quote char to check for; expect " or ' | |
[out] | buff | buffer to use or NULL to juect get length |
[out] | retlen | length of the quote-encoded string without terminating zero |
status_t val_range_ok | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
const ncx_num_t * | num | ||
) |
Check a number to see if it is in range or not Could be a number or size range.
typdef | typ_def_t for the simple type to check |
btyp | base type of num |
num | number to check |
status_t val_range_ok_errinfo | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
const ncx_num_t * | num, | ||
ncx_errinfo_t ** | errinfo | ||
) |
Check a number to see if it is in range or not; get errinfo Could be a number or size range.
typdef | typ_def_t for the simple type to check | |
btyp | base type of num | |
num | number to check | |
[out] | errinfo | address of return error struct
|
void val_reinit_from_template | ( | val_value_t * | val, |
struct obj_template_t_ * | obj | ||
) |
Re-Initialize a value node from its object template.
MUST CALL val_new_value FIRST
MUST CALL val_init_foo first
val | pointer to the initialized value struct to bind |
obj | object template to use |
void val_remove_child | ( | val_value_t * | child | ) |
Remove a child value node from its parent value node.
child | node to store in the parent |
void val_remove_key | ( | val_value_t * | keyval | ) |
Remove a key pointer because the key is invalid Free the key pointer.
keyval | value node to find, remove and free |
status_t val_replace | ( | val_value_t * | val, |
val_value_t * | copy | ||
) |
Replace a specified val_value_t struct and sub-trees.
!!! this can be destructive to the source 'val' parameter !!!!
val | value to clone from | |
[out] | copy | address of value to replace
|
status_t val_replace_str | ( | const xmlChar * | str, |
uint32 | stringlen, | ||
val_value_t * | copy | ||
) |
Replace a specified val_value_t struct with a string type.
str | value to clone from; may be NULL | |
stringlen | number of chars to use from str, if not NULL | |
[out] | copy | address of value to replace
|
void val_replace_stringval | ( | val_value_t * | val, |
const xmlChar * | str | ||
) |
Replace the string value, not the entire value.
val | value to change |
str | the string to use to replace the current string |
status_t val_reset_empty | ( | val_value_t * | val | ) |
Recast an already initialized value as an NCX_BT_EMPTY clean a value and set it to empty type used by yangcli to delete leafs.
[in,out] | val | value to set
|
status_t val_resolve_scoped_name | ( | val_value_t * | val, |
const xmlChar * | name, | ||
val_value_t ** | chval | ||
) |
Find the scoped identifier in the specified complex value.
E.g.: foo.bar.baz
val | complex type to check | |
name | scoped name string of a nested node to find | |
[out] | chval | address of return child val
|
status_t val_set_aiocb | ( | val_value_t * | val, |
struct xpath_aio_cb_t_ * | aiocb | ||
) |
Set the aiocb field in the value node.
val | value to set |
aiocb | backptr to set |
void val_set_all_tags | ( | val_value_t * | val, |
time_t * | timestamp, | ||
ncx_transaction_id_t | txid | ||
) |
Set the etag and last_modified field for the node and all config sub-children.
val | value node to set |
timestamp | new last-modified timestamp to set |
txid | transaction id for this edit |
status_t val_set_binary | ( | const xmlChar * | valstr, |
uint32 | valstrlen, | ||
val_value_t * | val | ||
) |
set and decode base64 value.
Set an initialized val_value_t as a binary type
This function expects the input to be in base64 format!!! ONLY USED BY PARSER FUNCTIONS SETTING A VAL ALREADY SETUP AS NCX_BT_BINARY
valstr | encoded value | |
valstrlen | length of valstr to use | |
[in,out] | val | value to set
|
boolean val_set_by_default | ( | const val_value_t * | val | ) |
Check if the value was set by val_add_defaults.
val | val_value_t struct to check |
status_t val_set_canonical | ( | val_value_t * | val | ) |
Invoke the canonical callback for the data type (if any)
val | node to change to canonical format |
void val_set_child_deleted_flag | ( | val_value_t * | val | ) |
Set the child_deleted flag for this value node.
val | value node to set |
status_t val_set_deleted_from_commit_deletes | ( | val_value_t * | val, |
boolean | deleted | ||
) |
Set deleted from check_commit_deletes.
val | value to set |
deleted | flag that the value was deleted |
INTERNAL API
void val_set_dirty_flag | ( | val_value_t * | val, |
boolean | clear_def | ||
) |
Set the dirty flag for this value node.
val | value node to set |
clear_def | TRUE to clear the DEFSET flag FALSE to skip the clear_default() step |
status_t val_set_dname | ( | val_value_t * | val, |
const xmlChar * | dname | ||
) |
Set the dname field.
The dname will be strdup-ed and then added
val | value to set |
dname | name to set |
status_t val_set_dname2 | ( | val_value_t * | val, |
const xmlChar * | dname, | ||
uint32 | dnamelen | ||
) |
Set the dname field.
The dname will be strndup-ed and then added
val | value to set |
dname | name to set |
dnamelen | length of dname field |
void val_set_extern | ( | val_value_t * | val, |
xmlChar * | fname | ||
) |
Setup an NCX_BT_EXTERN value.
val | value to setup |
fname | filespec string to set as the value |
void val_set_extra_instance_errors | ( | val_value_t * | val, |
const xmlChar * | modname, | ||
const xmlChar * | objname, | ||
uint32 | maxelems | ||
) |
mark ERR_NCX_EXTRA_VAL_INST errors for nodes > 'maxelems'
Count the number of instances of the specified object name in the parent value struct. This only checks the first level under the parent, not the entire subtree Set the val-res status for all instances beyond the specified 'maxelems' count to ERR_NCX_EXTRA_VAL_INST
val | value to check |
modname | name of module which defines the object to count NULL (do not check module names) |
objname | name of object to count |
maxelems | number of allowed instances |
void val_set_force_config | ( | val_value_t * | val, |
boolean | is_config | ||
) |
Set the force config flags for the object.
val | pointer to the value node to set |
is_config | config-stmt value to set |
status_t val_set_icookie | ( | val_value_t * | val, |
int | icookie | ||
) |
Set the SIL integer cookie in the editvars for the specified value node.
val | val_value_t struct to set |
icookie | integer cookie value to set |
void val_set_intern | ( | val_value_t * | val, |
xmlChar * | intbuff | ||
) |
Setup an NCX_BT_INTERN value.
val | value to setup |
intbuff | internal buffer to set as the value THIS IS LIVE MEMORY THAT WILL BE FREED IF THE VALUE IS FREED |
status_t val_set_mpid | ( | val_value_t * | val, |
struct ncx_sm_mpid_t_ * | mpid | ||
) |
Set the MPID.
val | value to set |
mpid | Mount Point ID |
void val_set_name | ( | val_value_t * | val, |
const xmlChar * | name, | ||
uint32 | namelen | ||
) |
Set (or reset) the name of a value struct.
val | val_value_t data structure to check |
name | name string to set. This is a counted string |
namelen | length of name string |
status_t val_set_pcookie | ( | val_value_t * | val, |
void * | pcookie | ||
) |
Set the SIL pointer cookie in the editvars for the specified value node.
val | val_value_t struct to set |
pcookie | pointer cookie value to set |
void val_set_qname | ( | val_value_t * | val, |
xmlns_id_t | nsid, | ||
const xmlChar * | name, | ||
uint32 | namelen | ||
) |
Set (or reset) the name and namespace ID of a value struct.
val | val_value_t data structure to check |
nsid | namespace ID to set |
name | name string to set |
namelen | length of name string |
status_t val_set_sil_priority | ( | val_value_t * | val, |
uint8 | silprio | ||
) |
Set the secondary SIL priority.
Intended for instances of list and list-list Will not have any affect for other node types
val | value to set |
silprio | value instance SIL priority |
status_t val_set_simval | ( | val_value_t * | val, |
typ_def_t * | typdef, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | valname, | ||
const xmlChar * | valstr | ||
) |
set any simple value with any typdef Set an initialized val_value_t as a simple type
[in,out] | val | value to set
|
typdef | typdef of expected type | |
nsid | namespace ID of this field | |
valname | name of simple value | |
valstr | simple value encoded as a string |
status_t val_set_simval_binary | ( | val_value_t * | val, |
const xmlChar * | binstr, | ||
uint32 | binstrlen | ||
) |
set a binary type either in a type binary, or type within 1 or more unions
The string value will be converted to a value struct format and checked against the provided typedef
Handles the following data types:
NCX_BT_BINARY NCX_BT_UNION
[in,out] | val | value to set
|
binstr | binary buffer | |
binstrlen | length of binstr |
status_t val_set_simval_max | ( | val_value_t * | val, |
typ_def_t * | typdef, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | valname, | ||
uint32 | valnamelen, | ||
const xmlChar * | valstr, | ||
uint32 | valstrlen | ||
) |
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type
The string value will be converted to a value struct format and checked against the provided typedef
Handles the following data types:
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_BINARY NCX_BT_STRING NCX_BT_INSTANCE_ID NCX_BT_ENUM NCX_BT_EMPTY NCX_BT_BOOLEAN NCX_BT_SLIST NCX_BT_BITS NCX_BT_UNION NCX_BT_LEAFREF NCX_BT_IDREF
[in,out] | val | value to set
|
typdef | typdef of expected type | |
nsid | namespace ID of this field | |
valname | name of simple value | |
valnamelen | length of valname string to use | |
valstr | simple value encoded as a string | |
valstrlen | length of valstr (in case valstr is binary) |
status_t val_set_simval_str | ( | val_value_t * | val, |
typ_def_t * | typdef, | ||
xmlns_id_t | nsid, | ||
const xmlChar * | valname, | ||
uint32 | valnamelen, | ||
const xmlChar * | valstr | ||
) |
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type
The string value will be converted to a value struct format and checked against the provided typedef
Handles the following data types:
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_BINARY NCX_BT_STRING NCX_BT_INSTANCE_ID NCX_BT_ENUM NCX_BT_EMPTY NCX_BT_BOOLEAN NCX_BT_SLIST NCX_BT_BITS NCX_BT_UNION NCX_BT_LEAFREF NCX_BT_IDREF
[in,out] | val | value to set
|
typdef | typdef of expected type | |
nsid | namespace ID of this field | |
valname | name of simple value | |
valnamelen | length of valname string to use | |
valstr | simple value encoded as a string |
status_t val_set_skip_sil_partial | ( | val_value_t * | val | ) |
Set the skip_sil_partial flag for this value in an edit.
Can only be called by internal APIs during edit processing
val | value to set |
status_t val_set_string | ( | val_value_t * | val, |
const xmlChar * | valname, | ||
const xmlChar * | valstr | ||
) |
set a generic string using the builtin string typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! use after calling val_new_value
[in,out] | val | value to set
|
valname | name of simple value | |
valstr | simple value encoded as a string |
status_t val_set_string2 | ( | val_value_t * | val, |
const xmlChar * | valname, | ||
typ_def_t * | typdef, | ||
const xmlChar * | valstr, | ||
uint32 | valstrlen | ||
) |
set a string with any typdef Set an initialized val_value_t as a simple type namespace set to 0 !!!
Will check if the string is OK for the typdef!
[in,out] | val | value to set
|
valname | name of simple value | |
typdef | parm typdef (may be NULL) | |
valstr | simple value encoded as a string | |
valstrlen | length of valstr to use |
status_t val_set_string3 | ( | val_value_t * | val, |
const xmlChar * | valname, | ||
typ_def_t * | typdef, | ||
const xmlChar * | valstr, | ||
uint32 | valstrlen, | ||
boolean | is_dblquote | ||
) |
set a string with any typdef (handle double-quoted) Set an initialized val_value_t as a simple type namespace set to 0 !!!
Will check if the string is OK for the typdef!
[in,out] | val | value to set
|
valname | name of simple value | |
typdef | parm typdef (may be NULL) | |
valstr | simple value encoded as a string | |
valstrlen | length of valstr to use | |
is_dblquote | == double-quoted string
|
void val_set_subtree_dirty_up | ( | val_value_t * | val | ) |
Set the dirty flag for this value node.
val | value node to set |
status_t val_set_varexpr | ( | val_value_t * | val, |
const xmlChar * | varexpr | ||
) |
Set the varexpr field in the value node.
val | value to set |
varexpr | string to set |
void val_set_wildcard_string | ( | val_value_t * | val | ) |
Set the value as a wildcard string.
val | value to set |
void val_set_withdef_default | ( | val_value_t * | val | ) |
Set the value flags as having the wd:default attribute.
val | val_value_t struct to set |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check |
simval | value string to check (NULL means empty string) |
status_t val_simval_ok_errinfo | ( | typ_def_t * | typdef, |
const xmlChar * | simval, | ||
ncx_errinfo_t ** | errinfo | ||
) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check | |
simval | value string to check (NULL means empty string) | |
[out] | errinfo | address of return error struct
|
status_t val_simval_ok_ex | ( | typ_def_t * | typdef, |
const xmlChar * | simval, | ||
ncx_errinfo_t ** | errinfo, | ||
ncx_module_t * | mod | ||
) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check | |
simval | value string to check (NULL means empty string) | |
[out] | errinfo | address of return error struct
|
mod | module in progress to use for idref and other strings with prefixes in them |
status_t val_simval_ok_max | ( | typ_def_t * | typdef, |
const xmlChar * | simval, | ||
ncx_errinfo_t ** | errinfo, | ||
ncx_module_t * | mod, | ||
boolean | logerrors | ||
) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check | |
simval | value string to check (NULL means empty string) | |
[out] | errinfo | address of return error struct
|
mod | module in progress to use for idref and other strings with prefixes in them | |
logerrors | TRUE to log errors; FALSE to not log errors (use FALSE for NCX_BT_UNION) |
status_t val_simval_ok_max2 | ( | typ_def_t * | typdef, |
const xmlChar * | simval, | ||
ncx_errinfo_t ** | errinfo, | ||
ncx_module_t * | mod, | ||
boolean | logerrors, | ||
boolean | nocond | ||
) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check | |
simval | value string to check (NULL means empty string) | |
[out] | errinfo | address of return error struct
|
mod | module in progress to use for idref and other strings with prefixes in them | |
logerrors | TRUE to log errors; FALSE to not log errors (use FALSE for NCX_BT_UNION) | |
nocond | TRUE if conditional values not allowed; needed to check YANG 1.1 default enum, bits, idref types FALSE to skip conditional test |
status_t val_simval_ok_max3 | ( | typ_def_t * | typdef, |
const xmlChar * | simval, | ||
ncx_errinfo_t ** | errinfo, | ||
ncx_module_t * | mod, | ||
boolean | logerrors, | ||
boolean | nocond, | ||
boolean | is_defval | ||
) |
check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example
typdef | typ_def_t for the simple type to check | |
simval | value string to check (NULL means empty string) | |
[out] | errinfo | address of return error struct
|
mod | module in progress to use for idref and other strings with prefixes in them | |
logerrors | TRUE to log errors; FALSE to not log errors (use FALSE for NCX_BT_UNION) | |
nocond | TRUE if conditional values not allowed; needed to check YANG 1.1 default enum, bits, idref types FALSE to skip conditional test | |
is_defval | True if the simval is a default value |
status_t val_sprintf_etag | ( | val_value_t * | val, |
xmlChar * | buff, | ||
int32 | buffsize | ||
) |
Write the Entity Tag for the value to the specified buffer.
val | val_value_t data structure to use | |
[out] | buff | buffer to use
|
buffsize | buffer size to use |
status_t val_sprintf_simval_nc | ( | xmlChar * | buff, |
const val_value_t * | val, | ||
uint32 * | len | ||
) |
Sprintf the xmlChar string NETCONF representation of a simple value.
buff is allowed to be NULL; if so, then this fn will just return the length of the string (w/o EOS ch)
USAGE: call 1st time with a NULL buffer to get the length
call the 2nd time with a buffer of the returned length
!!!! DOES NOT CHECK BUFF OVERRUN IF buff is non-NULL !!!!
buff | buffer to write (NULL means get length only) | |
val | value to print | |
[out] | len | address of return length
|
status_t val_sprintf_simval_nc_ex | ( | xmlChar * | buff, |
const val_value_t * | val, | ||
boolean | url_encode, | ||
uint32 * | len | ||
) |
Sprintf the xmlChar string NETCONF representation of a simple value.
buff is allowed to be NULL; if so, then this fn will just return the length of the string (w/o EOS ch)
USAGE: call 1st time with a NULL buffer to get the length call the 2nd time with a buffer of the returned length
!!!! DOES NOT CHECK BUFF OVERRUN IF buff is non-NULL !!!!
buff | buffer to write (NULL means get length only) | |
val | value to print | |
url_encode | TRUE to URL encode a string; false for regular output | |
[out] | len | address of return length
|
status_t val_sprintf_simval_xpath | ( | xmlChar * | buff, |
const val_value_t * | val, | ||
boolean | url_encode, | ||
xmlChar | quot_char, | ||
uint32 * | len | ||
) |
Sprintf the xmlChar string XPATH representation of a simple value.
buff is allowed to be NULL; if so, then this fn will just return the length of the string (w/o EOS ch)
USAGE: call 1st time with a NULL buffer to get the length call the 2nd time with a buffer of the returned length
!!!! DOES NOT CHECK BUFF OVERRUN IF buff is non-NULL !!!!
buff | buffer to write (NULL means get length only) |
val | value to print |
url_encode | TRUE to URL encode a string; false for regular output |
quot_char | quote char that needs to be escaped because this buffer will be part of an XPath predicate
|
len | address of return length
|
void val_stdout_value | ( | val_value_t * | val, |
int32 | startindent, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
void val_stdout_value_ex | ( | val_value_t * | val, |
int32 | startindent, | ||
ncx_display_mode_t | display_mode, | ||
log_debug_t | lvl | ||
) |
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h)
val | value to printf |
startindent | start indent char count |
display_mode | display mode enumeration to use |
lvl | debug level to use; will not print anything unless log-level set to at least this level |
status_t val_string_ok | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
const xmlChar * | strval | ||
) |
Check a string to make sure the value is valid based on the restrictions in the specified typdef.
typdef | typ_def_t for the designated string type |
btyp | basetype of the string |
strval | string value to check |
status_t val_string_ok_errinfo | ( | typ_def_t * | typdef, |
ncx_btype_t | btyp, | ||
const xmlChar * | strval, | ||
ncx_errinfo_t ** | errinfo | ||
) |
retrieve the YANG custom error info if any
Check a string to make sure the value is valid based on the restrictions in the specified typdef Retrieve the configured error info struct if any error
typdef | typ_def_t for the designated string type | |
btyp | basetype of the string | |
strval | string value to check | |
[out] | errinfo | address of return errinfo block (may be NULL)
|
status_t val_string_ok_ex | ( | ses_cb_t * | scb, |
typ_def_t * | typdef, | ||
ncx_btype_t | btyp, | ||
const xmlChar * | strval, | ||
ncx_errinfo_t ** | errinfo, | ||
boolean | logerrors | ||
) |
retrieve the YANG custom error info if any (extended)
Check a string to make sure the value is valid based on the restrictions in the specified typdef Retrieve the configured error info struct if any error
scb | session control block or NULL if none | |
typdef | typ_def_t for the designated string type | |
btyp | basetype of the string | |
strval | string value to check | |
[out] | errinfo | address of return errinfo block (may be NULL)
|
logerrors | TRUE to log errors FALSE to not log errors (use for NCX_BT_UNION) |
status_t val_string_ok_ex2 | ( | ses_cb_t * | scb, |
typ_def_t * | typdef, | ||
ncx_btype_t | btyp, | ||
const xmlChar * | strval, | ||
ncx_errinfo_t ** | errinfo, | ||
boolean | logerrors, | ||
boolean | is_defval | ||
) |
retrieve the YANG custom error info if any
Check a string to make sure the value is valid based on the restrictions in the specified typdef Retrieve the configured error info struct if any error
scb | session control block or NULL if none | |
typdef | typ_def_t for the designated string type | |
btyp | basetype of the string | |
strval | string value to check | |
[out] | errinfo | address of return errinfo block (may be NULL)
|
logerrors | TRUE to log errors FALSE to not log errors (use for NCX_BT_UNION) | |
is_defval | TRUE if the strval is a default value |
void val_swap_child | ( | val_value_t * | newchild, |
val_value_t * | curchild | ||
) |
Swap a child value node with a current value node.
newchild | node to store in the place of the curchild |
curchild | node to remove from the parent |
status_t val_union_ok | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
val_value_t * | retval | ||
) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format.
typdef | typ_def_t for the designated union type | |
strval | the value to check against the member typ defs | |
[out] | retval | pointer to output struct for converted value
|
status_t val_union_ok_binary | ( | typ_def_t * | typdef, |
const xmlChar * | binstr, | ||
uint32 | binstrlen, | ||
val_value_t * | retval, | ||
ncx_errinfo_t ** | errinfo, | ||
typ_def_t ** | match_typdef | ||
) |
Check a union to make sure the buffer is valid based on the specified typdef, and convert the buffer to an NCX internal format.
Expecting to find 1 or more NCX_BT_BINARY types within the union typedef; Other types will be ignored
typdef | typ_def_t for the designated union type | |
binstr | the binary buffer to check against the member typ defs | |
binstrlen | length of binstr buffer | |
[in,out] | retval | pointer to output struct for converted value
|
[out] | errinfo | address of error struct (may be NULL)
|
[out] | match_typdef | address of return matching typdef (may be NULL)
|
status_t val_union_ok_errinfo | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
val_value_t * | retval, | ||
ncx_errinfo_t ** | errinfo | ||
) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format.
typdef | typ_def_t for the designated union type | |
strval | the value to check against the member typ defs | |
[in,out] | retval | pointer to output struct for converted value
|
[out] | errinfo | address of error struct
|
status_t val_union_ok_ex | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
val_value_t * | retval, | ||
ncx_errinfo_t ** | errinfo, | ||
ncx_module_t * | mod, | ||
typ_def_t ** | match_typdef | ||
) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format.
typdef | typ_def_t for the designated union type | |
strval | the value to check against the member typ defs (may be NULL for empty string) | |
[in,out] | retval | pointer to output struct for converted value
|
[out] | errinfo | address of error struct
|
mod | module in progress, if any (may be NULL) | |
[out] | match_typdef | address of return matching typdef (may be NULL)
|
status_t val_union_ok_full | ( | typ_def_t * | typdef, |
const xmlChar * | strval, | ||
val_value_t * | contextval, | ||
val_value_t * | rootval, | ||
val_value_t * | retval, | ||
ncx_errinfo_t ** | errinfo | ||
) |
Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format.
Use context and root nodes to evaluate XPath for leafref and instance-identifier types
typdef | typ_def_t for the designated union type | |
strval | the value to check against the member typ defs (may be NULL for empty string) | |
contextval | XPath context node if needed | |
rootval | XPath document root val if needed | |
[in,out] | retval | pointer to output struct for converted value
|
[out] | errinfo | address of error struct (may be NULL)
|
uint32 val_url_encode_string | ( | const xmlChar * | str, |
xmlChar * | buff | ||
) |
Fill in a buffer with the URL-encoded string.
str | string to URL encode |
buff | buffer to use or NULL to juect get length |