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
760typedef void (*dumpfn_t) (log_debug_t level, const char *fstr, ...);
769typedef void (*errfn_t) (const char *fstr, ...);
778/* pick a log indent function for dump_value */
779typedef void (*indentfn_t) (log_debug_t level, int32 indentcnt);
785typedef struct logfns_t_ {
786 dumpfn_t dumpfn; /**< log dump callback */
787 errfn_t errorfn; /**< log error callback */
788 indentfn_t indentfn; /**< log indent callback */
789 boolean suppressVariableNames; /**< suppress variable names in output */
790 FILE *outputFile; /**< manager redirect to file output */
795typedef struct val_idref_t_ {
796 xmlns_id_t nsid; /**< namespace ID */
799 ncx_identity_t *identity; /**< ID back-ptr if found */
804typedef enum val_insert_mode_t_ {
805 VAL_INS_MODE_NONE, /**< not set */
806 VAL_INS_MODE_KEY, /**< YANG key attribute */
807 VAL_INS_MODE_VALUE, /**< YANG value attribute */
808 VAL_INS_MODE_POINT /**< YANG-API point param */
809} YPACK val_insert_mode_t;
813typedef enum val_dumpvalue_mode_t_ {
814 DUMP_VAL_NONE, /**< not set */
815 DUMP_VAL_STDOUT, /**< dump val to STDOUT */
816 DUMP_VAL_LOG, /**< dump val to main log */
817 DUMP_VAL_ALT_LOG, /**< dump val to alternate log */
818 DUMP_VAL_AUDIT_LOG, /**< dump val to audit log */
819} val_dumpvalue_mode_t;
823typedef struct val_editvars_t_ {
828 struct val_value_t_ *curparent; /**< track the real parent */
829 op_insertop_t insertop; /**< YANG insert operation */
830 xmlChar *insertstr; /**< saved value or key attr */
831 struct xpath_pcb_t_ *insertxpcb; /**< key attr for insert */
832 struct val_value_t_ *insertval; /**< back-ptr if before or after */
833 val_insert_mode_t insert_mode; /**< insert mode requested */
834 uint8 silprio; /**< 2nd SIL priority for server */
835 boolean operset; /**< nc:operation here */
836 void *pcookie; /**< user pointer cookie */
837 int icookie; /**< user integer cookie */
838 boolean is_move; /**< TRUE if YPATCH MOVE operation */
839 boolean skip_sil_partial; /**< TRUE is skip_sil_partial needed */
840} YPACK val_editvars_t;
844typedef struct val_extra_t_ {
851 xmlChar *dname; /**< malloced name if needed */
865 struct val_value_t_ *virtualval;
874 struct xpath_pcb_t_ *xpathpcb;
880 plock_cb_t *plock[VAL_MAX_PLOCKS];
886 dlq_hdr_t *dataruleQ; /**< Q of obj_xpath_ptr_t */
899 struct xpath_aio_cb_t_ *aiocb;
911typedef struct val_value_t_ {
916 struct obj_template_t_ *obj; /**< bptr to object def */
917 typ_def_t *typdef; /**< bptr to typdef if leaf */
918 const xmlChar *name; /**< back pointer to elname\n
919 * the dname field is moved to val_extra_t and only used when
920 * the value is constructed from dummy objects or no objects at all
923 struct val_value_t_ *parent; /**< back-ptr to parent if any */
924 struct val_child_hdr_t_ *hdr; /**< back-ptr to own child_hdr */
927 val_extra_t *val_extra;
929 uint32 flags; /**< internal status flags */
931 xmlns_id_t nsid; /**< namespace ID for this node */
932 ncx_btype_t btyp; /**< base type of this value */
933 ncx_data_class_t dataclass; /**< config or state data */
938 time_t last_modified;
939 ncx_etag_t etag; /**< ETag for RESTCONF */
954 dlq_hdr_t *metaQ; /**< Q of val_value_t */
959 val_editvars_t *editvars; /**< edit-vars from attrs */
960 op_editop_t editop; /**< needed for all edits */
961 status_t res; /**< validation result */
963 /* GET1 getcb moved to val_extra */
964 /* GET1 virtualval moved to val_extra */
965 /* GET1 cachetime moved to val_extra */
968 dlq_hdr_t *indexQ; /**< Q of val_index_t or ncx_filptr_t */
970 /* this field is used for NCX_BT_CHOICE
971 * If set, the object path for this node is really:
972 * $this --> casobj --> casobj.parent --> $this.parent
973 * the OBJ_TYP_CASE and OBJ_TYP_CHOICE nodes are skipped
974 * inside an XML instance document
976 * replaced by val_get_casobj() function in val_util.h
977 * struct obj_template_t_ *casobj;
980 /* xpathpcb moved to val_extra_t */
982 /* back-ptr to the partial locks that are held
984 * plock moved to val_extra
987 /* back-ptr to the data access control rules that
988 * reference this node
989 * dataruleQ moved to val_extra
992 /* malloced pointer to the variable expression found
993 * if this val node is part of a data template.
994 * The actual value in union v_ MUST be ignored if
995 * varexpr string is non-NULL!!
996 * varexpr moved to val_extra
1002 ncx_owner_id_t owner_id;
1005 ncx_nmda_origin_t nmda_origin;
1008 boolean extern_valonly;
1017 boolean from_anydata;
1038 dlq_hdr_t child_hdrQ;
1059 val_idref_t idref; /**< NCX_BT_IDREF */
1060 ncx_binary_t binary; /**< NCX_BT_BINARY */
1061 ncx_list_t list; /**< NCX_BT_BITS, NCX_BT_SLIST */
1062 boolean boo; /**< NCX_BT_EMPTY, NCX_BT_BOOLEAN */
1063 ncx_enum_t enu; /**< NCX_BT_UNION, NCX_BT_ENUM */
1064 xmlChar *fname; /**< NCX_BT_EXTERN */
1065 xmlChar *intbuff; /**< NCX_BT_INTERN */
1073typedef struct val_child_hdr_t_ {
1074 dlq_hdr_t qhdr; /**< queue header */
1081 struct obj_template_t_ *obj;
1086 struct val_tree_t_ *tree;
1099} YPACK val_child_hdr_t;
1112typedef struct val_index_t_ {
1113 dlq_hdr_t qhdr; /**< queue header */
1114 val_value_t *val; /**< points to a child node */
1119typedef struct val_unique_t_ {
1120 dlq_hdr_t qhdr; /**< queue header */
1121 struct xpath_pcb_t_ *pcb; /**< live XPath CB w/ result */
1122} YPACK val_unique_t;
1134 (*val_test_fn_t) (const val_value_t *val);
1147 (*val_walker_fn_t) (val_value_t *val,
1163 (*val_walker2_fn_t) (val_child_hdr_t *valhdr,
1179 (*val_hdr_test_fn_t) (val_child_hdr_t *hdr,
1193 (*val_test2_fn_t) (val_value_t *val,
1224 val_new_value (void);
1236 val_init_value (val_value_t *val);
1250 val_init_complex (val_value_t *val,
1264 val_init_virtual (val_value_t *val,
1266 struct obj_template_t_ *obj);
1279 val_init_from_template (val_value_t *val,
1280 struct obj_template_t_ *obj);
1293 val_reinit_from_template (val_value_t *val,
1294 struct obj_template_t_ *obj);
1307 val_free_value (val_value_t *val);
1318 val_set_name (val_value_t *val,
1319 const xmlChar *name,
1333 val_force_dname (val_value_t *val);
1345 val_set_qname (val_value_t *val,
1347 const xmlChar *name,
1361 val_string_ok (typ_def_t *typdef,
1363 const xmlChar *strval);
1381 val_string_ok_errinfo (typ_def_t *typdef,
1383 const xmlChar *strval,
1384 ncx_errinfo_t **errinfo);
1403 val_binary_ok_errinfo (typ_def_t *typdef,
1404 const xmlChar *strval,
1406 ncx_errinfo_t **errinfo);
1427 val_string_ok_ex (ses_cb_t *scb,
1430 const xmlChar *strval,
1431 ncx_errinfo_t **errinfo,
1454 val_string_ok_ex2 (ses_cb_t *scb,
1457 const xmlChar *strval,
1458 ncx_errinfo_t **errinfo,
1484 val_list_ok (typ_def_t *typdef,
1507 val_list_ok_errinfo (typ_def_t *typdef,
1510 ncx_errinfo_t **errinfo);
1526 val_enum_ok (typ_def_t *typdef,
1527 const xmlChar *enumval,
1529 const xmlChar **retstr);
1542 val_bit_ok (typ_def_t *typdef,
1543 const xmlChar *bitname,
1559 val_bitpos_ok (typ_def_t *typdef,
1561 const xmlChar **name);
1583 val_idref_ok (typ_def_t *typdef,
1584 const xmlChar *qname,
1586 const xmlChar **name,
1587 ncx_identity_t **id);
1615 val_idref_ok_ex (typ_def_t *typdef,
1616 const xmlChar *qname,
1619 ncx_module_t *impmod,
1621 const xmlChar **name,
1622 ncx_identity_t **id);
1642 val_parse_idref (ncx_module_t *mod,
1643 const xmlChar *qname,
1645 const xmlChar **name,
1646 ncx_identity_t **id);
1667 val_parse_idref_rootcb (ncx_module_t *mod,
1668 const xmlChar *qname,
1670 const xmlChar **name,
1671 ncx_identity_t **id,
1672 ncx_sm_rootcb_t *rootcb);
1685 val_range_ok (typ_def_t *typdef,
1687 const ncx_num_t *num);
1702 val_range_ok_errinfo (typ_def_t *typdef,
1704 const ncx_num_t *num,
1705 ncx_errinfo_t **errinfo);
1716 val_pattern_ok (typ_def_t *typdef,
1717 const xmlChar *strval);
1733 val_pattern_ok_errinfo (typ_def_t *typdef,
1734 const xmlChar *strval,
1735 ncx_errinfo_t **errinfo);
1748 val_simval_ok (typ_def_t *typdef,
1749 const xmlChar *simval);
1765 val_simval_ok_errinfo (typ_def_t *typdef,
1766 const xmlChar *simval,
1767 ncx_errinfo_t **errinfo);
1784 val_simval_ok_ex (typ_def_t *typdef,
1785 const xmlChar *simval,
1786 ncx_errinfo_t **errinfo,
1806 val_simval_ok_max (typ_def_t *typdef,
1807 const xmlChar *simval,
1808 ncx_errinfo_t **errinfo,
1831 val_simval_ok_max2 (typ_def_t *typdef,
1832 const xmlChar *simval,
1833 ncx_errinfo_t **errinfo,
1859 val_simval_ok_max3 (typ_def_t *typdef,
1860 const xmlChar *simval,
1861 ncx_errinfo_t **errinfo,
1880 val_union_ok (typ_def_t *typdef,
1881 const xmlChar *strval,
1882 val_value_t *retval);
1899 val_union_ok_errinfo (typ_def_t *typdef,
1900 const xmlChar *strval,
1901 val_value_t *retval,
1902 ncx_errinfo_t **errinfo);
1923 val_union_ok_ex (typ_def_t *typdef,
1924 const xmlChar *strval,
1925 val_value_t *retval,
1926 ncx_errinfo_t **errinfo,
1928 typ_def_t **match_typdef);
1952 val_union_ok_binary (typ_def_t *typdef,
1953 const xmlChar *binstr,
1955 val_value_t *retval,
1956 ncx_errinfo_t **errinfo,
1957 typ_def_t **match_typdef);
1980 val_union_ok_full (typ_def_t *typdef,
1981 const xmlChar *strval,
1982 val_value_t *contextval,
1983 val_value_t *rootval,
1984 val_value_t *retval,
1985 ncx_errinfo_t **errinfo);
1995 val_get_metaQ (val_value_t *val);
2006 val_get_first_meta (dlq_hdr_t *queue);
2017 val_get_first_meta_val (val_value_t *val);
2028 val_get_next_meta (val_value_t *curnode);
2039 val_meta_empty (val_value_t *val);
2051 val_find_meta (val_value_t *val,
2053 const xmlChar *name);
2066 val_meta_match (val_value_t *val,
2067 val_value_t *metaval);
2079 val_metadata_inst_count (val_value_t *val,
2081 const xmlChar *name);
2095 val_dump_value (val_value_t *val,
2112 val_dump_value_config (val_value_t *val,
2129 val_dump_value_ex (val_value_t *val,
2131 ncx_display_mode_t display_mode,
2146 val_dump_alt_value (val_value_t *val,
2161 val_stdout_value (val_value_t *val,
2177 val_stdout_value_ex (val_value_t *val,
2179 ncx_display_mode_t display_mode,
2201 val_dump_value_max (val_value_t *val,
2203 int32 indent_amount,
2204 val_dumpvalue_mode_t dumpmode,
2205 ncx_display_mode_t display_mode,
2233 val_dump_value_full (val_value_t *val,
2235 int32 indent_amount,
2236 val_dumpvalue_mode_t dumpmode,
2237 ncx_display_mode_t display_mode,
2241 boolean expand_varexpr,
2243 logfns_t *overrideOutput);
2269 val_dump_value_full2 (val_value_t *val,
2271 int32 indent_amount,
2272 val_dumpvalue_mode_t dumpmode,
2273 ncx_display_mode_t display_mode,
2277 boolean expand_varexpr,
2280 logfns_t *overrideOutput);
2296 val_set_string (val_value_t *val,
2297 const xmlChar *valname,
2298 const xmlChar *valstr);
2317 val_set_string2 (val_value_t *val,
2318 const xmlChar *valname,
2320 const xmlChar *valstr,
2345 val_set_string3 (val_value_t *val,
2346 const xmlChar *valname,
2348 const xmlChar *valstr,
2350 boolean is_dblquote);
2369 val_set_binary (const xmlChar *valstr,
2385 val_reset_empty (val_value_t *val);
2401 val_set_simval (val_value_t *val,
2404 const xmlChar *valname,
2405 const xmlChar *valstr);
2451 val_set_simval_str (val_value_t *val,
2454 const xmlChar *valname,
2456 const xmlChar *valstr);
2480 val_set_simval_binary (val_value_t *val,
2481 const xmlChar *binstr,
2529 val_set_simval_max (val_value_t *val,
2532 const xmlChar *valname,
2534 const xmlChar *valstr,
2552 val_make_simval (typ_def_t *typdef,
2554 const xmlChar *valname,
2555 const xmlChar *valstr,
2573 val_make_string (xmlns_id_t nsid,
2574 const xmlChar *valname,
2575 const xmlChar *valstr);
2589 val_make_binary (xmlns_id_t nsid,
2590 const xmlChar *valname,
2591 const xmlChar *valstr,
2607 val_merge (const val_value_t *src,
2618 val_clone (const val_value_t *val);
2629 val_clone2 (const val_value_t *val);
2646 val_clone_config_data (const val_value_t *val,
2668 val_clone_config_newval (const val_value_t *val,
2692 val_clone_config_newval_keys_only (const val_value_t *val,
2716 val_clone_config_save (const val_value_t *val,
2731 val_replace (val_value_t *val,
2745 val_replace_str (const xmlChar *str,
2761 val_fast_replace_string (const xmlChar *str,
2773 val_replace_stringval (val_value_t *val,
2774 const xmlChar *str);
2794 val_add_child (val_value_t *child,
2795 val_value_t *parent);
2810 val_add_child_sorted (val_value_t *child,
2811 val_value_t *parent);
2826 val_insert_child (val_value_t *child,
2827 val_value_t *current,
2828 val_value_t *parent);
2840 val_remove_child (val_value_t *child);
2853 val_swap_child (val_value_t *newchild,
2854 val_value_t *curchild);
2865 val_first_child_match (const val_value_t *parent,
2866 const val_value_t *child);
2880 val_first_child_match_fast (const val_value_t *parent,
2881 const val_value_t *child,
2882 val_value_t *lastmatch);
2897 val_next_child_match (val_value_t *parent,
2899 val_value_t *curmatch);
2909 val_next_child_same (val_value_t *curchild);
2919 val_get_first_child (const val_value_t *parent);
2929 val_get_next_child (const val_value_t *curchild);
2939 val_get_first_terminal_child (const val_value_t *parent);
2949 val_get_next_terminal_child (const val_value_t *curchild);
2966 val_find_child (const val_value_t *parent,
2967 const xmlChar *modname,
2968 const xmlChar *childname);
2985 val_find_child_fast (const val_value_t *parent,
2987 const xmlChar *childname);
2999 val_find_child_obj (const val_value_t *parent,
3000 const struct obj_template_t_ *chobj);
3018 val_find_child_que (const dlq_hdr_t *childQ,
3020 const xmlChar *childname);
3037 val_match_child (const val_value_t *parent,
3038 const xmlChar *modname,
3039 const xmlChar *childname);
3059 val_match_child_count (const val_value_t *parent,
3060 const xmlChar *modname,
3061 const xmlChar *childname,
3062 uint32 *matchcount);
3082 val_find_next_child (const val_value_t *parent,
3083 const xmlChar *modname,
3084 const xmlChar *childname,
3085 const val_value_t *curchild);
3102 val_find_next_child_fast (const val_value_t *parent,
3103 const val_value_t *curchild);
3115 val_first_child_name (val_value_t *parent,
3116 const xmlChar *name);
3128 val_first_child_qname (val_value_t *parent,
3130 const xmlChar *name);
3143 val_next_child_qname (val_value_t *parent,
3145 const xmlChar *name,
3146 val_value_t *curchild);
3167 val_first_child_string (val_value_t *parent,
3168 const xmlChar *name,
3169 const xmlChar *strval);
3181 val_child_cnt (val_value_t *parent);
3194 val_child_inst_cnt (const val_value_t *parent,
3195 const xmlChar *modname,
3196 const xmlChar *name);
3207 val_get_child_inst_id (const val_value_t *parent,
3208 const val_value_t *child);
3218 val_liststr_count (const val_value_t *val);
3234 val_index_match (const val_value_t *val1,
3235 const val_value_t *val2);
3249 val_index_compare (const val_value_t *val1,
3250 const val_value_t *val2);
3283 val_compare_max (const val_value_t *val1,
3284 const val_value_t *val2,
3324 val_compare_max_def (const val_value_t *val1,
3325 const val_value_t *val2,
3329 boolean ignore_defaults);
3356 val_compare_ex (const val_value_t *val1,
3357 const val_value_t *val2,
3358 boolean configonly);
3382 val_compare (const val_value_t *val1,
3383 const val_value_t *val2);
3406 val_compare_to_string (const val_value_t *val1,
3407 const xmlChar *strval2,
3433 val_compare_to_string_len (const val_value_t *val1,
3434 const xmlChar *strval2,
3458 val_compare_for_replace (const val_value_t *val1,
3459 const val_value_t *val2);
3481 val_compare_for_edit (const val_value_t *val1,
3482 const val_value_t *val2,
3505 val_compare_as_string (const val_value_t *val1,
3506 const val_value_t *val2,
3529 val_sprintf_simval_nc (xmlChar *buff,
3530 const val_value_t *val,
3554 val_sprintf_simval_nc_ex (xmlChar *buff,
3555 const val_value_t *val,
3573 val_make_sprintf_string (const val_value_t *val);
3589 val_resolve_scoped_name (val_value_t *val,
3590 const xmlChar *name,
3591 val_value_t **chval);
3601 val_get_iqualval (const val_value_t *val);
3623 val_duplicates_allowed (val_value_t *val);
3634 val_has_content (const val_value_t *val);
3646 val_has_content_ex (const val_value_t *val);
3657 val_has_index (const val_value_t *val);
3667 val_get_first_index (const val_value_t *val);
3677 val_get_next_index (const val_index_t *valindex);
3687 val_get_index_count (const val_value_t *val);
3702 val_parse_meta (ses_cb_t *scb,
3705 val_value_t *retval);
3715 val_set_extern (val_value_t *val,
3727 val_set_intern (val_value_t *val,
3750 val_fit_oneline (const val_value_t *val,
3764 val_create_allowed (const val_value_t *val);
3776 val_delete_allowed (const val_value_t *val);
3787 val_is_config_data (const val_value_t *val);
3799 val_is_config_save (const val_value_t *val);
3812 val_is_virtual (const val_value_t *val);
3845 val_get_virtual_value (ses_cb_t *scb,
3870 val_is_default (val_value_t *val);
3883 val_is_real (const val_value_t *val);
3893 val_get_parent_nsid (const val_value_t *val);
3908 val_instance_count (val_value_t *val,
3909 const xmlChar *modname,
3910 const xmlChar *objname);
3928 val_instance_count_fast (val_value_t *val,
3930 const xmlChar *objname,
3931 val_value_t **firstval);
3947 val_instance_count_fast2 (val_value_t *val,
3948 val_value_t *startval);
3967 val_set_extra_instance_errors (val_value_t *val,
3968 const xmlChar *modname,
3969 const xmlChar *objname,
3982 val_need_quotes (const xmlChar *str);
3995 val_has_dquotes (const xmlChar *str);
4006 val_need_dquotes (const xmlChar *str);
4017 val_all_whitespace (const xmlChar *str);
4029 val_any_whitespace (const xmlChar *str,
4042 val_match_metaval (const xml_attr_t *attr,
4044 const xmlChar *name);
4054 val_get_dirty_flag (const val_value_t *val);
4064 val_get_subtree_dirty_flag (const val_value_t *val);
4073 val_set_subtree_dirty_up (val_value_t *val);
4084 val_set_dirty_flag (val_value_t *val,
4094 val_set_child_deleted_flag (val_value_t *val);
4104 val_get_child_deleted_flag (val_value_t *val);
4120 val_clear_dirty_flag (val_value_t *val,
4122 ncx_transaction_id_t txid,
4124 boolean do_clear_default);
4133 val_clear_child_dirty_flag (val_value_t *val);
4143 val_dirty_subtree (const val_value_t *val);
4159 val_clean_tree (val_value_t *val);
4169 val_get_nest_level (val_value_t *val);
4181 val_get_first_leaf (val_value_t *val);
4191extern const xmlChar *
4192 val_get_mod_name (const val_value_t *val);
4202extern const xmlChar *
4203 val_get_mod_prefix (const val_value_t *val);
4213 val_get_nsid (const val_value_t *val);
4223 val_get_yang_sid (const val_value_t *val);
4233 val_change_nsid (val_value_t *val,
4244 val_change_nsid2 (val_value_t *val,
4255 val_change_nsid3 (val_value_t *val,
4271 val_make_from_insertxpcb (val_value_t *sourceval,
4280extern val_unique_t *
4281 val_new_unique (void);
4290 val_free_unique (val_unique_t *valuni);
4299extern const typ_def_t *
4300 val_get_typdef (const val_value_t *val);
4311 val_set_by_default (const val_value_t *val);
4322 val_has_withdef_default (const val_value_t *val);
4331 val_set_withdef_default (val_value_t *val);
4342 val_is_metaval (const val_value_t *val);
4353 val_move_children (val_value_t *srcval,
4354 val_value_t *destval);
4365 val_move_nonconfig_children (val_value_t *srcval,
4366 val_value_t *destval);
4388 val_cvt_generic (val_value_t *val);
4400 val_set_pcookie (val_value_t *val,
4413 val_set_icookie (val_value_t *val,
4425 val_get_pcookie (val_value_t *val);
4436 val_get_icookie (val_value_t *val);
4447 val_delete_default_leaf (val_value_t *val);
4460 val_delete_default_leaf_list (val_value_t *val);
4469 val_force_empty (val_value_t *val);
4480 val_delete_default_npcon (val_value_t *val);
4492 val_move_fields_for_xml (val_value_t *srcval,
4493 val_value_t *destval,
4505 val_move_metadata (val_value_t *srcval,
4506 val_value_t *destval);
4516 val_get_first_key (val_value_t *val);
4526 val_get_last_key (val_value_t *val);
4536 val_get_next_key (val_index_t *curkey);
4546 val_get_prev_key (val_index_t *curkey);
4556 val_remove_key (val_value_t *keyval);
4566 val_new_deleted_value (void);
4577 val_new_editvars (val_value_t *val);
4588 val_free_editvars (val_value_t *val);
4597 val_free_solo_editvars (val_editvars_t *editvars);
4611 val_all_np_containers (val_value_t *val);
4624 val_sprintf_etag (val_value_t *val,
4636 val_get_last_modified (val_value_t *val);
4645 val_force_default (val_value_t *val);
4656 val_set_all_tags (val_value_t *val,
4658 ncx_transaction_id_t txid);
4667extern const xmlChar *
4668 val_get_owner (val_value_t *val);
4677extern ncx_owner_id_t
4678 val_get_owner_id (val_value_t *val);
4688 val_need_owner_string (val_value_t *val);
4698 val_delete_children (val_value_t *val);
4707 val_clean_value (val_value_t *val);
4719 val_find_bit (val_value_t *val,
4720 const xmlChar *bitname);
4731 val_has_children (const val_value_t *val);
4742 val_add_test_valindex (val_value_t *parentval,
4743 val_value_t *keyval);
4752extern const xmlChar *
4753 val_get_yang_typename (val_value_t *val);
4763 val_set_force_config (val_value_t *val,
4774 val_clear_defvalset_flag (val_value_t *val);
4786 val_clone_valQ (dlq_hdr_t *valQ,
4787 dlq_hdr_t *return_valQ);
4798 val_clean_valQ (dlq_hdr_t *valQ);
4811 val_is_value_set (val_value_t *val);
4822 val_url_encode_string (const xmlChar *str,
4835 val_convert_any_to_container (val_value_t *val);
4845 val_clean_index_chain (val_value_t *val);
4856 val_pattern_match (const xmlRegexpPtr pattern,
4857 const xmlChar *strval);
4869 val_ocpattern_match (const regex_t *ocpattern,
4870 const xmlChar *strval);
4883 val_idref_derived_from (ncx_module_t *impmod,
4884 val_value_t *testval,
4885 const xmlChar *qname,
4900 val_set_sil_priority (val_value_t *val,
4911 val_get_sil_priority (val_value_t *val);
4922extern const xmlChar *
4923 val_find_bit_name (val_value_t *val,
4936extern const xmlChar *
4937 val_find_enum_name (val_value_t *val,
4952extern const xmlChar *
4953 val_find_enum_name2 (ncx_btype_t btyp,
4965 val_mark_deleted (val_value_t *val);
4976 val_mark_undeleted (val_value_t *val);
4990 val_has_conditional_value (val_value_t *val);
5004 val_convert_leafref (const val_value_t *val);
5028 val_compare_for_topreplace (const val_value_t *val1,
5029 const val_value_t *val2);
5058 val_compare_for_topreplace_simple (const val_value_t *val1,
5059 const val_value_t *val2);
5070 val_has_complex_child (const val_value_t *val);
5081 val_add_meta (val_value_t *metaval,
5092 val_find_root (val_value_t *val);
5102 val_set_canonical (val_value_t *val);
5113 val_get_leafref_typdef (val_value_t *val);
5136 val_ascendant_compare (val_value_t *val1,
5146extern const xmlChar *
5147 val_get_dname (const val_value_t *val);
5160 val_set_dname (val_value_t *val,
5161 const xmlChar *dname);
5175 val_set_dname2 (val_value_t *val,
5176 const xmlChar *dname,
5188 val_new_extra (val_value_t *val);
5197extern const xmlChar *
5198 val_get_varexpr (const val_value_t *val);
5209 val_set_varexpr (val_value_t *val,
5210 const xmlChar *varexpr);
5219 val_clear_varexpr (val_value_t *val);
5228 val_set_wildcard_string (val_value_t *val);
5237#define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
5248 val_copy_editvars (const val_value_t *val,
5261 val_set_skip_sil_partial (val_value_t *val);
5271 val_get_skip_sil_partial (const val_value_t *val);
5285 val_get_leafref_typdef_ex (val_value_t *val,
5286 boolean union_check);
5302 val_is_default_npcon (val_value_t *val);
5313 val_identity_ok (typ_def_t *typdef,
5314 ncx_identity_t *ident);
5332 val_highest_bit_set (const val_value_t *val,
5351 val_first_bit_set (const val_value_t *val,
5352 const ncx_lmem_t **lmem,
5371 val_next_bit_set (const val_value_t *val,
5372 const ncx_lmem_t *lmem,
5373 const ncx_lmem_t **nextlmem,
5382extern struct xpath_aio_cb_t_ *
5383 val_get_aiocb (const val_value_t *val);
5394 val_set_aiocb (val_value_t *val,
5395 struct xpath_aio_cb_t_ *aiocb);
5407extern ncx_sm_mpid_t *
5408 val_get_mpid (const val_value_t *val);
5420 val_set_mpid (val_value_t *val,
5421 struct ncx_sm_mpid_t_ *mpid);
5428} /* 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.