146#define VAL_MAX_PLOCKS 1
149#define VAL_MAX_DATARULES 1
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
337/********* val_child_hdr->flags fields ***************/
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
378/* macros to access simple value types */
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_NUMPTR(V) (&(V)->v.num)
443#define VAL_NUM(V) (V)->v.num
446#define VAL_LONG(V) (V)->v.num.l
449#define VAL_INT(V) (V)->v.num.i
452#define VAL_INT8(V) ((int8)((V)->v.num.i))
455#define VAL_L_INT8(V) (V)->v.num.i
458#define VAL_INT16(V) ((int16)((V)->v.num.i))
461#define VAL_L_INT16(V) (V)->v.num.i
464#define VAL_INT32(V) (V)->v.num.i
467#define VAL_INT64(V) (V)->v.num.l
470#define VAL_STR(V) (V)->v.str
473#define VAL_INSTANCE_ID(V) (V)->v.str
476#define VAL_IDREF(V) (&(V)->v.idref)
479#define VAL_IDREF_NSID(V) (V)->v.idref.nsid
482#define VAL_IDREF_NAME(V) (V)->v.idref.name
485#define VAL_IDREF_IDENTITY(V) (V)->v.idref.identity
488#define VAL_UINT(V) (V)->v.num.u
491#define VAL_UINT8(V) ((uint8)((V)->v.num.u))
494#define VAL_L_UINT8(V) (V)->v.num.u
497#define VAL_UINT16(V) ((uint16)((V)->v.num.u))
500#define VAL_L_UINT16(V) (V)->v.num.u
503#define VAL_UINT32(V) (V)->v.num.u
506#define VAL_L_UINT32(V) (V)->v.num.u
509#define VAL_UINT64(V) (V)->v.num.ul
512#define VAL_ULONG(V) (V)->v.num.ul
517#define VAL_DEC64(V) (V)->v.num.dec.val
522#define VAL_DEC64_DIGITS(V) (V)->v.num.dec.digits
527#define VAL_DEC64_ZEROES(V) (V)->v.num.dec.zeroes
530#define VAL_LIST(V) (V)->v.list
533#define VAL_BITS VAL_LIST
537#define VAL_INTERN(V) (V)->v.intbuff
541#define VAL_EXTERN(V) (V)->v.fname
545#define VAL_IS_DELETED(V) ((V)->flags & VAL_FL_DELETED)
548#define VAL_CLR_DELETED(V) (V)->flags &= ~VAL_FL_DELETED
551#define VAL_MARK_DELETED(V) val_mark_deleted(V)
554#define VAL_UNMARK_DELETED(V) val_mark_undeleted(V)
557#define VAL_LAST_MODIFIED(V) (V)->last_modified
560#define VAL_ETAG(V) (V)->etag
563#define VAL_BTYPE(V) (V)->btyp
566#define VAL_SET_VAREXPR(V) (V)->flags |= VAL_FL_IS_VAREXPR
569#define VAL_CLR_VAREXPR(V) (V)->flags &= ~VAL_FL_IS_VAREXPR
572#define VAL_IS_VAREXPR(V) ((V)->flags & VAL_FL_IS_VAREXPR)
575#define VAL_VAREXPR(V) val_get_varexpr(V)
580#define VAL_SET_META(V) (V)->flags |= VAL_FL_META
583#define VAL_REMOVE_META(M) dlq_remove(M)
588#define VAL_SET_FIXED_VALUE(V) (V)->flags |= VAL_FL_FIXED_VALUE
593#define VAL_CLR_FIXED_VALUE(V) (V)->flags &= ~VAL_FL_FIXED_VALUE
598#define VAL_IS_FIXED_VALUE(V) ((V)->flags & VAL_FL_FIXED_VALUE)
601#define VAL_SET_EDIT2_MERGE(V) (V)->flags |= VAL_FL_EDIT2_MERGE
604#define VAL_CLR_EDIT2_MERGE(V) (V)->flags &= ~VAL_FL_EDIT2_MERGE
607#define VAL_IS_EDIT2_MERGE(V) ((V)->flags & VAL_FL_EDIT2_MERGE)
612#define VAL_SET_EXTERNAL(V) (V)->flags |= VAL_FL_EXTERNAL
615#define VAL_CLR_EXTERNAL(V) (V)->flags &= ~VAL_FL_EXTERNAL
618#define VAL_IS_EXTERNAL(V) ((V)->flags & VAL_FL_EXTERNAL)
621#define VAL_SET_VALUE_SET(V) (V)->flags |= VAL_FL_VALUE_SET
624#define VAL_CLR_VALUE_SET(V) (V)->flags &= ~VAL_FL_VALUE_SET
627#define VAL_IS_VALUE_SET(V) ((V)->flags & VAL_FL_VALUE_SET)
630#define VAL_SET_TEMP_XPATH(V) (V)->flags |= VAL_FL_TEMP_XPATH
633#define VAL_CLR_TEMP_XPATH(V) (V)->flags &= ~VAL_FL_TEMP_XPATH
636#define VAL_IS_TEMP_XPATH(V) ((V)->flags & VAL_FL_TEMP_XPATH)
639#define VAL_SET_UNCOMMITTED_DELETE(V) (V)->flags |= VAL_FL_UNCMTD_DELETE
642#define VAL_CLR_UNCOMMITTED_DELETE(V) (V)->flags &= ~VAL_FL_UNCMTD_DELETE
645#define VAL_IS_UNCOMMITTED_DELETE(V) ((V)->flags & VAL_FL_UNCMTD_DELETE)
648#define VAL_SET_RECREATED(V) (V)->flags |= VAL_FL_RECREATED
651#define VAL_CLR_RECREATED(V) (V)->flags &= ~VAL_FL_RECREATED
654#define VAL_IS_RECREATED(V) ((V)->flags & VAL_FL_RECREATED)
657#define VAL_SET_FROM_TEMPLATE(V) (V)->flags |= VAL_FL_FROM_TEMPLATE
660#define VAL_CLR_FROM_TEMPLATE(V) (V)->flags &= ~VAL_FL_FROM_TEMPLATE
663#define VAL_IS_FROM_TEMPLATE(V) ((V)->flags & VAL_FL_FROM_TEMPLATE)
666#define VAL_XPATHPCB(V) val_get_xpathpcb(V)
669#define VAL_SET_CANONICAL(V) (V)->flags |= VAL_FL_CANONICAL
672#define VAL_CLR_CANONICAL(V) (V)->flags &= ~VAL_FL_CANONICAL
675#define VAL_IS_CANONICAL(V) ((V)->flags & VAL_FL_CANONICAL)
678#define VAL_NMDA_ORIGIN(V) (V)->nmda_origin
681#define VAL_IS_INDEX(V) ((V)->flags & VAL_FL_IS_INDEX)
684#define VAL_SET_IS_INDEX(V) (V)->flags |= VAL_FL_IS_INDEX
687#define VAL_CHILD_HDR_OBJ(H) (H)->obj
690#define VAL_CHILD_HDR_COUNT(H) (H)->count
693#define VAL_SET_DEFCON_DELETED(V) (V)->flags |= VAL_FL_DEFCON_DELETED
696#define VAL_CLR_DEFCON_DELETED(V) (V)->flags &= ~VAL_FL_DEFCON_DELETED
699#define VAL_IS_DEFCON_DELETED(V) ((V)->flags & VAL_FL_DEFCON_DELETED)
706#define VAL_SET_ADDEDIT_DELETED(V) (V)->flags |= VAL_FL_ADDEDIT_DELETED
709#define VAL_IS_ADDEDIT_DELETED(V) ((V)->flags & VAL_FL_ADDEDIT_DELETED)
716#define VAL_EDITOP(V) (V)->editop
718#define VAL_EXTERN_VALONLY(V) (V)->extern_valonly
723#define VAL_SET_DEFSET(V) (V)->flags |= VAL_FL_DEFSET
729#define VAL_CLR_DEFSET(V) (V)->flags &= ~VAL_FL_DEFSET
731/* Value node is from anydata that was replaced by datapath */
732#define VAL_FROM_ANYDATA(V) (V)->from_anydata
738#define VAL_SET_HDR_RECREATED(V) (V)->flags |= VAL_FL_HDR_RECREATED
741#define VAL_IS_HDR_RECREATED(V) ((V)->flags & VAL_FL_HDR_RECREATED)
769typedef void (*dumpfn_t) (log_debug_t level, const char *fstr, ...);
778typedef void (*errfn_t) (const char *fstr, ...);
787/* pick a log indent function for dump_value */
788typedef void (*indentfn_t) (log_debug_t level, int32 indentcnt);
794typedef struct logfns_t_ {
795 dumpfn_t dumpfn; /**< log dump callback */
796 errfn_t errorfn; /**< log error callback */
797 indentfn_t indentfn; /**< log indent callback */
798 boolean suppressVariableNames; /**< suppress variable names in output */
799 FILE *outputFile; /**< manager redirect to file output */
804typedef struct val_idref_t_ {
805 xmlns_id_t nsid; /**< namespace ID */
808 ncx_identity_t *identity; /**< ID back-ptr if found */
813typedef enum val_insert_mode_t_ {
814 VAL_INS_MODE_NONE, /**< not set */
815 VAL_INS_MODE_KEY, /**< YANG key attribute */
816 VAL_INS_MODE_VALUE, /**< YANG value attribute */
817 VAL_INS_MODE_POINT /**< YANG-API point param */
818} YPACK val_insert_mode_t;
822typedef enum val_dumpvalue_mode_t_ {
823 DUMP_VAL_NONE, /**< not set */
824 DUMP_VAL_STDOUT, /**< dump val to STDOUT */
825 DUMP_VAL_LOG, /**< dump val to main log */
826 DUMP_VAL_ALT_LOG, /**< dump val to alternate log */
827 DUMP_VAL_AUDIT_LOG, /**< dump val to audit log */
828} val_dumpvalue_mode_t;
832typedef struct val_editvars_t_ {
837 struct val_value_t_ *curparent; /**< track the real parent */
838 op_insertop_t insertop; /**< YANG insert operation */
839 xmlChar *insertstr; /**< saved value or key attr */
840 struct xpath_pcb_t_ *insertxpcb; /**< key attr for insert */
841 struct val_value_t_ *insertval; /**< back-ptr if before or after */
842 val_insert_mode_t insert_mode; /**< insert mode requested */
843 uint8 silprio; /**< 2nd SIL priority for server */
844 boolean operset; /**< nc:operation here */
845 void *pcookie; /**< user pointer cookie */
846 int icookie; /**< user integer cookie */
847 boolean is_move; /**< TRUE if YPATCH MOVE operation */
848 boolean skip_sil_partial; /**< TRUE if skip_sil_partial needed */
849 boolean deleted; /**< TRUE if deleted from commit_deletes */
850} YPACK val_editvars_t;
854typedef struct val_extra_t_ {
861 xmlChar *dname; /**< malloced name if needed */
875 struct val_value_t_ *virtualval;
884 struct xpath_pcb_t_ *xpathpcb;
890 plock_cb_t *plock[VAL_MAX_PLOCKS];
896 dlq_hdr_t *dataruleQ; /**< Q of obj_xpath_ptr_t */
909 struct xpath_aio_cb_t_ *aiocb;
921typedef struct val_value_t_ {
926 struct obj_template_t_ *obj; /**< bptr to object def */
927 typ_def_t *typdef; /**< bptr to typdef if leaf */
928 const xmlChar *name; /**< back pointer to elname\n
929 * the dname field is moved to val_extra_t and only used when
930 * the value is constructed from dummy objects or no objects at all
933 struct val_value_t_ *parent; /**< back-ptr to parent if any */
934 struct val_child_hdr_t_ *hdr; /**< back-ptr to own child_hdr */
937 val_extra_t *val_extra;
939 uint32 flags; /**< internal status flags */
941 xmlns_id_t nsid; /**< namespace ID for this node */
942 ncx_btype_t btyp; /**< base type of this value */
943 ncx_data_class_t dataclass; /**< config or state data */
948 time_t last_modified;
949 ncx_etag_t etag; /**< ETag for RESTCONF */
964 dlq_hdr_t *metaQ; /**< Q of val_value_t */
969 val_editvars_t *editvars; /**< edit-vars from attrs */
970 op_editop_t editop; /**< needed for all edits */
971 status_t res; /**< validation result */
973 /* GET1 getcb moved to val_extra */
974 /* GET1 virtualval moved to val_extra */
975 /* GET1 cachetime moved to val_extra */
978 dlq_hdr_t *indexQ; /**< Q of val_index_t or ncx_filptr_t */
980 /* this field is used for NCX_BT_CHOICE
981 * If set, the object path for this node is really:
982 * $this --> casobj --> casobj.parent --> $this.parent
983 * the OBJ_TYP_CASE and OBJ_TYP_CHOICE nodes are skipped
984 * inside an XML instance document
986 * replaced by val_get_casobj() function in val_util.h
987 * struct obj_template_t_ *casobj;
990 /* xpathpcb moved to val_extra_t */
992 /* back-ptr to the partial locks that are held
994 * plock moved to val_extra
997 /* back-ptr to the data access control rules that
998 * reference this node
999 * dataruleQ moved to val_extra
1002 /* malloced pointer to the variable expression found
1003 * if this val node is part of a data template.
1004 * The actual value in union v_ MUST be ignored if
1005 * varexpr string is non-NULL!!
1006 * varexpr moved to val_extra
1012 ncx_owner_id_t owner_id;
1015 ncx_nmda_origin_t nmda_origin;
1018 boolean extern_valonly;
1027 boolean from_anydata;
1048 dlq_hdr_t child_hdrQ;
1069 val_idref_t idref; /**< NCX_BT_IDREF */
1070 ncx_binary_t binary; /**< NCX_BT_BINARY */
1071 ncx_list_t list; /**< NCX_BT_BITS, NCX_BT_SLIST */
1072 boolean boo; /**< NCX_BT_EMPTY, NCX_BT_BOOLEAN */
1073 ncx_enum_t enu; /**< NCX_BT_UNION, NCX_BT_ENUM */
1074 xmlChar *fname; /**< NCX_BT_EXTERN */
1075 xmlChar *intbuff; /**< NCX_BT_INTERN */
1083typedef struct val_child_hdr_t_ {
1084 dlq_hdr_t qhdr; /**< queue header */
1091 struct obj_template_t_ *obj;
1096 struct val_tree_t_ *tree;
1109} YPACK val_child_hdr_t;
1122typedef struct val_index_t_ {
1123 dlq_hdr_t qhdr; /**< queue header */
1124 val_value_t *val; /**< points to a child node */
1137 (*val_test_fn_t) (const val_value_t *val);
1150 (*val_walker_fn_t) (val_value_t *val,
1166 (*val_walker2_fn_t) (val_child_hdr_t *valhdr,
1182 (*val_hdr_test_fn_t) (val_child_hdr_t *hdr,
1196 (*val_test2_fn_t) (val_value_t *val,
1227 val_new_value (void);
1239 val_init_value (val_value_t *val);
1253 val_init_complex (val_value_t *val,
1267 val_init_virtual (val_value_t *val,
1269 struct obj_template_t_ *obj);
1282 val_init_from_template (val_value_t *val,
1283 struct obj_template_t_ *obj);
1296 val_reinit_from_template (val_value_t *val,
1297 struct obj_template_t_ *obj);
1310 val_free_value (val_value_t *val);
1321 val_set_name (val_value_t *val,
1322 const xmlChar *name,
1336 val_force_dname (val_value_t *val);
1348 val_set_qname (val_value_t *val,
1350 const xmlChar *name,
1364 val_string_ok (typ_def_t *typdef,
1366 const xmlChar *strval);
1384 val_string_ok_errinfo (typ_def_t *typdef,
1386 const xmlChar *strval,
1387 ncx_errinfo_t **errinfo);
1406 val_binary_ok_errinfo (typ_def_t *typdef,
1407 const xmlChar *strval,
1409 ncx_errinfo_t **errinfo);
1430 val_string_ok_ex (ses_cb_t *scb,
1433 const xmlChar *strval,
1434 ncx_errinfo_t **errinfo,
1457 val_string_ok_ex2 (ses_cb_t *scb,
1460 const xmlChar *strval,
1461 ncx_errinfo_t **errinfo,
1487 val_list_ok (typ_def_t *typdef,
1510 val_list_ok_errinfo (typ_def_t *typdef,
1513 ncx_errinfo_t **errinfo);
1529 val_enum_ok (typ_def_t *typdef,
1530 const xmlChar *enumval,
1532 const xmlChar **retstr);
1545 val_bit_ok (typ_def_t *typdef,
1546 const xmlChar *bitname,
1562 val_bitpos_ok (typ_def_t *typdef,
1564 const xmlChar **name);
1586 val_idref_ok (typ_def_t *typdef,
1587 const xmlChar *qname,
1589 const xmlChar **name,
1590 ncx_identity_t **id);
1618 val_idref_ok_ex (typ_def_t *typdef,
1619 const xmlChar *qname,
1622 ncx_module_t *impmod,
1624 const xmlChar **name,
1625 ncx_identity_t **id);
1645 val_parse_idref (ncx_module_t *mod,
1646 const xmlChar *qname,
1648 const xmlChar **name,
1649 ncx_identity_t **id);
1670 val_parse_idref_rootcb (ncx_module_t *mod,
1671 const xmlChar *qname,
1673 const xmlChar **name,
1674 ncx_identity_t **id,
1675 ncx_sm_rootcb_t *rootcb);
1688 val_range_ok (typ_def_t *typdef,
1690 const ncx_num_t *num);
1705 val_range_ok_errinfo (typ_def_t *typdef,
1707 const ncx_num_t *num,
1708 ncx_errinfo_t **errinfo);
1719 val_pattern_ok (typ_def_t *typdef,
1720 const xmlChar *strval);
1736 val_pattern_ok_errinfo (typ_def_t *typdef,
1737 const xmlChar *strval,
1738 ncx_errinfo_t **errinfo);
1751 val_simval_ok (typ_def_t *typdef,
1752 const xmlChar *simval);
1768 val_simval_ok_errinfo (typ_def_t *typdef,
1769 const xmlChar *simval,
1770 ncx_errinfo_t **errinfo);
1787 val_simval_ok_ex (typ_def_t *typdef,
1788 const xmlChar *simval,
1789 ncx_errinfo_t **errinfo,
1809 val_simval_ok_max (typ_def_t *typdef,
1810 const xmlChar *simval,
1811 ncx_errinfo_t **errinfo,
1834 val_simval_ok_max2 (typ_def_t *typdef,
1835 const xmlChar *simval,
1836 ncx_errinfo_t **errinfo,
1862 val_simval_ok_max3 (typ_def_t *typdef,
1863 const xmlChar *simval,
1864 ncx_errinfo_t **errinfo,
1883 val_union_ok (typ_def_t *typdef,
1884 const xmlChar *strval,
1885 val_value_t *retval);
1902 val_union_ok_errinfo (typ_def_t *typdef,
1903 const xmlChar *strval,
1904 val_value_t *retval,
1905 ncx_errinfo_t **errinfo);
1926 val_union_ok_ex (typ_def_t *typdef,
1927 const xmlChar *strval,
1928 val_value_t *retval,
1929 ncx_errinfo_t **errinfo,
1931 typ_def_t **match_typdef);
1955 val_union_ok_binary (typ_def_t *typdef,
1956 const xmlChar *binstr,
1958 val_value_t *retval,
1959 ncx_errinfo_t **errinfo,
1960 typ_def_t **match_typdef);
1983 val_union_ok_full (typ_def_t *typdef,
1984 const xmlChar *strval,
1985 val_value_t *contextval,
1986 val_value_t *rootval,
1987 val_value_t *retval,
1988 ncx_errinfo_t **errinfo);
1998 val_get_metaQ (val_value_t *val);
2009 val_get_first_meta (dlq_hdr_t *queue);
2020 val_get_first_meta_val (val_value_t *val);
2031 val_get_next_meta (val_value_t *curnode);
2042 val_meta_empty (val_value_t *val);
2054 val_find_meta (val_value_t *val,
2056 const xmlChar *name);
2069 val_meta_match (val_value_t *val,
2070 val_value_t *metaval);
2082 val_metadata_inst_count (val_value_t *val,
2084 const xmlChar *name);
2098 val_dump_value (val_value_t *val,
2115 val_dump_value_config (val_value_t *val,
2132 val_dump_value_ex (val_value_t *val,
2134 ncx_display_mode_t display_mode,
2149 val_dump_alt_value (val_value_t *val,
2164 val_stdout_value (val_value_t *val,
2180 val_stdout_value_ex (val_value_t *val,
2182 ncx_display_mode_t display_mode,
2204 val_dump_value_max (val_value_t *val,
2206 int32 indent_amount,
2207 val_dumpvalue_mode_t dumpmode,
2208 ncx_display_mode_t display_mode,
2236 val_dump_value_full (val_value_t *val,
2238 int32 indent_amount,
2239 val_dumpvalue_mode_t dumpmode,
2240 ncx_display_mode_t display_mode,
2244 boolean expand_varexpr,
2246 logfns_t *overrideOutput);
2272 val_dump_value_full2 (val_value_t *val,
2274 int32 indent_amount,
2275 val_dumpvalue_mode_t dumpmode,
2276 ncx_display_mode_t display_mode,
2280 boolean expand_varexpr,
2283 logfns_t *overrideOutput);
2299 val_set_string (val_value_t *val,
2300 const xmlChar *valname,
2301 const xmlChar *valstr);
2320 val_set_string2 (val_value_t *val,
2321 const xmlChar *valname,
2323 const xmlChar *valstr,
2348 val_set_string3 (val_value_t *val,
2349 const xmlChar *valname,
2351 const xmlChar *valstr,
2353 boolean is_dblquote);
2372 val_set_binary (const xmlChar *valstr,
2388 val_reset_empty (val_value_t *val);
2404 val_set_simval (val_value_t *val,
2407 const xmlChar *valname,
2408 const xmlChar *valstr);
2454 val_set_simval_str (val_value_t *val,
2457 const xmlChar *valname,
2459 const xmlChar *valstr);
2483 val_set_simval_binary (val_value_t *val,
2484 const xmlChar *binstr,
2532 val_set_simval_max (val_value_t *val,
2535 const xmlChar *valname,
2537 const xmlChar *valstr,
2555 val_make_simval (typ_def_t *typdef,
2557 const xmlChar *valname,
2558 const xmlChar *valstr,
2576 val_make_string (xmlns_id_t nsid,
2577 const xmlChar *valname,
2578 const xmlChar *valstr);
2592 val_make_binary (xmlns_id_t nsid,
2593 const xmlChar *valname,
2594 const xmlChar *valstr,
2610 val_merge (const val_value_t *src,
2621 val_clone (const val_value_t *val);
2632 val_clone2 (const val_value_t *val);
2649 val_clone_config_data (const val_value_t *val,
2671 val_clone_config_newval (const val_value_t *val,
2695 val_clone_config_newval_keys_only (const val_value_t *val,
2719 val_clone_config_save (const val_value_t *val,
2734 val_replace (val_value_t *val,
2748 val_replace_str (const xmlChar *str,
2764 val_fast_replace_string (const xmlChar *str,
2776 val_replace_stringval (val_value_t *val,
2777 const xmlChar *str);
2797 val_add_child (val_value_t *child,
2798 val_value_t *parent);
2813 val_add_child_sorted (val_value_t *child,
2814 val_value_t *parent);
2829 val_insert_child (val_value_t *child,
2830 val_value_t *current,
2831 val_value_t *parent);
2843 val_remove_child (val_value_t *child);
2856 val_swap_child (val_value_t *newchild,
2857 val_value_t *curchild);
2868 val_first_child_match (const val_value_t *parent,
2869 const val_value_t *child);
2883 val_first_child_match_fast (const val_value_t *parent,
2884 const val_value_t *child,
2885 val_value_t *lastmatch);
2900 val_next_child_match (val_value_t *parent,
2902 val_value_t *curmatch);
2912 val_next_child_same (val_value_t *curchild);
2922 val_get_first_child (const val_value_t *parent);
2932 val_get_next_child (const val_value_t *curchild);
2942 val_get_first_terminal_child (const val_value_t *parent);
2952 val_get_next_terminal_child (const val_value_t *curchild);
2969 val_find_child (const val_value_t *parent,
2970 const xmlChar *modname,
2971 const xmlChar *childname);
2988 val_find_child_fast (const val_value_t *parent,
2990 const xmlChar *childname);
3002 val_find_child_obj (const val_value_t *parent,
3003 const struct obj_template_t_ *chobj);
3021 val_find_child_que (const dlq_hdr_t *childQ,
3023 const xmlChar *childname);
3040 val_match_child (const val_value_t *parent,
3041 const xmlChar *modname,
3042 const xmlChar *childname);
3062 val_match_child_count (const val_value_t *parent,
3063 const xmlChar *modname,
3064 const xmlChar *childname,
3065 uint32 *matchcount);
3085 val_find_next_child (const val_value_t *parent,
3086 const xmlChar *modname,
3087 const xmlChar *childname,
3088 const val_value_t *curchild);
3105 val_find_next_child_fast (const val_value_t *parent,
3106 const val_value_t *curchild);
3118 val_first_child_name (val_value_t *parent,
3119 const xmlChar *name);
3131 val_first_child_qname (val_value_t *parent,
3133 const xmlChar *name);
3146 val_next_child_qname (val_value_t *parent,
3148 const xmlChar *name,
3149 val_value_t *curchild);
3170 val_first_child_string (val_value_t *parent,
3171 const xmlChar *name,
3172 const xmlChar *strval);
3184 val_child_cnt (val_value_t *parent);
3197 val_child_inst_cnt (const val_value_t *parent,
3198 const xmlChar *modname,
3199 const xmlChar *name);
3210 val_get_child_inst_id (const val_value_t *parent,
3211 const val_value_t *child);
3221 val_liststr_count (const val_value_t *val);
3237 val_index_match (const val_value_t *val1,
3238 const val_value_t *val2);
3252 val_index_compare (const val_value_t *val1,
3253 const val_value_t *val2);
3288 val_compare_max (const val_value_t *val1,
3289 const val_value_t *val2,
3332 val_compare_max_def (const val_value_t *val1,
3333 const val_value_t *val2,
3337 boolean ignore_defaults);
3364 val_compare_ex (const val_value_t *val1,
3365 const val_value_t *val2,
3366 boolean configonly);
3390 val_compare (const val_value_t *val1,
3391 const val_value_t *val2);
3414 val_compare_to_string (const val_value_t *val1,
3415 const xmlChar *strval2,
3441 val_compare_to_string_len (const val_value_t *val1,
3442 const xmlChar *strval2,
3454// val_compare_for_replace (const val_value_t *val1,
3455// const val_value_t *val2);
3477 val_compare_for_edit (const val_value_t *val1,
3478 const val_value_t *val2,
3501 val_compare_as_string (const val_value_t *val1,
3502 const val_value_t *val2,
3525 val_sprintf_simval_nc (xmlChar *buff,
3526 const val_value_t *val,
3550 val_sprintf_simval_nc_ex (xmlChar *buff,
3551 const val_value_t *val,
3581 val_sprintf_simval_xpath (xmlChar *buff,
3582 const val_value_t *val,
3601 val_make_sprintf_string (const val_value_t *val);
3617 val_resolve_scoped_name (val_value_t *val,
3618 const xmlChar *name,
3619 val_value_t **chval);
3629 val_get_iqualval (const val_value_t *val);
3651 val_duplicates_allowed (val_value_t *val);
3662 val_has_content (const val_value_t *val);
3674 val_has_content_ex (const val_value_t *val);
3685 val_has_index (const val_value_t *val);
3695 val_get_first_index (const val_value_t *val);
3705 val_get_next_index (const val_index_t *valindex);
3715 val_get_index_count (const val_value_t *val);
3730 val_parse_meta (ses_cb_t *scb,
3733 val_value_t *retval);
3743 val_set_extern (val_value_t *val,
3755 val_set_intern (val_value_t *val,
3778 val_fit_oneline (const val_value_t *val,
3792 val_create_allowed (const val_value_t *val);
3804 val_delete_allowed (const val_value_t *val);
3815 val_is_config_data (const val_value_t *val);
3827 val_is_config_save (const val_value_t *val);
3840 val_is_virtual (const val_value_t *val);
3873 val_get_virtual_value (ses_cb_t *scb,
3898 val_is_default (val_value_t *val);
3911 val_is_real (const val_value_t *val);
3921 val_get_parent_nsid (const val_value_t *val);
3936 val_instance_count (val_value_t *val,
3937 const xmlChar *modname,
3938 const xmlChar *objname);
3956 val_instance_count_fast (val_value_t *val,
3958 const xmlChar *objname,
3959 val_value_t **firstval);
3975 val_instance_count_fast2 (val_value_t *val,
3976 val_value_t *startval);
3995 val_set_extra_instance_errors (val_value_t *val,
3996 const xmlChar *modname,
3997 const xmlChar *objname,
4010 val_need_quotes (const xmlChar *str);
4023 val_has_dquotes (const xmlChar *str);
4034 val_need_dquotes (const xmlChar *str);
4045 val_all_whitespace (const xmlChar *str);
4057 val_any_whitespace (const xmlChar *str,
4070 val_match_metaval (const xml_attr_t *attr,
4072 const xmlChar *name);
4082 val_get_dirty_flag (const val_value_t *val);
4092 val_get_subtree_dirty_flag (const val_value_t *val);
4101 val_set_subtree_dirty_up (val_value_t *val);
4112 val_set_dirty_flag (val_value_t *val,
4122 val_set_child_deleted_flag (val_value_t *val);
4132 val_get_child_deleted_flag (val_value_t *val);
4148 val_clear_dirty_flag (val_value_t *val,
4150 ncx_transaction_id_t txid,
4152 boolean do_clear_default);
4161 val_clear_child_dirty_flag (val_value_t *val);
4171 val_dirty_subtree (const val_value_t *val);
4187 val_clean_tree (val_value_t *val);
4197 val_get_nest_level (val_value_t *val);
4209 val_get_first_leaf (val_value_t *val);
4219extern const xmlChar *
4220 val_get_mod_name (const val_value_t *val);
4230extern const xmlChar *
4231 val_get_mod_prefix (const val_value_t *val);
4241 val_get_nsid (const val_value_t *val);
4251 val_get_yang_sid (const val_value_t *val);
4261 val_change_nsid (val_value_t *val,
4272 val_change_nsid2 (val_value_t *val,
4283 val_change_nsid3 (val_value_t *val,
4299 val_make_from_insertxpcb (val_value_t *sourceval,
4309extern const typ_def_t *
4310 val_get_typdef (const val_value_t *val);
4321 val_set_by_default (const val_value_t *val);
4332 val_has_withdef_default (const val_value_t *val);
4341 val_set_withdef_default (val_value_t *val);
4352 val_is_metaval (const val_value_t *val);
4363 val_move_children (val_value_t *srcval,
4364 val_value_t *destval);
4375 val_move_nonconfig_children (val_value_t *srcval,
4376 val_value_t *destval);
4398 val_cvt_generic (val_value_t *val);
4410 val_set_pcookie (val_value_t *val,
4423 val_set_icookie (val_value_t *val,
4435 val_get_pcookie (val_value_t *val);
4446 val_get_icookie (val_value_t *val);
4457 val_delete_default_leaf (val_value_t *val);
4470 val_delete_default_leaf_list (val_value_t *val);
4479 val_force_empty (val_value_t *val);
4490 val_delete_default_npcon (val_value_t *val);
4502 val_move_fields_for_xml (val_value_t *srcval,
4503 val_value_t *destval,
4515 val_move_metadata (val_value_t *srcval,
4516 val_value_t *destval);
4526 val_get_first_key (val_value_t *val);
4536 val_get_last_key (val_value_t *val);
4546 val_get_next_key (val_index_t *curkey);
4556 val_get_prev_key (val_index_t *curkey);
4566 val_remove_key (val_value_t *keyval);
4576 val_new_deleted_value (void);
4587 val_new_editvars (val_value_t *val);
4598 val_free_editvars (val_value_t *val);
4607 val_free_solo_editvars (val_editvars_t *editvars);
4621 val_all_np_containers (val_value_t *val);
4634 val_sprintf_etag (val_value_t *val,
4646 val_get_last_modified (val_value_t *val);
4655 val_force_default (val_value_t *val);
4666 val_set_all_tags (val_value_t *val,
4668 ncx_transaction_id_t txid);
4677extern const xmlChar *
4678 val_get_owner (val_value_t *val);
4687extern ncx_owner_id_t
4688 val_get_owner_id (val_value_t *val);
4698 val_need_owner_string (val_value_t *val);
4708 val_delete_children (val_value_t *val);
4717 val_clean_value (val_value_t *val);
4729 val_find_bit (val_value_t *val,
4730 const xmlChar *bitname);
4741 val_has_children (const val_value_t *val);
4752 val_add_test_valindex (val_value_t *parentval,
4753 val_value_t *keyval);
4762extern const xmlChar *
4763 val_get_yang_typename (val_value_t *val);
4773 val_set_force_config (val_value_t *val,
4784 val_clear_defvalset_flag (val_value_t *val);
4796 val_clone_valQ (dlq_hdr_t *valQ,
4797 dlq_hdr_t *return_valQ);
4808 val_clean_valQ (dlq_hdr_t *valQ);
4821 val_is_value_set (val_value_t *val);
4832 val_url_encode_string (const xmlChar *str,
4849 val_quote_encode_string (const xmlChar *str,
4864 val_convert_any_to_container (val_value_t *val);
4874 val_clean_index_chain (val_value_t *val);
4885 val_pattern_match (const xmlRegexpPtr pattern,
4886 const xmlChar *strval);
4898 val_ocpattern_match (const regex_t *ocpattern,
4899 const xmlChar *strval);
4912 val_idref_derived_from (ncx_module_t *impmod,
4913 val_value_t *testval,
4914 const xmlChar *qname,
4929 val_set_sil_priority (val_value_t *val,
4940 val_get_sil_priority (val_value_t *val);
4951extern const xmlChar *
4952 val_find_bit_name (val_value_t *val,
4965extern const xmlChar *
4966 val_find_enum_name (val_value_t *val,
4981extern const xmlChar *
4982 val_find_enum_name2 (ncx_btype_t btyp,
4997 val_mark_deleted (val_value_t *val);
5008 val_mark_undeleted (val_value_t *val);
5022 val_has_conditional_value (val_value_t *val);
5036 val_convert_leafref (const val_value_t *val);
5062 val_compare_for_topreplace (const val_value_t *val1,
5063 const val_value_t *val2);
5094 val_compare_for_topreplace_simple (const val_value_t *val1,
5095 const val_value_t *val2);
5106 val_has_complex_child (const val_value_t *val);
5117 val_add_meta (val_value_t *metaval,
5128 val_find_root (val_value_t *val);
5138 val_set_canonical (val_value_t *val);
5149 val_get_leafref_typdef (val_value_t *val);
5172 val_ascendant_compare (val_value_t *val1,
5182extern const xmlChar *
5183 val_get_dname (const val_value_t *val);
5196 val_set_dname (val_value_t *val,
5197 const xmlChar *dname);
5211 val_set_dname2 (val_value_t *val,
5212 const xmlChar *dname,
5224 val_new_extra (val_value_t *val);
5233extern const xmlChar *
5234 val_get_varexpr (const val_value_t *val);
5245 val_set_varexpr (val_value_t *val,
5246 const xmlChar *varexpr);
5255 val_clear_varexpr (val_value_t *val);
5264 val_set_wildcard_string (val_value_t *val);
5273#define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
5284 val_copy_editvars (const val_value_t *val,
5297 val_set_skip_sil_partial (val_value_t *val);
5307 val_get_skip_sil_partial (const val_value_t *val);
5321 val_get_leafref_typdef_ex (val_value_t *val,
5322 boolean union_check);
5338 val_is_default_npcon (val_value_t *val);
5349 val_identity_ok (typ_def_t *typdef,
5350 ncx_identity_t *ident);
5368 val_highest_bit_set (const val_value_t *val,
5387 val_first_bit_set (const val_value_t *val,
5388 const ncx_lmem_t **lmem,
5407 val_next_bit_set (const val_value_t *val,
5408 const ncx_lmem_t *lmem,
5409 const ncx_lmem_t **nextlmem,
5418extern struct xpath_aio_cb_t_ *
5419 val_get_aiocb (const val_value_t *val);
5430 val_set_aiocb (val_value_t *val,
5431 struct xpath_aio_cb_t_ *aiocb);
5443extern ncx_sm_mpid_t *
5444 val_get_mpid (const val_value_t *val);
5456 val_set_mpid (val_value_t *val,
5457 struct ncx_sm_mpid_t_ *mpid);
5475 val_set_deleted_from_commit_deletes (val_value_t *val,
5493 val_get_deleted_from_commit_deletes (const val_value_t *val);
5525 val_set_child_leaf (val_value_t *parent,
5526 const xmlChar *modname,
5527 const xmlChar *childname,
5528 const xmlChar *valstr);
5567 val_delete_child_leaf (val_value_t *parent,
5568 val_value_t *curparent,
5569 const xmlChar *modname,
5570 const xmlChar *childname);
5576} /* end extern 'C' */
dlq provides general double-linked list and queue support:
NCX System Logging Manager.
YANG module data structures Many internal representations of YANG module constructs.
NETCONF protocol operations.
RFC 57517 partial lock support Data structure definition.
NETCONF Session Common definitions module.
Global error messages for status code enumerations.