yumapro  21.10T-8
YumaPro SDK
val.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_val
13 #define _H_val
14 
15 /* FILE: val.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
30 /*********************************************************************
31 * *
32 * C H A N G E H I S T O R Y *
33 * *
34 *********************************************************************
35 
36 date init comment
37 ----------------------------------------------------------------------
38 19-dec-05 abb Begun
39 21jul08 abb start obj-based rewrite
40 
41 */
42 
43 #include <xmlstring.h>
44 #include <time.h>
45 
46 #include "dlq.h"
47 #include "ncxconst.h"
48 #include "ncxtypes.h"
49 #include "op.h"
50 #include "plock_cb.h"
51 #include "status.h"
52 #include "typ.h"
53 #include "xml_util.h"
54 #include "xmlns.h"
55 #include "log.h"
56 
57 #ifndef _H_ses
58 #include "ses.h"
59 #endif
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 /********************************************************************
66 * *
67 * C O N S T A N T S *
68 * *
69 *********************************************************************/
70 
71 
72 // Header only
73 
146 #define VAL_MAX_PLOCKS 1 // was 4
147 
149 #define VAL_MAX_DATARULES 1 // was 4
150 
152 #define VAL_MAX_NUMLEN NCX_MAX_NUMLEN
153 
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 '/'
168 
169 #define VAL_XPATH_INDEX_SEPSTR (const xmlChar *)"]["
170 #define VAL_XPATH_INDEX_SEPLEN 2
171 
173 #define VAL_PASSWORD_STRING (const xmlChar *)"****"
174 
178 #define VAL_FL_DUPDONE bit0
179 
181 #define VAL_FL_DUPOK bit1
182 
184 #define VAL_FL_DEFSET bit2
185 
187 #define VAL_FL_META bit3
188 
190 #define VAL_FL_DIRTY bit4
191 
193 #define VAL_FL_UNIDONE bit5
194 
196 #define VAL_FL_DEFVALSET bit6
197 
201 #define VAL_FL_DEFVAL bit7
202 
206 #define VAL_FL_WITHDEF bit8
207 
209 #define VAL_FL_DELETED bit9
210 
214 #define VAL_FL_SUBTREE_DIRTY bit10
215 
221 #define VAL_FL_CHILD_DELETED bit11
222 
229 #define VAL_FL_IS_VAREXPR bit12
230 
234 #define VAL_FL_FIXED_VALUE bit13
235 
239 #define VAL_FL_EDIT2_MERGE bit14
240 
242 #define VAL_FL_EXTERNAL bit15
243 
248 #define VAL_FL_FORCE_CONFIG bit16
249 
254 #define VAL_FL_FORCE_CONFIG_VALUE bit17
255 
260 #define VAL_FL_VALUE_SET bit18
261 
266 #define VAL_FL_TEMP_XPATH bit19
267 
271 #define VAL_FL_UNCMTD_DELETE bit20
272 
276 #define VAL_FL_RECREATED bit21
277 
283 #define VAL_FL_SUBTREE_RECREATED bit22
284 
289 #define VAL_FL_FROM_TEMPLATE bit23
290 
293 #define VAL_FL_CANONICAL bit24
294 
298 #define VAL_FL_IS_INDEX bit25
299 
304 #define VAL_FL_WILDCARD bit26
305 
309 #define VAL_FL_ANYXML_KEY bit27
310 
314 #define VAL_FL_ANYXML_CONFIG bit28
315 
321 #define VAL_FL_ANYXML_UNKNOWN bit29
322 
324 #define VAL_FL_DEFCON_DELETED bit30
325 
326 
334 #define VAL_FL_ADDEDIT_DELETED bit31
335 
336 
337 /********* val_child_hdr->flags fields ***************/
338 
339 
347 #define VAL_FL_GENERIC bit0
348 
350 #define VAL_FL_ROOT bit1
351 
353 #define VAL_FL_USE_QUE bit2
354 
356 #define VAL_FL_USE_TREE bit3
357 
359 #define VAL_FL_HDR_DIRTY bit4
360 
362 #define VAL_FL_HDR_SUBTREE_DIRTY bit5
363 
367 #define VAL_FL_HDR_RECREATED bit6
368 
372 #define VAL_FL_HDR_NOT_INSERTED bit7
373 
374 
376 #define VAL_VIRTUAL_CACHE_TIME 3
377 
378 /* macros to access simple value types */
379 
381 #define VAL_OBJ(V) (V)->obj
382 
384 #define VAL_OBJTYPE(V) (V)->obj->objtype
385 
387 #define VAL_TYPE(V) (V)->btyp
388 
390 #define VAL_HDR(V) (V)->hdr
391 
393 #define VAL_TYPDEF(V) (V)->typdef
394 
396 #define VAL_NSID(V) (V)->nsid
397 
399 #define VAL_NAME(V) (V)->name
400 
402 #define VAL_RES(V) (V)->res
403 
405 #define VAL_BOOL(V) (V)->v.boo
406 
408 #define VAL_EMPTY(V) (V)->v.boo
409 
411 #define VAL_DOUBLE(V) (V)->v.num.d
412 
414 #define VAL_STRING(V) (V)->v.str
415 
420 #define VAL_BINARY(V) (V)->v.binary.ustr
421 
423 #define VAL_BINARY_LEN(V) (V)->v.binary.ustrlen
424 
426 #define VAL_ENU(V) (&(V)->v.enu)
427 
429 #define VAL_ENUM(V) (V)->v.enu.val
430 
434 #define VAL_ENUM_NAME(V) (V)->v.enu.name
435 
437 #define VAL_FLAG(V) (V)->v.boo
438 
440 #define VAL_LONG(V) (V)->v.num.l
441 
443 #define VAL_INT(V) (V)->v.num.i
444 
446 #define VAL_INT8(V) ((int8)((V)->v.num.i))
447 
449 #define VAL_L_INT8(V) (V)->v.num.i
450 
452 #define VAL_INT16(V) ((int16)((V)->v.num.i))
453 
455 #define VAL_L_INT16(V) (V)->v.num.i
456 
458 #define VAL_INT32(V) (V)->v.num.i
459 
461 #define VAL_INT64(V) (V)->v.num.l
462 
464 #define VAL_STR(V) (V)->v.str
465 
467 #define VAL_INSTANCE_ID(V) (V)->v.str
468 
470 #define VAL_IDREF(V) (&(V)->v.idref)
471 
473 #define VAL_IDREF_NSID(V) (V)->v.idref.nsid
474 
476 #define VAL_IDREF_NAME(V) (V)->v.idref.name
477 
479 #define VAL_IDREF_IDENTITY(V) (V)->v.idref.identity
480 
482 #define VAL_UINT(V) (V)->v.num.u
483 
485 #define VAL_UINT8(V) ((uint8)((V)->v.num.u))
486 
488 #define VAL_L_UINT8(V) (V)->v.num.u
489 
491 #define VAL_UINT16(V) ((uint16)((V)->v.num.u))
492 
494 #define VAL_L_UINT16(V) (V)->v.num.u
495 
497 #define VAL_UINT32(V) (V)->v.num.u
498 
500 #define VAL_L_UINT32(V) (V)->v.num.u
501 
503 #define VAL_UINT64(V) (V)->v.num.ul
504 
506 #define VAL_ULONG(V) (V)->v.num.ul
507 
511 #define VAL_DEC64(V) (V)->v.num.dec.val
512 
516 #define VAL_DEC64_DIGITS(V) (V)->v.num.dec.digits
517 
521 #define VAL_DEC64_ZEROES(V) (V)->v.num.dec.zeroes
522 
524 #define VAL_LIST(V) (V)->v.list
525 
527 #define VAL_BITS VAL_LIST
528 
530 #define VAL_EXTERN(V) (V)->v.fname
531 
533 #define VAL_IS_DELETED(V) ((V)->flags & VAL_FL_DELETED)
534 
536 #define VAL_MARK_DELETED(V) val_mark_deleted(V)
537 
539 #define VAL_UNMARK_DELETED(V) val_mark_undeleted(V)
540 
542 #define VAL_LAST_MODIFIED(V) (V)->last_modified
543 
545 #define VAL_ETAG(V) (V)->etag
546 
548 #define VAL_BTYPE(V) (V)->btyp
549 
551 #define VAL_SET_VAREXPR(V) (V)->flags |= VAL_FL_IS_VAREXPR
552 
554 #define VAL_CLR_VAREXPR(V) (V)->flags &= ~VAL_FL_IS_VAREXPR
555 
557 #define VAL_IS_VAREXPR(V) ((V)->flags & VAL_FL_IS_VAREXPR)
558 
560 #define VAL_VAREXPR(V) val_get_varexpr(V)
561 
565 #define VAL_SET_META(V) (V)->flags |= VAL_FL_META
566 
568 #define VAL_REMOVE_META(M) dlq_remove(M)
569 
573 #define VAL_SET_FIXED_VALUE(V) (V)->flags |= VAL_FL_FIXED_VALUE
574 
578 #define VAL_CLR_FIXED_VALUE(V) (V)->flags &= ~VAL_FL_FIXED_VALUE
579 
583 #define VAL_IS_FIXED_VALUE(V) ((V)->flags & VAL_FL_FIXED_VALUE)
584 
586 #define VAL_SET_EDIT2_MERGE(V) (V)->flags |= VAL_FL_EDIT2_MERGE
587 
589 #define VAL_CLR_EDIT2_MERGE(V) (V)->flags &= ~VAL_FL_EDIT2_MERGE
590 
592 #define VAL_IS_EDIT2_MERGE(V) ((V)->flags & VAL_FL_EDIT2_MERGE)
593 
597 #define VAL_SET_EXTERNAL(V) (V)->flags |= VAL_FL_EXTERNAL
598 
600 #define VAL_CLR_EXTERNAL(V) (V)->flags &= ~VAL_FL_EXTERNAL
601 
603 #define VAL_IS_EXTERNAL(V) ((V)->flags & VAL_FL_EXTERNAL)
604 
606 #define VAL_SET_VALUE_SET(V) (V)->flags |= VAL_FL_VALUE_SET
607 
609 #define VAL_CLR_VALUE_SET(V) (V)->flags &= ~VAL_FL_VALUE_SET
610 
612 #define VAL_IS_VALUE_SET(V) ((V)->flags & VAL_FL_VALUE_SET)
613 
615 #define VAL_SET_TEMP_XPATH(V) (V)->flags |= VAL_FL_TEMP_XPATH
616 
618 #define VAL_CLR_TEMP_XPATH(V) (V)->flags &= ~VAL_FL_TEMP_XPATH
619 
621 #define VAL_IS_TEMP_XPATH(V) ((V)->flags & VAL_FL_TEMP_XPATH)
622 
624 #define VAL_SET_UNCOMMITTED_DELETE(V) (V)->flags |= VAL_FL_UNCMTD_DELETE
625 
627 #define VAL_CLR_UNCOMMITTED_DELETE(V) (V)->flags &= ~VAL_FL_UNCMTD_DELETE
628 
630 #define VAL_IS_UNCOMMITTED_DELETE(V) ((V)->flags & VAL_FL_UNCMTD_DELETE)
631 
633 #define VAL_SET_RECREATED(V) (V)->flags |= VAL_FL_RECREATED
634 
636 #define VAL_CLR_RECREATED(V) (V)->flags &= ~VAL_FL_RECREATED
637 
639 #define VAL_IS_RECREATED(V) ((V)->flags & VAL_FL_RECREATED)
640 
642 #define VAL_SET_FROM_TEMPLATE(V) (V)->flags |= VAL_FL_FROM_TEMPLATE
643 
645 #define VAL_CLR_FROM_TEMPLATE(V) (V)->flags &= ~VAL_FL_FROM_TEMPLATE
646 
648 #define VAL_IS_FROM_TEMPLATE(V) ((V)->flags & VAL_FL_FROM_TEMPLATE)
649 
651 #define VAL_XPATHPCB(V) val_get_xpathpcb(V)
652 
654 #define VAL_SET_CANONICAL(V) (V)->flags |= VAL_FL_CANONICAL
655 
657 #define VAL_CLR_CANONICAL(V) (V)->flags &= ~VAL_FL_CANONICAL
658 
660 #define VAL_IS_CANONICAL(V) ((V)->flags & VAL_FL_CANONICAL)
661 
663 #define VAL_NMDA_ORIGIN(V) (V)->nmda_origin
664 
666 #define VAL_IS_INDEX(V) ((V)->flags & VAL_FL_IS_INDEX)
667 
669 #define VAL_SET_IS_INDEX(V) (V)->flags |= VAL_FL_IS_INDEX
670 
672 #define VAL_CHILD_HDR_OBJ(H) (H)->obj
673 
675 #define VAL_CHILD_HDR_COUNT(H) (H)->count
676 
678 #define VAL_SET_DEFCON_DELETED(V) (V)->flags |= VAL_FL_DEFCON_DELETED
679 
681 #define VAL_CLR_DEFCON_DELETED(V) (V)->flags &= ~VAL_FL_DEFCON_DELETED
682 
684 #define VAL_IS_DEFCON_DELETED(V) ((V)->flags & VAL_FL_DEFCON_DELETED)
685 
686 
691 #define VAL_SET_ADDEDIT_DELETED(V) (V)->flags |= VAL_FL_ADDEDIT_DELETED
692 
694 #define VAL_IS_ADDEDIT_DELETED(V) ((V)->flags & VAL_FL_ADDEDIT_DELETED)
695 
696 
701 #define VAL_EDITOP(V) (V)->editop
702 
705 /********************************************************************
706 * *
707 * T Y P E S *
708 * *
709 *********************************************************************/
710 
728 typedef void (*dumpfn_t) (log_debug_t level, const char *fstr, ...);
729 
730 
737 typedef void (*errfn_t) (const char *fstr, ...);
738 
739 
746 /* pick a log indent function for dump_value */
747 typedef void (*indentfn_t) (log_debug_t level, int32 indentcnt);
748 
749 
753 typedef struct logfns_t_ {
758  FILE *outputFile;
759 } logfns_t;
760 
761 
763 typedef struct val_idref_t_ {
766  xmlChar *name;
768 } YPACK val_idref_t;
769 
770 
772 typedef enum val_insert_mode_t_ {
777 } YPACK val_insert_mode_t;
778 
779 
781 typedef enum val_dumpvalue_mode_t_ {
788 
789 
791 typedef struct val_editvars_t_ {
796  struct val_value_t_ *curparent;
798  xmlChar *insertstr;
799  struct xpath_pcb_t_ *insertxpcb;
800  struct val_value_t_ *insertval;
801  val_insert_mode_t insert_mode;
802  uint8 silprio;
803  boolean operset;
804  void *pcookie;
805  int icookie;
806  boolean is_move;
808 } YPACK val_editvars_t;
809 
810 
812 typedef struct val_extra_t_ {
813 
819  xmlChar *dname;
827  void *getcb;
828 
833  struct val_value_t_ *virtualval;
834 
836  time_t cachetime;
837 
842  struct xpath_pcb_t_ *xpathpcb;
843 
844 
849 
850 
854  dlq_hdr_t *dataruleQ;
861  xmlChar *varexpr;
862 
863 } YPACK val_extra_t;
864 
865 
870 typedef struct val_value_t_ {
872  dlq_hdr_t qhdr;
873 
875  struct obj_template_t_ *obj;
877  const xmlChar *name;
882  struct val_value_t_ *parent;
883  struct val_child_hdr_t_ *hdr;
886  val_extra_t *val_extra;
887 
888  uint32 flags;
898  ncx_etag_t etag;
913  dlq_hdr_t *metaQ;
918  val_editvars_t *editvars;
922  /* GET1 getcb moved to val_extra */
923  /* GET1 virtualval moved to val_extra */
924  /* GET1 cachetime moved to val_extra */
925 
927  dlq_hdr_t *indexQ;
929  /* this field is used for NCX_BT_CHOICE
930  * If set, the object path for this node is really:
931  * $this --> casobj --> casobj.parent --> $this.parent
932  * the OBJ_TYP_CASE and OBJ_TYP_CHOICE nodes are skipped
933  * inside an XML instance document
934  *
935  * replaced by val_get_casobj() function in val_util.h
936  * struct obj_template_t_ *casobj;
937  */
938 
939  /* xpathpcb moved to val_extra_t */
940 
941  /* back-ptr to the partial locks that are held
942  * against this node
943  * plock moved to val_extra
944  */
945 
946  /* back-ptr to the data access control rules that
947  * reference this node
948  * dataruleQ moved to val_extra
949  */
950 
951  /* malloced pointer to the variable expression found
952  * if this val node is part of a data template.
953  * The actual value in union v_ MUST be ignored if
954  * varexpr string is non-NULL!!
955  * varexpr moved to val_extra
956  */
957 
962 
965 
975  union v_ {
985  dlq_hdr_t child_hdrQ;
986 
997 
1005 
1006  val_idref_t idref;
1009  boolean boo;
1011  xmlChar *fname;
1012  xmlChar *intbuff;
1013  } YPACK v;
1014 } YPACK val_value_t;
1015 
1016 
1020 typedef struct val_child_hdr_t_ {
1021  dlq_hdr_t qhdr;
1028  struct obj_template_t_ *obj;
1029 
1033  struct val_tree_t_ *tree;
1034 
1039  dlq_hdr_t que;
1040 
1042  uint32 count;
1043 
1045  uint8 flags;
1046 } YPACK val_child_hdr_t;
1047 
1048 
1059 typedef struct val_index_t_ {
1060  dlq_hdr_t qhdr;
1061  val_value_t *val;
1062 } YPACK val_index_t;
1063 
1064 
1066 typedef struct val_unique_t_ {
1067  dlq_hdr_t qhdr;
1068  struct xpath_pcb_t_ *pcb;
1069 } YPACK val_unique_t;
1070 
1071 
1080 typedef boolean
1081  (*val_test_fn_t) (const val_value_t *val);
1082 
1083 
1093 typedef boolean
1094  (*val_walker_fn_t) (val_value_t *val,
1095  void *cookie1,
1096  void *cookie2);
1097 
1098 
1099 
1109 typedef boolean
1110  (*val_walker2_fn_t) (val_child_hdr_t *valhdr,
1111  void *cookie1,
1112  void *cookie2);
1113 
1114 
1115 
1125 typedef boolean
1126  (*val_hdr_test_fn_t) (val_child_hdr_t *hdr,
1127  void *cookie);
1128 
1129 
1139 typedef boolean
1140  (*val_test2_fn_t) (val_value_t *val,
1141  void *cookie);
1142 
1143 
1147 /********************************************************************
1148 * *
1149 * F U N C T I O N S *
1150 * *
1151 *********************************************************************/
1152 
1170 extern val_value_t *
1171  val_new_value (void);
1172 
1173 
1182 extern void
1183  val_init_value (val_value_t *val);
1184 
1185 
1196 extern void
1197  val_init_complex (val_value_t *val,
1198  ncx_btype_t btyp);
1199 
1200 
1210 extern void
1211  val_init_virtual (val_value_t *val,
1212  void *cbfn,
1213  struct obj_template_t_ *obj);
1214 
1215 
1225 extern void
1226  val_init_from_template (val_value_t *val,
1227  struct obj_template_t_ *obj);
1228 
1229 
1239 extern void
1240  val_reinit_from_template (val_value_t *val,
1241  struct obj_template_t_ *obj);
1242 
1243 
1253 extern void
1254  val_free_value (val_value_t *val);
1255 
1256 
1264 extern void
1265  val_set_name (val_value_t *val,
1266  const xmlChar *name,
1267  uint32 namelen);
1268 
1269 
1279 extern status_t
1280  val_force_dname (val_value_t *val);
1281 
1282 
1291 extern void
1292  val_set_qname (val_value_t *val,
1293  xmlns_id_t nsid,
1294  const xmlChar *name,
1295  uint32 namelen);
1296 
1297 
1307 extern status_t
1308  val_string_ok (typ_def_t *typdef,
1309  ncx_btype_t btyp,
1310  const xmlChar *strval);
1311 
1312 
1327 extern status_t
1329  ncx_btype_t btyp,
1330  const xmlChar *strval,
1331  ncx_errinfo_t **errinfo);
1332 
1333 
1349 status_t
1351  const xmlChar *strval,
1352  val_value_t *val,
1353  ncx_errinfo_t **errinfo);
1354 
1355 
1373 extern status_t
1374  val_string_ok_ex (ses_cb_t *scb,
1375  typ_def_t *typdef,
1376  ncx_btype_t btyp,
1377  const xmlChar *strval,
1378  ncx_errinfo_t **errinfo,
1379  boolean logerrors);
1380 
1381 
1400 extern status_t
1402  typ_def_t *typdef,
1403  ncx_btype_t btyp,
1404  const xmlChar *strval,
1405  ncx_errinfo_t **errinfo,
1406  boolean logerrors,
1407  boolean is_defval);
1408 
1409 
1430 extern status_t
1431  val_list_ok (typ_def_t *typdef,
1432  ncx_btype_t btyp,
1433  ncx_list_t *list);
1434 
1435 
1453 extern status_t
1454  val_list_ok_errinfo (typ_def_t *typdef,
1455  ncx_btype_t btyp,
1456  ncx_list_t *list,
1457  ncx_errinfo_t **errinfo);
1458 
1459 
1472 extern status_t
1473  val_enum_ok (typ_def_t *typdef,
1474  const xmlChar *enumval,
1475  int32 *retval,
1476  const xmlChar **retstr);
1477 
1478 
1488 extern status_t
1489  val_bit_ok (typ_def_t *typdef,
1490  const xmlChar *bitname,
1491  uint32 *position);
1492 
1493 
1512 extern status_t
1513  val_idref_ok (typ_def_t *typdef,
1514  const xmlChar *qname,
1515  xmlns_id_t nsid,
1516  const xmlChar **name,
1517  ncx_identity_t **id);
1518 
1519 
1544 extern status_t
1545  val_idref_ok_ex (typ_def_t *typdef,
1546  const xmlChar *qname,
1547  xmlns_id_t nsid,
1548  boolean is_json,
1549  ncx_module_t *impmod,
1550  boolean or_self,
1551  const xmlChar **name,
1552  ncx_identity_t **id);
1553 
1554 
1571 extern status_t
1573  const xmlChar *qname,
1574  xmlns_id_t *nsid,
1575  const xmlChar **name,
1576  ncx_identity_t **id);
1577 
1578 
1588 extern status_t
1589  val_range_ok (typ_def_t *typdef,
1590  ncx_btype_t btyp,
1591  const ncx_num_t *num);
1592 
1593 
1605 extern status_t
1607  ncx_btype_t btyp,
1608  const ncx_num_t *num,
1609  ncx_errinfo_t **errinfo);
1610 
1611 
1619 extern status_t
1620  val_pattern_ok (typ_def_t *typdef,
1621  const xmlChar *strval);
1622 
1623 
1636 extern status_t
1638  const xmlChar *strval,
1639  ncx_errinfo_t **errinfo);
1640 
1641 
1651 extern status_t
1652  val_simval_ok (typ_def_t *typdef,
1653  const xmlChar *simval);
1654 
1655 
1656 
1668 extern status_t
1670  const xmlChar *simval,
1671  ncx_errinfo_t **errinfo);
1672 
1673 
1687 extern status_t
1688  val_simval_ok_ex (typ_def_t *typdef,
1689  const xmlChar *simval,
1690  ncx_errinfo_t **errinfo,
1691  ncx_module_t *mod);
1692 
1693 
1709 extern status_t
1710  val_simval_ok_max (typ_def_t *typdef,
1711  const xmlChar *simval,
1712  ncx_errinfo_t **errinfo,
1713  ncx_module_t *mod,
1714  boolean logerrors);
1715 
1734 extern status_t
1735  val_simval_ok_max2 (typ_def_t *typdef,
1736  const xmlChar *simval,
1737  ncx_errinfo_t **errinfo,
1738  ncx_module_t *mod,
1739  boolean logerrors,
1740  boolean nocond);
1741 
1742 
1762 status_t
1763  val_simval_ok_max3 (typ_def_t *typdef,
1764  const xmlChar *simval,
1765  ncx_errinfo_t **errinfo,
1766  ncx_module_t *mod,
1767  boolean logerrors,
1768  boolean nocond,
1769  boolean is_defval);
1770 
1771 
1783 extern status_t
1784  val_union_ok (typ_def_t *typdef,
1785  const xmlChar *strval,
1786  val_value_t *retval);
1787 
1788 
1801 extern status_t
1803  const xmlChar *strval,
1804  val_value_t *retval,
1805  ncx_errinfo_t **errinfo);
1806 
1807 
1824 extern status_t
1825  val_union_ok_ex (typ_def_t *typdef,
1826  const xmlChar *strval,
1827  val_value_t *retval,
1828  ncx_errinfo_t **errinfo,
1829  ncx_module_t *mod,
1830  typ_def_t **match_typdef);
1831 
1832 
1853 extern status_t
1854  val_union_ok_binary (typ_def_t *typdef,
1855  const xmlChar *binstr,
1856  uint32 binstrlen,
1857  val_value_t *retval,
1858  ncx_errinfo_t **errinfo,
1859  typ_def_t **match_typdef);
1860 
1861 
1881 extern status_t
1882  val_union_ok_full (typ_def_t *typdef,
1883  const xmlChar *strval,
1884  val_value_t *contextval,
1885  val_value_t *rootval,
1886  val_value_t *retval,
1887  ncx_errinfo_t **errinfo);
1888 
1889 
1896 extern dlq_hdr_t *
1897  val_get_metaQ (val_value_t *val);
1898 
1899 
1907 extern val_value_t *
1908  val_get_first_meta (dlq_hdr_t *queue);
1909 
1910 
1918 extern val_value_t *
1919  val_get_first_meta_val (val_value_t *val);
1920 
1921 
1929 extern val_value_t *
1930  val_get_next_meta (val_value_t *curnode);
1931 
1932 
1940 extern boolean
1941  val_meta_empty (val_value_t *val);
1942 
1943 
1952 extern val_value_t *
1953  val_find_meta (val_value_t *val,
1954  xmlns_id_t nsid,
1955  const xmlChar *name);
1956 
1957 
1967 extern boolean
1968  val_meta_match (val_value_t *val,
1969  val_value_t *metaval);
1970 
1971 
1980 extern uint32
1981  val_metadata_inst_count (val_value_t *val,
1982  xmlns_id_t nsid,
1983  const xmlChar *name);
1984 
1985 
1996 extern void
1997  val_dump_value (val_value_t *val,
1998  int32 startindent,
1999  log_debug_t lvl);
2000 
2001 
2013 extern void
2014  val_dump_value_ex (val_value_t *val,
2015  int32 startindent,
2016  ncx_display_mode_t display_mode,
2017  log_debug_t lvl);
2018 
2019 
2030 extern void
2031  val_dump_alt_value (val_value_t *val,
2032  int32 startindent,
2033  log_debug_t lvl);
2034 
2035 
2045 extern void
2046  val_stdout_value (val_value_t *val,
2047  int32 startindent,
2048  log_debug_t lvl);
2049 
2050 
2061 extern void
2062  val_stdout_value_ex (val_value_t *val,
2063  int32 startindent,
2064  ncx_display_mode_t display_mode,
2065  log_debug_t lvl);
2066 
2067 
2085 extern void
2086  val_dump_value_max (val_value_t *val,
2087  int32 startindent,
2088  int32 indent_amount,
2089  val_dumpvalue_mode_t dumpmode,
2090  ncx_display_mode_t display_mode,
2091  boolean with_meta,
2092  boolean configonly,
2093  log_debug_t lvl);
2094 
2095 
2117 extern void
2118  val_dump_value_full (val_value_t *val,
2119  int32 startindent,
2120  int32 indent_amount,
2121  val_dumpvalue_mode_t dumpmode,
2122  ncx_display_mode_t display_mode,
2123  boolean with_meta,
2124  boolean configonly,
2125  boolean conf_mode,
2126  boolean expand_varexpr,
2127  log_debug_t lvl,
2128  logfns_t *overrideOutput);
2129 
2130 
2153 extern void
2154  val_dump_value_full2 (val_value_t *val,
2155  int32 startindent,
2156  int32 indent_amount,
2157  val_dumpvalue_mode_t dumpmode,
2158  ncx_display_mode_t display_mode,
2159  boolean with_meta,
2160  boolean configonly,
2161  boolean conf_mode,
2162  boolean expand_varexpr,
2163  boolean withdef,
2164  log_debug_t lvl,
2165  logfns_t *overrideOutput);
2166 
2167 
2180 extern status_t
2181  val_set_string (val_value_t *val,
2182  const xmlChar *valname,
2183  const xmlChar *valstr);
2184 
2185 
2201 extern status_t
2202  val_set_string2 (val_value_t *val,
2203  const xmlChar *valname,
2204  typ_def_t *typdef,
2205  const xmlChar *valstr,
2206  uint32 valstrlen);
2207 
2208 
2224 extern status_t
2225  val_set_binary (const xmlChar *valstr,
2226  uint32 valstrlen,
2227  val_value_t *val);
2228 
2229 
2230 
2240 extern status_t
2241  val_reset_empty (val_value_t *val);
2242 
2243 
2256 extern status_t
2257  val_set_simval (val_value_t *val,
2258  typ_def_t *typdef,
2259  xmlns_id_t nsid,
2260  const xmlChar *valname,
2261  const xmlChar *valstr);
2262 
2263 
2306 extern status_t
2307  val_set_simval_str (val_value_t *val,
2308  typ_def_t *typdef,
2309  xmlns_id_t nsid,
2310  const xmlChar *valname,
2311  uint32 valnamelen,
2312  const xmlChar *valstr);
2313 
2314 
2335 extern status_t
2336  val_set_simval_binary (val_value_t *val,
2337  const xmlChar *binstr,
2338  uint32 binstrlen);
2339 
2340 
2384 extern status_t
2385  val_set_simval_max (val_value_t *val,
2386  typ_def_t *typdef,
2387  xmlns_id_t nsid,
2388  const xmlChar *valname,
2389  uint32 valnamelen,
2390  const xmlChar *valstr,
2391  uint32 valstrlen);
2392 
2393 
2407 extern val_value_t *
2408  val_make_simval (typ_def_t *typdef,
2409  xmlns_id_t nsid,
2410  const xmlChar *valname,
2411  const xmlChar *valstr,
2412  status_t *res);
2413 
2414 
2428 extern val_value_t *
2430  const xmlChar *valname,
2431  const xmlChar *valstr);
2432 
2433 
2444 extern val_value_t *
2446  const xmlChar *valname,
2447  const xmlChar *valstr,
2448  uint32 valstrlen);
2449 
2450 
2462 extern status_t
2463  val_merge (const val_value_t *src,
2464  val_value_t *dest);
2465 
2466 
2473 extern val_value_t *
2474  val_clone (const val_value_t *val);
2475 
2476 
2484 extern val_value_t *
2485  val_clone2 (const val_value_t *val);
2486 
2487 
2501 extern val_value_t *
2502  val_clone_config_data (const val_value_t *val,
2503  status_t *res);
2504 
2505 
2525 extern val_value_t *
2526  val_clone_config_save (const val_value_t *val,
2527  status_t *res);
2528 
2529 
2540 extern status_t
2541  val_replace (val_value_t *val,
2542  val_value_t *copy);
2543 
2544 
2554 extern status_t
2555  val_replace_str (const xmlChar *str,
2556  uint32 stringlen,
2557  val_value_t *copy);
2558 
2559 
2570 extern status_t
2571  val_fast_replace_string (const xmlChar *str,
2572  uint32 stringlen,
2573  val_value_t *copy);
2574 
2575 
2582 extern void
2583  val_replace_stringval (val_value_t *val,
2584  const xmlChar *str);
2585 
2586 
2605 extern void
2606  val_add_child (val_value_t *child,
2607  val_value_t *parent);
2608 
2609 
2622 extern void
2623  val_add_child_sorted (val_value_t *child,
2624  val_value_t *parent);
2625 
2626 
2638 extern void
2639  val_insert_child (val_value_t *child,
2640  val_value_t *current,
2641  val_value_t *parent);
2642 
2643 
2652 extern void
2653  val_remove_child (val_value_t *child);
2654 
2655 
2665 extern void
2666  val_swap_child (val_value_t *newchild,
2667  val_value_t *curchild);
2668 
2669 
2677 extern val_value_t *
2678  val_first_child_match (const val_value_t *parent,
2679  const val_value_t *child);
2680 
2681 
2692 extern val_value_t *
2693  val_first_child_match_fast (const val_value_t *parent,
2694  const val_value_t *child,
2695  val_value_t *lastmatch);
2696 
2697 
2709 extern val_value_t *
2710  val_next_child_match (val_value_t *parent,
2711  val_value_t *child,
2712  val_value_t *curmatch);
2713 
2714 
2721 extern val_value_t *
2722  val_next_child_same (val_value_t *curchild);
2723 
2724 
2731 extern val_value_t *
2732  val_get_first_child (const val_value_t *parent);
2733 
2734 
2741 extern val_value_t *
2742  val_get_next_child (const val_value_t *curchild);
2743 
2744 
2751 extern val_value_t *
2752  val_get_first_terminal_child (const val_value_t *parent);
2753 
2754 
2761 extern val_value_t *
2762  val_get_next_terminal_child (const val_value_t *curchild);
2763 
2764 
2778 extern val_value_t *
2779  val_find_child (const val_value_t *parent,
2780  const xmlChar *modname,
2781  const xmlChar *childname);
2782 
2783 
2797 extern val_value_t *
2798  val_find_child_fast (const val_value_t *parent,
2799  xmlns_id_t nsid,
2800  const xmlChar *childname);
2801 
2802 
2811 extern val_value_t *
2812  val_find_child_obj (const val_value_t *parent,
2813  const struct obj_template_t_ *chobj);
2814 
2815 
2830 extern val_value_t *
2831  val_find_child_que (const dlq_hdr_t *childQ,
2832  xmlns_id_t nsid,
2833  const xmlChar *childname);
2834 
2835 
2849 extern val_value_t *
2850  val_match_child (const val_value_t *parent,
2851  const xmlChar *modname,
2852  const xmlChar *childname);
2853 
2854 
2871 extern val_value_t *
2872  val_match_child_count (const val_value_t *parent,
2873  const xmlChar *modname,
2874  const xmlChar *childname,
2875  uint32 *matchcount);
2876 
2877 
2894 extern val_value_t *
2895  val_find_next_child (const val_value_t *parent,
2896  const xmlChar *modname,
2897  const xmlChar *childname,
2898  const val_value_t *curchild);
2899 
2900 
2914 extern val_value_t *
2915  val_find_next_child_fast (const val_value_t *parent,
2916  const val_value_t *curchild);
2917 
2918 
2927 extern val_value_t *
2928  val_first_child_name (val_value_t *parent,
2929  const xmlChar *name);
2930 
2931 
2940 extern val_value_t *
2941  val_first_child_qname (val_value_t *parent,
2942  xmlns_id_t nsid,
2943  const xmlChar *name);
2944 
2945 
2955 extern val_value_t *
2956  val_next_child_qname (val_value_t *parent,
2957  xmlns_id_t nsid,
2958  const xmlChar *name,
2959  val_value_t *curchild);
2960 
2961 
2979 extern val_value_t *
2980  val_first_child_string (val_value_t *parent,
2981  const xmlChar *name,
2982  const xmlChar *strval);
2983 
2984 
2993 extern uint32
2994  val_child_cnt (val_value_t *parent);
2995 
2996 
3006 extern uint32
3007  val_child_inst_cnt (const val_value_t *parent,
3008  const xmlChar *modname,
3009  const xmlChar *name);
3010 
3011 
3019 extern uint32
3020  val_get_child_inst_id (const val_value_t *parent,
3021  const val_value_t *child);
3022 
3023 
3030 extern uint32
3031  val_liststr_count (const val_value_t *val);
3032 
3033 
3046 extern boolean
3047  val_index_match (const val_value_t *val1,
3048  const val_value_t *val2);
3049 
3050 
3061 extern int
3062  val_index_compare (const val_value_t *val1,
3063  const val_value_t *val2);
3064 
3065 
3095 extern int32
3096  val_compare_max (const val_value_t *val1,
3097  const val_value_t *val2,
3098  boolean configonly,
3099  boolean childonly,
3100  boolean editing);
3101 
3102 
3136 extern int32
3137  val_compare_max_def (const val_value_t *val1,
3138  const val_value_t *val2,
3139  boolean configonly,
3140  boolean childonly,
3141  boolean editing,
3142  boolean ignore_defaults);
3143 
3144 
3168 extern int32
3169  val_compare_ex (const val_value_t *val1,
3170  const val_value_t *val2,
3171  boolean configonly);
3172 
3173 
3194 extern int32
3195  val_compare (const val_value_t *val1,
3196  const val_value_t *val2);
3197 
3198 
3218 extern int32
3219  val_compare_to_string (const val_value_t *val1,
3220  const xmlChar *strval2,
3221  status_t *res);
3222 
3223 
3245 extern int32
3246  val_compare_to_string_len (const val_value_t *val1,
3247  const xmlChar *strval2,
3248  uint32 strval2len,
3249  status_t *res);
3250 
3251 
3270 extern int32
3271  val_compare_for_replace (const val_value_t *val1,
3272  const val_value_t *val2);
3273 
3274 
3293 extern int32
3294  val_compare_for_edit (const val_value_t *val1,
3295  const val_value_t *val2,
3296  boolean ismerge);
3297 
3298 
3317 extern int32
3318  val_compare_as_string (const val_value_t *val1,
3319  const val_value_t *val2,
3320  status_t *res);
3321 
3322 
3341 extern status_t
3342  val_sprintf_simval_nc (xmlChar *buff,
3343  const val_value_t *val,
3344  uint32 *len);
3345 
3346 
3366 extern status_t
3367  val_sprintf_simval_nc_ex (xmlChar *buff,
3368  const val_value_t *val,
3369  boolean url_encode,
3370  uint32 *len);
3371 
3372 
3385 extern xmlChar *
3386  val_make_sprintf_string (const val_value_t *val);
3387 
3388 
3401 extern status_t
3402  val_resolve_scoped_name (val_value_t *val,
3403  const xmlChar *name,
3404  val_value_t **chval);
3405 
3406 
3413 extern ncx_iqual_t
3414  val_get_iqualval (const val_value_t *val);
3415 
3416 
3435 extern boolean
3436  val_duplicates_allowed (val_value_t *val);
3437 
3438 
3446 extern boolean
3447  val_has_content (const val_value_t *val);
3448 
3449 
3458 extern boolean
3459  val_has_content_ex (const val_value_t *val);
3460 
3461 
3469 extern boolean
3470  val_has_index (const val_value_t *val);
3471 
3472 
3479 extern val_index_t *
3480  val_get_first_index (const val_value_t *val);
3481 
3482 
3489 extern val_index_t *
3490  val_get_next_index (const val_index_t *valindex);
3491 
3492 
3499 extern uint32
3500  val_get_index_count (const val_value_t *val);
3501 
3502 
3514 extern status_t
3515  val_parse_meta (ses_cb_t *scb,
3516  typ_def_t *typdef,
3517  xml_attr_t *attr,
3518  val_value_t *retval);
3519 
3520 
3527 extern void
3528  val_set_extern (val_value_t *val,
3529  xmlChar *fname);
3530 
3531 
3539 extern void
3540  val_set_intern (val_value_t *val,
3541  xmlChar *intbuff);
3542 
3543 
3562 extern boolean
3563  val_fit_oneline (const val_value_t *val,
3564  uint32 linesize,
3565  boolean isxml);
3566 
3567 
3576 extern boolean
3577  val_create_allowed (const val_value_t *val);
3578 
3579 
3588 extern boolean
3589  val_delete_allowed (const val_value_t *val);
3590 
3591 
3599 extern boolean
3600  val_is_config_data (const val_value_t *val);
3601 
3602 
3611 extern boolean
3612  val_is_config_save (const val_value_t *val);
3613 
3614 
3624 extern boolean
3625  val_is_virtual (const val_value_t *val);
3626 
3627 
3657 extern val_value_t *
3659  val_value_t *val,
3660  status_t *res);
3661 
3662 
3682 extern boolean
3683  val_is_default (val_value_t *val);
3684 
3685 
3695 extern boolean
3696  val_is_real (const val_value_t *val);
3697 
3698 
3705 extern xmlns_id_t
3706  val_get_parent_nsid (const val_value_t *val);
3707 
3708 
3720 extern uint32
3721  val_instance_count (val_value_t *val,
3722  const xmlChar *modname,
3723  const xmlChar *objname);
3724 
3725 
3740 extern uint32
3741  val_instance_count_fast (val_value_t *val,
3742  xmlns_id_t nsid,
3743  const xmlChar *objname,
3744  val_value_t **firstval);
3745 
3746 
3759 extern uint32
3760  val_instance_count_fast2 (val_value_t *val,
3761  val_value_t *startval);
3762 
3763 
3779 extern void
3780  val_set_extra_instance_errors (val_value_t *val,
3781  const xmlChar *modname,
3782  const xmlChar *objname,
3783  uint32 maxelems);
3784 
3785 
3794 extern boolean
3795  val_need_quotes (const xmlChar *str);
3796 
3797 
3805 extern boolean
3806  val_all_whitespace (const xmlChar *str);
3807 
3808 
3817 extern boolean
3818  val_any_whitespace (const xmlChar *str,
3819  uint32 len);
3820 
3821 
3830 extern boolean
3831  val_match_metaval (const xml_attr_t *attr,
3832  xmlns_id_t nsid,
3833  const xmlChar *name);
3834 
3835 
3842 extern boolean
3843  val_get_dirty_flag (const val_value_t *val);
3844 
3845 
3852 extern boolean
3853  val_get_subtree_dirty_flag (const val_value_t *val);
3854 
3855 
3861 extern void
3862  val_set_subtree_dirty_up (val_value_t *val);
3863 
3864 
3872 extern void
3873  val_set_dirty_flag (val_value_t *val,
3874  boolean clear_def);
3875 
3876 
3882 extern void
3883  val_set_child_deleted_flag (val_value_t *val);
3884 
3885 
3892 extern boolean
3893  val_get_child_deleted_flag (val_value_t *val);
3894 
3895 
3896 
3909 extern void
3910  val_clear_dirty_flag (val_value_t *val,
3911  time_t *timestamp,
3912  ncx_transaction_id_t txid,
3913  boolean is_delete,
3914  boolean do_clear_default);
3915 
3916 
3923 extern boolean
3924  val_dirty_subtree (const val_value_t *val);
3925 
3926 
3939 extern void
3940  val_clean_tree (val_value_t *val);
3941 
3942 
3949 extern uint32
3950  val_get_nest_level (val_value_t *val);
3951 
3952 
3961 extern val_value_t *
3962  val_get_first_leaf (val_value_t *val);
3963 
3964 
3972 extern const xmlChar *
3973  val_get_mod_name (const val_value_t *val);
3974 
3975 
3983 extern const xmlChar *
3984  val_get_mod_prefix (const val_value_t *val);
3985 
3986 
3994 extern xmlns_id_t
3995  val_get_nsid (const val_value_t *val);
3996 
3997 
4004 extern void
4005  val_change_nsid (val_value_t *val,
4006  xmlns_id_t nsid);
4007 
4008 
4015 extern void
4016  val_change_nsid2 (val_value_t *val,
4017  xmlns_id_t nsid);
4018 
4019 
4026 extern void
4027  val_change_nsid3 (val_value_t *val,
4028  xmlns_id_t nsid);
4029 
4030 
4042 extern val_value_t *
4043  val_make_from_insertxpcb (val_value_t *sourceval,
4044  status_t *res);
4045 
4046 
4052 extern val_unique_t *
4053  val_new_unique (void);
4054 
4055 
4061 extern void
4062  val_free_unique (val_unique_t *valuni);
4063 
4064 
4071 extern const typ_def_t *
4072  val_get_typdef (const val_value_t *val);
4073 
4074 
4082 extern boolean
4083  val_set_by_default (const val_value_t *val);
4084 
4085 
4093 extern boolean
4094  val_has_withdef_default (const val_value_t *val);
4095 
4096 
4102 extern void
4103  val_set_withdef_default (val_value_t *val);
4104 
4105 
4113 extern boolean
4114  val_is_metaval (const val_value_t *val);
4115 
4116 
4124 extern void
4125  val_move_children (val_value_t *srcval,
4126  val_value_t *destval);
4127 
4128 
4136 extern void
4137  val_move_nonconfig_children (val_value_t *srcval,
4138  val_value_t *destval);
4139 
4159 extern status_t
4160  val_cvt_generic (val_value_t *val);
4161 
4162 
4171 extern status_t
4172  val_set_pcookie (val_value_t *val,
4173  void *pcookie);
4174 
4175 
4184 extern status_t
4185  val_set_icookie (val_value_t *val,
4186  int icookie);
4187 
4188 
4196 extern void *
4197  val_get_pcookie (val_value_t *val);
4198 
4199 
4207 extern int
4208  val_get_icookie (val_value_t *val);
4209 
4210 
4218 extern status_t
4219  val_delete_default_leaf (val_value_t *val);
4220 
4221 
4231 extern status_t
4232  val_delete_default_leaf_list (val_value_t *val);
4233 
4234 
4240 extern void
4241  val_force_empty (val_value_t *val);
4242 
4243 
4251 extern status_t
4252  val_delete_default_npcon (val_value_t *val);
4253 
4254 
4263 extern void
4264  val_move_fields_for_xml (val_value_t *srcval,
4265  val_value_t *destval,
4266  boolean movemeta);
4267 
4268 
4276 extern void
4277  val_move_metadata (val_value_t *srcval,
4278  val_value_t *destval);
4279 
4280 
4287 extern val_index_t *
4288  val_get_first_key (val_value_t *val);
4289 
4290 
4297 extern val_index_t *
4298  val_get_last_key (val_value_t *val);
4299 
4300 
4307 extern val_index_t *
4308  val_get_next_key (val_index_t *curkey);
4309 
4310 
4317 extern val_index_t *
4318  val_get_prev_key (val_index_t *curkey);
4319 
4320 
4327 extern void
4328  val_remove_key (val_value_t *keyval);
4329 
4330 
4337 extern val_value_t *
4338  val_new_deleted_value (void);
4339 
4340 
4348 extern status_t
4349  val_new_editvars (val_value_t *val);
4350 
4351 
4359 extern void
4360  val_free_editvars (val_value_t *val);
4361 
4362 
4368 extern void
4369  val_free_solo_editvars (val_editvars_t *editvars);
4370 
4371 
4382 extern boolean
4383  val_all_np_containers (val_value_t *val);
4384 
4385 
4395 extern status_t
4396  val_sprintf_etag (val_value_t *val,
4397  xmlChar *buff,
4398  int32 buffsize);
4399 
4400 
4407 extern time_t *
4408  val_get_last_modified (val_value_t *val);
4409 
4410 
4416 extern void
4417  val_force_default (val_value_t *val);
4418 
4427 extern void
4428  val_set_all_tags (val_value_t *val,
4429  time_t *timestamp,
4430  ncx_transaction_id_t txid);
4431 
4432 
4439 extern const xmlChar *
4440  val_get_owner (val_value_t *val);
4441 
4442 
4449 extern ncx_owner_id_t
4450  val_get_owner_id (val_value_t *val);
4451 
4452 
4459 extern boolean
4460  val_need_owner_string (val_value_t *val);
4461 
4462 
4469 extern void
4470  val_delete_children (val_value_t *val);
4471 
4472 
4478 extern void
4479  val_clean_value (val_value_t *val);
4480 
4481 
4490 extern boolean
4491  val_find_bit (val_value_t *val,
4492  const xmlChar *bitname);
4493 
4494 
4502 extern boolean
4503  val_has_children (const val_value_t *val);
4504 
4505 
4513 extern status_t
4514  val_add_test_valindex (val_value_t *parentval,
4515  val_value_t *keyval);
4516 
4517 
4524 extern const xmlChar *
4525  val_get_yang_typename (val_value_t *val);
4526 
4527 
4534 extern void
4535  val_set_force_config (val_value_t *val,
4536  boolean is_config);
4537 
4538 
4545 extern void
4546  val_clear_defvalset_flag (val_value_t *val);
4547 
4548 
4557 extern status_t
4558  val_clone_valQ (dlq_hdr_t *valQ,
4559  dlq_hdr_t *return_valQ);
4560 
4561 
4569 extern void
4570  val_clean_valQ (dlq_hdr_t *valQ);
4571 
4572 
4582 extern boolean
4583  val_is_value_set (val_value_t *val);
4584 
4585 
4593 extern uint32
4594  val_url_encode_string (const xmlChar *str,
4595  xmlChar *buff);
4596 
4597 
4606 extern void
4607  val_convert_any_to_container (val_value_t *val);
4608 
4609 
4616 extern void
4617  val_clean_index_chain (val_value_t *val);
4618 
4619 
4627 extern boolean
4628  val_pattern_match (const xmlRegexpPtr pattern,
4629  const xmlChar *strval);
4630 
4631 
4640 extern boolean
4641  val_ocpattern_match (const regex_t *ocpattern,
4642  const xmlChar *strval);
4643 
4644 
4654 extern boolean
4656  val_value_t *testval,
4657  const xmlChar *qname,
4658  boolean or_self);
4659 
4660 
4671 extern status_t
4672  val_set_sil_priority (val_value_t *val,
4673  uint8 silprio);
4674 
4675 
4682 extern uint8
4683  val_get_sil_priority (val_value_t *val);
4684 
4685 
4694 extern const xmlChar *
4695  val_find_bit_name (val_value_t *val,
4696  uint32 bitpos);
4697 
4698 
4708 extern const xmlChar *
4709  val_find_enum_name (val_value_t *val,
4710  int32 enunum);
4711 
4712 
4724 extern const xmlChar *
4726  typ_def_t *typdef,
4727  int32 enunum);
4728 
4729 
4736 extern void
4737  val_mark_deleted (val_value_t *val);
4738 
4739 
4747 extern void
4748  val_mark_undeleted (val_value_t *val);
4749 
4750 
4761 extern boolean
4762  val_has_conditional_value (val_value_t *val);
4763 
4764 
4775 extern val_value_t *
4776  val_convert_leafref (const val_value_t *val);
4777 
4778 
4799 extern int32
4800  val_compare_for_topreplace (const val_value_t *val1,
4801  const val_value_t *val2);
4802 
4803 
4829 extern int32
4830  val_compare_for_topreplace_simple (const val_value_t *val1,
4831  const val_value_t *val2);
4832 
4833 
4841 extern boolean
4842  val_has_complex_child (const val_value_t *val);
4843 
4844 
4852 extern status_t
4853  val_add_meta (val_value_t *metaval,
4854  val_value_t *val);
4855 
4856 
4863 extern val_value_t *
4864  val_find_root (val_value_t *val);
4865 
4866 
4873 extern status_t
4874  val_set_canonical (val_value_t *val);
4875 
4876 
4884 extern typ_def_t *
4885  val_get_leafref_typdef (val_value_t *val);
4886 
4887 
4907 extern boolean
4908  val_ascendant_compare (val_value_t *val1,
4909  val_value_t *val2);
4910 
4911 
4918 extern const xmlChar *
4919  val_get_dname (const val_value_t *val);
4920 
4921 
4931 extern status_t
4932  val_set_dname (val_value_t *val,
4933  const xmlChar *dname);
4934 
4935 
4946 extern status_t
4947  val_set_dname2 (val_value_t *val,
4948  const xmlChar *dname,
4949  uint32 dnamelen);
4950 
4951 
4959 extern status_t
4960  val_new_extra (val_value_t *val);
4961 
4962 
4969 extern const xmlChar *
4970  val_get_varexpr (const val_value_t *val);
4971 
4972 
4980 extern status_t
4981  val_set_varexpr (val_value_t *val,
4982  const xmlChar *varexpr);
4983 
4984 
4990 extern void
4991  val_clear_varexpr (val_value_t *val);
4992 
4993 
4999 extern void
5000  val_set_wildcard_string (val_value_t *val);
5001 
5002 
5009 #define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
5010 
5011 
5019 extern status_t
5020  val_copy_editvars (const val_value_t *val,
5021  val_value_t *copy);
5022 
5023 
5032 extern status_t
5033  val_set_skip_sil_partial (val_value_t *val);
5034 
5035 
5042 extern boolean
5043  val_get_skip_sil_partial (const val_value_t *val);
5044 
5045 
5056 extern typ_def_t *
5057  val_get_leafref_typdef_ex (val_value_t *val,
5058  boolean union_check);
5059 
5060 
5061 
5073 extern boolean
5074  val_is_default_npcon (val_value_t *val);
5075 
5076 
5080 #ifdef __cplusplus
5081 } /* end extern 'C' */
5082 #endif
5083 
5084 #endif /* _H_val */
boolean val_pattern_match(const xmlRegexpPtr pattern, const xmlChar *strval)
Check the specified string against the specified pattern.
Definition: val.c:14123
int32 val_compare_max_def(const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing, boolean ignore_defaults)
Compare 2 val_value_t struct value contents.
Definition: val.c:9156
status_t val_set_simval_max(val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr, uint32 valstrlen)
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple...
val_value_t * val_find_child_fast(const val_value_t *parent, xmlns_id_t nsid, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8588
int32 val_compare_for_edit(const val_value_t *val1, const val_value_t *val2, boolean ismerge)
Compare 2 val_value_t struct value contents from an editing POV; compare for merge or delete! ...
Definition: val.c:9763
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:700
xmlns_id_t val_get_parent_nsid(const val_value_t *val)
Try to get the parent namespace ID.
Definition: val.c:11476
val_value_t * val_clone2(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees but not the editvars.
Definition: val.c:7865
status_t val_idref_ok_ex(typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, boolean is_json, ncx_module_t *impmod, boolean or_self, const xmlChar **name, ncx_identity_t **id)
Check if an identityref QName is valid for the typedef.
Definition: val.c:3763
ncx_data_class_t dataclass
config or state data
Definition: val.h:892
val_index_t * val_get_last_key(val_value_t *val)
Get the last key record if this is a list with a key-stmt.
Definition: val.c:13227
indentfn_t indentfn
log indent callback
Definition: val.h:756
void val_init_value(val_value_t *val)
Initialize the generic fields in a val_value_t so it is ready for use.
Definition: val.c:2725
dumpfn_t dumpfn
log dump callback
Definition: val.h:754
val_value_t * val_get_first_terminal_child(const val_value_t *parent)
Get the child node only if obj_is_terminal(val->obj) is true.
Definition: val.c:8515
boolean val_has_withdef_default(const val_value_t *val)
Check if the value contained the wd:default attribute.
Definition: val.c:12592
boolean(* val_test_fn_t)(const val_value_t *val)
test callback function to check if a value node should be cloned
Definition: val.h:1081
dlq provides general double-linked list and queue support:
status_t val_resolve_scoped_name(val_value_t *val, const xmlChar *name, val_value_t **chval)
Find the scoped identifier in the specified complex value.
Definition: val.c:10365
void val_clean_value(val_value_t *val)
Clean a static val_value_t struct.
Definition: val.c:13672
void val_move_nonconfig_children(val_value_t *srcval, val_value_t *destval)
Move all the config=false child nodes from src to dest Source and dest must both be containers! ...
Definition: val.c:12671
void val_change_nsid2(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for the descendant nodes of the value node.
Definition: val.c:12331
boolean(* val_walker_fn_t)(val_value_t *val, void *cookie1, void *cookie2)
child or descendant node search walker function
Definition: val.h:1094
void val_dump_alt_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to the alternate logfile Uses conf file format (see ncx/conf...
Definition: val.c:5755
boolean suppressVariableNames
suppress variable names in output
Definition: val.h:757
val_value_t * val_clone_config_data(const val_value_t *val, status_t *res)
Clone a specified val_value_t struct and sub-trees with config=true only.
Definition: val.c:7903
status_t res
validation result
Definition: val.h:920
boolean val_is_default(val_value_t *val)
Check if the specified value is set to the YANG default value.
Definition: val.c:11347
ncx_identity_t * identity
ID back-ptr if found.
Definition: val.h:767
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:386
struct val_value_t_ * insertval
back-ptr if before or after
Definition: val.h:800
void val_force_empty(val_value_t *val)
Convert a simple node to an empty type.
Definition: val.c:13101
const xmlChar * val_get_varexpr(const val_value_t *val)
Get the varexpr field if set; NULL if not set.
Definition: val.c:15461
time_t cachetime
timestamp for virtual val timeout
Definition: val.h:836
dlq_hdr_t * val_get_metaQ(val_value_t *val)
Get the meta Q header for the value.
Definition: val.c:5391
NCX base64 string node for YANG &#39;binary&#39; built-in type.
Definition: ncxtypes.h:801
val_editvars_t * editvars
value editing variables the editvars will only be malloced while edit is in progress ...
Definition: val.h:918
YANG-API point param.
Definition: val.h:776
boolean val_all_np_containers(val_value_t *val)
Check if the value tree is all NP containers and nothing else.
Definition: val.c:13433
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
void val_clean_tree(val_value_t *val)
Clear the dirty flag and the operation for all nodes within a value struct.
Definition: val.c:12075
ncx_str_t str
String data types:
Definition: val.h:1004
boolean(* val_test2_fn_t)(val_value_t *val, void *cookie)
get first or next child test function value test function
Definition: val.h:1140
boolean val_is_metaval(const val_value_t *val)
Check if the value is a meta-val (XML attribute)
Definition: val.c:12631
void val_set_subtree_dirty_up(val_value_t *val)
Set the dirty flag for this value node.
Definition: val.c:11862
boolean val_has_content_ex(const val_value_t *val)
Determine if there is a value or any child nodes for this val.
Definition: val.c:10573
const xmlChar * val_get_owner(val_value_t *val)
Get the owner string for the specified value node.
Definition: val.c:13577
struct representing 1 configuration database
Definition: plock_cb.h:81
val_index_t * val_get_next_index(const val_index_t *valindex)
Get the next index entry, if any for this value node.
Definition: val.c:10714
errfn_t errorfn
log error callback
Definition: val.h:755
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
status_t val_union_ok_full(typ_def_t *typdef, const xmlChar *strval, val_value_t *contextval, val_value_t *rootval, val_value_t *retval, ncx_errinfo_t **errinfo)
Check a union to make sure the string is valid based on the specified typdef, and convert the string ...
Definition: val.c:5200
const xmlChar * name
back pointer to elname the dname field is moved to val_extra_t and only used when the value is constr...
Definition: val.h:877
val_value_t * val_convert_leafref(const val_value_t *val)
Convert a value of type NCX_BT_LEAFREF to the value that the final leafref is pointing at...
Definition: val.c:14766
boolean val_has_content(const val_value_t *val)
Determine if there is a value or any child nodes for this val.
Definition: val.c:10527
#define VAL_MAX_PLOCKS
max number of concurrent partial locks by the same session
Definition: val.h:146
boolean val_has_conditional_value(val_value_t *val)
Check if the value is conditional.
Definition: val.c:14677
val_insert_mode_t insert_mode
insert mode requested
Definition: val.h:801
uint32 val_instance_count_fast2(val_value_t *val, val_value_t *startval)
Count the number of instances of the specified object name in the parent value struct.
Definition: val.c:11580
dump val to audit log
Definition: val.h:786
void * val_get_pcookie(val_value_t *val)
Get the SIL pointer cookie in the editvars for the specified value node.
Definition: val.c:12882
void val_change_nsid(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node and all its descendants.
Definition: val.c:12303
YANG key attribute.
Definition: val.h:774
boolean(* val_hdr_test_fn_t)(val_child_hdr_t *hdr, void *cookie)
get first or next child test function header test function
Definition: val.h:1126
status_t val_pattern_ok_errinfo(typ_def_t *typdef, const xmlChar *strval, ncx_errinfo_t **errinfo)
Check a string against all the patterns in a big AND expression Get errinfo if any.
Definition: val.c:4308
void val_stdout_value_ex(val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl)
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h)
Definition: val.c:5819
val_value_t * val_get_first_leaf(val_value_t *val)
Get the first leaf or leaflist node in the specified value tree.
Definition: val.c:12185
Discriminated union for all data typedefs.
Definition: typ.h:458
status_t val_set_string2(val_value_t *val, const xmlChar *valname, typ_def_t *typdef, const xmlChar *valstr, uint32 valstrlen)
set a string with any typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! ...
Definition: val.c:6675
boolean skip_sil_partial
TRUE is skip_sil_partial needed.
Definition: val.h:807
uint32 val_url_encode_string(const xmlChar *str, xmlChar *buff)
Fill in a buffer with the URL-encoded string.
Definition: val.c:14020
uint32 count
que count of non-deleted nodes
Definition: val.h:1042
status_t val_set_simval_binary(val_value_t *val, const xmlChar *binstr, uint32 binstrlen)
set a binary type either in a type binary, or type within 1 or more unions
Definition: val.c:7400
status_t val_add_meta(val_value_t *metaval, val_value_t *val)
Add a meta value to a value node.
Definition: val.c:15162
NETCONF Session Common definitions module.
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:741
status_t val_union_ok_errinfo(typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo)
Check a union to make sure the string is valid based on the specified typdef, and convert the string ...
Definition: val.c:4909
boolean val_has_index(const val_value_t *val)
Determine if this value has an index.
Definition: val.c:10660
one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms)
Definition: ncxtypes.h:746
ncx_iqual_t
The instance qualifier types are borrowed from ABNF and RelaxNG.
Definition: ncxtypes.h:447
const typ_def_t * val_get_typdef(const val_value_t *val)
Get the typdef field for a value struct.
Definition: val.c:12550
RFC 57517 partial lock support Data structure definition.
const xmlChar * val_get_yang_typename(val_value_t *val)
Get the YANG type name for this value node if there is one.
Definition: val.c:13808
void val_set_extern(val_value_t *val, xmlChar *fname)
Setup an NCX_BT_EXTERN value.
Definition: val.c:10893
status_t val_string_ok_ex2(ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors, boolean is_defval)
retrieve the YANG custom error info if any
boolean val_is_config_save(const val_value_t *val)
Check if the specified value is a config DB object instance Check for config-save mode...
Definition: val.c:11223
val_value_t * val_find_next_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, const val_value_t *curchild)
Find the next instance of the specified child node.
Definition: val.c:8748
int32 val_compare_as_string(const val_value_t *val1, const val_value_t *val2, status_t *res)
Compare 2 val_value_t structs Convert each value to a string and compare as strings Needed to compare...
Definition: val.c:9873
void(* dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for dump_value.
Definition: val.h:728
status_t val_set_simval(val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr)
set any simple value with any typdef Set an initialized val_value_t as a simple type ...
Definition: val.c:6836
int32 val_compare_for_topreplace_simple(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:14982
const xmlChar * val_get_dname(const val_value_t *val)
Get the dname field if set; NULL if not set.
Definition: val.c:15338
boolean val_index_match(const val_value_t *val1, const val_value_t *val2)
Check 2 val_value structs for the same instance ID.
Definition: val.c:9032
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
union of all the basic number types if float not supported, then it is stored as an int64 ...
Definition: ncxtypes.h:719
boolean val_any_whitespace(const xmlChar *str, uint32 len)
Check if a string has any whitespace chars.
Definition: val.c:11753
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
xmlChar * insertstr
saved value or key attr
Definition: val.h:798
uint32 val_child_inst_cnt(const val_value_t *parent, const xmlChar *modname, const xmlChar *name)
Get the corresponding child instance count by name get instance count – for instance qualifer checki...
Definition: val.c:8929
boolean val_dirty_subtree(const val_value_t *val)
Check the dirty or subtree_dirty flag.
Definition: val.c:12050
Contains NCX constants.
int val_index_compare(const val_value_t *val1, const val_value_t *val2)
Check 2 val_value structs for the same instance ID.
Definition: val.c:9062
void val_set_intern(val_value_t *val, xmlChar *intbuff)
Setup an NCX_BT_INTERN value.
Definition: val.c:10921
struct obj_template_t_ * obj
common fields
Definition: val.h:875
val_value_t * val_first_child_string(val_value_t *parent, const xmlChar *name, const xmlChar *strval)
find first name value pair
Definition: val.c:8875
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1052
time_t last_modified
last_modified and etag fields used for filtered retrieval and YANG-API If-Match type of conditional e...
Definition: val.h:897
boolean val_has_complex_child(const val_value_t *val)
Check if the value has complex children nodes.
Definition: val.c:15125
val_value_t * val_first_child_match_fast(const val_value_t *parent, const val_value_t *child, val_value_t *lastmatch)
Get the first instance of the corresponding child node Object pointers must be from the same tree!!! ...
Definition: val.c:8388
int32 val_compare_for_replace(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents for the nc:operation=replace procedures.
Definition: val.c:9654
void val_set_name(val_value_t *val, const xmlChar *name, uint32 namelen)
Set (or reset) the name of a value struct.
Definition: val.c:2875
uint32 val_metadata_inst_count(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the number of instances of the specified attribute.
Definition: val.c:5639
void val_move_metadata(val_value_t *srcval, val_value_t *destval)
Move the attribute fields from one val to another for xml_wr purposes.
Definition: val.c:13164
status_t val_new_extra(val_value_t *val)
Create the val_extra struct if it does not exist.
Definition: val.c:15433
boolean val_get_dirty_flag(const val_value_t *val)
Get the dirty flag for this value node.
Definition: val.c:11825
xmlns_id_t val_get_nsid(const val_value_t *val)
Get the namespace ID for the specified value node.
Definition: val.c:12277
ncx_iqual_t val_get_iqualval(const val_value_t *val)
Get the effective instance qualifier value for this value.
Definition: val.c:10440
void val_dump_value_ex(val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5721
val_value_t * val_find_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8560
val_index_t * val_get_next_key(val_index_t *curkey)
Get the next key record if this is a list with a key-stmt.
Definition: val.c:13254
boolean val_ascendant_compare(val_value_t *val1, val_value_t *val2)
Special compare function for edit compares.
Definition: val.c:15273
uint32 val_get_index_count(const val_value_t *val)
Get the number of index nodes in this val.
Definition: val.c:10740
status_t val_replace_str(const xmlChar *str, uint32 stringlen, val_value_t *copy)
Replace a specified val_value_t struct with a string type.
Definition: val.c:8085
int32 val_compare_for_topreplace(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:14837
struct xpath_pcb_t_ * xpathpcb
this field is for NCX_BT_LEAFREF NCX_BT_INSTANCE_ID, or tagged ncx:xpath value stored in v union as a...
Definition: val.h:842
void val_free_editvars(val_value_t *val)
Free the editing variables for the value node.
Definition: val.c:13389
void val_add_child_sorted(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node in the proper place (deprecated: use val_child_add inst...
Definition: val.c:8258
status_t val_range_ok(typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num)
Check a number to see if it is in range or not Could be a number or size range.
Definition: val.c:4181
status_t val_sprintf_etag(val_value_t *val, xmlChar *buff, int32 buffsize)
Write the Entity Tag for the value to the specified buffer.
Definition: val.c:13472
typ_def_t * typdef
bptr to typdef if leaf
Definition: val.h:876
int icookie
user integer cookie
Definition: val.h:805
xmlChar * varexpr
malloced pointer to the variable expression found if this val node is part of a data template...
Definition: val.h:861
val_index_t * val_get_first_index(const val_value_t *val)
Get the first index entry, if any for this value node.
Definition: val.c:10685
boolean val_create_allowed(const val_value_t *val)
Check if the specified value is allowed to have a create edit-config operation attribute.
Definition: val.c:11100
ncx_num_t num
Numeric data types:
Definition: val.h:996
void val_set_child_deleted_flag(val_value_t *val)
Set the child_deleted flag for this value node.
Definition: val.c:11940
boolean val_find_bit(val_value_t *val, const xmlChar *bitname)
Find the specified bit name in the NCX_BT_BITS value.
Definition: val.c:13695
not set
Definition: val.h:782
status_t val_set_simval_str(val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr)
set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple...
Definition: val.c:6900
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
xmlChar * val_make_sprintf_string(const val_value_t *val)
Malloc a buffer and then sprintf the xmlChar string NETCONF representation of a simple value...
Definition: val.c:10323
one set of edit-in-progress variables for one value node
Definition: val.h:791
void val_dump_value_full2(val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, boolean withdef, log_debug_t lvl, logfns_t *overrideOutput)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5960
void val_move_children(val_value_t *srcval, val_value_t *destval)
Move all the child nodes from src to dest Source and dest must both be containers! ...
Definition: val.c:12651
dump val to main log
Definition: val.h:784
status_t val_parse_meta(ses_cb_t *scb, typ_def_t *typdef, xml_attr_t *attr, val_value_t *retval)
Parse the metadata descriptor against the typdef Check only that the value is ok, not instance count...
represents one attribute
Definition: xml_util.h:156
YANG module data structures Many internal representations of YANG module constructs.
extra information not used very often within a val_value_t
Definition: val.h:812
boolean val_fit_oneline(const val_value_t *val, uint32 linesize, boolean isxml)
Check if the XML encoding for the specified val_value_t should take one line or more than one line...
Definition: val.c:10960
int32 val_compare(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:9456
void val_change_nsid3(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node only.
Definition: val.c:12357
boolean val_get_subtree_dirty_flag(const val_value_t *val)
Get the subtree dirty flag for this value node.
Definition: val.c:11845
val_value_t * val_next_child_match(val_value_t *parent, val_value_t *child, val_value_t *curmatch)
Get the next instance of the corresponding child node.
Definition: val.c:8423
status_t val_union_ok(typ_def_t *typdef, const xmlChar *strval, val_value_t *retval)
Check a union to make sure the string is valid based on the specified typdef, and convert the string ...
Definition: val.c:4872
typ_def_t * val_get_leafref_typdef_ex(val_value_t *val, boolean union_check)
Return a base typedef of type NCX_BT_LEAFREF.
Definition: val.c:15675
Struct marking the parsing of an instance identifier The position of this record in the val_value_t i...
Definition: val.h:1059
status_t val_cvt_generic(val_value_t *val)
Convert all the database object pointers to generic object pointers.
Definition: val.c:12718
void val_mark_deleted(val_value_t *val)
mark the value node as deleted May have to really delete from val_tree
Definition: val.c:14640
val_idref_t idref
NCX_BT_IDREF.
Definition: val.h:1006
void val_replace_stringval(val_value_t *val, const xmlChar *str)
Replace the string value, not the entire value.
Definition: val.c:8193
void val_clean_index_chain(val_value_t *val)
Clean out any indexQ entries.
Definition: val.c:14100
ncx_nmda_origin_t nmda_origin
NMDA origin enum.
Definition: val.h:964
status_t val_set_varexpr(val_value_t *val, const xmlChar *varexpr)
Set the varexpr field in the value node.
Definition: val.c:15484
ncx_owner_id_t owner_id
set if the owners are being stored and this is a data node in the running config
Definition: val.h:961
not set
Definition: val.h:773
uint8 flags
internal processing flags
Definition: val.h:1045
status_t val_set_binary(const xmlChar *valstr, uint32 valstrlen, val_value_t *val)
set and decode base64 value.
Definition: val.c:6758
uint8 silprio
2nd SIL priority for server
Definition: val.h:802
void val_set_wildcard_string(val_value_t *val)
Set the value as a wildcard string.
Definition: val.c:15536
val_value_t * val_get_first_meta_val(val_value_t *val)
Get the first metaQ entry from the specified Queue.
Definition: val.c:5447
const xmlChar * val_find_enum_name(val_value_t *val, int32 enunum)
Find the specified enum name for the value field that matches for NCX_BT_ENUM value.
Definition: val.c:14450
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
void val_stdout_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h)
Definition: val.c:5787
struct obj_template_t_ * obj
child object template The numbering of this object will determine the insertion order of child nodes ...
Definition: val.h:1028
XML Utilities.
ncx_nmda_origin_t
internal enumerations for standard NMDA origins
Definition: ncxtypes.h:1501
val_value_t * val_get_virtual_value(ses_cb_t *scb, val_value_t *val, status_t *res)
Get the value of a virtual value node.
Definition: val.c:11310
uint32 flags
internal status flags
Definition: val.h:888
ncx_list_t list
NCX_BT_BITS, NCX_BT_SLIST.
Definition: val.h:1008
void * pcookie
user pointer cookie
Definition: val.h:804
one unique-stmt component test value node
Definition: val.h:1066
val_value_t * val_first_child_name(val_value_t *parent, const xmlChar *name)
Get the first corresponding child node instance, by name find first – really for resolve index funct...
Definition: val.c:8796
void val_set_withdef_default(val_value_t *val)
Set the value flags as having the wd:default attribute.
Definition: val.c:12610
val_value_t * val_find_meta(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the corresponding meta data node.
Definition: val.c:5532
void val_mark_undeleted(val_value_t *val)
mark the value node as un-deleted
Definition: val.c:14657
boolean val_is_default_npcon(val_value_t *val)
Check if the value node is a default NP container.
Definition: val.c:15770
one value to match one type
Definition: val.h:870
struct val_child_hdr_t_ * hdr
back-ptr to own child_hdr
Definition: val.h:883
status_t val_set_string(val_value_t *val, const xmlChar *valname, const xmlChar *valstr)
set a generic string using the builtin string typdef Set an initialized val_value_t as a simple type ...
Definition: val.c:6622
void val_dump_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5688
status_t val_parse_idref(ncx_module_t *mod, const xmlChar *qname, xmlns_id_t *nsid, const xmlChar **name, ncx_identity_t **id)
Parse a CLI BASED identityref QName into its various parts.
Definition: val.c:3927
void val_init_complex(val_value_t *val, ncx_btype_t btyp)
Initialize the fields in a complex val_value_t this is deprecated and should only be called by val_in...
Definition: val.c:2746
struct val_value_t_ * curparent
these fields are only used in modified values before they are actually added to the config database (...
Definition: val.h:796
boolean val_all_whitespace(const xmlChar *str)
Check if a string is all whitespace.
Definition: val.c:11719
dump val to STDOUT
Definition: val.h:783
status_t val_enum_ok(typ_def_t *typdef, const xmlChar *enumval, int32 *retval, const xmlChar **retstr)
Check an enumerated integer string to make sure the value is valid based on the specified typdef...
Definition: val.c:3455
void val_convert_any_to_container(val_value_t *val)
Convert the extern parameter to a container instead of extern.
Definition: val.c:14076
boolean val_need_quotes(const xmlChar *str)
Check if a string needs to be quoted to be output within a conf file or ncxcli stdout output...
Definition: val.c:11685
ncx_etag_t etag
ETag for RESTCONF.
Definition: val.h:898
val_value_t * val_make_simval(typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type same as val_set_simval, but malloc the value first...
Definition: val.c:7504
status_t val_set_pcookie(val_value_t *val, void *pcookie)
Set the SIL pointer cookie in the editvars for the specified value node.
Definition: val.c:12819
status_t val_string_ok_ex(ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors)
retrieve the YANG custom error info if any (extended)
Session Control Block.
Definition: ses.h:542
boolean val_has_children(const val_value_t *val)
Determine if there are any child nodes for this val.
Definition: val.c:13724
boolean val_duplicates_allowed(val_value_t *val)
Determine if duplicates are allowed for the given val type The entire definition chain is checked to ...
Definition: val.c:10480
struct xpath_pcb_t_ * insertxpcb
key attr for insert
Definition: val.h:799
int32 val_compare_ex(const val_value_t *val1, const val_value_t *val2, boolean configonly)
Compare 2 val_value_t struct value contents Check all or config only.
Definition: val.c:9421
one QName for the NCX_BT_IDREF value
Definition: val.h:763
xmlns_id_t nsid
namespace ID
Definition: val.h:764
void val_insert_child(val_value_t *child, val_value_t *current, val_value_t *parent)
Insert a child value node to a parent value node.
Definition: val.c:8286
status_t val_range_ok_errinfo(typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num, ncx_errinfo_t **errinfo)
Check a number to see if it is in range or not; get errinfo Could be a number or size range...
Definition: val.c:4216
uint32 val_child_cnt(val_value_t *parent)
Get the number of child nodes present.
Definition: val.c:8907
ncx_display_mode_t
enumeration of val_dump_value display modes
Definition: ncxtypes.h:599
val_value_t * val_get_next_terminal_child(const val_value_t *curchild)
Get the next child node only if obj_is_terminal(val->obj) is true.
Definition: val.c:8534
ncx_owner_id_t val_get_owner_id(val_value_t *val)
Get the owner ID for the specified value node.
Definition: val.c:13602
status_t
global error return code
Definition: status_enum.h:186
status_t val_idref_ok(typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, const xmlChar **name, ncx_identity_t **id)
Check if an identityref QName is valid for the typedef.
Definition: val.c:3717
status_t val_set_skip_sil_partial(val_value_t *val)
Set the skip_sil_partial flag for this value in an edit.
Definition: val.c:15626
void val_dump_value_max(val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5859
op_editop_t editop
needed for all edits
Definition: val.h:919
status_t val_simval_ok_errinfo(typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4413
const xmlChar * val_get_mod_prefix(const val_value_t *val)
Get the module prefix associated with this value node.
Definition: val.c:12250
status_t val_simval_ok_ex(typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4443
boolean operset
nc:operation here
Definition: val.h:803
val_value_t * val_find_root(val_value_t *val)
Find the root value node or top-val if no ncx:root found.
Definition: val.c:15191
xmlChar * dname
malloced value name used rarely if obj_get_name not correct this can happen if val_value_t trees are ...
Definition: val.h:819
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
int val_get_icookie(val_value_t *val)
Get the SIL integer cookie in the editvars for the specified value node.
Definition: val.c:12908
status_t val_simval_ok_max3(typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond, boolean is_defval)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4561
void * getcb
Used by Agent only: GET1 callback for virtualval if this field is non-NULL, then the entire value nod...
Definition: val.h:827
status_t val_pattern_ok(typ_def_t *typdef, const xmlChar *strval)
Check a string against all the patterns in a big AND expression.
Definition: val.c:4275
boolean val_meta_match(val_value_t *val, val_value_t *metaval)
Return true if the corresponding attribute exists and has the same value.
Definition: val.c:5582
void val_add_child(val_value_t *child, val_value_t *parent)
Add a child (deprecated): use val_child_add instead.
Definition: val.c:8231
uint32 val_liststr_count(const val_value_t *val)
Get the number of strings in the list type.
Definition: val.c:8995
val_value_t * val_find_child_que(const dlq_hdr_t *childQ, xmlns_id_t nsid, const xmlChar *childname)
Find the first instance of the specified child node in the specified child Q.
Definition: val.c:8640
void val_free_unique(val_unique_t *valuni)
Clean and free a val_unique_t struct.
Definition: val.c:12525
boolean val_match_metaval(const xml_attr_t *attr, xmlns_id_t nsid, const xmlChar *name)
Match the specific attribute value and namespace ID.
Definition: val.c:11790
boolean(* val_walker2_fn_t)(val_child_hdr_t *valhdr, void *cookie1, void *cookie2)
child or descendant node search walker function - GEN2
Definition: val.h:1110
status_t val_string_ok(typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval)
Check a string to make sure the value is valid based on the restrictions in the specified typdef...
Definition: val.c:3007
val_value_t * val_clone_config_save(const val_value_t *val, status_t *res)
Clone a specified val_value_t struct and sub-trees filter for config only for saving to NVRAM...
Definition: val.c:7941
Global error messages for status code enumerations.
status_t val_simval_ok_max2(typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4517
void val_clear_varexpr(val_value_t *val)
Clear the varexpr field in the value node.
Definition: val.c:15513
status_t val_sprintf_simval_nc(xmlChar *buff, const val_value_t *val, uint32 *len)
Sprintf the xmlChar string NETCONF representation of a simple value.
Definition: val.c:9931
union of all the NCX-specific sub-types note that the following invisible constructs should never sho...
Definition: val.h:975
ncx_data_class_t
NCX Persistence Control.
Definition: ncxtypes.h:190
void val_swap_child(val_value_t *newchild, val_value_t *curchild)
Swap a child value node with a current value node.
Definition: val.c:8334
val_value_t * val_match_child_count(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, uint32 *matchcount)
Match the first instance of the specified child node Return the total number of matches.
Definition: val.c:8718
Parameter Type Handler.
op_insertop_t insertop
YANG insert operation.
Definition: val.h:797
status_t val_sprintf_simval_nc_ex(xmlChar *buff, const val_value_t *val, boolean url_encode, uint32 *len)
Sprintf the xmlChar string NETCONF representation of a simple value.
Definition: val.c:9966
void val_set_extra_instance_errors(val_value_t *val, const xmlChar *modname, const xmlChar *objname, uint32 maxelems)
mark ERR_NCX_EXTRA_VAL_INST errors for nodes > &#39;maxelems&#39;
Definition: val.c:11630
void val_delete_children(val_value_t *val)
Check if the value is a complex type and if so then delete all child nodes.
Definition: val.c:13645
YANG value attribute.
Definition: val.h:775
this struct is inserted in the val->v.child_hdrQ for container and list value nodes ...
Definition: val.h:1020
status_t val_simval_ok_max(typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4476
typ_def_t * val_get_leafref_typdef(val_value_t *val)
Return a base typedef of type NCX_BT_LEAFREF.
Definition: val.c:15242
struct xpath_pcb_t_ * pcb
live XPath CB w/ result
Definition: val.h:1068
boolean val_is_value_set(val_value_t *val)
Check if a value has been set by a client It has to be initialized and not set by default to return t...
Definition: val.c:13941
void val_clear_dirty_flag(val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid, boolean is_delete, boolean do_clear_default)
Clear the dirty flag for this value node.
Definition: val.c:11981
status_t val_list_ok_errinfo(typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list, ncx_errinfo_t **errinfo)
Check a list to make sure the all the strings are valid based on the specified typdef.
Definition: val.c:3384
uint8 ncx_owner_id_t
used as index into the agt_owner registry
Definition: ncxtypes.h:1414
const xmlChar * val_find_enum_name2(ncx_btype_t btyp, typ_def_t *typdef, int32 enunum)
Find the specified enum name for the value field that matches for NCX_BT_ENUM value Do not use val_va...
Definition: val.c:14550
void val_move_fields_for_xml(val_value_t *srcval, val_value_t *destval, boolean movemeta)
Move or copy the internal fields from one val to another for xml_wr purposes.
Definition: val.c:13133
boolean val_delete_allowed(const val_value_t *val)
Check if the specified value is allowed to have a delete edit-config operation attribute.
Definition: val.c:11129
status_t val_union_ok_binary(typ_def_t *typdef, const xmlChar *binstr, uint32 binstrlen, val_value_t *retval, ncx_errinfo_t **errinfo, typ_def_t **match_typdef)
Check a union to make sure the buffer is valid based on the specified typdef, and convert the buffer ...
Definition: val.c:5072
boolean is_move
TRUE if YPATCH MOVE operation.
Definition: val.h:806
void(* errfn_t)(const char *fstr,...)
Callback to do error log function for dump_value.
Definition: val.h:737
status_t val_list_ok(typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list)
Check a list to make sure the all the strings are valid based on the specified typdef.
Definition: val.c:3344
boolean val_idref_derived_from(ncx_module_t *impmod, val_value_t *testval, const xmlChar *qname, boolean or_self)
Check the specified valnode is derived from the specified identity.
Definition: val.c:14206
void val_set_dirty_flag(val_value_t *val, boolean clear_def)
Set the dirty flag for this value node.
Definition: val.c:11896
void val_set_all_tags(val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid)
Set the etag and last_modified field for the node and all config sub-children.
Definition: val.c:13545
void val_remove_child(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val.c:8316
void val_reinit_from_template(val_value_t *val, struct obj_template_t_ *obj)
Re-Initialize a value node from its object template.
Definition: val.c:2820
op_insertop_t
YANG insert operation types.
Definition: op.h:137
header for a NCX List
Definition: ncxtypes.h:794
val_value_t * val_next_child_qname(val_value_t *parent, xmlns_id_t nsid, const xmlChar *name, val_value_t *curchild)
Get the next corresponding child node instance, by QName.
Definition: val.c:8842
NETCONF protocol operations.
status_t val_union_ok_ex(typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo, ncx_module_t *mod, typ_def_t **match_typdef)
Check a union to make sure the string is valid based on the specified typdef, and convert the string ...
Definition: val.c:4943
void val_dump_value_full(val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, log_debug_t lvl, logfns_t *overrideOutput)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5907
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1250
status_t val_set_canonical(val_value_t *val)
Invoke the canonical callback for the data type (if any)
Definition: val.c:15221
status_t val_set_dname2(val_value_t *val, const xmlChar *dname, uint32 dnamelen)
Set the dname field.
Definition: val.c:15397
val_value_t * val_match_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Match the first instance of the specified child node.
Definition: val.c:8685
status_t val_delete_default_leaf_list(val_value_t *val)
Do the internal work to convert a leaf-list to its YANG default value(s)
Definition: val.c:12983
ncx_binary_t binary
NCX_BT_BINARY.
Definition: val.h:1007
boolean val_meta_empty(val_value_t *val)
Check if the metaQ is empty for the value node.
Definition: val.c:5499
val_unique_t * val_new_unique(void)
Malloc and initialize the fields in a val_unique_t.
Definition: val.c:12501
val_value_t * val_make_from_insertxpcb(val_value_t *sourceval, status_t *res)
Make a val_value_t for a list, with the child nodes for key leafs, specified in the key attribute str...
Definition: val.c:12384
val_extra_t * val_extra
val extra fields only needed about 25% of the time
Definition: val.h:886
val_index_t * val_get_prev_key(val_index_t *curkey)
Get the previous key record if this is a list with a key-stmt.
Definition: val.c:13272
status_t val_delete_default_npcon(val_value_t *val)
Do the internal work to convert an NP-container to its subtree of YANG default values.
Definition: val.c:13048
val_insert_mode_t
type of protocol parameter used for insert operation
Definition: val.h:772
uint32 val_get_nest_level(val_value_t *val)
Get the next level of the value.
Definition: val.c:12157
val_value_t * val_make_string(xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr)
Malloc and set a val_value_t as a generic NCX_BT_STRING namespace set to 0 !!!
Definition: val.c:7557
YANG identity entry.
Definition: ncxtypes.h:1025
val_value_t * val
points to a child node
Definition: val.h:1061
ncx_enum_t enu
NCX_BT_UNION, NCX_BT_ENUM.
Definition: val.h:1010
boolean val_get_child_deleted_flag(val_value_t *val)
Get the child_deleted flag for this value node.
Definition: val.c:11958
status_t val_binary_ok_errinfo(typ_def_t *typdef, const xmlChar *strval, val_value_t *val, ncx_errinfo_t **errinfo)
retrieve the YANG custom error info for binary val, if any
Definition: val.c:3070
struct val_value_t_ * virtualval
if this field is non-NULL, then a malloced value struct representing the real value retrieved by val_...
Definition: val.h:833
void val_remove_key(val_value_t *keyval)
Remove a key pointer because the key is invalid Free the key pointer.
Definition: val.c:13291
xmlChar * fname
NCX_BT_EXTERN.
Definition: val.h:1011
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
uint32 val_instance_count(val_value_t *val, const xmlChar *modname, const xmlChar *objname)
Count the number of instances of the specified object name in the parent value struct.
Definition: val.c:11515
status_t val_merge(const val_value_t *src, val_value_t *dest)
Merge src val into dest val (! MUST be same type !) Any meta vars in src are also merged into dest...
Definition: val.c:7645
status_t val_set_icookie(val_value_t *val, int icookie)
Set the SIL integer cookie in the editvars for the specified value node.
Definition: val.c:12851
int32 val_compare_max(const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing)
Compare 2 val_value_t struct value contents.
Definition: val.c:9108
void val_force_default(val_value_t *val)
Set a node created by the server as a default node.
Definition: val.c:13526
boolean val_is_real(const val_value_t *val)
Check if the specified value is a real value.
Definition: val.c:11449
boolean val_is_config_data(const val_value_t *val)
Check if the specified value is a config DB object instance.
Definition: val.c:11157
boolean val_need_owner_string(val_value_t *val)
Check if the owner string is needed when generating ywx:owner attrs.
Definition: val.c:13627
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
boolean val_ocpattern_match(const regex_t *ocpattern, const xmlChar *strval)
Check the specified string against the specified pattern Use POSIX format for openconfig pattern...
Definition: val.c:14157
val_index_t * val_get_first_key(val_value_t *val)
Get the first key record if this is a list with a key-stmt.
Definition: val.c:13200
void val_init_virtual(val_value_t *val, void *cbfn, struct obj_template_t_ *obj)
Special function to initialize a virtual value node.
int32 val_compare_to_string_len(const val_value_t *val1, const xmlChar *strval2, uint32 strval2len, status_t *res)
Compare a val_value_t struct value contents to a string Provide a max-length to compare.
Definition: val.c:9575
status_t val_fast_replace_string(const xmlChar *str, uint32 stringlen, val_value_t *copy)
Replace a specified val_value_t struct with a string type Reuse everything – just set the val->v...
Definition: val.c:8139
status_t val_add_test_valindex(val_value_t *parentval, val_value_t *keyval)
Make a dummy val_index_t for the getcg acmtest.
Definition: val.c:13757
uint32 val_get_child_inst_id(const val_value_t *parent, const val_value_t *child)
Get the instance ID for this child node within the parent context.
Definition: val.c:8953
status_t val_clone_valQ(dlq_hdr_t *valQ, dlq_hdr_t *return_valQ)
Clone all values in 1 valQ into the return_valQ.
Definition: val.c:13885
status_t val_set_sil_priority(val_value_t *val, uint8 silprio)
Set the secondary SIL priority.
Definition: val.c:14302
status_t val_force_dname(val_value_t *val)
Set (or reset) the name of a value struct.
Definition: val.c:2918
log functions control block used by manager code
Definition: val.h:753
void val_free_solo_editvars(val_editvars_t *editvars)
Free the editing variables removed from a val_value_t.
Definition: val.c:13411
status_t val_copy_editvars(const val_value_t *val, val_value_t *copy)
Copy the editvars struct contents into the value node.
Definition: val.c:15557
status_t val_string_ok_errinfo(typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo)
retrieve the YANG custom error info if any
Definition: val.c:3038
uint8 val_get_sil_priority(val_value_t *val)
Get the secondary SIL priority; zero if not found.
Definition: val.c:14327
val_value_t * val_first_child_qname(val_value_t *parent, xmlns_id_t nsid, const xmlChar *name)
Get the first corresponding child node instance, by QName.
Definition: val.c:8818
XML namespace support.
val_value_t * val_find_next_child_fast(const val_value_t *parent, const val_value_t *curchild)
Find the next instance of the specified child node.
Definition: val.c:8774
NCX System Logging Manager.
boolean boo
NCX_BT_EMPTY, NCX_BT_BOOLEAN.
Definition: val.h:1009
void val_set_qname(val_value_t *val, xmlns_id_t nsid, const xmlChar *name, uint32 namelen)
Set (or reset) the name and namespace ID of a value struct.
Definition: val.c:2962
status_t val_reset_empty(val_value_t *val)
Recast an already initialized value as an NCX_BT_EMPTY clean a value and set it to empty type used by...
Definition: val.c:6800
void val_clear_defvalset_flag(val_value_t *val)
Clear the defvalset flag so the server will re-check this node the next time the client does a get re...
Definition: val.c:13862
FILE * outputFile
manager redirect to file output
Definition: val.h:758
status_t val_replace(val_value_t *val, val_value_t *copy)
Replace a specified val_value_t struct and sub-trees.
Definition: val.c:7974
xmlChar * name
if nsid == INV_ID then this is entire QName
Definition: val.h:766
void(* indentfn_t)(log_debug_t level, int32 indentcnt)
Callback to do indent function for dump_value.
Definition: val.h:747
status_t val_new_editvars(val_value_t *val)
Malloc and initialize the val->editvars field.
Definition: val.c:13350
xmlns_id_t nsid
namespace ID for this node
Definition: val.h:890
uint32 val_instance_count_fast(val_value_t *val, xmlns_id_t nsid, const xmlChar *objname, val_value_t **firstval)
Count the number of instances of the specified object name in the parent value struct.
Definition: val.c:11550
val_dumpvalue_mode_t
dump value mode used in val_dump_value
Definition: val.h:781
val_value_t * val_get_next_meta(val_value_t *curnode)
Get the next metaQ entry from the specified entry.
Definition: val.c:5475
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
const xmlChar * val_find_bit_name(val_value_t *val, uint32 bitpos)
Find the specified bit name in the NCX_BT_BITS value.
Definition: val.c:14351
struct val_tree_t_ * tree
OBJ_TYP_LIST stores values in an AVL tree for fast lookup and also a dlq to maintain sorted order...
Definition: val.h:1033
val_value_t * val_next_child_same(val_value_t *curchild)
Get the next instance of the corresponding child node.
Definition: val.c:8456
status_t val_delete_default_leaf(val_value_t *val)
Do the internal work to setup a delete of a default leaf.
Definition: val.c:12933
val_value_t * val_make_binary(xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, uint32 valstrlen)
Malloc and set a val_value_t as a NCX_BT_BINARY type Uses the generic binary object from ncx_get_gen_...
Definition: val.c:7592
val_value_t * val_get_first_meta(dlq_hdr_t *queue)
Get the first metaQ entry from the specified Queue.
Definition: val.c:5423
status_t val_simval_ok(typ_def_t *typdef, const xmlChar *simval)
check any simple type to see if it is valid, but do not retrieve the value; used to check the default...
Definition: val.c:4379
int32 val_compare_to_string(const val_value_t *val1, const xmlChar *strval2, status_t *res)
Compare a val_value_t struct value contents to a string.
Definition: val.c:9493
void val_clean_valQ(dlq_hdr_t *valQ)
Clean a queue of val_value_t.
Definition: val.c:13916
ncx_btype_t btyp
base type of this value
Definition: val.h:891
val_value_t * val_find_child_obj(const val_value_t *parent, const struct obj_template_t_ *chobj)
Find the first instance of the specified child node Use the object template pointer to match the obje...
Definition: val.c:8612
boolean val_is_virtual(const val_value_t *val)
Check if the specified value is a virtual value such that a &#39;get&#39; callback function is required to ac...
Definition: val.c:11260
status_t val_set_dname(val_value_t *val, const xmlChar *dname)
Set the dname field.
Definition: val.c:15362
boolean val_get_skip_sil_partial(const val_value_t *val)
Get the skip_sil_partial flag.
Definition: val.c:15650
dump val to alternate log
Definition: val.h:785
status_t val_bit_ok(typ_def_t *typdef, const xmlChar *bitname, uint32 *position)
Check a bit name is valid for the typedef.
Definition: val.c:3583
xmlChar * intbuff
NCX_BT_INTERN.
Definition: val.h:1012
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported ...
Definition: ncxtypes.h:200
time_t * val_get_last_modified(val_value_t *val)
Get the last_modified field.
Definition: val.c:13510
val_value_t * val_new_deleted_value(void)
Malloc and initialize the fields in a val_value_t to be used as a deleted node marker.
Definition: val.c:13323
val_value_t * val_first_child_match(const val_value_t *parent, const val_value_t *child)
Get the first instance of the corresponding child node.
Definition: val.c:8359
struct val_value_t_ * parent
back-ptr to parent if any
Definition: val.h:882
void val_set_force_config(val_value_t *val, boolean is_config)
Set the force config flags for the object.
Definition: val.c:13831