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 *)"****"
175/********* val_value->flags fields ***************/
180#define VAL_FL_DUPDONE bit0
183#define VAL_FL_DUPOK bit1
186#define VAL_FL_DEFSET bit2
189#define VAL_FL_META bit3
192#define VAL_FL_DIRTY bit4
195#define VAL_FL_UNIDONE bit5
198#define VAL_FL_DEFVALSET bit6
203#define VAL_FL_DEFVAL bit7
208#define VAL_FL_WITHDEF bit8
211#define VAL_FL_DELETED bit9
216#define VAL_FL_SUBTREE_DIRTY bit10
223#define VAL_FL_CHILD_DELETED bit11
231#define VAL_FL_IS_VAREXPR bit12
236#define VAL_FL_FIXED_VALUE bit13
241#define VAL_FL_EDIT2_MERGE bit14
244#define VAL_FL_EXTERNAL bit15
250#define VAL_FL_FORCE_CONFIG bit16
256#define VAL_FL_FORCE_CONFIG_VALUE bit17
262#define VAL_FL_VALUE_SET bit18
268#define VAL_FL_TEMP_XPATH bit19
273#define VAL_FL_UNCMTD_DELETE bit20
278#define VAL_FL_RECREATED bit21
285#define VAL_FL_SUBTREE_RECREATED bit22
291#define VAL_FL_FROM_TEMPLATE bit23
295#define VAL_FL_CANONICAL bit24
300#define VAL_FL_IS_INDEX bit25
306#define VAL_FL_WILDCARD bit26
311#define VAL_FL_ANYXML_KEY bit27
316#define VAL_FL_ANYXML_CONFIG bit28
323#define VAL_FL_ANYXML_UNKNOWN bit29
326#define VAL_FL_DEFCON_DELETED bit30
336#define VAL_FL_ADDEDIT_DELETED bit31
338/********* val_value->flags2 fields ***************/
344#define VAL_FL_EXTERN_VALONLY bit0
349#define VAL_FL_EXTERN_BINARY bit1
360#define VAL_FL_FROM_ANYDATA bit2
364/********* val_child_hdr->flags fields ***************/
374#define VAL_FL_GENERIC bit0
377#define VAL_FL_ROOT bit1
380#define VAL_FL_USE_QUE bit2
383#define VAL_FL_USE_TREE bit3
386#define VAL_FL_HDR_DIRTY bit4
389#define VAL_FL_HDR_SUBTREE_DIRTY bit5
394#define VAL_FL_HDR_RECREATED bit6
399#define VAL_FL_HDR_NOT_INSERTED bit7
403#define VAL_VIRTUAL_CACHE_TIME 3
407#define VAL_MIN_REGEX_LEN 5
410#define VAL_REGEX_END_CHAR ')'
413#define VAL_REGEX_R1 (const xmlChar *)"r1("
416#define VAL_REGEX_R2 (const xmlChar *)"r2("
419#define VAL_REGEX_R_LEN 3
422/* macros to access simple value types */
425#define VAL_OBJ(V) (V)->obj
428#define VAL_OBJTYPE(V) (V)->obj->objtype
431#define VAL_TYPE(V) (V)->btyp
434#define VAL_HDR(V) (V)->hdr
437#define VAL_TYPDEF(V) (V)->typdef
440#define VAL_NSID(V) (V)->nsid
443#define VAL_NAME(V) (V)->name
446#define VAL_RES(V) (V)->res
449#define VAL_BOOL(V) (V)->v.boo
452#define VAL_EMPTY(V) (V)->v.boo
455#define VAL_DOUBLE(V) (V)->v.num.d
458#define VAL_STRING(V) (V)->v.str
464#define VAL_BINARY(V) (V)->v.binary.ustr
467#define VAL_BINARY_LEN(V) (V)->v.binary.ustrlen
470//#define VAL_EXTERN_BINARY(V) (V)->extern_binary
473#define VAL_ENU(V) (&(V)->v.enu)
476#define VAL_ENUM(V) (V)->v.enu.val
481#define VAL_ENUM_NAME(V) (V)->v.enu.name
484#define VAL_FLAG(V) (V)->v.boo
487#define VAL_NUMPTR(V) (&(V)->v.num)
490#define VAL_NUM(V) (V)->v.num
493#define VAL_LONG(V) (V)->v.num.l
496#define VAL_INT(V) (V)->v.num.i
499#define VAL_INT8(V) ((int8)((V)->v.num.i))
502#define VAL_L_INT8(V) (V)->v.num.i
505#define VAL_INT16(V) ((int16)((V)->v.num.i))
508#define VAL_L_INT16(V) (V)->v.num.i
511#define VAL_INT32(V) (V)->v.num.i
514#define VAL_INT64(V) (V)->v.num.l
517#define VAL_STR(V) (V)->v.str
520#define VAL_INSTANCE_ID(V) (V)->v.str
523#define VAL_IDREF(V) (&(V)->v.idref)
526#define VAL_IDREF_NSID(V) (V)->v.idref.nsid
529#define VAL_IDREF_NAME(V) (V)->v.idref.name
532#define VAL_IDREF_IDENTITY(V) (V)->v.idref.identity
535#define VAL_UINT(V) (V)->v.num.u
538#define VAL_UINT8(V) ((uint8)((V)->v.num.u))
541#define VAL_L_UINT8(V) (V)->v.num.u
544#define VAL_UINT16(V) ((uint16)((V)->v.num.u))
547#define VAL_L_UINT16(V) (V)->v.num.u
550#define VAL_UINT32(V) (V)->v.num.u
553#define VAL_L_UINT32(V) (V)->v.num.u
556#define VAL_UINT64(V) (V)->v.num.ul
559#define VAL_ULONG(V) (V)->v.num.ul
564#define VAL_DEC64(V) (V)->v.num.dec.val
569#define VAL_DEC64_DIGITS(V) (V)->v.num.dec.digits
574#define VAL_DEC64_ZEROES(V) (V)->v.num.dec.zeroes
577#define VAL_LIST(V) (V)->v.list
580#define VAL_BITS VAL_LIST
584#define VAL_INTERN(V) (V)->v.intbuff
588#define VAL_EXTERN(V) (V)->v.fname
592#define VAL_IS_DELETED(V) ((V)->flags & VAL_FL_DELETED)
595#define VAL_CLR_DELETED(V) (V)->flags &= ~VAL_FL_DELETED
598#define VAL_MARK_DELETED(V) val_mark_deleted(V)
601#define VAL_UNMARK_DELETED(V) val_mark_undeleted(V)
604#define VAL_LAST_MODIFIED(V) (V)->last_modified
607#define VAL_ETAG(V) (V)->etag
610#define VAL_BTYPE(V) (V)->btyp
613#define VAL_SET_VAREXPR(V) (V)->flags |= VAL_FL_IS_VAREXPR
616#define VAL_CLR_VAREXPR(V) (V)->flags &= ~VAL_FL_IS_VAREXPR
619#define VAL_IS_VAREXPR(V) ((V)->flags & VAL_FL_IS_VAREXPR)
622#define VAL_VAREXPR(V) val_get_varexpr(V)
627#define VAL_SET_META(V) (V)->flags |= VAL_FL_META
630#define VAL_REMOVE_META(M) dlq_remove(M)
635#define VAL_SET_FIXED_VALUE(V) (V)->flags |= VAL_FL_FIXED_VALUE
640#define VAL_CLR_FIXED_VALUE(V) (V)->flags &= ~VAL_FL_FIXED_VALUE
645#define VAL_IS_FIXED_VALUE(V) ((V)->flags & VAL_FL_FIXED_VALUE)
648#define VAL_SET_EDIT2_MERGE(V) (V)->flags |= VAL_FL_EDIT2_MERGE
651#define VAL_CLR_EDIT2_MERGE(V) (V)->flags &= ~VAL_FL_EDIT2_MERGE
654#define VAL_IS_EDIT2_MERGE(V) ((V)->flags & VAL_FL_EDIT2_MERGE)
659#define VAL_SET_EXTERNAL(V) (V)->flags |= VAL_FL_EXTERNAL
662#define VAL_CLR_EXTERNAL(V) (V)->flags &= ~VAL_FL_EXTERNAL
665#define VAL_IS_EXTERNAL(V) ((V)->flags & VAL_FL_EXTERNAL)
668#define VAL_SET_VALUE_SET(V) (V)->flags |= VAL_FL_VALUE_SET
671#define VAL_CLR_VALUE_SET(V) (V)->flags &= ~VAL_FL_VALUE_SET
674#define VAL_IS_VALUE_SET(V) ((V)->flags & VAL_FL_VALUE_SET)
677#define VAL_SET_TEMP_XPATH(V) (V)->flags |= VAL_FL_TEMP_XPATH
680#define VAL_CLR_TEMP_XPATH(V) (V)->flags &= ~VAL_FL_TEMP_XPATH
683#define VAL_IS_TEMP_XPATH(V) ((V)->flags & VAL_FL_TEMP_XPATH)
686#define VAL_SET_UNCOMMITTED_DELETE(V) (V)->flags |= VAL_FL_UNCMTD_DELETE
689#define VAL_CLR_UNCOMMITTED_DELETE(V) (V)->flags &= ~VAL_FL_UNCMTD_DELETE
692#define VAL_IS_UNCOMMITTED_DELETE(V) ((V)->flags & VAL_FL_UNCMTD_DELETE)
695#define VAL_SET_RECREATED(V) (V)->flags |= VAL_FL_RECREATED
698#define VAL_CLR_RECREATED(V) (V)->flags &= ~VAL_FL_RECREATED
701#define VAL_IS_RECREATED(V) ((V)->flags & VAL_FL_RECREATED)
704#define VAL_SET_FROM_TEMPLATE(V) (V)->flags |= VAL_FL_FROM_TEMPLATE
707#define VAL_CLR_FROM_TEMPLATE(V) (V)->flags &= ~VAL_FL_FROM_TEMPLATE
710#define VAL_IS_FROM_TEMPLATE(V) ((V)->flags & VAL_FL_FROM_TEMPLATE)
713#define VAL_XPATHPCB(V) val_get_xpathpcb(V)
716#define VAL_SET_CANONICAL(V) (V)->flags |= VAL_FL_CANONICAL
719#define VAL_CLR_CANONICAL(V) (V)->flags &= ~VAL_FL_CANONICAL
722#define VAL_IS_CANONICAL(V) ((V)->flags & VAL_FL_CANONICAL)
725#define VAL_NMDA_ORIGIN(V) (V)->nmda_origin
728#define VAL_IS_INDEX(V) ((V)->flags & VAL_FL_IS_INDEX)
731#define VAL_SET_IS_INDEX(V) (V)->flags |= VAL_FL_IS_INDEX
734#define VAL_CHILD_HDR_OBJ(H) (H)->obj
737#define VAL_CHILD_HDR_COUNT(H) (H)->count
740#define VAL_SET_DEFCON_DELETED(V) (V)->flags |= VAL_FL_DEFCON_DELETED
743#define VAL_CLR_DEFCON_DELETED(V) (V)->flags &= ~VAL_FL_DEFCON_DELETED
746#define VAL_IS_DEFCON_DELETED(V) ((V)->flags & VAL_FL_DEFCON_DELETED)
753#define VAL_SET_ADDEDIT_DELETED(V) (V)->flags |= VAL_FL_ADDEDIT_DELETED
756#define VAL_IS_ADDEDIT_DELETED(V) ((V)->flags & VAL_FL_ADDEDIT_DELETED)
759#define VAL_CLR_ADDEDIT_DELETED(V) (V)->flags &= ~VAL_FL_ADDEDIT_DELETED
766#define VAL_EDITOP(V) (V)->editop
768//#define VAL_EXTERN_VALONLY(V) (V)->extern_valonly
773#define VAL_SET_DEFSET(V) (V)->flags |= VAL_FL_DEFSET
779#define VAL_CLR_DEFSET(V) (V)->flags &= ~VAL_FL_DEFSET
781/* Value node is from anydata that was replaced by datapath */
782// #define VAL_FROM_ANYDATA(V) (V)->from_anydata
785#define VAL_EXTRA(V) (V)->val_extra
789#define VAL_IS_FORCE_CONFIG(V) ((V)->flags & VAL_FL_FORCE_CONFIG)
791#define VAL_SET_FORCE_CONFIG(V) (V)->flags |= VAL_FL_FORCE_CONFIG
796#define VAL_SET_HDR_RECREATED(V) (V)->flags |= VAL_FL_HDR_RECREATED
799#define VAL_IS_HDR_RECREATED(V) ((V)->flags & VAL_FL_HDR_RECREATED)
803/**************** val_value_t flags2 macros ********************/
807#define VAL_SET_EXTERN_VALONLY(V) (V)->flags2 |= VAL_FL_EXTERN_VALONLY
810#define VAL_CLR_EXTERN_VALONLY(V) (V)->flags2 &= ~VAL_FL_EXTERN_VALONLY
813#define VAL_EXTERN_VALONLY(V) ((V)->flags2 & VAL_FL_EXTERN_VALONLY)
817#define VAL_SET_EXTERN_BINARY(V) (V)->flags2 |= VAL_FL_EXTERN_BINARY
820#define VAL_CLR_EXTERN_BINARY(V) (V)->flags2 &= ~VAL_FL_EXTERN_BINARY
823#define VAL_EXTERN_BINARY(V) ((V)->flags2 & VAL_FL_EXTERN_BINARY)
827#define VAL_SET_FROM_ANYDATA(V) (V)->flags2 |= VAL_FL_FROM_ANYDATA
830#define VAL_CLR_FROM_ANYDATA(V) (V)->flags2 &= ~VAL_FL_FROM_ANYDATA
833#define VAL_FROM_ANYDATA(V) ((V)->flags2 & VAL_FL_FROM_ANYDATA)
862typedef void (*dumpfn_t) (log_debug_t level, const char *fstr, ...);
871typedef void (*errfn_t) (const char *fstr, ...);
880/* pick a log indent function for dump_value */
881typedef void (*indentfn_t) (log_debug_t level, int32 indentcnt);
887typedef struct logfns_t_ {
888 dumpfn_t dumpfn; /**< log dump callback */
889 errfn_t errorfn; /**< log error callback */
890 indentfn_t indentfn; /**< log indent callback */
891 boolean suppressVariableNames; /**< suppress variable names in output */
892 FILE *outputFile; /**< manager redirect to file output */
897typedef struct val_idref_t_ {
898 xmlns_id_t nsid; /**< namespace ID */
901 ncx_identity_t *identity; /**< ID back-ptr if found */
906typedef enum val_insert_mode_t_ {
907 VAL_INS_MODE_NONE, /**< not set */
908 VAL_INS_MODE_KEY, /**< YANG key attribute */
909 VAL_INS_MODE_VALUE, /**< YANG value attribute */
910 VAL_INS_MODE_POINT /**< YANG-API point param */
911} YPACK val_insert_mode_t;
915typedef enum val_dumpvalue_mode_t_ {
916 DUMP_VAL_NONE, /**< not set */
917 DUMP_VAL_STDOUT, /**< dump val to STDOUT */
918 DUMP_VAL_LOG, /**< dump val to main log */
919 DUMP_VAL_ALT_LOG, /**< dump val to alternate log */
920 DUMP_VAL_AUDIT_LOG, /**< dump val to audit log */
921} val_dumpvalue_mode_t;
925typedef struct val_editvars_t_ {
930 struct val_value_t_ *curparent; /**< track the real parent */
931 op_insertop_t insertop; /**< YANG insert operation */
932 xmlChar *insertstr; /**< saved value or key attr */
933 struct xpath_pcb_t_ *insertxpcb; /**< key attr for insert */
934 struct val_value_t_ *insertval; /**< back-ptr if before or after */
935 val_insert_mode_t insert_mode; /**< insert mode requested */
936 uint8 silprio; /**< 2nd SIL priority for server */
937 boolean operset; /**< nc:operation here */
938 void *pcookie; /**< user pointer cookie */
939 int icookie; /**< user integer cookie */
940 boolean is_move; /**< TRUE if YPATCH MOVE operation */
941 boolean skip_sil_partial; /**< TRUE if skip_sil_partial needed */
942 boolean deleted; /**< TRUE if deleted from commit_deletes */
943} YPACK val_editvars_t;
947typedef struct val_extra_t_ {
954 xmlChar *dname; /**< malloced name if needed */
968 struct val_value_t_ *virtualval;
977 struct xpath_pcb_t_ *xpathpcb;
983 plock_cb_t *plock[VAL_MAX_PLOCKS];
989 dlq_hdr_t *dataruleQ; /**< Q of obj_xpath_ptr_t */
1002 struct xpath_aio_cb_t_ *aiocb;
1005 ncx_sm_mpid_t *mpid;
1009 struct val_value_t_ *leafrefval;
1015 typ_pattern_t *regex_filter;
1024typedef struct val_value_t_ {
1029 struct obj_template_t_ *obj; /**< bptr to object def */
1030 typ_def_t *typdef; /**< bptr to typdef if leaf */
1031 const xmlChar *name; /**< back pointer to elname\n
1032 * the dname field is moved to val_extra_t and only used when
1033 * the value is constructed from dummy objects or no objects at all
1036 struct val_value_t_ *parent; /**< back-ptr to parent if any */
1037 struct val_child_hdr_t_ *hdr; /**< back-ptr to own child_hdr */
1040 val_extra_t *val_extra;
1042 uint32 flags; /**< internal status flags */
1044 xmlns_id_t nsid; /**< namespace ID for this node */
1045 ncx_btype_t btyp; /**< base type of this value */
1046 ncx_data_class_t dataclass; /**< config or state data */
1051 time_t last_modified;
1052 ncx_etag_t etag; /**< ETag for RESTCONF */
1067 dlq_hdr_t *metaQ; /**< Q of val_value_t */
1072 val_editvars_t *editvars; /**< edit-vars from attrs */
1073 op_editop_t editop; /**< needed for all edits */
1074 status_t res; /**< validation result */
1076 /* GET1 getcb moved to val_extra */
1077 /* GET1 virtualval moved to val_extra */
1078 /* GET1 cachetime moved to val_extra */
1081 dlq_hdr_t *indexQ; /**< Q of val_index_t or ncx_filptr_t */
1083 /* this field is used for NCX_BT_CHOICE
1084 * If set, the object path for this node is really:
1085 * $this --> casobj --> casobj.parent --> $this.parent
1086 * the OBJ_TYP_CASE and OBJ_TYP_CHOICE nodes are skipped
1087 * inside an XML instance document
1089 * replaced by val_get_casobj() function in val_util.h
1090 * struct obj_template_t_ *casobj;
1093 /* xpathpcb moved to val_extra_t */
1095 /* back-ptr to the partial locks that are held
1097 * plock moved to val_extra
1100 /* back-ptr to the data access control rules that
1101 * reference this node
1102 * dataruleQ moved to val_extra
1105 /* malloced pointer to the variable expression found
1106 * if this val node is part of a data template.
1107 * The actual value in union v_ MUST be ignored if
1108 * varexpr string is non-NULL!!
1109 * varexpr moved to val_extra
1115 ncx_owner_id_t owner_id;
1118 ncx_nmda_origin_t nmda_origin;
1126 //boolean extern_valonly;
1129 //boolean extern_binary;
1138 //boolean from_anydata;
1159 dlq_hdr_t child_hdrQ;
1180 val_idref_t idref; /**< NCX_BT_IDREF */
1181 ncx_binary_t binary; /**< NCX_BT_BINARY */
1182 ncx_list_t list; /**< NCX_BT_BITS, NCX_BT_SLIST */
1183 boolean boo; /**< NCX_BT_EMPTY, NCX_BT_BOOLEAN */
1184 ncx_enum_t enu; /**< NCX_BT_UNION, NCX_BT_ENUM */
1185 xmlChar *fname; /**< NCX_BT_EXTERN */
1186 xmlChar *intbuff; /**< NCX_BT_INTERN */
1194typedef struct val_child_hdr_t_ {
1195 dlq_hdr_t qhdr; /**< queue header */
1202 struct obj_template_t_ *obj;
1207 struct val_tree_t_ *tree;
1220} YPACK val_child_hdr_t;
1233typedef struct val_index_t_ {
1234 dlq_hdr_t qhdr; /**< queue header */
1235 val_value_t *val; /**< points to a child node */
1248 (*val_test_fn_t) (const val_value_t *val);
1261 (*val_walker_fn_t) (val_value_t *val,
1277 (*val_walker2_fn_t) (val_child_hdr_t *valhdr,
1293 (*val_hdr_test_fn_t) (val_child_hdr_t *hdr,
1307 (*val_test2_fn_t) (val_value_t *val,
1338 val_new_value (void);
1350 val_init_value (val_value_t *val);
1364 val_init_complex (val_value_t *val,
1378 val_init_virtual (val_value_t *val,
1380 struct obj_template_t_ *obj);
1393 val_init_from_template (val_value_t *val,
1394 struct obj_template_t_ *obj);
1407 val_reinit_from_template (val_value_t *val,
1408 struct obj_template_t_ *obj);
1421 val_free_value (val_value_t *val);
1432 val_set_name (val_value_t *val,
1433 const xmlChar *name,
1447 val_force_dname (val_value_t *val);
1459 val_set_qname (val_value_t *val,
1461 const xmlChar *name,
1475 val_string_ok (typ_def_t *typdef,
1477 const xmlChar *strval);
1495 val_string_ok_errinfo (typ_def_t *typdef,
1497 const xmlChar *strval,
1498 ncx_errinfo_t **errinfo);
1517 val_binary_ok_errinfo (typ_def_t *typdef,
1518 const xmlChar *strval,
1520 ncx_errinfo_t **errinfo);
1541 val_string_ok_ex (ses_cb_t *scb,
1544 const xmlChar *strval,
1545 ncx_errinfo_t **errinfo,
1568 val_string_ok_ex2 (ses_cb_t *scb,
1571 const xmlChar *strval,
1572 ncx_errinfo_t **errinfo,
1598 val_list_ok (typ_def_t *typdef,
1621 val_list_ok_errinfo (typ_def_t *typdef,
1624 ncx_errinfo_t **errinfo);
1640 val_enum_ok (typ_def_t *typdef,
1641 const xmlChar *enumval,
1643 const xmlChar **retstr);
1656 val_bit_ok (typ_def_t *typdef,
1657 const xmlChar *bitname,
1673 val_bitpos_ok (typ_def_t *typdef,
1675 const xmlChar **name);
1697 val_idref_ok (typ_def_t *typdef,
1698 const xmlChar *qname,
1700 const xmlChar **name,
1701 ncx_identity_t **id);
1729 val_idref_ok_ex (typ_def_t *typdef,
1730 const xmlChar *qname,
1733 ncx_module_t *impmod,
1735 const xmlChar **name,
1736 ncx_identity_t **id);
1756 val_parse_idref (ncx_module_t *mod,
1757 const xmlChar *qname,
1759 const xmlChar **name,
1760 ncx_identity_t **id);
1781 val_parse_idref_rootcb (ncx_module_t *mod,
1782 const xmlChar *qname,
1784 const xmlChar **name,
1785 ncx_identity_t **id,
1786 ncx_sm_rootcb_t *rootcb);
1799 val_range_ok (typ_def_t *typdef,
1801 const ncx_num_t *num);
1816 val_range_ok_errinfo (typ_def_t *typdef,
1818 const ncx_num_t *num,
1819 ncx_errinfo_t **errinfo);
1830 val_pattern_ok (typ_def_t *typdef,
1831 const xmlChar *strval);
1847 val_pattern_ok_errinfo (typ_def_t *typdef,
1848 const xmlChar *strval,
1849 ncx_errinfo_t **errinfo);
1862 val_simval_ok (typ_def_t *typdef,
1863 const xmlChar *simval);
1879 val_simval_ok_errinfo (typ_def_t *typdef,
1880 const xmlChar *simval,
1881 ncx_errinfo_t **errinfo);
1898 val_simval_ok_ex (typ_def_t *typdef,
1899 const xmlChar *simval,
1900 ncx_errinfo_t **errinfo,
1920 val_simval_ok_max (typ_def_t *typdef,
1921 const xmlChar *simval,
1922 ncx_errinfo_t **errinfo,
1945 val_simval_ok_max2 (typ_def_t *typdef,
1946 const xmlChar *simval,
1947 ncx_errinfo_t **errinfo,
1973 val_simval_ok_max3 (typ_def_t *typdef,
1974 const xmlChar *simval,
1975 ncx_errinfo_t **errinfo,
1994 val_union_ok (typ_def_t *typdef,
1995 const xmlChar *strval,
1996 val_value_t *retval);
2013 val_union_ok_errinfo (typ_def_t *typdef,
2014 const xmlChar *strval,
2015 val_value_t *retval,
2016 ncx_errinfo_t **errinfo);
2037 val_union_ok_ex (typ_def_t *typdef,
2038 const xmlChar *strval,
2039 val_value_t *retval,
2040 ncx_errinfo_t **errinfo,
2042 typ_def_t **match_typdef);
2066 val_union_ok_binary (typ_def_t *typdef,
2067 const xmlChar *binstr,
2069 val_value_t *retval,
2070 ncx_errinfo_t **errinfo,
2071 typ_def_t **match_typdef);
2094 val_union_ok_full (typ_def_t *typdef,
2095 const xmlChar *strval,
2096 val_value_t *contextval,
2097 val_value_t *rootval,
2098 val_value_t *retval,
2099 ncx_errinfo_t **errinfo);
2109 val_get_metaQ (val_value_t *val);
2120 val_get_first_meta (dlq_hdr_t *queue);
2131 val_get_first_meta_val (val_value_t *val);
2142 val_get_next_meta (val_value_t *curnode);
2153 val_meta_empty (val_value_t *val);
2165 val_find_meta (val_value_t *val,
2167 const xmlChar *name);
2180 val_meta_match (val_value_t *val,
2181 val_value_t *metaval);
2193 val_metadata_inst_count (val_value_t *val,
2195 const xmlChar *name);
2209 val_dump_value (val_value_t *val,
2226 val_dump_value_config (val_value_t *val,
2243 val_dump_value_ex (val_value_t *val,
2245 ncx_display_mode_t display_mode,
2260 val_dump_alt_value (val_value_t *val,
2275 val_stdout_value (val_value_t *val,
2291 val_stdout_value_ex (val_value_t *val,
2293 ncx_display_mode_t display_mode,
2315 val_dump_value_max (val_value_t *val,
2317 int32 indent_amount,
2318 val_dumpvalue_mode_t dumpmode,
2319 ncx_display_mode_t display_mode,
2343 val_dump_value_nonconfig (val_value_t *val,
2345 int32 indent_amount,
2346 val_dumpvalue_mode_t dumpmode,
2347 ncx_display_mode_t display_mode,
2374 val_dump_value_full (val_value_t *val,
2376 int32 indent_amount,
2377 val_dumpvalue_mode_t dumpmode,
2378 ncx_display_mode_t display_mode,
2382 boolean expand_varexpr,
2384 logfns_t *overrideOutput);
2410 val_dump_value_full2 (val_value_t *val,
2412 int32 indent_amount,
2413 val_dumpvalue_mode_t dumpmode,
2414 ncx_display_mode_t display_mode,
2418 boolean expand_varexpr,
2421 logfns_t *overrideOutput);
2437 val_set_string (val_value_t *val,
2438 const xmlChar *valname,
2439 const xmlChar *valstr);
2458 val_set_string2 (val_value_t *val,
2459 const xmlChar *valname,
2461 const xmlChar *valstr,
2486 val_set_string3 (val_value_t *val,
2487 const xmlChar *valname,
2489 const xmlChar *valstr,
2491 boolean is_dblquote);
2510 val_set_binary (const xmlChar *valstr,
2526 val_reset_empty (val_value_t *val);
2542 val_set_simval (val_value_t *val,
2545 const xmlChar *valname,
2546 const xmlChar *valstr);
2592 val_set_simval_str (val_value_t *val,
2595 const xmlChar *valname,
2597 const xmlChar *valstr);
2621 val_set_simval_binary (val_value_t *val,
2622 const xmlChar *binstr,
2670 val_set_simval_max (val_value_t *val,
2673 const xmlChar *valname,
2675 const xmlChar *valstr,
2693 val_make_simval (typ_def_t *typdef,
2695 const xmlChar *valname,
2696 const xmlChar *valstr,
2714 val_make_string (xmlns_id_t nsid,
2715 const xmlChar *valname,
2716 const xmlChar *valstr);
2730 val_make_binary (xmlns_id_t nsid,
2731 const xmlChar *valname,
2732 const xmlChar *valstr,
2748 val_merge (const val_value_t *src,
2759 val_clone (const val_value_t *val);
2770 val_clone2 (const val_value_t *val);
2787 val_clone_config_data (const val_value_t *val,
2809 val_clone_config_newval (const val_value_t *val,
2833 val_clone_config_newval_keys_only (const val_value_t *val,
2857 val_clone_config_save (const val_value_t *val,
2883 val_clone_config_false (const val_value_t *val,
2898 val_replace (val_value_t *val,
2912 val_replace_str (const xmlChar *str,
2928 val_fast_replace_string (const xmlChar *str,
2940 val_replace_stringval (val_value_t *val,
2941 const xmlChar *str);
2961 val_add_child (val_value_t *child,
2962 val_value_t *parent);
2977 val_add_child_sorted (val_value_t *child,
2978 val_value_t *parent);
2993 val_insert_child (val_value_t *child,
2994 val_value_t *current,
2995 val_value_t *parent);
3007 val_remove_child (val_value_t *child);
3020 val_swap_child (val_value_t *newchild,
3021 val_value_t *curchild);
3032 val_first_child_match (const val_value_t *parent,
3033 const val_value_t *child);
3047 val_first_child_match_fast (const val_value_t *parent,
3048 const val_value_t *child,
3049 val_value_t *lastmatch);
3064 val_next_child_match (val_value_t *parent,
3066 val_value_t *curmatch);
3076 val_next_child_same (val_value_t *curchild);
3086 val_get_first_child (const val_value_t *parent);
3096 val_get_next_child (const val_value_t *curchild);
3106 val_get_first_terminal_child (const val_value_t *parent);
3116 val_get_next_terminal_child (const val_value_t *curchild);
3133 val_find_child (const val_value_t *parent,
3134 const xmlChar *modname,
3135 const xmlChar *childname);
3152 val_find_child_fast (const val_value_t *parent,
3154 const xmlChar *childname);
3166 val_find_child_obj (const val_value_t *parent,
3167 const struct obj_template_t_ *chobj);
3185 val_find_child_que (const dlq_hdr_t *childQ,
3187 const xmlChar *childname);
3204 val_match_child (const val_value_t *parent,
3205 const xmlChar *modname,
3206 const xmlChar *childname);
3226 val_match_child_count (const val_value_t *parent,
3227 const xmlChar *modname,
3228 const xmlChar *childname,
3229 uint32 *matchcount);
3249 val_find_next_child (const val_value_t *parent,
3250 const xmlChar *modname,
3251 const xmlChar *childname,
3252 const val_value_t *curchild);
3269 val_find_next_child_fast (const val_value_t *parent,
3270 const val_value_t *curchild);
3282 val_first_child_name (val_value_t *parent,
3283 const xmlChar *name);
3295 val_first_child_qname (val_value_t *parent,
3297 const xmlChar *name);
3310 val_next_child_qname (val_value_t *parent,
3312 const xmlChar *name,
3313 val_value_t *curchild);
3334 val_first_child_string (val_value_t *parent,
3335 const xmlChar *name,
3336 const xmlChar *strval);
3348 val_child_cnt (val_value_t *parent);
3361 val_child_inst_cnt (const val_value_t *parent,
3362 const xmlChar *modname,
3363 const xmlChar *name);
3374 val_get_child_inst_id (const val_value_t *parent,
3375 const val_value_t *child);
3385 val_liststr_count (const val_value_t *val);
3401 val_index_match (const val_value_t *val1,
3402 const val_value_t *val2);
3416 val_index_compare (const val_value_t *val1,
3417 const val_value_t *val2);
3452 val_compare_max (const val_value_t *val1,
3453 const val_value_t *val2,
3496 val_compare_max_def (const val_value_t *val1,
3497 const val_value_t *val2,
3501 boolean ignore_defaults);
3528 val_compare_ex (const val_value_t *val1,
3529 const val_value_t *val2,
3530 boolean configonly);
3554 val_compare (const val_value_t *val1,
3555 const val_value_t *val2);
3578 val_compare_to_string (const val_value_t *val1,
3579 const xmlChar *strval2,
3605 val_compare_to_string_len (const val_value_t *val1,
3606 const xmlChar *strval2,
3618// val_compare_for_replace (const val_value_t *val1,
3619// const val_value_t *val2);
3641 val_compare_for_edit (const val_value_t *val1,
3642 const val_value_t *val2,
3665 val_compare_as_string (const val_value_t *val1,
3666 const val_value_t *val2,
3689 val_sprintf_simval_nc (xmlChar *buff,
3690 const val_value_t *val,
3714 val_sprintf_simval_nc_ex (xmlChar *buff,
3715 const val_value_t *val,
3745 val_sprintf_simval_xpath (xmlChar *buff,
3746 const val_value_t *val,
3778 val_sprintf_binary (xmlChar *buff,
3779 const val_value_t *val,
3797 val_make_sprintf_string (const val_value_t *val);
3813 val_resolve_scoped_name (val_value_t *val,
3814 const xmlChar *name,
3815 val_value_t **chval);
3825 val_get_iqualval (const val_value_t *val);
3847 val_duplicates_allowed (val_value_t *val);
3858 val_has_content (const val_value_t *val);
3870 val_has_content_ex (const val_value_t *val);
3881 val_has_index (const val_value_t *val);
3891 val_get_first_index (const val_value_t *val);
3901 val_get_next_index (const val_index_t *valindex);
3911 val_get_index_count (const val_value_t *val);
3926 val_parse_meta (ses_cb_t *scb,
3929 val_value_t *retval);
3939 val_set_extern (val_value_t *val,
3951 val_set_intern (val_value_t *val,
3974 val_fit_oneline (const val_value_t *val,
3988 val_create_allowed (const val_value_t *val);
4000 val_delete_allowed (const val_value_t *val);
4011 val_is_config_data (const val_value_t *val);
4023 val_is_config_save (const val_value_t *val);
4043 val_is_config_false (const val_value_t *val);
4056 val_is_virtual (const val_value_t *val);
4089 val_get_virtual_value (ses_cb_t *scb,
4114 val_is_default (val_value_t *val);
4127 val_is_real (const val_value_t *val);
4137 val_get_parent_nsid (const val_value_t *val);
4152 val_instance_count (val_value_t *val,
4153 const xmlChar *modname,
4154 const xmlChar *objname);
4172 val_instance_count_fast (val_value_t *val,
4174 const xmlChar *objname,
4175 val_value_t **firstval);
4191 val_instance_count_fast2 (val_value_t *val,
4192 val_value_t *startval);
4211 val_set_extra_instance_errors (val_value_t *val,
4212 const xmlChar *modname,
4213 const xmlChar *objname,
4226 val_need_quotes (const xmlChar *str);
4239 val_has_dquotes (const xmlChar *str);
4250 val_need_dquotes (const xmlChar *str);
4261 val_all_whitespace (const xmlChar *str);
4273 val_any_whitespace (const xmlChar *str,
4286 val_match_metaval (const xml_attr_t *attr,
4288 const xmlChar *name);
4298 val_get_dirty_flag (const val_value_t *val);
4308 val_get_subtree_dirty_flag (const val_value_t *val);
4317 val_set_subtree_dirty_up (val_value_t *val);
4328 val_set_dirty_flag (val_value_t *val,
4338 val_set_child_deleted_flag (val_value_t *val);
4348 val_get_child_deleted_flag (val_value_t *val);
4364 val_clear_dirty_flag (val_value_t *val,
4366 ncx_transaction_id_t txid,
4368 boolean do_clear_default);
4377 val_clear_child_dirty_flag (val_value_t *val);
4387 val_dirty_subtree (const val_value_t *val);
4403 val_clean_tree (val_value_t *val);
4413 val_get_nest_level (val_value_t *val);
4425 val_get_first_leaf (val_value_t *val);
4435extern const xmlChar *
4436 val_get_mod_name (const val_value_t *val);
4446extern const xmlChar *
4447 val_get_mod_prefix (const val_value_t *val);
4457 val_get_nsid (const val_value_t *val);
4467 val_get_yang_sid (const val_value_t *val);
4477 val_change_nsid (val_value_t *val,
4488 val_change_nsid2 (val_value_t *val,
4499 val_change_nsid3 (val_value_t *val,
4515 val_make_from_insertxpcb (val_value_t *sourceval,
4525extern const typ_def_t *
4526 val_get_typdef (const val_value_t *val);
4537 val_set_by_default (const val_value_t *val);
4548 val_has_withdef_default (const val_value_t *val);
4557 val_set_withdef_default (val_value_t *val);
4568 val_is_metaval (const val_value_t *val);
4579 val_move_children (val_value_t *srcval,
4580 val_value_t *destval);
4591 val_move_nonconfig_children (val_value_t *srcval,
4592 val_value_t *destval);
4614 val_cvt_generic (val_value_t *val);
4626 val_set_pcookie (val_value_t *val,
4639 val_set_icookie (val_value_t *val,
4651 val_get_pcookie (val_value_t *val);
4662 val_get_icookie (val_value_t *val);
4673 val_delete_default_leaf (val_value_t *val);
4686 val_delete_default_leaf_list (val_value_t *val);
4695 val_force_empty (val_value_t *val);
4706 val_delete_default_npcon (val_value_t *val);
4718 val_move_fields_for_xml (val_value_t *srcval,
4719 val_value_t *destval,
4731 val_move_metadata (val_value_t *srcval,
4732 val_value_t *destval);
4742 val_get_first_key (val_value_t *val);
4752 val_get_last_key (val_value_t *val);
4762 val_get_next_key (val_index_t *curkey);
4772 val_get_prev_key (val_index_t *curkey);
4782 val_remove_key (val_value_t *keyval);
4792 val_new_deleted_value (void);
4803 val_new_editvars (val_value_t *val);
4814 val_free_editvars (val_value_t *val);
4823 val_free_solo_editvars (val_editvars_t *editvars);
4837 val_all_np_containers (val_value_t *val);
4850 val_sprintf_etag (val_value_t *val,
4862 val_get_last_modified (val_value_t *val);
4871 val_force_default (val_value_t *val);
4882 val_set_all_tags (val_value_t *val,
4884 ncx_transaction_id_t txid);
4893extern const xmlChar *
4894 val_get_owner (val_value_t *val);
4903extern ncx_owner_id_t
4904 val_get_owner_id (val_value_t *val);
4914 val_need_owner_string (val_value_t *val);
4924 val_delete_children (val_value_t *val);
4933 val_clean_value (val_value_t *val);
4945 val_find_bit (val_value_t *val,
4946 const xmlChar *bitname);
4957 val_has_children (const val_value_t *val);
4968 val_add_test_valindex (val_value_t *parentval,
4969 val_value_t *keyval);
4978extern const xmlChar *
4979 val_get_yang_typename (val_value_t *val);
4989 val_set_force_config (val_value_t *val,
5000 val_clear_defvalset_flag (val_value_t *val);
5012 val_clone_valQ (dlq_hdr_t *valQ,
5013 dlq_hdr_t *return_valQ);
5024 val_clean_valQ (dlq_hdr_t *valQ);
5037 val_is_value_set (val_value_t *val);
5048 val_url_encode_string (const xmlChar *str,
5065 val_quote_encode_string (const xmlChar *str,
5080 val_convert_any_to_container (val_value_t *val);
5090 val_clean_index_chain (val_value_t *val);
5101 val_pattern_match (const xmlRegexpPtr pattern,
5102 const xmlChar *strval);
5114 val_ocpattern_match (const regex_t *ocpattern,
5115 const xmlChar *strval);
5128 val_idref_derived_from (ncx_module_t *impmod,
5129 val_value_t *testval,
5130 const xmlChar *qname,
5145 val_set_sil_priority (val_value_t *val,
5156 val_get_sil_priority (val_value_t *val);
5167extern const xmlChar *
5168 val_find_bit_name (val_value_t *val,
5181extern const xmlChar *
5182 val_find_enum_name (val_value_t *val,
5197extern const xmlChar *
5198 val_find_enum_name2 (ncx_btype_t btyp,
5213 val_mark_deleted (val_value_t *val);
5224 val_mark_undeleted (val_value_t *val);
5238 val_has_conditional_value (val_value_t *val);
5252 val_convert_leafref (const val_value_t *val);
5266 val_convert_leafref_ext (val_value_t *val);
5292 val_compare_for_topreplace (const val_value_t *val1,
5293 const val_value_t *val2);
5324 val_compare_for_topreplace_simple (const val_value_t *val1,
5325 const val_value_t *val2);
5336 val_has_complex_child (const val_value_t *val);
5347 val_add_meta (val_value_t *metaval,
5358 val_find_root (val_value_t *val);
5368 val_set_canonical (val_value_t *val);
5379 val_get_leafref_typdef (val_value_t *val);
5402 val_ascendant_compare (val_value_t *val1,
5412extern const xmlChar *
5413 val_get_dname (const val_value_t *val);
5426 val_set_dname (val_value_t *val,
5427 const xmlChar *dname);
5441 val_set_dname2 (val_value_t *val,
5442 const xmlChar *dname,
5454 val_new_extra (val_value_t *val);
5463extern const xmlChar *
5464 val_get_varexpr (const val_value_t *val);
5475 val_set_varexpr (val_value_t *val,
5476 const xmlChar *varexpr);
5485 val_clear_varexpr (val_value_t *val);
5494 val_set_wildcard_string (val_value_t *val);
5503#define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
5514 val_copy_editvars (const val_value_t *val,
5528 val_set_skip_sil_partial (val_value_t *val);
5538 val_get_skip_sil_partial (const val_value_t *val);
5552 val_get_leafref_typdef_ex (val_value_t *val,
5553 boolean union_check);
5569 val_is_default_npcon (val_value_t *val);
5580 val_identity_ok (typ_def_t *typdef,
5581 ncx_identity_t *ident);
5599 val_highest_bit_set (const val_value_t *val,
5618 val_first_bit_set (const val_value_t *val,
5619 const ncx_lmem_t **lmem,
5638 val_next_bit_set (const val_value_t *val,
5639 const ncx_lmem_t *lmem,
5640 const ncx_lmem_t **nextlmem,
5649extern struct xpath_aio_cb_t_ *
5650 val_get_aiocb (const val_value_t *val);
5661 val_set_aiocb (val_value_t *val,
5662 struct xpath_aio_cb_t_ *aiocb);
5674extern ncx_sm_mpid_t *
5675 val_get_mpid (const val_value_t *val);
5687 val_set_mpid (val_value_t *val,
5688 struct ncx_sm_mpid_t_ *mpid);
5706 val_set_deleted_from_commit_deletes (val_value_t *val,
5724 val_get_deleted_from_commit_deletes (const val_value_t *val);
5738 val_clean_leafref_cache (val_value_t *val);
5770 val_set_child_leaf (val_value_t *parent,
5771 const xmlChar *modname,
5772 const xmlChar *childname,
5773 const xmlChar *valstr);
5812 val_delete_child_leaf (val_value_t *parent,
5813 val_value_t *curparent,
5814 const xmlChar *modname,
5815 const xmlChar *childname);
5828 val_is_all_digits (const xmlChar *str);
5846 val_cvt_instanceid_filter (val_value_t *val);
5857extern typ_pattern_t *
5858 val_get_regex_filter (val_value_t *val);
5873 val_set_regex_filter (val_value_t *val,
5874 typ_pattern_t *regex_filter);
5889 val_test_regex_filter (typ_pattern_t *pat,
5890 const xmlChar *strval,
5906 val_is_regex_filter (const xmlChar *testval,
5916 val_clean_meta_all (val_value_t *val);
5926 val_from_annotation (const val_value_t *val);
5933} /* 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.