43 #include <xmlstring.h> 146 #define VAL_MAX_PLOCKS 1 // was 4 149 #define VAL_MAX_DATARULES 1 // was 4 152 #define VAL_MAX_NUMLEN NCX_MAX_NUMLEN 155 #define VAL_BINDEX_CH '[' 156 #define VAL_EINDEX_CH ']' 158 #define VAL_BENUM_CH '(' 159 #define VAL_EENUM_CH ')' 160 #define VAL_INST_SEPCH '.' 161 #define VAL_INDEX_SEPCH ',' 162 #define VAL_INDEX_CLI_SEPCH ' ' 163 #define VAL_CLI_SEPCH ' ' 164 #define VAL_QUOTE_CH '\'' 165 #define VAL_DBLQUOTE_CH '\"' 166 #define VAL_EQUAL_CH '=' 167 #define VAL_XPATH_SEPCH '/' 169 #define VAL_XPATH_INDEX_SEPSTR (const xmlChar *)"][" 170 #define VAL_XPATH_INDEX_SEPLEN 2 173 #define VAL_PASSWORD_STRING (const xmlChar *)"****" 178 #define VAL_FL_DUPDONE bit0 181 #define VAL_FL_DUPOK bit1 184 #define VAL_FL_DEFSET bit2 187 #define VAL_FL_META bit3 190 #define VAL_FL_DIRTY bit4 193 #define VAL_FL_UNIDONE bit5 196 #define VAL_FL_DEFVALSET bit6 201 #define VAL_FL_DEFVAL bit7 206 #define VAL_FL_WITHDEF bit8 209 #define VAL_FL_DELETED bit9 214 #define VAL_FL_SUBTREE_DIRTY bit10 221 #define VAL_FL_CHILD_DELETED bit11 229 #define VAL_FL_IS_VAREXPR bit12 234 #define VAL_FL_FIXED_VALUE bit13 239 #define VAL_FL_EDIT2_MERGE bit14 242 #define VAL_FL_EXTERNAL bit15 248 #define VAL_FL_FORCE_CONFIG bit16 254 #define VAL_FL_FORCE_CONFIG_VALUE bit17 260 #define VAL_FL_VALUE_SET bit18 266 #define VAL_FL_TEMP_XPATH bit19 271 #define VAL_FL_UNCMTD_DELETE bit20 276 #define VAL_FL_RECREATED bit21 283 #define VAL_FL_SUBTREE_RECREATED bit22 289 #define VAL_FL_FROM_TEMPLATE bit23 293 #define VAL_FL_CANONICAL bit24 298 #define VAL_FL_IS_INDEX bit25 304 #define VAL_FL_WILDCARD bit26 309 #define VAL_FL_ANYXML_KEY bit27 314 #define VAL_FL_ANYXML_CONFIG bit28 321 #define VAL_FL_ANYXML_UNKNOWN bit29 324 #define VAL_FL_DEFCON_DELETED bit30 334 #define VAL_FL_ADDEDIT_DELETED bit31 347 #define VAL_FL_GENERIC bit0 350 #define VAL_FL_ROOT bit1 353 #define VAL_FL_USE_QUE bit2 356 #define VAL_FL_USE_TREE bit3 359 #define VAL_FL_HDR_DIRTY bit4 362 #define VAL_FL_HDR_SUBTREE_DIRTY bit5 367 #define VAL_FL_HDR_RECREATED bit6 372 #define VAL_FL_HDR_NOT_INSERTED bit7 376 #define VAL_VIRTUAL_CACHE_TIME 3 381 #define VAL_OBJ(V) (V)->obj 384 #define VAL_OBJTYPE(V) (V)->obj->objtype 387 #define VAL_TYPE(V) (V)->btyp 390 #define VAL_HDR(V) (V)->hdr 393 #define VAL_TYPDEF(V) (V)->typdef 396 #define VAL_NSID(V) (V)->nsid 399 #define VAL_NAME(V) (V)->name 402 #define VAL_RES(V) (V)->res 405 #define VAL_BOOL(V) (V)->v.boo 408 #define VAL_EMPTY(V) (V)->v.boo 411 #define VAL_DOUBLE(V) (V)->v.num.d 414 #define VAL_STRING(V) (V)->v.str 420 #define VAL_BINARY(V) (V)->v.binary.ustr 423 #define VAL_BINARY_LEN(V) (V)->v.binary.ustrlen 426 #define VAL_ENU(V) (&(V)->v.enu) 429 #define VAL_ENUM(V) (V)->v.enu.val 434 #define VAL_ENUM_NAME(V) (V)->v.enu.name 437 #define VAL_FLAG(V) (V)->v.boo 440 #define VAL_LONG(V) (V)->v.num.l 443 #define VAL_INT(V) (V)->v.num.i 446 #define VAL_INT8(V) ((int8)((V)->v.num.i)) 449 #define VAL_L_INT8(V) (V)->v.num.i 452 #define VAL_INT16(V) ((int16)((V)->v.num.i)) 455 #define VAL_L_INT16(V) (V)->v.num.i 458 #define VAL_INT32(V) (V)->v.num.i 461 #define VAL_INT64(V) (V)->v.num.l 464 #define VAL_STR(V) (V)->v.str 467 #define VAL_INSTANCE_ID(V) (V)->v.str 470 #define VAL_IDREF(V) (&(V)->v.idref) 473 #define VAL_IDREF_NSID(V) (V)->v.idref.nsid 476 #define VAL_IDREF_NAME(V) (V)->v.idref.name 479 #define VAL_IDREF_IDENTITY(V) (V)->v.idref.identity 482 #define VAL_UINT(V) (V)->v.num.u 485 #define VAL_UINT8(V) ((uint8)((V)->v.num.u)) 488 #define VAL_L_UINT8(V) (V)->v.num.u 491 #define VAL_UINT16(V) ((uint16)((V)->v.num.u)) 494 #define VAL_L_UINT16(V) (V)->v.num.u 497 #define VAL_UINT32(V) (V)->v.num.u 500 #define VAL_L_UINT32(V) (V)->v.num.u 503 #define VAL_UINT64(V) (V)->v.num.ul 506 #define VAL_ULONG(V) (V)->v.num.ul 511 #define VAL_DEC64(V) (V)->v.num.dec.val 516 #define VAL_DEC64_DIGITS(V) (V)->v.num.dec.digits 521 #define VAL_DEC64_ZEROES(V) (V)->v.num.dec.zeroes 524 #define VAL_LIST(V) (V)->v.list 527 #define VAL_BITS VAL_LIST 530 #define VAL_EXTERN(V) (V)->v.fname 533 #define VAL_IS_DELETED(V) ((V)->flags & VAL_FL_DELETED) 536 #define VAL_MARK_DELETED(V) val_mark_deleted(V) 539 #define VAL_UNMARK_DELETED(V) val_mark_undeleted(V) 542 #define VAL_LAST_MODIFIED(V) (V)->last_modified 545 #define VAL_ETAG(V) (V)->etag 548 #define VAL_BTYPE(V) (V)->btyp 551 #define VAL_SET_VAREXPR(V) (V)->flags |= VAL_FL_IS_VAREXPR 554 #define VAL_CLR_VAREXPR(V) (V)->flags &= ~VAL_FL_IS_VAREXPR 557 #define VAL_IS_VAREXPR(V) ((V)->flags & VAL_FL_IS_VAREXPR) 560 #define VAL_VAREXPR(V) val_get_varexpr(V) 565 #define VAL_SET_META(V) (V)->flags |= VAL_FL_META 568 #define VAL_REMOVE_META(M) dlq_remove(M) 573 #define VAL_SET_FIXED_VALUE(V) (V)->flags |= VAL_FL_FIXED_VALUE 578 #define VAL_CLR_FIXED_VALUE(V) (V)->flags &= ~VAL_FL_FIXED_VALUE 583 #define VAL_IS_FIXED_VALUE(V) ((V)->flags & VAL_FL_FIXED_VALUE) 586 #define VAL_SET_EDIT2_MERGE(V) (V)->flags |= VAL_FL_EDIT2_MERGE 589 #define VAL_CLR_EDIT2_MERGE(V) (V)->flags &= ~VAL_FL_EDIT2_MERGE 592 #define VAL_IS_EDIT2_MERGE(V) ((V)->flags & VAL_FL_EDIT2_MERGE) 597 #define VAL_SET_EXTERNAL(V) (V)->flags |= VAL_FL_EXTERNAL 600 #define VAL_CLR_EXTERNAL(V) (V)->flags &= ~VAL_FL_EXTERNAL 603 #define VAL_IS_EXTERNAL(V) ((V)->flags & VAL_FL_EXTERNAL) 606 #define VAL_SET_VALUE_SET(V) (V)->flags |= VAL_FL_VALUE_SET 609 #define VAL_CLR_VALUE_SET(V) (V)->flags &= ~VAL_FL_VALUE_SET 612 #define VAL_IS_VALUE_SET(V) ((V)->flags & VAL_FL_VALUE_SET) 615 #define VAL_SET_TEMP_XPATH(V) (V)->flags |= VAL_FL_TEMP_XPATH 618 #define VAL_CLR_TEMP_XPATH(V) (V)->flags &= ~VAL_FL_TEMP_XPATH 621 #define VAL_IS_TEMP_XPATH(V) ((V)->flags & VAL_FL_TEMP_XPATH) 624 #define VAL_SET_UNCOMMITTED_DELETE(V) (V)->flags |= VAL_FL_UNCMTD_DELETE 627 #define VAL_CLR_UNCOMMITTED_DELETE(V) (V)->flags &= ~VAL_FL_UNCMTD_DELETE 630 #define VAL_IS_UNCOMMITTED_DELETE(V) ((V)->flags & VAL_FL_UNCMTD_DELETE) 633 #define VAL_SET_RECREATED(V) (V)->flags |= VAL_FL_RECREATED 636 #define VAL_CLR_RECREATED(V) (V)->flags &= ~VAL_FL_RECREATED 639 #define VAL_IS_RECREATED(V) ((V)->flags & VAL_FL_RECREATED) 642 #define VAL_SET_FROM_TEMPLATE(V) (V)->flags |= VAL_FL_FROM_TEMPLATE 645 #define VAL_CLR_FROM_TEMPLATE(V) (V)->flags &= ~VAL_FL_FROM_TEMPLATE 648 #define VAL_IS_FROM_TEMPLATE(V) ((V)->flags & VAL_FL_FROM_TEMPLATE) 651 #define VAL_XPATHPCB(V) val_get_xpathpcb(V) 654 #define VAL_SET_CANONICAL(V) (V)->flags |= VAL_FL_CANONICAL 657 #define VAL_CLR_CANONICAL(V) (V)->flags &= ~VAL_FL_CANONICAL 660 #define VAL_IS_CANONICAL(V) ((V)->flags & VAL_FL_CANONICAL) 663 #define VAL_NMDA_ORIGIN(V) (V)->nmda_origin 666 #define VAL_IS_INDEX(V) ((V)->flags & VAL_FL_IS_INDEX) 669 #define VAL_SET_IS_INDEX(V) (V)->flags |= VAL_FL_IS_INDEX 672 #define VAL_CHILD_HDR_OBJ(H) (H)->obj 675 #define VAL_CHILD_HDR_COUNT(H) (H)->count 678 #define VAL_SET_DEFCON_DELETED(V) (V)->flags |= VAL_FL_DEFCON_DELETED 681 #define VAL_CLR_DEFCON_DELETED(V) (V)->flags &= ~VAL_FL_DEFCON_DELETED 684 #define VAL_IS_DEFCON_DELETED(V) ((V)->flags & VAL_FL_DEFCON_DELETED) 691 #define VAL_SET_ADDEDIT_DELETED(V) (V)->flags |= VAL_FL_ADDEDIT_DELETED 694 #define VAL_IS_ADDEDIT_DELETED(V) ((V)->flags & VAL_FL_ADDEDIT_DELETED) 701 #define VAL_EDITOP(V) (V)->editop 737 typedef void (*
errfn_t) (
const char *fstr, ...);
753 typedef struct logfns_t_ {
763 typedef struct val_idref_t_ {
772 typedef enum val_insert_mode_t_ {
781 typedef enum val_dumpvalue_mode_t_ {
791 typedef struct val_editvars_t_ {
812 typedef struct val_extra_t_ {
854 dlq_hdr_t *dataruleQ;
870 typedef struct val_value_t_ {
875 struct obj_template_t_ *
obj;
883 struct val_child_hdr_t_ *
hdr;
985 dlq_hdr_t child_hdrQ;
1020 typedef struct val_child_hdr_t_ {
1059 typedef struct val_index_t_ {
1066 typedef struct val_unique_t_ {
1170 extern val_value_t *
1213 struct obj_template_t_ *obj);
1227 struct obj_template_t_ *obj);
1241 struct obj_template_t_ *obj);
1266 const xmlChar *name,
1294 const xmlChar *name,
1310 const xmlChar *strval);
1330 const xmlChar *strval,
1351 const xmlChar *strval,
1377 const xmlChar *strval,
1404 const xmlChar *strval,
1474 const xmlChar *enumval,
1476 const xmlChar **retstr);
1490 const xmlChar *bitname,
1514 const xmlChar *qname,
1516 const xmlChar **name,
1546 const xmlChar *qname,
1551 const xmlChar **name,
1573 const xmlChar *qname,
1575 const xmlChar **name,
1621 const xmlChar *strval);
1638 const xmlChar *strval,
1653 const xmlChar *simval);
1670 const xmlChar *simval,
1689 const xmlChar *simval,
1711 const xmlChar *simval,
1736 const xmlChar *simval,
1764 const xmlChar *simval,
1785 const xmlChar *strval,
1786 val_value_t *retval);
1803 const xmlChar *strval,
1804 val_value_t *retval,
1826 const xmlChar *strval,
1827 val_value_t *retval,
1855 const xmlChar *binstr,
1857 val_value_t *retval,
1883 const xmlChar *strval,
1884 val_value_t *contextval,
1885 val_value_t *rootval,
1886 val_value_t *retval,
1907 extern val_value_t *
1918 extern val_value_t *
1929 extern val_value_t *
1952 extern val_value_t *
1955 const xmlChar *name);
1969 val_value_t *metaval);
1983 const xmlChar *name);
2088 int32 indent_amount,
2089 val_dumpvalue_mode_t dumpmode,
2120 int32 indent_amount,
2121 val_dumpvalue_mode_t dumpmode,
2126 boolean expand_varexpr,
2156 int32 indent_amount,
2157 val_dumpvalue_mode_t dumpmode,
2162 boolean expand_varexpr,
2182 const xmlChar *valname,
2183 const xmlChar *valstr);
2203 const xmlChar *valname,
2205 const xmlChar *valstr,
2260 const xmlChar *valname,
2261 const xmlChar *valstr);
2310 const xmlChar *valname,
2312 const xmlChar *valstr);
2337 const xmlChar *binstr,
2388 const xmlChar *valname,
2390 const xmlChar *valstr,
2407 extern val_value_t *
2410 const xmlChar *valname,
2411 const xmlChar *valstr,
2428 extern val_value_t *
2430 const xmlChar *valname,
2431 const xmlChar *valstr);
2444 extern val_value_t *
2446 const xmlChar *valname,
2447 const xmlChar *valstr,
2473 extern val_value_t *
2484 extern val_value_t *
2501 extern val_value_t *
2525 extern val_value_t *
2584 const xmlChar *str);
2607 val_value_t *parent);
2624 val_value_t *parent);
2640 val_value_t *current,
2641 val_value_t *parent);
2667 val_value_t *curchild);
2677 extern val_value_t *
2679 const val_value_t *child);
2692 extern val_value_t *
2694 const val_value_t *child,
2695 val_value_t *lastmatch);
2709 extern val_value_t *
2712 val_value_t *curmatch);
2721 extern val_value_t *
2731 extern val_value_t *
2741 extern val_value_t *
2751 extern val_value_t *
2761 extern val_value_t *
2778 extern val_value_t *
2780 const xmlChar *modname,
2781 const xmlChar *childname);
2797 extern val_value_t *
2800 const xmlChar *childname);
2811 extern val_value_t *
2813 const struct obj_template_t_ *chobj);
2830 extern val_value_t *
2833 const xmlChar *childname);
2849 extern val_value_t *
2851 const xmlChar *modname,
2852 const xmlChar *childname);
2871 extern val_value_t *
2873 const xmlChar *modname,
2874 const xmlChar *childname,
2875 uint32 *matchcount);
2894 extern val_value_t *
2896 const xmlChar *modname,
2897 const xmlChar *childname,
2898 const val_value_t *curchild);
2914 extern val_value_t *
2916 const val_value_t *curchild);
2927 extern val_value_t *
2929 const xmlChar *name);
2940 extern val_value_t *
2943 const xmlChar *name);
2955 extern val_value_t *
2958 const xmlChar *name,
2959 val_value_t *curchild);
2979 extern val_value_t *
2981 const xmlChar *name,
2982 const xmlChar *strval);
3008 const xmlChar *modname,
3009 const xmlChar *name);
3021 const val_value_t *child);
3048 const val_value_t *val2);
3063 const val_value_t *val2);
3097 const val_value_t *val2,
3138 const val_value_t *val2,
3142 boolean ignore_defaults);
3170 const val_value_t *val2,
3171 boolean configonly);
3196 const val_value_t *val2);
3220 const xmlChar *strval2,
3247 const xmlChar *strval2,
3272 const val_value_t *val2);
3295 const val_value_t *val2,
3319 const val_value_t *val2,
3343 const val_value_t *val,
3368 const val_value_t *val,
3403 const xmlChar *name,
3404 val_value_t **chval);
3479 extern val_index_t *
3489 extern val_index_t *
3518 val_value_t *retval);
3657 extern val_value_t *
3722 const xmlChar *modname,
3723 const xmlChar *objname);
3743 const xmlChar *objname,
3744 val_value_t **firstval);
3761 val_value_t *startval);
3781 const xmlChar *modname,
3782 const xmlChar *objname,
3833 const xmlChar *name);
3914 boolean do_clear_default);
3961 extern val_value_t *
3972 extern const xmlChar *
3983 extern const xmlChar *
4042 extern val_value_t *
4052 extern val_unique_t *
4126 val_value_t *destval);
4138 val_value_t *destval);
4265 val_value_t *destval,
4278 val_value_t *destval);
4287 extern val_index_t *
4297 extern val_index_t *
4307 extern val_index_t *
4317 extern val_index_t *
4337 extern val_value_t *
4439 extern const xmlChar *
4492 const xmlChar *bitname);
4515 val_value_t *keyval);
4524 extern const xmlChar *
4559 dlq_hdr_t *return_valQ);
4629 const xmlChar *strval);
4642 const xmlChar *strval);
4656 val_value_t *testval,
4657 const xmlChar *qname,
4694 extern const xmlChar *
4708 extern const xmlChar *
4724 extern const xmlChar *
4775 extern val_value_t *
4801 const val_value_t *val2);
4831 const val_value_t *val2);
4863 extern val_value_t *
4918 extern const xmlChar *
4933 const xmlChar *dname);
4948 const xmlChar *dname,
4969 extern const xmlChar *
4982 const xmlChar *varexpr);
5009 #define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE) 5058 boolean union_check);
boolean val_pattern_match(const xmlRegexpPtr pattern, const xmlChar *strval)
Check the specified string against the specified pattern.
Definition: val.c:14123
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.
Definition: val.c:9156
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...
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.
Definition: val.c:8588
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 from an editing POV; compare for merge or delete! ...
Definition: val.c:9763
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:700
xmlns_id_t val_get_parent_nsid(const val_value_t *val)
Try to get the parent namespace ID.
Definition: val.c:11476
val_value_t * val_clone2(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees but not the editvars.
Definition: val.c:7865
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.
Definition: val.c:3763
ncx_data_class_t dataclass
config or state data
Definition: val.h:892
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.
Definition: val.c:13227
indentfn_t indentfn
log indent callback
Definition: val.h:756
void val_init_value(val_value_t *val)
Initialize the generic fields in a val_value_t so it is ready for use.
Definition: val.c:2725
dumpfn_t dumpfn
log dump callback
Definition: val.h:754
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.
Definition: val.c:8515
boolean val_has_withdef_default(const val_value_t *val)
Check if the value contained the wd:default attribute.
Definition: val.c:12592
boolean(* val_test_fn_t)(const val_value_t *val)
test callback function to check if a value node should be cloned
Definition: val.h:1081
dlq provides general double-linked list and queue support:
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.
Definition: val.c:10365
void val_clean_value(val_value_t *val)
Clean a static val_value_t struct.
Definition: val.c:13672
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! ...
Definition: val.c:12671
void val_change_nsid2(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for the descendant nodes of the value node.
Definition: val.c:12331
boolean(* val_walker_fn_t)(val_value_t *val, void *cookie1, void *cookie2)
child or descendant node search walker function
Definition: val.h:1094
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...
Definition: val.c:5755
boolean suppressVariableNames
suppress variable names in output
Definition: val.h:757
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.
Definition: val.c:7903
status_t res
validation result
Definition: val.h:920
boolean val_is_default(val_value_t *val)
Check if the specified value is set to the YANG default value.
Definition: val.c:11347
ncx_identity_t * identity
ID back-ptr if found.
Definition: val.h:767
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:386
struct val_value_t_ * insertval
back-ptr if before or after
Definition: val.h:800
void val_force_empty(val_value_t *val)
Convert a simple node to an empty type.
Definition: val.c:13101
const xmlChar * val_get_varexpr(const val_value_t *val)
Get the varexpr field if set; NULL if not set.
Definition: val.c:15461
dlq_hdr_t * val_get_metaQ(val_value_t *val)
Get the meta Q header for the value.
Definition: val.c:5391
NCX base64 string node for YANG 'binary' built-in type.
Definition: ncxtypes.h:801
val_editvars_t * editvars
value editing variables the editvars will only be malloced while edit is in progress ...
Definition: val.h:918
YANG-API point param.
Definition: val.h:776
boolean val_all_np_containers(val_value_t *val)
Check if the value tree is all NP containers and nothing else.
Definition: val.c:13433
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 it...
Definition: val.c:2842
void val_clean_tree(val_value_t *val)
Clear the dirty flag and the operation for all nodes within a value struct.
Definition: val.c:12075
ncx_str_t str
String data types:
Definition: val.h:1004
boolean(* val_test2_fn_t)(val_value_t *val, void *cookie)
get first or next child test function value test function
Definition: val.h:1140
boolean val_is_metaval(const val_value_t *val)
Check if the value is a meta-val (XML attribute)
Definition: val.c:12631
void val_set_subtree_dirty_up(val_value_t *val)
Set the dirty flag for this value node.
Definition: val.c:11862
boolean val_has_content_ex(const val_value_t *val)
Determine if there is a value or any child nodes for this val.
Definition: val.c:10573
const xmlChar * val_get_owner(val_value_t *val)
Get the owner string for the specified value node.
Definition: val.c:13577
struct representing 1 configuration database
Definition: plock_cb.h:81
val_index_t * val_get_next_index(const val_index_t *valindex)
Get the next index entry, if any for this value node.
Definition: val.c:10714
errfn_t errorfn
log error callback
Definition: val.h:755
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
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 ...
Definition: val.c:5200
const xmlChar * name
back pointer to elname the dname field is moved to val_extra_t and only used when the value is constr...
Definition: val.h:877
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...
Definition: val.c:14766
boolean val_has_content(const val_value_t *val)
Determine if there is a value or any child nodes for this val.
Definition: val.c:10527
#define VAL_MAX_PLOCKS
max number of concurrent partial locks by the same session
Definition: val.h:146
boolean val_has_conditional_value(val_value_t *val)
Check if the value is conditional.
Definition: val.c:14677
val_insert_mode_t insert_mode
insert mode requested
Definition: val.h:801
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.
Definition: val.c:11580
dump val to audit log
Definition: val.h:786
void * val_get_pcookie(val_value_t *val)
Get the SIL pointer cookie in the editvars for the specified value node.
Definition: val.c:12882
void val_change_nsid(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node and all its descendants.
Definition: val.c:12303
YANG key attribute.
Definition: val.h:774
boolean(* val_hdr_test_fn_t)(val_child_hdr_t *hdr, void *cookie)
get first or next child test function header test function
Definition: val.h:1126
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.
Definition: val.c:4308
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)
Definition: val.c:5819
val_value_t * val_get_first_leaf(val_value_t *val)
Get the first leaf or leaflist node in the specified value tree.
Definition: val.c:12185
Discriminated union for all data typedefs.
Definition: typ.h:458
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 !!! ...
Definition: val.c:6675
boolean skip_sil_partial
TRUE is skip_sil_partial needed.
Definition: val.h:807
uint32 val_url_encode_string(const xmlChar *str, xmlChar *buff)
Fill in a buffer with the URL-encoded string.
Definition: val.c:14020
uint32 count
que count of non-deleted nodes
Definition: val.h:1042
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
Definition: val.c:7400
status_t val_add_meta(val_value_t *metaval, val_value_t *val)
Add a meta value to a value node.
Definition: val.c:15162
NETCONF Session Common definitions module.
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:741
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 ...
Definition: val.c:4909
boolean val_has_index(const val_value_t *val)
Determine if this value has an index.
Definition: val.c:10660
one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms)
Definition: ncxtypes.h:746
ncx_iqual_t
The instance qualifier types are borrowed from ABNF and RelaxNG.
Definition: ncxtypes.h:447
const typ_def_t * val_get_typdef(const val_value_t *val)
Get the typdef field for a value struct.
Definition: val.c:12550
RFC 57517 partial lock support Data structure definition.
const xmlChar * val_get_yang_typename(val_value_t *val)
Get the YANG type name for this value node if there is one.
Definition: val.c:13808
void val_set_extern(val_value_t *val, xmlChar *fname)
Setup an NCX_BT_EXTERN value.
Definition: val.c:10893
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
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...
Definition: val.c:11223
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.
Definition: val.c:8748
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...
Definition: val.c:9873
void(* dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for dump_value.
Definition: val.h:728
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 ...
Definition: val.c:6836
int32 val_compare_for_topreplace_simple(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:14982
const xmlChar * val_get_dname(const val_value_t *val)
Get the dname field if set; NULL if not set.
Definition: val.c:15338
boolean val_index_match(const val_value_t *val1, const val_value_t *val2)
Check 2 val_value structs for the same instance ID.
Definition: val.c:9032
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
union of all the basic number types if float not supported, then it is stored as an int64 ...
Definition: ncxtypes.h:719
boolean val_any_whitespace(const xmlChar *str, uint32 len)
Check if a string has any whitespace chars.
Definition: val.c:11753
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
xmlChar * insertstr
saved value or key attr
Definition: val.h:798
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 checki...
Definition: val.c:8929
boolean val_dirty_subtree(const val_value_t *val)
Check the dirty or subtree_dirty flag.
Definition: val.c:12050
int val_index_compare(const val_value_t *val1, const val_value_t *val2)
Check 2 val_value structs for the same instance ID.
Definition: val.c:9062
void val_set_intern(val_value_t *val, xmlChar *intbuff)
Setup an NCX_BT_INTERN value.
Definition: val.c:10921
struct obj_template_t_ * obj
common fields
Definition: val.h:875
val_value_t * val_first_child_string(val_value_t *parent, const xmlChar *name, const xmlChar *strval)
find first name value pair
Definition: val.c:8875
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1052
time_t last_modified
last_modified and etag fields used for filtered retrieval and YANG-API If-Match type of conditional e...
Definition: val.h:897
boolean val_has_complex_child(const val_value_t *val)
Check if the value has complex children nodes.
Definition: val.c:15125
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!!! ...
Definition: val.c:8388
int32 val_compare_for_replace(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents for the nc:operation=replace procedures.
Definition: val.c:9654
void val_set_name(val_value_t *val, const xmlChar *name, uint32 namelen)
Set (or reset) the name of a value struct.
Definition: val.c:2875
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.
Definition: val.c:5639
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.
Definition: val.c:13164
status_t val_new_extra(val_value_t *val)
Create the val_extra struct if it does not exist.
Definition: val.c:15433
boolean val_get_dirty_flag(const val_value_t *val)
Get the dirty flag for this value node.
Definition: val.c:11825
xmlns_id_t val_get_nsid(const val_value_t *val)
Get the namespace ID for the specified value node.
Definition: val.c:12277
ncx_iqual_t val_get_iqualval(const val_value_t *val)
Get the effective instance qualifier value for this value.
Definition: val.c:10440
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 (...
Definition: val.c:5721
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.
Definition: val.c:8560
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.
Definition: val.c:13254
boolean val_ascendant_compare(val_value_t *val1, val_value_t *val2)
Special compare function for edit compares.
Definition: val.c:15273
uint32 val_get_index_count(const val_value_t *val)
Get the number of index nodes in this val.
Definition: val.c:10740
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.
Definition: val.c:8085
int32 val_compare_for_topreplace(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:14837
void val_free_editvars(val_value_t *val)
Free the editing variables for the value node.
Definition: val.c:13389
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 inst...
Definition: val.c:8258
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.
Definition: val.c:4181
status_t val_sprintf_etag(val_value_t *val, xmlChar *buff, int32 buffsize)
Write the Entity Tag for the value to the specified buffer.
Definition: val.c:13472
typ_def_t * typdef
bptr to typdef if leaf
Definition: val.h:876
int icookie
user integer cookie
Definition: val.h:805
val_index_t * val_get_first_index(const val_value_t *val)
Get the first index entry, if any for this value node.
Definition: val.c:10685
boolean val_create_allowed(const val_value_t *val)
Check if the specified value is allowed to have a create edit-config operation attribute.
Definition: val.c:11100
ncx_num_t num
Numeric data types:
Definition: val.h:996
void val_set_child_deleted_flag(val_value_t *val)
Set the child_deleted flag for this value node.
Definition: val.c:11940
boolean val_find_bit(val_value_t *val, const xmlChar *bitname)
Find the specified bit name in the NCX_BT_BITS value.
Definition: val.c:13695
not set
Definition: val.h:782
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...
Definition: val.c:6900
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
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...
Definition: val.c:10323
one set of edit-in-progress variables for one value node
Definition: val.h:791
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 (...
Definition: val.c:5960
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! ...
Definition: val.c:12651
dump val to main log
Definition: val.h:784
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...
represents one attribute
Definition: xml_util.h:156
YANG module data structures Many internal representations of YANG module constructs.
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...
Definition: val.c:10960
int32 val_compare(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:9456
void val_change_nsid3(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node only.
Definition: val.c:12357
boolean val_get_subtree_dirty_flag(const val_value_t *val)
Get the subtree dirty flag for this value node.
Definition: val.c:11845
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.
Definition: val.c:8423
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 ...
Definition: val.c:4872
typ_def_t * val_get_leafref_typdef_ex(val_value_t *val, boolean union_check)
Return a base typedef of type NCX_BT_LEAFREF.
Definition: val.c:15675
Struct marking the parsing of an instance identifier The position of this record in the val_value_t i...
Definition: val.h:1059
status_t val_cvt_generic(val_value_t *val)
Convert all the database object pointers to generic object pointers.
Definition: val.c:12718
void val_mark_deleted(val_value_t *val)
mark the value node as deleted May have to really delete from val_tree
Definition: val.c:14640
val_idref_t idref
NCX_BT_IDREF.
Definition: val.h:1006
void val_replace_stringval(val_value_t *val, const xmlChar *str)
Replace the string value, not the entire value.
Definition: val.c:8193
void val_clean_index_chain(val_value_t *val)
Clean out any indexQ entries.
Definition: val.c:14100
ncx_nmda_origin_t nmda_origin
NMDA origin enum.
Definition: val.h:964
status_t val_set_varexpr(val_value_t *val, const xmlChar *varexpr)
Set the varexpr field in the value node.
Definition: val.c:15484
ncx_owner_id_t owner_id
set if the owners are being stored and this is a data node in the running config
Definition: val.h:961
not set
Definition: val.h:773
uint8 flags
internal processing flags
Definition: val.h:1045
status_t val_set_binary(const xmlChar *valstr, uint32 valstrlen, val_value_t *val)
set and decode base64 value.
Definition: val.c:6758
uint8 silprio
2nd SIL priority for server
Definition: val.h:802
void val_set_wildcard_string(val_value_t *val)
Set the value as a wildcard string.
Definition: val.c:15536
val_value_t * val_get_first_meta_val(val_value_t *val)
Get the first metaQ entry from the specified Queue.
Definition: val.c:5447
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.
Definition: val.c:14450
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
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)
Definition: val.c:5787
struct obj_template_t_ * obj
child object template The numbering of this object will determine the insertion order of child nodes ...
Definition: val.h:1028
ncx_nmda_origin_t
internal enumerations for standard NMDA origins
Definition: ncxtypes.h:1501
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.
Definition: val.c:11310
uint32 flags
internal status flags
Definition: val.h:888
ncx_list_t list
NCX_BT_BITS, NCX_BT_SLIST.
Definition: val.h:1008
void * pcookie
user pointer cookie
Definition: val.h:804
one unique-stmt component test value node
Definition: val.h:1066
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 funct...
Definition: val.c:8796
void val_set_withdef_default(val_value_t *val)
Set the value flags as having the wd:default attribute.
Definition: val.c:12610
val_value_t * val_find_meta(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the corresponding meta data node.
Definition: val.c:5532
void val_mark_undeleted(val_value_t *val)
mark the value node as un-deleted
Definition: val.c:14657
boolean val_is_default_npcon(val_value_t *val)
Check if the value node is a default NP container.
Definition: val.c:15770
one value to match one type
Definition: val.h:870
struct val_child_hdr_t_ * hdr
back-ptr to own child_hdr
Definition: val.h:883
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 ...
Definition: val.c:6622
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 (...
Definition: val.c:5688
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.
Definition: val.c:3927
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_in...
Definition: val.c:2746
struct val_value_t_ * curparent
these fields are only used in modified values before they are actually added to the config database (...
Definition: val.h:796
boolean val_all_whitespace(const xmlChar *str)
Check if a string is all whitespace.
Definition: val.c:11719
dump val to STDOUT
Definition: val.h:783
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...
Definition: val.c:3455
void val_convert_any_to_container(val_value_t *val)
Convert the extern parameter to a container instead of extern.
Definition: val.c:14076
boolean val_need_quotes(const xmlChar *str)
Check if a string needs to be quoted to be output within a conf file or ncxcli stdout output...
Definition: val.c:11685
ncx_etag_t etag
ETag for RESTCONF.
Definition: val.h:898
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...
Definition: val.c:7504
status_t val_set_pcookie(val_value_t *val, void *pcookie)
Set the SIL pointer cookie in the editvars for the specified value node.
Definition: val.c:12819
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)
Session Control Block.
Definition: ses.h:542
boolean val_has_children(const val_value_t *val)
Determine if there are any child nodes for this val.
Definition: val.c:13724
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 ...
Definition: val.c:10480
struct xpath_pcb_t_ * insertxpcb
key attr for insert
Definition: val.h:799
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.
Definition: val.c:9421
one QName for the NCX_BT_IDREF value
Definition: val.h:763
xmlns_id_t nsid
namespace ID
Definition: val.h:764
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.
Definition: val.c:8286
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...
Definition: val.c:4216
uint32 val_child_cnt(val_value_t *parent)
Get the number of child nodes present.
Definition: val.c:8907
ncx_display_mode_t
enumeration of val_dump_value display modes
Definition: ncxtypes.h:599
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.
Definition: val.c:8534
ncx_owner_id_t val_get_owner_id(val_value_t *val)
Get the owner ID for the specified value node.
Definition: val.c:13602
status_t
global error return code
Definition: status_enum.h:186
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.
Definition: val.c:3717
status_t val_set_skip_sil_partial(val_value_t *val)
Set the skip_sil_partial flag for this value in an edit.
Definition: val.c:15626
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 (...
Definition: val.c:5859
op_editop_t editop
needed for all edits
Definition: val.h:919
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...
Definition: val.c:4413
const xmlChar * val_get_mod_prefix(const val_value_t *val)
Get the module prefix associated with this value node.
Definition: val.c:12250
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...
Definition: val.c:4443
boolean operset
nc:operation here
Definition: val.h:803
val_value_t * val_find_root(val_value_t *val)
Find the root value node or top-val if no ncx:root found.
Definition: val.c:15191
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
int val_get_icookie(val_value_t *val)
Get the SIL integer cookie in the editvars for the specified value node.
Definition: val.c:12908
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...
Definition: val.c:4561
status_t val_pattern_ok(typ_def_t *typdef, const xmlChar *strval)
Check a string against all the patterns in a big AND expression.
Definition: val.c:4275
boolean val_meta_match(val_value_t *val, val_value_t *metaval)
Return true if the corresponding attribute exists and has the same value.
Definition: val.c:5582
void val_add_child(val_value_t *child, val_value_t *parent)
Add a child (deprecated): use val_child_add instead.
Definition: val.c:8231
uint32 val_liststr_count(const val_value_t *val)
Get the number of strings in the list type.
Definition: val.c:8995
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.
Definition: val.c:8640
void val_free_unique(val_unique_t *valuni)
Clean and free a val_unique_t struct.
Definition: val.c:12525
boolean val_match_metaval(const xml_attr_t *attr, xmlns_id_t nsid, const xmlChar *name)
Match the specific attribute value and namespace ID.
Definition: val.c:11790
boolean(* val_walker2_fn_t)(val_child_hdr_t *valhdr, void *cookie1, void *cookie2)
child or descendant node search walker function - GEN2
Definition: val.h:1110
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...
Definition: val.c:3007
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...
Definition: val.c:7941
Global error messages for status code enumerations.
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...
Definition: val.c:4517
void val_clear_varexpr(val_value_t *val)
Clear the varexpr field in the value node.
Definition: val.c:15513
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.
Definition: val.c:9931
union of all the NCX-specific sub-types note that the following invisible constructs should never sho...
Definition: val.h:975
ncx_data_class_t
NCX Persistence Control.
Definition: ncxtypes.h:190
void val_swap_child(val_value_t *newchild, val_value_t *curchild)
Swap a child value node with a current value node.
Definition: val.c:8334
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.
Definition: val.c:8718
op_insertop_t insertop
YANG insert operation.
Definition: val.h:797
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.
Definition: val.c:9966
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'
Definition: val.c:11630
void val_delete_children(val_value_t *val)
Check if the value is a complex type and if so then delete all child nodes.
Definition: val.c:13645
YANG value attribute.
Definition: val.h:775
this struct is inserted in the val->v.child_hdrQ for container and list value nodes ...
Definition: val.h:1020
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...
Definition: val.c:4476
typ_def_t * val_get_leafref_typdef(val_value_t *val)
Return a base typedef of type NCX_BT_LEAFREF.
Definition: val.c:15242
struct xpath_pcb_t_ * pcb
live XPath CB w/ result
Definition: val.h:1068
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 t...
Definition: val.c:13941
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.
Definition: val.c:11981
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.
Definition: val.c:3384
uint8 ncx_owner_id_t
used as index into the agt_owner registry
Definition: ncxtypes.h:1414
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_va...
Definition: val.c:14550
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.
Definition: val.c:13133
boolean val_delete_allowed(const val_value_t *val)
Check if the specified value is allowed to have a delete edit-config operation attribute.
Definition: val.c:11129
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 ...
Definition: val.c:5072
boolean is_move
TRUE if YPATCH MOVE operation.
Definition: val.h:806
void(* errfn_t)(const char *fstr,...)
Callback to do error log function for dump_value.
Definition: val.h:737
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.
Definition: val.c:3344
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.
Definition: val.c:14206
void val_set_dirty_flag(val_value_t *val, boolean clear_def)
Set the dirty flag for this value node.
Definition: val.c:11896
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.
Definition: val.c:13545
void val_remove_child(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val.c:8316
void val_reinit_from_template(val_value_t *val, struct obj_template_t_ *obj)
Re-Initialize a value node from its object template.
Definition: val.c:2820
op_insertop_t
YANG insert operation types.
Definition: op.h:137
header for a NCX List
Definition: ncxtypes.h:794
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.
Definition: val.c:8842
NETCONF protocol operations.
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 ...
Definition: val.c:4943
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 (...
Definition: val.c:5907
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1250
status_t val_set_canonical(val_value_t *val)
Invoke the canonical callback for the data type (if any)
Definition: val.c:15221
status_t val_set_dname2(val_value_t *val, const xmlChar *dname, uint32 dnamelen)
Set the dname field.
Definition: val.c:15397
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.
Definition: val.c:8685
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)
Definition: val.c:12983
ncx_binary_t binary
NCX_BT_BINARY.
Definition: val.h:1007
boolean val_meta_empty(val_value_t *val)
Check if the metaQ is empty for the value node.
Definition: val.c:5499
val_unique_t * val_new_unique(void)
Malloc and initialize the fields in a val_unique_t.
Definition: val.c:12501
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 str...
Definition: val.c:12384
val_extra_t * val_extra
val extra fields only needed about 25% of the time
Definition: val.h:886
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.
Definition: val.c:13272
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.
Definition: val.c:13048
val_insert_mode_t
type of protocol parameter used for insert operation
Definition: val.h:772
uint32 val_get_nest_level(val_value_t *val)
Get the next level of the value.
Definition: val.c:12157
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 !!!
Definition: val.c:7557
YANG identity entry.
Definition: ncxtypes.h:1025
val_value_t * val
points to a child node
Definition: val.h:1061
ncx_enum_t enu
NCX_BT_UNION, NCX_BT_ENUM.
Definition: val.h:1010
boolean val_get_child_deleted_flag(val_value_t *val)
Get the child_deleted flag for this value node.
Definition: val.c:11958
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
Definition: val.c:3070
void val_remove_key(val_value_t *keyval)
Remove a key pointer because the key is invalid Free the key pointer.
Definition: val.c:13291
xmlChar * fname
NCX_BT_EXTERN.
Definition: val.h:1011
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
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.
Definition: val.c:11515
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...
Definition: val.c:7645
status_t val_set_icookie(val_value_t *val, int icookie)
Set the SIL integer cookie in the editvars for the specified value node.
Definition: val.c:12851
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.
Definition: val.c:9108
void val_force_default(val_value_t *val)
Set a node created by the server as a default node.
Definition: val.c:13526
boolean val_is_real(const val_value_t *val)
Check if the specified value is a real value.
Definition: val.c:11449
boolean val_is_config_data(const val_value_t *val)
Check if the specified value is a config DB object instance.
Definition: val.c:11157
boolean val_need_owner_string(val_value_t *val)
Check if the owner string is needed when generating ywx:owner attrs.
Definition: val.c:13627
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
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...
Definition: val.c:14157
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.
Definition: val.c:13200
void val_init_virtual(val_value_t *val, void *cbfn, struct obj_template_t_ *obj)
Special function to initialize a virtual value node.
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.
Definition: val.c:9575
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...
Definition: val.c:8139
status_t val_add_test_valindex(val_value_t *parentval, val_value_t *keyval)
Make a dummy val_index_t for the getcg acmtest.
Definition: val.c:13757
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.
Definition: val.c:8953
status_t val_clone_valQ(dlq_hdr_t *valQ, dlq_hdr_t *return_valQ)
Clone all values in 1 valQ into the return_valQ.
Definition: val.c:13885
status_t val_set_sil_priority(val_value_t *val, uint8 silprio)
Set the secondary SIL priority.
Definition: val.c:14302
status_t val_force_dname(val_value_t *val)
Set (or reset) the name of a value struct.
Definition: val.c:2918
log functions control block used by manager code
Definition: val.h:753
void val_free_solo_editvars(val_editvars_t *editvars)
Free the editing variables removed from a val_value_t.
Definition: val.c:13411
status_t val_copy_editvars(const val_value_t *val, val_value_t *copy)
Copy the editvars struct contents into the value node.
Definition: val.c:15557
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
Definition: val.c:3038
uint8 val_get_sil_priority(val_value_t *val)
Get the secondary SIL priority; zero if not found.
Definition: val.c:14327
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.
Definition: val.c:8818
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.
Definition: val.c:8774
NCX System Logging Manager.
boolean boo
NCX_BT_EMPTY, NCX_BT_BOOLEAN.
Definition: val.h:1009
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.
Definition: val.c:2962
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...
Definition: val.c:6800
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 re...
Definition: val.c:13862
FILE * outputFile
manager redirect to file output
Definition: val.h:758
status_t val_replace(val_value_t *val, val_value_t *copy)
Replace a specified val_value_t struct and sub-trees.
Definition: val.c:7974
xmlChar * name
if nsid == INV_ID then this is entire QName
Definition: val.h:766
void(* indentfn_t)(log_debug_t level, int32 indentcnt)
Callback to do indent function for dump_value.
Definition: val.h:747
status_t val_new_editvars(val_value_t *val)
Malloc and initialize the val->editvars field.
Definition: val.c:13350
xmlns_id_t nsid
namespace ID for this node
Definition: val.h:890
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.
Definition: val.c:11550
val_dumpvalue_mode_t
dump value mode used in val_dump_value
Definition: val.h:781
val_value_t * val_get_next_meta(val_value_t *curnode)
Get the next metaQ entry from the specified entry.
Definition: val.c:5475
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
const xmlChar * val_find_bit_name(val_value_t *val, uint32 bitpos)
Find the specified bit name in the NCX_BT_BITS value.
Definition: val.c:14351
struct val_tree_t_ * tree
OBJ_TYP_LIST stores values in an AVL tree for fast lookup and also a dlq to maintain sorted order...
Definition: val.h:1033
val_value_t * val_next_child_same(val_value_t *curchild)
Get the next instance of the corresponding child node.
Definition: val.c:8456
status_t val_delete_default_leaf(val_value_t *val)
Do the internal work to setup a delete of a default leaf.
Definition: val.c:12933
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_...
Definition: val.c:7592
val_value_t * val_get_first_meta(dlq_hdr_t *queue)
Get the first metaQ entry from the specified Queue.
Definition: val.c:5423
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...
Definition: val.c:4379
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.
Definition: val.c:9493
void val_clean_valQ(dlq_hdr_t *valQ)
Clean a queue of val_value_t.
Definition: val.c:13916
ncx_btype_t btyp
base type of this value
Definition: val.h:891
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 obje...
Definition: val.c:8612
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 ac...
Definition: val.c:11260
status_t val_set_dname(val_value_t *val, const xmlChar *dname)
Set the dname field.
Definition: val.c:15362
boolean val_get_skip_sil_partial(const val_value_t *val)
Get the skip_sil_partial flag.
Definition: val.c:15650
dump val to alternate log
Definition: val.h:785
status_t val_bit_ok(typ_def_t *typdef, const xmlChar *bitname, uint32 *position)
Check a bit name is valid for the typedef.
Definition: val.c:3583
xmlChar * intbuff
NCX_BT_INTERN.
Definition: val.h:1012
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported ...
Definition: ncxtypes.h:200
time_t * val_get_last_modified(val_value_t *val)
Get the last_modified field.
Definition: val.c:13510
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.
Definition: val.c:13323
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.
Definition: val.c:8359
struct val_value_t_ * parent
back-ptr to parent if any
Definition: val.h:882
void val_set_force_config(val_value_t *val, boolean is_config)
Set the force config flags for the object.
Definition: val.c:13831