yumapro  20.10-12
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 - 2020, 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 
698 /********************************************************************
699 * *
700 * T Y P E S *
701 * *
702 *********************************************************************/
703 
721 typedef void (*dumpfn_t) (log_debug_t level, const char *fstr, ...);
722 
723 
730 typedef void (*errfn_t) (const char *fstr, ...);
731 
732 
739 /* pick a log indent function for dump_value */
740 typedef void (*indentfn_t) (log_debug_t level, int32 indentcnt);
741 
742 
746 typedef struct logfns_t_ {
751  FILE *outputFile;
752 } logfns_t;
753 
754 
756 typedef struct val_idref_t_ {
759  xmlChar *name;
760  ncx_identity_t *identity;
761 } YPACK val_idref_t;
762 
763 
765 typedef enum val_insert_mode_t_ {
770 } YPACK val_insert_mode_t;
771 
772 
774 typedef enum val_dumpvalue_mode_t_ {
780 } val_dumpvalue_mode_t;
781 
782 
784 typedef struct val_editvars_t_ {
790  op_insertop_t insertop;
791  xmlChar *insertstr;
794  val_insert_mode_t insert_mode;
795  uint8 silprio;
796  boolean operset;
797  void *pcookie;
798  int icookie;
799  boolean is_move;
801 } YPACK val_editvars_t;
802 
803 
805 typedef struct val_extra_t_ {
806 
812  xmlChar *dname;
820  void *getcb;
821 
827 
829  time_t cachetime;
830 
836 
837 
841  plock_cb_t *plock[VAL_MAX_PLOCKS];
842 
843 
847  dlq_hdr_t *dataruleQ;
854  xmlChar *varexpr;
855 
856 } YPACK val_extra_t;
857 
858 
860 typedef struct val_value_t_ {
862  dlq_hdr_t qhdr;
863 
866  typ_def_t *typdef;
867  const xmlChar *name;
876  val_extra_t *val_extra;
877 
878  uint32 flags;
881  ncx_btype_t btyp;
882  ncx_data_class_t dataclass;
888  ncx_etag_t etag;
903  dlq_hdr_t *metaQ;
908  val_editvars_t *editvars;
909  op_editop_t editop;
910  status_t res;
912  /* GET1 getcb moved to val_extra */
913  /* GET1 virtualval moved to val_extra */
914  /* GET1 cachetime moved to val_extra */
915 
917  dlq_hdr_t *indexQ;
919  /* this field is used for NCX_BT_CHOICE
920  * If set, the object path for this node is really:
921  * $this --> casobj --> casobj.parent --> $this.parent
922  * the OBJ_TYP_CASE and OBJ_TYP_CHOICE nodes are skipped
923  * inside an XML instance document
924  *
925  * replaced by val_get_casobj() function in val_util.h
926  * struct obj_template_t_ *casobj;
927  */
928 
929  /* xpathpcb moved to val_extra_t */
930 
931  /* back-ptr to the partial locks that are held
932  * against this node
933  * plock moved to val_extra
934  */
935 
936  /* back-ptr to the data access control rules that
937  * reference this node
938  * dataruleQ moved to val_extra
939  */
940 
941  /* malloced pointer to the variable expression found
942  * if this val node is part of a data template.
943  * The actual value in union v_ MUST be ignored if
944  * varexpr string is non-NULL!!
945  * varexpr moved to val_extra
946  */
947 
952 
954  ncx_nmda_origin_t nmda_origin;
955 
965  union v_ {
975  dlq_hdr_t child_hdrQ;
976 
986  ncx_num_t num;
987 
995 
996  val_idref_t idref;
997  ncx_binary_t binary;
998  ncx_list_t list;
999  boolean boo;
1000  ncx_enum_t enu;
1001  xmlChar *fname;
1002  xmlChar *intbuff;
1003  } YPACK v;
1004 } YPACK val_value_t;
1005 
1006 
1010 typedef struct val_child_hdr_t_ {
1011  dlq_hdr_t qhdr;
1019 
1024 
1029  dlq_hdr_t que;
1030 
1032  uint32 count;
1033 
1035  uint8 flags;
1036 } YPACK val_child_hdr_t;
1037 
1038 
1049 typedef struct val_index_t_ {
1050  dlq_hdr_t qhdr;
1051  val_value_t *val;
1052 } YPACK val_index_t;
1053 
1054 
1056 typedef struct val_unique_t_ {
1057  dlq_hdr_t qhdr;
1058  struct xpath_pcb_t_ *pcb;
1059 } YPACK val_unique_t;
1060 
1061 
1070 typedef boolean
1071  (*val_test_fn_t) (const val_value_t *val);
1072 
1073 
1083 typedef boolean
1084  (*val_walker_fn_t) (val_value_t *val,
1085  void *cookie1,
1086  void *cookie2);
1087 
1088 
1089 
1099 typedef boolean
1100  (*val_walker2_fn_t) (val_child_hdr_t *valhdr,
1101  void *cookie1,
1102  void *cookie2);
1103 
1104 
1105 
1115 typedef boolean
1116  (*val_hdr_test_fn_t) (val_child_hdr_t *hdr,
1117  void *cookie);
1118 
1119 
1129 typedef boolean
1130  (*val_test2_fn_t) (val_value_t *val,
1131  void *cookie);
1132 
1133 
1137 /********************************************************************
1138 * *
1139 * F U N C T I O N S *
1140 * *
1141 *********************************************************************/
1142 
1160 extern val_value_t *
1161  val_new_value (void);
1162 
1163 
1172 extern void
1173  val_init_value (val_value_t *val);
1174 
1175 
1186 extern void
1187  val_init_complex (val_value_t *val,
1188  ncx_btype_t btyp);
1189 
1190 
1200 extern void
1201  val_init_virtual (val_value_t *val,
1202  void *cbfn,
1203  struct obj_template_t_ *obj);
1204 
1205 
1215 extern void
1216  val_init_from_template (val_value_t *val,
1217  struct obj_template_t_ *obj);
1218 
1219 
1229 extern void
1230  val_reinit_from_template (val_value_t *val,
1231  struct obj_template_t_ *obj);
1232 
1233 
1243 extern void
1244  val_free_value (val_value_t *val);
1245 
1246 
1254 extern void
1255  val_set_name (val_value_t *val,
1256  const xmlChar *name,
1257  uint32 namelen);
1258 
1259 
1269 extern status_t
1270  val_force_dname (val_value_t *val);
1271 
1272 
1281 extern void
1282  val_set_qname (val_value_t *val,
1283  xmlns_id_t nsid,
1284  const xmlChar *name,
1285  uint32 namelen);
1286 
1287 
1297 extern status_t
1298  val_string_ok (typ_def_t *typdef,
1299  ncx_btype_t btyp,
1300  const xmlChar *strval);
1301 
1302 
1317 extern status_t
1318  val_string_ok_errinfo (typ_def_t *typdef,
1319  ncx_btype_t btyp,
1320  const xmlChar *strval,
1321  ncx_errinfo_t **errinfo);
1322 
1323 
1339 status_t
1340  val_binary_ok_errinfo (typ_def_t *typdef,
1341  const xmlChar *strval,
1342  val_value_t *val,
1343  ncx_errinfo_t **errinfo);
1344 
1345 
1363 extern status_t
1364  val_string_ok_ex (ses_cb_t *scb,
1365  typ_def_t *typdef,
1366  ncx_btype_t btyp,
1367  const xmlChar *strval,
1368  ncx_errinfo_t **errinfo,
1369  boolean logerrors);
1370 
1371 
1390 extern status_t
1391  val_string_ok_ex2 (ses_cb_t *scb,
1392  typ_def_t *typdef,
1393  ncx_btype_t btyp,
1394  const xmlChar *strval,
1395  ncx_errinfo_t **errinfo,
1396  boolean logerrors,
1397  boolean is_defval);
1398 
1399 
1420 extern status_t
1421  val_list_ok (typ_def_t *typdef,
1422  ncx_btype_t btyp,
1423  ncx_list_t *list);
1424 
1425 
1443 extern status_t
1444  val_list_ok_errinfo (typ_def_t *typdef,
1445  ncx_btype_t btyp,
1446  ncx_list_t *list,
1447  ncx_errinfo_t **errinfo);
1448 
1449 
1462 extern status_t
1463  val_enum_ok (typ_def_t *typdef,
1464  const xmlChar *enumval,
1465  int32 *retval,
1466  const xmlChar **retstr);
1467 
1468 
1478 extern status_t
1479  val_bit_ok (typ_def_t *typdef,
1480  const xmlChar *bitname,
1481  uint32 *position);
1482 
1483 
1502 extern status_t
1503  val_idref_ok (typ_def_t *typdef,
1504  const xmlChar *qname,
1505  xmlns_id_t nsid,
1506  const xmlChar **name,
1507  ncx_identity_t **id);
1508 
1509 
1534 extern status_t
1535  val_idref_ok_ex (typ_def_t *typdef,
1536  const xmlChar *qname,
1537  xmlns_id_t nsid,
1538  boolean is_json,
1539  ncx_module_t *impmod,
1540  boolean or_self,
1541  const xmlChar **name,
1542  ncx_identity_t **id);
1543 
1544 
1561 extern status_t
1562  val_parse_idref (ncx_module_t *mod,
1563  const xmlChar *qname,
1564  xmlns_id_t *nsid,
1565  const xmlChar **name,
1566  ncx_identity_t **id);
1567 
1568 
1578 extern status_t
1579  val_range_ok (typ_def_t *typdef,
1580  ncx_btype_t btyp,
1581  const ncx_num_t *num);
1582 
1583 
1595 extern status_t
1596  val_range_ok_errinfo (typ_def_t *typdef,
1597  ncx_btype_t btyp,
1598  const ncx_num_t *num,
1599  ncx_errinfo_t **errinfo);
1600 
1601 
1609 extern status_t
1610  val_pattern_ok (typ_def_t *typdef,
1611  const xmlChar *strval);
1612 
1613 
1626 extern status_t
1627  val_pattern_ok_errinfo (typ_def_t *typdef,
1628  const xmlChar *strval,
1629  ncx_errinfo_t **errinfo);
1630 
1631 
1641 extern status_t
1642  val_simval_ok (typ_def_t *typdef,
1643  const xmlChar *simval);
1644 
1645 
1646 
1658 extern status_t
1659  val_simval_ok_errinfo (typ_def_t *typdef,
1660  const xmlChar *simval,
1661  ncx_errinfo_t **errinfo);
1662 
1663 
1677 extern status_t
1678  val_simval_ok_ex (typ_def_t *typdef,
1679  const xmlChar *simval,
1680  ncx_errinfo_t **errinfo,
1681  ncx_module_t *mod);
1682 
1683 
1699 extern status_t
1700  val_simval_ok_max (typ_def_t *typdef,
1701  const xmlChar *simval,
1702  ncx_errinfo_t **errinfo,
1703  ncx_module_t *mod,
1704  boolean logerrors);
1705 
1724 extern status_t
1725  val_simval_ok_max2 (typ_def_t *typdef,
1726  const xmlChar *simval,
1727  ncx_errinfo_t **errinfo,
1728  ncx_module_t *mod,
1729  boolean logerrors,
1730  boolean nocond);
1731 
1732 
1752 status_t
1753  val_simval_ok_max3 (typ_def_t *typdef,
1754  const xmlChar *simval,
1755  ncx_errinfo_t **errinfo,
1756  ncx_module_t *mod,
1757  boolean logerrors,
1758  boolean nocond,
1759  boolean is_defval);
1760 
1761 
1773 extern status_t
1774  val_union_ok (typ_def_t *typdef,
1775  const xmlChar *strval,
1776  val_value_t *retval);
1777 
1778 
1791 extern status_t
1792  val_union_ok_errinfo (typ_def_t *typdef,
1793  const xmlChar *strval,
1794  val_value_t *retval,
1795  ncx_errinfo_t **errinfo);
1796 
1797 
1814 extern status_t
1815  val_union_ok_ex (typ_def_t *typdef,
1816  const xmlChar *strval,
1817  val_value_t *retval,
1818  ncx_errinfo_t **errinfo,
1819  ncx_module_t *mod,
1820  typ_def_t **match_typdef);
1821 
1822 
1843 extern status_t
1844  val_union_ok_binary (typ_def_t *typdef,
1845  const xmlChar *binstr,
1846  uint32 binstrlen,
1847  val_value_t *retval,
1848  ncx_errinfo_t **errinfo,
1849  typ_def_t **match_typdef);
1850 
1851 
1871 extern status_t
1872  val_union_ok_full (typ_def_t *typdef,
1873  const xmlChar *strval,
1874  val_value_t *contextval,
1875  val_value_t *rootval,
1876  val_value_t *retval,
1877  ncx_errinfo_t **errinfo);
1878 
1879 
1886 extern dlq_hdr_t *
1887  val_get_metaQ (val_value_t *val);
1888 
1889 
1897 extern val_value_t *
1898  val_get_first_meta (dlq_hdr_t *queue);
1899 
1900 
1908 extern val_value_t *
1909  val_get_first_meta_val (val_value_t *val);
1910 
1911 
1919 extern val_value_t *
1920  val_get_next_meta (val_value_t *curnode);
1921 
1922 
1930 extern boolean
1931  val_meta_empty (val_value_t *val);
1932 
1933 
1942 extern val_value_t *
1943  val_find_meta (val_value_t *val,
1944  xmlns_id_t nsid,
1945  const xmlChar *name);
1946 
1947 
1957 extern boolean
1958  val_meta_match (val_value_t *val,
1959  val_value_t *metaval);
1960 
1961 
1970 extern uint32
1971  val_metadata_inst_count (val_value_t *val,
1972  xmlns_id_t nsid,
1973  const xmlChar *name);
1974 
1975 
1986 extern void
1987  val_dump_value (val_value_t *val,
1988  int32 startindent,
1989  log_debug_t lvl);
1990 
1991 
2003 extern void
2004  val_dump_value_ex (val_value_t *val,
2005  int32 startindent,
2006  ncx_display_mode_t display_mode,
2007  log_debug_t lvl);
2008 
2009 
2020 extern void
2021  val_dump_alt_value (val_value_t *val,
2022  int32 startindent,
2023  log_debug_t lvl);
2024 
2025 
2035 extern void
2036  val_stdout_value (val_value_t *val,
2037  int32 startindent,
2038  log_debug_t lvl);
2039 
2040 
2051 extern void
2052  val_stdout_value_ex (val_value_t *val,
2053  int32 startindent,
2054  ncx_display_mode_t display_mode,
2055  log_debug_t lvl);
2056 
2057 
2075 extern void
2076  val_dump_value_max (val_value_t *val,
2077  int32 startindent,
2078  int32 indent_amount,
2079  val_dumpvalue_mode_t dumpmode,
2080  ncx_display_mode_t display_mode,
2081  boolean with_meta,
2082  boolean configonly,
2083  log_debug_t lvl);
2084 
2085 
2107 extern void
2108  val_dump_value_full (val_value_t *val,
2109  int32 startindent,
2110  int32 indent_amount,
2111  val_dumpvalue_mode_t dumpmode,
2112  ncx_display_mode_t display_mode,
2113  boolean with_meta,
2114  boolean configonly,
2115  boolean conf_mode,
2116  boolean expand_varexpr,
2117  log_debug_t lvl,
2118  logfns_t *overrideOutput);
2119 
2120 
2143 extern void
2144  val_dump_value_full2 (val_value_t *val,
2145  int32 startindent,
2146  int32 indent_amount,
2147  val_dumpvalue_mode_t dumpmode,
2148  ncx_display_mode_t display_mode,
2149  boolean with_meta,
2150  boolean configonly,
2151  boolean conf_mode,
2152  boolean expand_varexpr,
2153  boolean withdef,
2154  log_debug_t lvl,
2155  logfns_t *overrideOutput);
2156 
2157 
2170 extern status_t
2171  val_set_string (val_value_t *val,
2172  const xmlChar *valname,
2173  const xmlChar *valstr);
2174 
2175 
2191 extern status_t
2192  val_set_string2 (val_value_t *val,
2193  const xmlChar *valname,
2194  typ_def_t *typdef,
2195  const xmlChar *valstr,
2196  uint32 valstrlen);
2197 
2198 
2214 extern status_t
2215  val_set_binary (const xmlChar *valstr,
2216  uint32 valstrlen,
2217  val_value_t *val);
2218 
2219 
2220 
2230 extern status_t
2231  val_reset_empty (val_value_t *val);
2232 
2233 
2246 extern status_t
2247  val_set_simval (val_value_t *val,
2248  typ_def_t *typdef,
2249  xmlns_id_t nsid,
2250  const xmlChar *valname,
2251  const xmlChar *valstr);
2252 
2253 
2296 extern status_t
2297  val_set_simval_str (val_value_t *val,
2298  typ_def_t *typdef,
2299  xmlns_id_t nsid,
2300  const xmlChar *valname,
2301  uint32 valnamelen,
2302  const xmlChar *valstr);
2303 
2304 
2325 extern status_t
2326  val_set_simval_binary (val_value_t *val,
2327  const xmlChar *binstr,
2328  uint32 binstrlen);
2329 
2330 
2374 extern status_t
2375  val_set_simval_max (val_value_t *val,
2376  typ_def_t *typdef,
2377  xmlns_id_t nsid,
2378  const xmlChar *valname,
2379  uint32 valnamelen,
2380  const xmlChar *valstr,
2381  uint32 valstrlen);
2382 
2383 
2397 extern val_value_t *
2398  val_make_simval (typ_def_t *typdef,
2399  xmlns_id_t nsid,
2400  const xmlChar *valname,
2401  const xmlChar *valstr,
2402  status_t *res);
2403 
2404 
2418 extern val_value_t *
2420  const xmlChar *valname,
2421  const xmlChar *valstr);
2422 
2423 
2434 extern val_value_t *
2436  const xmlChar *valname,
2437  const xmlChar *valstr,
2438  uint32 valstrlen);
2439 
2440 
2452 extern status_t
2453  val_merge (const val_value_t *src,
2454  val_value_t *dest);
2455 
2456 
2463 extern val_value_t *
2464  val_clone (const val_value_t *val);
2465 
2466 
2474 extern val_value_t *
2475  val_clone2 (const val_value_t *val);
2476 
2477 
2491 extern val_value_t *
2492  val_clone_config_data (const val_value_t *val,
2493  status_t *res);
2494 
2495 
2515 extern val_value_t *
2516  val_clone_config_save (const val_value_t *val,
2517  status_t *res);
2518 
2519 
2530 extern status_t
2531  val_replace (val_value_t *val,
2532  val_value_t *copy);
2533 
2534 
2544 extern status_t
2545  val_replace_str (const xmlChar *str,
2546  uint32 stringlen,
2547  val_value_t *copy);
2548 
2549 
2560 extern status_t
2561  val_fast_replace_string (const xmlChar *str,
2562  uint32 stringlen,
2563  val_value_t *copy);
2564 
2565 
2572 extern void
2573  val_replace_stringval (val_value_t *val,
2574  const xmlChar *str);
2575 
2576 
2593 extern void
2594  val_add_child (val_value_t *child,
2595  val_value_t *parent);
2596 
2597 
2605 extern void
2606  val_add_child_sorted (val_value_t *child,
2607  val_value_t *parent);
2608 
2609 
2618 extern void
2619  val_insert_child (val_value_t *child,
2620  val_value_t *current,
2621  val_value_t *parent);
2622 
2623 
2629 extern void
2630  val_remove_child (val_value_t *child);
2631 
2632 
2639 extern void
2640  val_swap_child (val_value_t *newchild,
2641  val_value_t *curchild);
2642 
2643 
2651 extern val_value_t *
2652  val_first_child_match (const val_value_t *parent,
2653  const val_value_t *child);
2654 
2655 
2666 extern val_value_t *
2667  val_first_child_match_fast (const val_value_t *parent,
2668  const val_value_t *child,
2669  val_value_t *lastmatch);
2670 
2671 
2683 extern val_value_t *
2684  val_next_child_match (val_value_t *parent,
2685  val_value_t *child,
2686  val_value_t *curmatch);
2687 
2688 
2695 extern val_value_t *
2696  val_next_child_same (val_value_t *curchild);
2697 
2698 
2705 extern val_value_t *
2706  val_get_first_child (const val_value_t *parent);
2707 
2708 
2715 extern val_value_t *
2716  val_get_next_child (const val_value_t *curchild);
2717 
2718 
2725 extern val_value_t *
2726  val_get_first_terminal_child (const val_value_t *parent);
2727 
2728 
2735 extern val_value_t *
2736  val_get_next_terminal_child (const val_value_t *curchild);
2737 
2738 
2752 extern val_value_t *
2753  val_find_child (const val_value_t *parent,
2754  const xmlChar *modname,
2755  const xmlChar *childname);
2756 
2757 
2771 extern val_value_t *
2772  val_find_child_fast (const val_value_t *parent,
2773  xmlns_id_t nsid,
2774  const xmlChar *childname);
2775 
2776 
2785 extern val_value_t *
2786  val_find_child_obj (const val_value_t *parent,
2787  const struct obj_template_t_ *chobj);
2788 
2789 
2804 extern val_value_t *
2805  val_find_child_que (const dlq_hdr_t *childQ,
2806  xmlns_id_t nsid,
2807  const xmlChar *childname);
2808 
2809 
2823 extern val_value_t *
2824  val_match_child (const val_value_t *parent,
2825  const xmlChar *modname,
2826  const xmlChar *childname);
2827 
2828 
2845 extern val_value_t *
2846  val_match_child_count (const val_value_t *parent,
2847  const xmlChar *modname,
2848  const xmlChar *childname,
2849  uint32 *matchcount);
2850 
2851 
2868 extern val_value_t *
2869  val_find_next_child (const val_value_t *parent,
2870  const xmlChar *modname,
2871  const xmlChar *childname,
2872  const val_value_t *curchild);
2873 
2874 
2888 extern val_value_t *
2889  val_find_next_child_fast (const val_value_t *parent,
2890  const val_value_t *curchild);
2891 
2892 
2901 extern val_value_t *
2902  val_first_child_name (val_value_t *parent,
2903  const xmlChar *name);
2904 
2905 
2914 extern val_value_t *
2915  val_first_child_qname (val_value_t *parent,
2916  xmlns_id_t nsid,
2917  const xmlChar *name);
2918 
2919 
2929 extern val_value_t *
2930  val_next_child_qname (val_value_t *parent,
2931  xmlns_id_t nsid,
2932  const xmlChar *name,
2933  val_value_t *curchild);
2934 
2935 
2953 extern val_value_t *
2954  val_first_child_string (val_value_t *parent,
2955  const xmlChar *name,
2956  const xmlChar *strval);
2957 
2958 
2967 extern uint32
2968  val_child_cnt (val_value_t *parent);
2969 
2970 
2980 extern uint32
2981  val_child_inst_cnt (const val_value_t *parent,
2982  const xmlChar *modname,
2983  const xmlChar *name);
2984 
2985 
2993 extern uint32
2994  val_get_child_inst_id (const val_value_t *parent,
2995  const val_value_t *child);
2996 
2997 
3004 extern uint32
3005  val_liststr_count (const val_value_t *val);
3006 
3007 
3020 extern boolean
3021  val_index_match (const val_value_t *val1,
3022  const val_value_t *val2);
3023 
3024 
3035 extern int
3036  val_index_compare (const val_value_t *val1,
3037  const val_value_t *val2);
3038 
3039 
3069 extern int32
3070  val_compare_max (const val_value_t *val1,
3071  const val_value_t *val2,
3072  boolean configonly,
3073  boolean childonly,
3074  boolean editing);
3075 
3076 
3110 extern int32
3111  val_compare_max_def (const val_value_t *val1,
3112  const val_value_t *val2,
3113  boolean configonly,
3114  boolean childonly,
3115  boolean editing,
3116  boolean ignore_defaults);
3117 
3118 
3142 extern int32
3143  val_compare_ex (const val_value_t *val1,
3144  const val_value_t *val2,
3145  boolean configonly);
3146 
3147 
3168 extern int32
3169  val_compare (const val_value_t *val1,
3170  const val_value_t *val2);
3171 
3172 
3192 extern int32
3193  val_compare_to_string (const val_value_t *val1,
3194  const xmlChar *strval2,
3195  status_t *res);
3196 
3197 
3219 extern int32
3220  val_compare_to_string_len (const val_value_t *val1,
3221  const xmlChar *strval2,
3222  uint32 strval2len,
3223  status_t *res);
3224 
3225 
3244 extern int32
3245  val_compare_for_replace (const val_value_t *val1,
3246  const val_value_t *val2);
3247 
3248 
3267 extern int32
3268  val_compare_for_edit (const val_value_t *val1,
3269  const val_value_t *val2,
3270  boolean ismerge);
3271 
3272 
3291 extern int32
3292  val_compare_as_string (const val_value_t *val1,
3293  const val_value_t *val2,
3294  status_t *res);
3295 
3296 
3315 extern status_t
3316  val_sprintf_simval_nc (xmlChar *buff,
3317  const val_value_t *val,
3318  uint32 *len);
3319 
3320 
3340 extern status_t
3341  val_sprintf_simval_nc_ex (xmlChar *buff,
3342  const val_value_t *val,
3343  boolean url_encode,
3344  uint32 *len);
3345 
3346 
3359 extern xmlChar *
3360  val_make_sprintf_string (const val_value_t *val);
3361 
3362 
3375 extern status_t
3376  val_resolve_scoped_name (val_value_t *val,
3377  const xmlChar *name,
3378  val_value_t **chval);
3379 
3380 
3387 extern ncx_iqual_t
3388  val_get_iqualval (const val_value_t *val);
3389 
3390 
3409 extern boolean
3410  val_duplicates_allowed (val_value_t *val);
3411 
3412 
3420 extern boolean
3421  val_has_content (const val_value_t *val);
3422 
3423 
3432 extern boolean
3433  val_has_content_ex (const val_value_t *val);
3434 
3435 
3443 extern boolean
3444  val_has_index (const val_value_t *val);
3445 
3446 
3453 extern val_index_t *
3454  val_get_first_index (const val_value_t *val);
3455 
3456 
3463 extern val_index_t *
3464  val_get_next_index (const val_index_t *valindex);
3465 
3466 
3473 extern uint32
3474  val_get_index_count (const val_value_t *val);
3475 
3476 
3488 extern status_t
3489  val_parse_meta (ses_cb_t *scb,
3490  typ_def_t *typdef,
3491  xml_attr_t *attr,
3492  val_value_t *retval);
3493 
3494 
3501 extern void
3502  val_set_extern (val_value_t *val,
3503  xmlChar *fname);
3504 
3505 
3513 extern void
3514  val_set_intern (val_value_t *val,
3515  xmlChar *intbuff);
3516 
3517 
3536 extern boolean
3537  val_fit_oneline (const val_value_t *val,
3538  uint32 linesize,
3539  boolean isxml);
3540 
3541 
3550 extern boolean
3551  val_create_allowed (const val_value_t *val);
3552 
3553 
3562 extern boolean
3563  val_delete_allowed (const val_value_t *val);
3564 
3565 
3573 extern boolean
3574  val_is_config_data (const val_value_t *val);
3575 
3576 
3585 extern boolean
3586  val_is_config_save (const val_value_t *val);
3587 
3588 
3598 extern boolean
3599  val_is_virtual (const val_value_t *val);
3600 
3601 
3631 extern val_value_t *
3632  val_get_virtual_value (ses_cb_t *scb,
3633  val_value_t *val,
3634  status_t *res);
3635 
3636 
3656 extern boolean
3657  val_is_default (val_value_t *val);
3658 
3659 
3669 extern boolean
3670  val_is_real (const val_value_t *val);
3671 
3672 
3679 extern xmlns_id_t
3680  val_get_parent_nsid (const val_value_t *val);
3681 
3682 
3694 extern uint32
3695  val_instance_count (val_value_t *val,
3696  const xmlChar *modname,
3697  const xmlChar *objname);
3698 
3699 
3714 extern uint32
3715  val_instance_count_fast (val_value_t *val,
3716  xmlns_id_t nsid,
3717  const xmlChar *objname,
3718  val_value_t **firstval);
3719 
3720 
3733 extern uint32
3734  val_instance_count_fast2 (val_value_t *val,
3735  val_value_t *startval);
3736 
3737 
3753 extern void
3754  val_set_extra_instance_errors (val_value_t *val,
3755  const xmlChar *modname,
3756  const xmlChar *objname,
3757  uint32 maxelems);
3758 
3759 
3768 extern boolean
3769  val_need_quotes (const xmlChar *str);
3770 
3771 
3779 extern boolean
3780  val_all_whitespace (const xmlChar *str);
3781 
3782 
3791 extern boolean
3792  val_any_whitespace (const xmlChar *str,
3793  uint32 len);
3794 
3795 
3804 extern boolean
3805  val_match_metaval (const xml_attr_t *attr,
3806  xmlns_id_t nsid,
3807  const xmlChar *name);
3808 
3809 
3816 extern boolean
3817  val_get_dirty_flag (const val_value_t *val);
3818 
3819 
3826 extern boolean
3827  val_get_subtree_dirty_flag (const val_value_t *val);
3828 
3829 
3835 extern void
3836  val_set_subtree_dirty_up (val_value_t *val);
3837 
3838 
3846 extern void
3847  val_set_dirty_flag (val_value_t *val,
3848  boolean clear_def);
3849 
3850 
3856 extern void
3857  val_set_child_deleted_flag (val_value_t *val);
3858 
3859 
3866 extern boolean
3867  val_get_child_deleted_flag (val_value_t *val);
3868 
3869 
3870 
3883 extern void
3884  val_clear_dirty_flag (val_value_t *val,
3885  time_t *timestamp,
3886  ncx_transaction_id_t txid,
3887  boolean is_delete,
3888  boolean do_clear_default);
3889 
3890 
3897 extern boolean
3898  val_dirty_subtree (const val_value_t *val);
3899 
3900 
3913 extern void
3914  val_clean_tree (val_value_t *val);
3915 
3916 
3923 extern uint32
3924  val_get_nest_level (val_value_t *val);
3925 
3926 
3935 extern val_value_t *
3936  val_get_first_leaf (val_value_t *val);
3937 
3938 
3946 extern const xmlChar *
3947  val_get_mod_name (const val_value_t *val);
3948 
3949 
3957 extern const xmlChar *
3958  val_get_mod_prefix (const val_value_t *val);
3959 
3960 
3968 extern xmlns_id_t
3969  val_get_nsid (const val_value_t *val);
3970 
3971 
3978 extern void
3979  val_change_nsid (val_value_t *val,
3980  xmlns_id_t nsid);
3981 
3982 
3989 extern void
3990  val_change_nsid2 (val_value_t *val,
3991  xmlns_id_t nsid);
3992 
3993 
4000 extern void
4001  val_change_nsid3 (val_value_t *val,
4002  xmlns_id_t nsid);
4003 
4004 
4016 extern val_value_t *
4017  val_make_from_insertxpcb (val_value_t *sourceval,
4018  status_t *res);
4019 
4020 
4026 extern val_unique_t *
4027  val_new_unique (void);
4028 
4029 
4035 extern void
4036  val_free_unique (val_unique_t *valuni);
4037 
4038 
4045 extern const typ_def_t *
4046  val_get_typdef (const val_value_t *val);
4047 
4048 
4056 extern boolean
4057  val_set_by_default (const val_value_t *val);
4058 
4059 
4067 extern boolean
4068  val_has_withdef_default (const val_value_t *val);
4069 
4070 
4076 extern void
4077  val_set_withdef_default (val_value_t *val);
4078 
4079 
4087 extern boolean
4088  val_is_metaval (const val_value_t *val);
4089 
4090 
4098 extern void
4099  val_move_children (val_value_t *srcval,
4100  val_value_t *destval);
4101 
4102 
4110 extern void
4111  val_move_nonconfig_children (val_value_t *srcval,
4112  val_value_t *destval);
4113 
4133 extern status_t
4134  val_cvt_generic (val_value_t *val);
4135 
4136 
4145 extern status_t
4146  val_set_pcookie (val_value_t *val,
4147  void *pcookie);
4148 
4149 
4158 extern status_t
4159  val_set_icookie (val_value_t *val,
4160  int icookie);
4161 
4162 
4170 extern void *
4171  val_get_pcookie (val_value_t *val);
4172 
4173 
4181 extern int
4182  val_get_icookie (val_value_t *val);
4183 
4184 
4192 extern status_t
4193  val_delete_default_leaf (val_value_t *val);
4194 
4195 
4205 extern status_t
4206  val_delete_default_leaf_list (val_value_t *val);
4207 
4208 
4214 extern void
4215  val_force_empty (val_value_t *val);
4216 
4217 
4225 extern status_t
4226  val_delete_default_npcon (val_value_t *val);
4227 
4228 
4237 extern void
4238  val_move_fields_for_xml (val_value_t *srcval,
4239  val_value_t *destval,
4240  boolean movemeta);
4241 
4242 
4250 extern void
4251  val_move_metadata (val_value_t *srcval,
4252  val_value_t *destval);
4253 
4254 
4261 extern val_index_t *
4262  val_get_first_key (val_value_t *val);
4263 
4264 
4271 extern val_index_t *
4272  val_get_last_key (val_value_t *val);
4273 
4274 
4281 extern val_index_t *
4282  val_get_next_key (val_index_t *curkey);
4283 
4284 
4291 extern val_index_t *
4292  val_get_prev_key (val_index_t *curkey);
4293 
4294 
4301 extern void
4302  val_remove_key (val_value_t *keyval);
4303 
4304 
4311 extern val_value_t *
4312  val_new_deleted_value (void);
4313 
4314 
4322 extern status_t
4323  val_new_editvars (val_value_t *val);
4324 
4325 
4333 extern void
4334  val_free_editvars (val_value_t *val);
4335 
4336 
4342 extern void
4343  val_free_solo_editvars (val_editvars_t *editvars);
4344 
4345 
4356 extern boolean
4357  val_all_np_containers (val_value_t *val);
4358 
4359 
4369 extern status_t
4370  val_sprintf_etag (val_value_t *val,
4371  xmlChar *buff,
4372  int32 buffsize);
4373 
4374 
4381 extern time_t *
4382  val_get_last_modified (val_value_t *val);
4383 
4384 
4390 extern void
4391  val_force_default (val_value_t *val);
4392 
4401 extern void
4402  val_set_all_tags (val_value_t *val,
4403  time_t *timestamp,
4404  ncx_transaction_id_t txid);
4405 
4406 
4413 extern const xmlChar *
4414  val_get_owner (val_value_t *val);
4415 
4416 
4423 extern ncx_owner_id_t
4424  val_get_owner_id (val_value_t *val);
4425 
4426 
4433 extern boolean
4434  val_need_owner_string (val_value_t *val);
4435 
4436 
4443 extern void
4444  val_delete_children (val_value_t *val);
4445 
4446 
4452 extern void
4453  val_clean_value (val_value_t *val);
4454 
4455 
4464 extern boolean
4465  val_find_bit (val_value_t *val,
4466  const xmlChar *bitname);
4467 
4468 
4476 extern boolean
4477  val_has_children (const val_value_t *val);
4478 
4479 
4487 extern status_t
4488  val_add_test_valindex (val_value_t *parentval,
4489  val_value_t *keyval);
4490 
4491 
4498 extern const xmlChar *
4499  val_get_yang_typename (val_value_t *val);
4500 
4501 
4508 extern void
4509  val_set_force_config (val_value_t *val,
4510  boolean is_config);
4511 
4512 
4519 extern void
4520  val_clear_defvalset_flag (val_value_t *val);
4521 
4522 
4531 extern status_t
4532  val_clone_valQ (dlq_hdr_t *valQ,
4533  dlq_hdr_t *return_valQ);
4534 
4535 
4543 extern void
4544  val_clean_valQ (dlq_hdr_t *valQ);
4545 
4546 
4556 extern boolean
4557  val_is_value_set (val_value_t *val);
4558 
4559 
4567 extern uint32
4568  val_url_encode_string (const xmlChar *str,
4569  xmlChar *buff);
4570 
4571 
4580 extern void
4581  val_convert_any_to_container (val_value_t *val);
4582 
4583 
4590 extern void
4591  val_clean_index_chain (val_value_t *val);
4592 
4593 
4601 extern boolean
4602  val_pattern_match (const xmlRegexpPtr pattern,
4603  const xmlChar *strval);
4604 
4605 
4614 extern boolean
4615  val_ocpattern_match (const regex_t *ocpattern,
4616  const xmlChar *strval);
4617 
4618 
4628 extern boolean
4629  val_idref_derived_from (ncx_module_t *impmod,
4630  val_value_t *testval,
4631  const xmlChar *qname,
4632  boolean or_self);
4633 
4634 
4645 extern status_t
4646  val_set_sil_priority (val_value_t *val,
4647  uint8 silprio);
4648 
4649 
4656 extern uint8
4657  val_get_sil_priority (val_value_t *val);
4658 
4659 
4668 extern const xmlChar *
4669  val_find_bit_name (val_value_t *val,
4670  uint32 bitpos);
4671 
4672 
4682 extern const xmlChar *
4683  val_find_enum_name (val_value_t *val,
4684  int32 enunum);
4685 
4686 
4698 extern const xmlChar *
4699  val_find_enum_name2 (ncx_btype_t btyp,
4700  typ_def_t *typdef,
4701  int32 enunum);
4702 
4703 
4710 extern void
4711  val_mark_deleted (val_value_t *val);
4712 
4713 
4721 extern void
4722  val_mark_undeleted (val_value_t *val);
4723 
4724 
4735 extern boolean
4736  val_has_conditional_value (val_value_t *val);
4737 
4738 
4749 extern val_value_t *
4750  val_convert_leafref (const val_value_t *val);
4751 
4752 
4773 extern int32
4774  val_compare_for_topreplace (const val_value_t *val1,
4775  const val_value_t *val2);
4776 
4777 
4803 extern int32
4804  val_compare_for_topreplace_simple (const val_value_t *val1,
4805  const val_value_t *val2);
4806 
4807 
4815 extern boolean
4816  val_has_complex_child (const val_value_t *val);
4817 
4818 
4826 extern status_t
4827  val_add_meta (val_value_t *metaval,
4828  val_value_t *val);
4829 
4830 
4837 extern val_value_t *
4838  val_find_root (val_value_t *val);
4839 
4840 
4847 extern status_t
4848  val_set_canonical (val_value_t *val);
4849 
4850 
4858 extern typ_def_t *
4859  val_get_leafref_typdef (val_value_t *val);
4860 
4861 
4881 extern boolean
4882  val_ascendant_compare (val_value_t *val1,
4883  val_value_t *val2);
4884 
4885 
4892 extern const xmlChar *
4893  val_get_dname (const val_value_t *val);
4894 
4895 
4905 extern status_t
4906  val_set_dname (val_value_t *val,
4907  const xmlChar *dname);
4908 
4909 
4920 extern status_t
4921  val_set_dname2 (val_value_t *val,
4922  const xmlChar *dname,
4923  uint32 dnamelen);
4924 
4925 
4933 extern status_t
4934  val_new_extra (val_value_t *val);
4935 
4936 
4943 extern const xmlChar *
4944  val_get_varexpr (const val_value_t *val);
4945 
4946 
4954 extern status_t
4955  val_set_varexpr (val_value_t *val,
4956  const xmlChar *varexpr);
4957 
4958 
4964 extern void
4965  val_clear_varexpr (val_value_t *val);
4966 
4967 
4973 extern void
4974  val_set_wildcard_string (val_value_t *val);
4975 
4976 
4983 #define val_is_wildcard_string(V) (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
4984 
4985 
4993 extern status_t
4994  val_copy_editvars (const val_value_t *val,
4995  val_value_t *copy);
4996 
4997 
5006 extern status_t
5007  val_set_skip_sil_partial (val_value_t *val);
5008 
5009 
5016 extern boolean
5017  val_get_skip_sil_partial (const val_value_t *val);
5018 
5019 
5023 #ifdef __cplusplus
5024 } /* end extern 'C' */
5025 #endif
5026 
5027 #endif /* _H_val */
ncx_str.h
NCX Module Library String Utility Functions.
val_tree.h
AVL Tree storage of YANG List Data.
typ_get_basetype
ncx_btype_t typ_get_basetype(const typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1764
val_get_typdef
const typ_def_t * val_get_typdef(const val_value_t *val)
Get the typdef field for a value struct.
Definition: val.c:12550
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
val_child_next_test
val_value_t * val_child_next_test(val_value_t *curchild, val_hdr_test_fn_t hdr_test_fn, val_test2_fn_t test_fn, void *cookie)
Get the next child present for this parent that passes the callback tests.
Definition: val_child.c:3695
TK_TT_RBRACK
@ TK_TT_RBRACK
right bracket ']'
Definition: tk.h:292
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
xpath_yang_validate_path_ex
status_t xpath_yang_validate_path_ex(ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb, boolean schemainst, obj_template_t **leafobj, boolean logerrors, boolean is_xpath)
Validate the previously parsed leafref path (extended)
Definition: xpath_yang.c:2395
yang_typ_identity_enabled
boolean yang_typ_identity_enabled(ncx_identity_t *id)
Check if an identity-stmt is enabled.
Definition: yang_typ.c:5639
val_child_find_same_nsid
val_value_t * val_child_find_same_nsid(const val_value_t *parent, xmlns_id_t child_nsid, const xmlChar *child_name, val_value_t *curchild, val_child_op_t child_op)
Find the child node for the specified child name and modname.
Definition: val_child.c:1808
tk_next_typ
tk_type_t tk_next_typ(tk_chain_t *tkc)
Get the token type of the next token.
Definition: tk.c:3349
ERR_NCX_CONDITIONAL_DEFVAL
@ ERR_NCX_CONDITIONAL_DEFVAL
414
Definition: status_enum.h:457
ERR_NCX_NOT_IN_RANGE
@ ERR_NCX_NOT_IN_RANGE
288
Definition: status_enum.h:331
val_value_t_::indexQ
dlq_hdr_t * indexQ
this field used in NCX_BT_LIST only ??? when is it ncx_filptr_t ???
Definition: val.h:917
val_set_pcookie
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
val_set_dname
status_t val_set_dname(val_value_t *val, const xmlChar *dname)
Set the dname field.
Definition: val.c:15387
ncx_next_identity_base
ncx_identity_base_t * ncx_next_identity_base(ncx_identity_base_t *idbase)
Get the next base record for an identity.
Definition: ncx.c:6018
indentfn_t
void(* indentfn_t)(log_debug_t level, int32 indentcnt)
Callback to do indent function for dump_value.
Definition: val.h:740
val_get_first_meta_val
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
val_find_enum_name
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:14445
DUMP_VAL_LOG
@ DUMP_VAL_LOG
dump val to main log
Definition: val.h:777
ncx_find_identity
ncx_identity_t * ncx_find_identity(ncx_module_t *mod, const xmlChar *name, boolean useall)
Find a ncx_identity_t struct in the module and perhaps any of its submodules.
Definition: ncx.c:6082
val_compare_for_topreplace_simple
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:14977
cfg.h
VAL_ENUM
#define VAL_ENUM(V)
Access the enum value in the value ONLY if BCX_NT_ENUM.
Definition: val.h:429
val_remove_key
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
val_extra_t_::plock
plock_cb_t * plock[VAL_MAX_PLOCKS]
back-ptr to the partial locks that are held against this node
Definition: val.h:841
NCX_BT_INT32
@ NCX_BT_INT32
int32
Definition: ncxtypes.h:209
val_duplicates_allowed
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
val_add_test_valindex
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:13752
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
dlq_block_enque
void dlq_block_enque(dlq_hdrT *srcP, dlq_hdrT *dstP)
add all the queue entries in the srcP queue list to the end of the dstP queue list
Definition: dlq.c:731
xml_strncpy
uint32 xml_strncpy(xmlChar *copyTo, const xmlChar *copyFrom, uint32 maxlen)
String copy for xmlChar – checks for buffer overflow.
Definition: xml_util.c:1518
val_move_children
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
val_string_ok
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_::res
status_t res
validation result
Definition: val.h:910
ncx_first_identity_base
ncx_identity_base_t * ncx_first_identity_base(ncx_identity_t *identity)
Get the first base record for an identity.
Definition: ncx.c:6003
NCX_BT_CASE
@ NCX_BT_CASE
internal, not a real type
Definition: ncxtypes.h:227
val_compare_max
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
OBJ_TYP_LIST
@ OBJ_TYP_LIST
list: last real database object
Definition: obj.h:617
val_child_first_test
val_value_t * val_child_first_test(val_value_t *parent, val_hdr_test_fn_t hdr_test_fn, val_test2_fn_t test_fn, void *cookie)
Get the first child present for this parent that passes the callback tests.
Definition: val_child.c:3613
val_editvars_t_
one set of edit-in-progress variables for one value node
Definition: val.h:784
NCX_IQUAL_1MORE
@ NCX_IQUAL_1MORE
'+' == 1 or more
Definition: ncxtypes.h:299
NCX_BT_BINARY
@ NCX_BT_BINARY
binary (base64)
Definition: ncxtypes.h:218
val_first_child_string
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
ncx_convert_dec64
status_t ncx_convert_dec64(const xmlChar *numstr, ncx_numfmt_t numfmt, uint8 digits, ncx_num_t *val)
Convert a number string to a decimal64 number.
Definition: ncx_num.c:1039
ncx_get_binary_display_maxlen
uint32 ncx_get_binary_display_maxlen(void)
Get the binary_display_maxlen parameter.
Definition: ncx.c:14697
xpath1_parse_expr
status_t xpath1_parse_expr(tk_chain_t *tkc, ncx_module_t *mod, xpath_pcb_t *pcb, xpath_source_t source)
Parse the XPATH 1.0 expression string.
Definition: xpath1.c:4816
val_value_t_::v_::enu
ncx_enum_t enu
NCX_BT_UNION, NCX_BT_ENUM.
Definition: val.h:1000
val_copy_editvars
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:15582
obj_get_typdef
typ_def_t * obj_get_typdef(obj_template_t *obj)
Get the typdef for the leaf or leaf-list.
Definition: obj.c:11991
val_has_content_ex
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
ncx_alt_printf_num
void ncx_alt_printf_num(const ncx_num_t *num, ncx_btype_t btyp)
Printf a ncx_num_t contents to the alternate log file.
Definition: ncx_num.c:2278
VAL_FL_DUPOK
#define VAL_FL_DUPOK
if set the duplicates-ok test was OK
Definition: val.h:181
val_type_is_any
boolean val_type_is_any(const val_value_t *val)
Check if val_value node is a proper simple type ANYXML.
Definition: val_util.c:7918
typ_is_xpath_string
boolean typ_is_xpath_string(const typ_def_t *typdef)
Find the ncx:xpath extension within the specified typdef chain.
Definition: typ.c:2686
val_index_t_
Struct marking the parsing of an instance identifier The position of this record in the val_value_t i...
Definition: val.h:1049
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
val_first_child_name
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 functi...
Definition: val.c:8796
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
ncx_decode_num
status_t ncx_decode_num(const xmlChar *numstr, ncx_btype_t btyp, ncx_num_t *retnum)
Handle some sort of number string.
Definition: ncx_num.c:1288
obj_is_abstract
boolean obj_is_abstract(const obj_template_t *obj)
Check if object is being used as an object identifier or error-info.
Definition: obj.c:14291
val_set_name
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
val_simval_ok_errinfo
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
val_find_meta
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
val_mark_undeleted
void val_mark_undeleted(val_value_t *val)
mark the value node as un-deleted
Definition: val.c:14652
val_get_leafref_typdef
typ_def_t * val_get_leafref_typdef(val_value_t *val)
Return a base typedef of type NCX_BT_LEAFREF.
Definition: val.c:15237
val_fast_replace_string
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
val_child_remove
void val_child_remove(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val_child.c:2133
typ_userdef_compare
status_t typ_userdef_compare(const val_value_t *val1, const val_value_t *val2, int32 *ret)
Invoke the compare callback function for a user defined type if it exists.
Definition: typ_userdef.c:303
NCX_IQUAL_ONE
@ NCX_IQUAL_ONE
no iqual == 1
Definition: ncxtypes.h:297
xmlns_find_ns_by_prefix
xmlns_id_t xmlns_find_ns_by_prefix(const xmlChar *pfix)
Find the NS ID from its prefix.
Definition: xmlns.c:755
val_force_dname
status_t val_force_dname(val_value_t *val)
Set (or reset) the name of a value struct.
Definition: val.c:2918
val_get_owner
const xmlChar * val_get_owner(val_value_t *val)
Get the owner string for the specified value node.
Definition: val.c:13572
val_find_child
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_CLR_EXTERNAL
#define VAL_CLR_EXTERNAL(V)
clear the value as an external value
Definition: val.h:600
val_mark_deleted
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:14635
val_find_child_fast
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
val_union_ok_full
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
val_compare_for_edit
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
ncx_get_mod_nsid
xmlns_id_t ncx_get_mod_nsid(const ncx_module_t *mod)
Get the main module namespace ID.
Definition: ncx.c:4850
val_index_compare
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
ncx_owner_id_t
uint8 ncx_owner_id_t
used as index into the agt_owner registry
Definition: ncxtypes.h:1261
val_find_enum_name2
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:14545
VAL_FL_CHILD_DELETED
#define VAL_FL_CHILD_DELETED
if set then the VAL_FL_DIRTY flag should also be set; this flags indicates the parent node is dirty b...
Definition: val.h:221
val_editvars_t_::insertstr
xmlChar * insertstr
saved value or key attr
Definition: val.h:791
errfn_t
void(* errfn_t)(const char *fstr,...)
Callback to do error log function for dump_value.
Definition: val.h:730
OP_INSOP_AFTER
@ OP_INSOP_AFTER
insert after foo
Definition: op.h:142
val_resolve_scoped_name
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
NCX_PREFIX
#define NCX_PREFIX
default prefix to use for NCX namespace
Definition: ncxconst.h:244
val_new_unique
val_unique_t * val_new_unique(void)
Malloc and initialize the fields in a val_unique_t.
Definition: val.c:12501
val_change_nsid
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
ncx_get_next_session_module
ncx_module_t * ncx_get_next_session_module(const ncx_module_t *mod)
Get the next module in the ncx_sesmodQ.
Definition: ncx.c:4816
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
typ_get_parent_typdef
typ_def_t * typ_get_parent_typdef(typ_def_t *typdef)
Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2069
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
typ_get_constrained
boolean typ_get_constrained(const typ_def_t *typdef)
Get the constrained true/false field for the data type leafref or instance-identifier constrained fla...
Definition: typ.c:4884
val_value_t_::metaQ
dlq_hdr_t * metaQ
YANG does not support user-defined meta-data but NCX does.
Definition: val.h:903
val_get_dirty_flag
boolean val_get_dirty_flag(const val_value_t *val)
Get the dirty flag for this value node.
Definition: val.c:11825
val_union_ok_ex
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
obj_is_leaf_list
boolean obj_is_leaf_list(const obj_template_t *obj)
Check if object is a proper leaf-list.
Definition: obj.c:13336
ncx_get_modname
const xmlChar * ncx_get_modname(const ncx_module_t *mod)
Get the main module name.
Definition: ncx.c:4834
NCX_BT_BOOLEAN
@ NCX_BT_BOOLEAN
boolean
Definition: ncxtypes.h:206
val_make_string
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
xpath_pcb_t_::val
val_value_t * val
saved state for the current() function result
Definition: xpath.h:757
val.h
Value Node Basic Support.
NCX_BT_INSTANCE_ID
@ NCX_BT_INSTANCE_ID
instance-identifier
Definition: ncxtypes.h:219
val_editvars_t_::insertval
struct val_value_t_ * insertval
back-ptr if before or after
Definition: val.h:793
VAL_FL_DIRTY
#define VAL_FL_DIRTY
if set, value has been edited or added, or child deleted
Definition: val.h:190
val_set_simval_binary
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
val_is_default
boolean val_is_default(val_value_t *val)
Check if the specified value is set to the YANG default value.
Definition: val.c:11347
xml_util.h
XML Utilities.
ncx_get_first_module
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:4729
val_make_simval_obj
val_value_t * val_make_simval_obj(obj_template_t *obj, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type from an object template instead of individual fields Ca...
Definition: val_util.c:4389
VAL_IS_EXTERNAL
#define VAL_IS_EXTERNAL(V)
check if the value is an external value
Definition: val.h:603
ncx_list_linelen
uint32 ncx_list_linelen(const ncx_list_t *list)
Get the length of the string if the list was printed in 1 line with spaces between the entries.
Definition: ncx_list.c:231
NCX_BT_IDREF
@ NCX_BT_IDREF
identityref
Definition: ncxtypes.h:222
getcb.h
GET1 and GET2 Callback Support.
val_next_child_same
val_value_t * val_next_child_same(val_value_t *curchild)
Get the next instance of the corresponding child node.
Definition: val.c:8456
typ_get_rangeQ_con
dlq_hdr_t * typ_get_rangeQ_con(typ_def_t *typdef)
Return the rangeQ for the given typdef Do not follow typdef chains.
Definition: typ.c:1090
typ_get_next_pattern
typ_pattern_t * typ_get_next_pattern(typ_pattern_t *curpat)
Get the next pattern struct for a typdef.
Definition: typ.c:4317
ERR_NCX_EXTRA_VAL_INST
@ ERR_NCX_EXTRA_VAL_INST
311
Definition: status_enum.h:354
NCX_BT_INTERN
@ NCX_BT_INTERN
not a real type, string buffer for contents
Definition: ncxtypes.h:231
val_delete_default_leaf
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
xpath_new_pcb
xpath_pcb_t * xpath_new_pcb(const xmlChar *xpathstr, xpath_getvar_fn_t getvar_fn)
malloc a new XPath parser control block
Definition: xpath.c:2739
DUMP_VAL_NONE
@ DUMP_VAL_NONE
not set
Definition: val.h:775
val_delete_default_npcon
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_child_move_children
void val_child_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_child.c:3270
val_child_find
val_value_t * val_child_find(const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name)
Find the child node for the specified child name and modname.
Definition: val_child.c:1707
val_force_default
void val_force_default(val_value_t *val)
Set a node created by the server as a default node.
Definition: val.c:13521
xpath_parse_token
status_t xpath_parse_token(xpath_pcb_t *pcb, tk_type_t tktype)
Parse the XPath token sequence for a specific token type.
Definition: xpath.c:3579
xpath_pcb_t_::scb
ses_cb_t * scb
backptr to session control block in progress.
Definition: xpath.h:894
val_idref_ok
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
val_child_find_obj
val_value_t * val_child_find_obj(const val_value_t *parent, const obj_template_t *child_obj)
Find the child node for the specified child object header.
Definition: val_child.c:1858
val_child_find_same_lastmatch
val_value_t * val_child_find_same_lastmatch(const val_value_t *child, const val_value_t *parent, val_value_t *lastmatch, val_child_op_t child_op)
Find the child header for the specified child.
Definition: val_child.c:1923
val_set_string2
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
typ_is_number
boolean typ_is_number(ncx_btype_t btyp)
Check if the base type is numeric.
Definition: typ.c:4063
val_swap_child
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
ncx_clean_backptrQ
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:11470
NCX_BT_LEAFREF
@ NCX_BT_LEAFREF
leafref (needs special processing)
Definition: ncxtypes.h:221
val_value_t_::v_::boo
boolean boo
NCX_BT_EMPTY, NCX_BT_BOOLEAN.
Definition: val.h:999
val_child_find_nsid
val_value_t * val_child_find_nsid(const val_value_t *parent, xmlns_id_t child_nsid, const xmlChar *child_name)
Find the child node for the specified child name and namespace ID.
Definition: val_child.c:1775
tk.h
NCX Syntax Token Handler.
val_get_child_deleted_flag
boolean val_get_child_deleted_flag(val_value_t *val)
Get the child_deleted flag for this value node.
Definition: val.c:11958
xmlns_ns_id
xmlns_id_t xmlns_ns_id(void)
Get the ID for the XMLNS namespace or 0 if it doesn't exist.
Definition: xmlns.c:914
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
val_index_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: val.h:1050
val_get_first_key
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
xml_wr.h
XML Write functions.
val_delete_children
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:13640
obj_next_child_deep
obj_template_t * obj_next_child_deep(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:7138
VAL_INS_MODE_NONE
@ VAL_INS_MODE_NONE
not set
Definition: val.h:766
ncx_num.h
NCX Module Library Number Utility Functions.
val_pattern_match
boolean val_pattern_match(const xmlRegexpPtr pattern, const xmlChar *strval)
Check the specified string against the specified pattern.
Definition: val.c:14118
xpath_pcb_t_::obj
obj_template_t * obj
these parms are used by leafref and XPath1 parsing obj is a bptr to start object
Definition: xpath.h:734
typ_find_appinfo
const ncx_appinfo_t * typ_find_appinfo(const typ_def_t *typdef, const xmlChar *prefix, const xmlChar *name)
Find the specified appinfo variable by its prefix and name.
Definition: typ.c:2604
val_is_wildcard_string
#define val_is_wildcard_string(V)
Check if the value is a wildcard string.
Definition: val.h:4983
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
log_alt_write_level
void void log_alt_write_level(log_debug_t level, const char *fstr,...) __attribute__((format(printf
Write to the alternate log file if debug-level set.
dumpfn_t
void(* dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for dump_value.
Definition: val.h:721
val_find_bit
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:13690
val_idref_t_
one QName for the NCX_BT_IDREF value
Definition: val.h:756
val_child_find_same
val_value_t * val_child_find_same(const val_value_t *child, const val_value_t *parent, val_child_op_t child_op)
Find the child header for the specified child, which is a different root; e.g., trying to match candi...
Definition: val_child.c:1888
val_child_hdr_t_::que
dlq_hdr_t que
LIST, LEAF_LIST or generic objects may have multiple instances per parent so a queue is maintained Th...
Definition: val.h:1029
val_list_ok_errinfo
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
val_get_next_index
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
val_clone2
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
val_init_complex
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
VAL_IDREF_NAME
#define VAL_IDREF_NAME(V)
Access the name string value as an identityref ONLY if NCX_BT_IDREF.
Definition: val.h:476
val_pattern_ok
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
val_set_withdef_default
void val_set_withdef_default(val_value_t *val)
Set the value flags as having the wd:default attribute.
Definition: val.c:12610
val_compare
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
ncx_printf_num_ex
void ncx_printf_num_ex(const ncx_num_t *num, ncx_btype_t btyp, log_debug_t level, FILE *overrideOut)
Printf a ncx_num_t contents (write to a file)
Definition: ncx_num.c:2234
ncx_next_backptr
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:11545
val_is_metaval
boolean val_is_metaval(const val_value_t *val)
Check if the value is a meta-val (XML attribute)
Definition: val.c:12631
VAL_CHILD_OP_NEXT
@ VAL_CHILD_OP_NEXT
get-next
Definition: val_child.h:83
obj_is_cli_text_block
boolean obj_is_cli_text_block(const obj_template_t *obj)
Check if object is marked as ywx:cli-text-block.
Definition: obj.c:16000
VAL_SET_TEMP_XPATH
#define VAL_SET_TEMP_XPATH(V)
flag the value as a temporary XPath in use
Definition: val.h:615
obj_is_key
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:14278
val_add_defaults
status_t val_add_defaults(val_value_t *val, boolean scriptmode)
Add defaults to an initialized complex value.
Definition: val_util.c:2692
val_instance_count_fast2
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
ncx_get_first_session_module
ncx_module_t * ncx_get_first_session_module(void)
Get the first module in the ncx_sesmodQ.
Definition: ncx.c:4796
ncx_init_num
void ncx_init_num(ncx_num_t *num)
Init a ncx_num_t struct.
Definition: ncx_num.c:162
val_change_nsid2
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
NCX_BT_ANYDATA
@ NCX_BT_ANYDATA
YANG 1.1 anydata.
Definition: ncxtypes.h:229
ERR_NCX_NO_INSTANCE
@ ERR_NCX_NO_INSTANCE
1009
Definition: status_enum.h:498
typ_userdef_canonical
status_t typ_userdef_canonical(val_value_t *val)
Invoke the canonical callback function for a user defined type if it exists.
Definition: typ_userdef.c:245
ncx_clean_str
void ncx_clean_str(ncx_str_t *str)
Scrub the memory in a ncx_str_t by freeing all the sub-fields.
Definition: ncx_str.c:196
val_compare_for_replace
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
dlq_lastEntry
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:352
ERR_NCX_PATTERN_FAILED
@ ERR_NCX_PATTERN_FAILED
333
Definition: status_enum.h:376
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
VAL_SET_EXTERNAL
#define VAL_SET_EXTERNAL(V)
flag the value as an external value Not sure why this is different than NCX_BT_EXTERN
Definition: val.h:597
DUMP_VAL_ALT_LOG
@ DUMP_VAL_ALT_LOG
dump val to alternate log
Definition: val.h:778
val_move_metadata
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
VAL_MAX_PLOCKS
#define VAL_MAX_PLOCKS
max number of concurrent partial locks by the same session
Definition: val.h:146
op.h
NETCONF protocol operations.
typ_userdef.h
User Defined Types.
val_first_child_qname
val_value_t * val_first_child_qname(val_value_t *parent, xmlns_id_t nsid, const xmlChar *name)
Get the first corresponding child node instance, by QName.
Definition: val.c:8818
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
ncxconst.h
Contains NCX constants.
XP_SRC_YANG
@ XP_SRC_YANG
YANG must or when.
Definition: xpath.h:376
VAL_FL_DEFSET
#define VAL_FL_DEFSET
if set, this value was added by val_add_defaults
Definition: val.h:184
val_make_binary
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_extra
val_extra_t * val_extra
val extra fields only needed about 25% of the time
Definition: val.h:876
ncx_use_objptrs
boolean ncx_use_objptrs(void)
Get the use_objptrs flag.
Definition: ncx.c:12647
val_simval_ok
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
typ_get_mergetype
ncx_merge_t typ_get_mergetype(const typ_def_t *typdef)
Get the merge type for a specified type def.
Definition: typ.c:3724
val_set_wildcard_string
void val_set_wildcard_string(val_value_t *val)
Set the value as a wildcard string.
Definition: val.c:15561
ncx_first_lmem
ncx_lmem_t * ncx_first_lmem(ncx_list_t *list)
Return the first list member.
Definition: ncx_list.c:1249
val_get_subtree_dirty_flag
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_compare_for_topreplace
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:14832
val_get_iqualval
ncx_iqual_t val_get_iqualval(const val_value_t *val)
Get the effective instance qualifier value for this value.
Definition: val.c:10440
obj_get_mod_prefix
const xmlChar * obj_get_mod_prefix(const obj_template_t *obj)
Get the module prefix for this object.
Definition: obj.c:12125
typ_get_correct_enumdef
typ_def_t * typ_get_correct_enumdef(typ_def_t *typdef)
Get the typ_enum_t to use.
Definition: typ.c:3469
ncx_get_vtimeout_value
uint32 ncx_get_vtimeout_value(void)
Get the virtual node cache timeout value.
Definition: ncx.c:10021
NCX_DC_CONFIG
@ NCX_DC_CONFIG
persistent config
Definition: ncxtypes.h:192
TK_ADV
#define TK_ADV(T)
advance the current token pointer
Definition: tk.h:107
NCX_IQUAL_ZMORE
@ NCX_IQUAL_ZMORE
'*' == 0 or more
Definition: ncxtypes.h:300
VAL_INS_MODE_KEY
@ VAL_INS_MODE_KEY
YANG key attribute.
Definition: val.h:767
val_is_virtual
boolean val_is_virtual(const val_value_t *val)
Check if the specified value is a virtual value such that a 'get' callback function is required to ac...
Definition: val.c:11260
val_value_t_::editop
op_editop_t editop
needed for all edits
Definition: val.h:909
TK_CUR_VAL
#define TK_CUR_VAL(T)
return the current token value
Definition: tk.h:128
val_has_index
boolean val_has_index(const val_value_t *val)
Determine if this value has an index.
Definition: val.c:10660
log_audit_write
void void void void void void void void void log_audit_write(const char *fstr,...) __attribute__((format(printf
Write an new entry to the audit log file.
ncx_set_enum
status_t ncx_set_enum(const xmlChar *enum_name, const int32 enum_val, ncx_enum_t *retenu)
Parse an enumerated integer string into an ncx_enum_t without matching it against any typdef.
Definition: ncx.c:6445
getcb_fn_t
status_t(* getcb_fn_t)(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
GET1 Callback function for agent node get handler.
Definition: getcb.h:580
val_url_encode_string
uint32 val_url_encode_string(const xmlChar *str, xmlChar *buff)
Fill in a buffer with the URL-encoded string.
Definition: val.c:14015
NCX_BT_UINT8
@ NCX_BT_UINT8
uint8
Definition: ncxtypes.h:211
ncx_first_objptr
ncx_backptr_t * ncx_first_objptr(void)
Get the first object pointer.
Definition: ncx.c:12662
val_child_hdr_t_::flags
uint8 flags
internal processing flags
Definition: val.h:1035
val_get_last_modified
time_t * val_get_last_modified(val_value_t *val)
Get the last_modified field.
Definition: val.c:13505
val_set_xpathpcb
status_t val_set_xpathpcb(val_value_t *val, xpath_pcb_t *xpathpcb)
Set the xpathpcb field with passed field;.
Definition: val_util.c:4324
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
val_value_t_::obj
struct obj_template_t_ * obj
common fields
Definition: val.h:865
val_get_next_terminal_child
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
val_get_owner_id
ncx_owner_id_t val_get_owner_id(val_value_t *val)
Get the owner ID for the specified value node.
Definition: val.c:13597
val_get_yang_typename
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:13803
val_find_next_child
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
VAL_FL_WILDCARD
#define VAL_FL_WILDCARD
set if this is a node in a yangcli test-suite template that is really a WILDCARD_STRING match; the re...
Definition: val.h:304
VAL_ENUM_NAME
#define VAL_ENUM_NAME(V)
Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL c...
Definition: val.h:434
val_value_t_::name
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:867
xpath_pcb_t_::impmod
ncx_module_t * impmod
[sub]module containing obj
Definition: xpath.h:743
val_child_inst_cnt
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 checkin...
Definition: val.c:8929
VAL_TYPDEF
#define VAL_TYPDEF(V)
Access the typedef (simple types only)
Definition: val.h:393
xmlns_get_module
const xmlChar * xmlns_get_module(xmlns_id_t nsid)
get the module name of the namespace ID
Definition: xmlns.c:1126
val_meta_match
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
val_set_simval_str
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
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
ERR_NCX_VALUE_DISABLED
@ ERR_NCX_VALUE_DISABLED
408
Definition: status_enum.h:451
val_get_dname
const xmlChar * val_get_dname(const val_value_t *val)
Get the dname field if set; NULL if not set.
Definition: val.c:15363
val_child_find_count
val_value_t * val_child_find_count(const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name, uint32 *matchcount)
Find the child node for the specified child name and modname Get the first instance and also return t...
Definition: val_child.c:1966
val_set_dirty_flag
void val_set_dirty_flag(val_value_t *val, boolean clear_def)
Set the dirty flag for this value node.
Definition: val.c:11896
val_remove_child
void val_remove_child(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val.c:8316
NCX_NF_NONE
@ NCX_NF_NONE
not set
Definition: ncxtypes.h:333
VAL_FL_META
#define VAL_FL_META
if set, value is actually for an XML attribute
Definition: val.h:187
val_reinit_from_template
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
NCX_MERGE_NONE
@ NCX_MERGE_NONE
value not set
Definition: ncxtypes.h:305
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
typ_get_basetype_typdef
typ_def_t * typ_get_basetype_typdef(ncx_btype_t btyp)
Get the default typdef for the specified base type.
Definition: typ.c:2039
val_is_config_save
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
xpath1.h
XPath 1.0 expression support.
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
val_bit_ok
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
ncx_next_lmem
ncx_lmem_t * ncx_next_lmem(ncx_lmem_t *cur)
Return the next list member.
Definition: ncx_list.c:1274
typ_idref_t::modname
const xmlChar * modname
back-ptr to the main mod name
Definition: typ.h:356
val_any_whitespace
boolean val_any_whitespace(const xmlChar *str, uint32 len)
Check if a string has any whitespace chars.
Definition: val.c:11753
ncx_compare_lists
int32 ncx_compare_lists(const ncx_list_t *list1, const ncx_list_t *list2)
Compare 2 ncx_list_t struct contents.
Definition: ncx_list.c:411
NCX_BT_ENUM
@ NCX_BT_ENUM
enumeration
Definition: ncxtypes.h:204
val_child_insert
status_t val_child_insert(val_value_t *child, val_value_t *current, val_value_t *parent, op_insertop_t insert_op)
Insert a child value node into a parent value node before or after the specified node.
Definition: val_child.c:2066
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
ncx_compare_enums
int32 ncx_compare_enums(const ncx_enum_t *enu1, const ncx_enum_t *enu2)
Compare 2 enum values.
Definition: ncx.c:6422
xpath.h
Schema and data model Xpath search support.
val_editvars_t_::insertop
op_insertop_t insertop
YANG insert operation.
Definition: val.h:790
NCX_BT_LIST
@ NCX_BT_LIST
internal, YANG list
Definition: ncxtypes.h:228
ncx_get_gen_anyxml
obj_template_t * ncx_get_gen_anyxml(void)
Get the object template for the NCX generic anyxml container.
Definition: ncx.c:6664
ncx_clean_list
void ncx_clean_list(ncx_list_t *list)
Scrub the memory of a ncx_list_t but do not delete it.
Definition: ncx_list.c:139
val_add_child
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
val_convert_leafref
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:14761
NCX_CL_SIMPLE
@ NCX_CL_SIMPLE
a restriction of a base type
Definition: ncxtypes.h:245
logfns_t_::dumpfn
dumpfn_t dumpfn
log dump callback
Definition: val.h:747
DUMP_VAL_AUDIT_LOG
@ DUMP_VAL_AUDIT_LOG
dump val to audit log
Definition: val.h:779
NCX_BT_UINT64
@ NCX_BT_UINT64
uint64
Definition: ncxtypes.h:214
val_get_pcookie
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
ses_cb_t_
Session Control Block.
Definition: ses.h:542
ERR_NCX_MOD_NOT_FOUND
@ ERR_NCX_MOD_NOT_FOUND
236
Definition: status_enum.h:275
val_pattern_ok_errinfo
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
xml_strndup
xmlChar * xml_strndup(const xmlChar *copyFrom, uint32 maxlen)
String duplicate for max N xmlChars.
Definition: xml_util.c:1663
val_dump_value
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
dlq_createQue
dlq_hdrT * dlq_createQue(void)
create a dynamic queue header
Definition: dlq.c:146
yang_typ.h
YANG Module parser typedef and type statement support.
val_get_nsid
xmlns_id_t val_get_nsid(const val_value_t *val)
Get the namespace ID for the specified value node.
Definition: val.c:12277
VAL_FL_GENERIC
#define VAL_FL_GENERIC
Begin val_child_hdr->flags fields.
Definition: val.h:347
typ_get_fraction_digits
uint8 typ_get_fraction_digits(const typ_def_t *typdef)
Get the fraction-digits field from the typdef chain typdef must be an NCX_BT_DECIMAL64 or 0 will be r...
Definition: typ.c:5253
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
ncx_audit_printf_num
void ncx_audit_printf_num(const ncx_num_t *num, ncx_btype_t btyp)
Printf a ncx_num_t contents to the audit log file.
Definition: ncx_num.c:2314
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
val_ascendant_compare
boolean val_ascendant_compare(val_value_t *val1, val_value_t *val2)
Special compare function for edit compares.
Definition: val.c:15298
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
val_replace_str
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
val_child_hdr_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: val.h:1011
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
xpath_pcb_t_::logerrors
boolean logerrors
T: use log_error F: suppress error messages.
Definition: xpath.h:711
val_set_skip_sil_partial
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:15651
val_list_ok
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
xpath_free_result
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3107
val_child_hdr_t_::obj
struct obj_template_t_ * obj
child object template The numbering of this object will determine the insertion order of child nodes ...
Definition: val.h:1018
val_union_ok_errinfo
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
val_gen_index_chain
status_t val_gen_index_chain(const obj_template_t *obj, val_value_t *val)
Create an index chain for the just-parsed table or container struct.
Definition: val_util.c:2632
ncx_errinfo_set
boolean ncx_errinfo_set(const ncx_errinfo_t *errinfo)
Check if error-app-tag or error-message set.
Definition: ncx.c:8071
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
val_set_child_deleted_flag
void val_set_child_deleted_flag(val_value_t *val)
Set the child_deleted flag for this value node.
Definition: val.c:11940
val_is_config_data
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
ncx_str_t
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:589
log_warn
void void void log_warn(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_WARN log entry.
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
val_sprintf_simval_nc_ex
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
xpath1_find_val_in_nodeset_ex
boolean xpath1_find_val_in_nodeset_ex(xpath_result_t *result, val_value_t *testval)
Check a nodeset result and find the same value in one of the nodes.
Definition: xpath1.c:6519
val_value_t_::hdr
struct val_child_hdr_t_ * hdr
back-ptr to own child_hdr
Definition: val.h:873
val_add_child_sorted
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
val_child_next
val_value_t * val_child_next(const val_value_t *curchild)
Get the next child present for the current node Parent must be set.
Definition: val_child.c:2326
val_unique_t_
one unique-stmt component test value node
Definition: val.h:1056
VAL_PASSWORD_STRING
#define VAL_PASSWORD_STRING
display instead of readl password contents
Definition: val.h:173
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
val_set_varexpr
status_t val_set_varexpr(val_value_t *val, const xmlChar *varexpr)
Set the varexpr field in the value node.
Definition: val.c:15509
val_editvars_t_::is_move
boolean is_move
TRUE if YPATCH MOVE operation.
Definition: val.h:799
val_child_add
status_t val_child_add(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node.
Definition: val_child.c:1542
val_dump_alt_value
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
val_compare_to_string_len
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
val_util.h
Value Node Utilities.
ERR_NCX_WRONG_TYPE
@ ERR_NCX_WRONG_TYPE
231
Definition: status_enum.h:270
json_wr.h
JSON Write functions.
val_index_match
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
val_idref_t_::name
xmlChar * name
if nsid == INV_ID then this is entire QName
Definition: val.h:759
ncx_get_gen_container
obj_template_t * ncx_get_gen_container(void)
Get the object template for the NCX generic container.
Definition: ncx.c:6678
typ_get_name
const xmlChar * typ_get_name(const typ_def_t *typdef)
Get the name for the specified typdef.
Definition: typ.c:1871
NCX_DEF_LINELEN
#define NCX_DEF_LINELEN
yangdump default line length
Definition: ncxconst.h:307
NCX_BT_INT64
@ NCX_BT_INT64
int64
Definition: ncxtypes.h:210
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
typ_enumdef_conditional
boolean typ_enumdef_conditional(typ_def_t *typdef, const xmlChar *valstr)
Check if the specified enumdef value is conditional on if-feature.
Definition: typ.c:3434
ncx_merge_list
void ncx_merge_list(ncx_list_t *src, ncx_list_t *dest, ncx_merge_t mergetyp, boolean allow_dups)
The merge function is handled specially for lists.
Definition: ncx_list.c:604
ncx_is_true
boolean ncx_is_true(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:7691
ncx_copy_list
status_t ncx_copy_list(const ncx_list_t *list1, ncx_list_t *list2)
Copy the contents of list1 to list2 Supports base type NCX_BT_SLIST.
Definition: ncx_list.c:503
val_set_all_tags
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:13540
ncx_clean_binary
void ncx_clean_binary(ncx_binary_t *binary)
Scrub the memory of a ncx_binary_t but do not delete it.
Definition: ncx.c:5897
ncx_finish_list
status_t ncx_finish_list(typ_def_t *typdef, ncx_list_t *list)
2nd pass of parsing a ncx_list_t Finish converting the list members to the proper format
Definition: ncx_list.c:862
val_child_hdr_t_
this struct is inserted in the val->v.child_hdrQ for container and list value nodes
Definition: val.h:1010
val_value_t_::editvars
val_editvars_t * editvars
value editing variables the editvars will only be malloced while edit is in progress
Definition: val.h:908
VAL_FL_FORCE_CONFIG
#define VAL_FL_FORCE_CONFIG
if set then the value is forced as config=true or config=false Do not use the val->obj pointer to fig...
Definition: val.h:248
val_get_varexpr
const xmlChar * val_get_varexpr(const val_value_t *val)
Get the varexpr field if set; NULL if not set.
Definition: val.c:15486
ncx_clean_enum
void ncx_clean_enum(ncx_enum_t *enu)
Scrub the memory of a ncx_enum_t but do not delete it.
Definition: ncx.c:6399
val_unique_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: val.h:1057
NCX_BT_EMPTY
@ NCX_BT_EMPTY
empty
Definition: ncxtypes.h:205
NCX_BT_UINT16
@ NCX_BT_UINT16
uint16
Definition: ncxtypes.h:212
obj_get_first_default
const xmlChar * obj_get_first_default(const obj_template_t *obj, ncx_backptr_t **thisdef)
Get the first default value for the specified object.
Definition: obj.c:11613
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_change_nsid3
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
val_value_t_::v_::fname
xmlChar * fname
NCX_BT_EXTERN.
Definition: val.h:1001
xml_strncmp
int xml_strncmp(const xmlChar *s1, const xmlChar *s2, uint32 maxlen)
String compare for xmlChar for at most 'maxlen' xmlChars.
Definition: xml_util.c:1824
val_union_ok
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
NCX_DISPLAY_MODE_XML_NONS
@ NCX_DISPLAY_MODE_XML_NONS
XML display mode without any prefixes (not compliant XML!)
Definition: ncxtypes.h:463
ncx_get_identity_conditional
boolean ncx_get_identity_conditional(const ncx_identity_t *identity)
Check if the identity is conditional on if-feature.
Definition: ncx.c:6217
val_editvars_t_::icookie
int icookie
user integer cookie
Definition: val.h:798
val_clone
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
val_match_metaval
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
NCX_DISPLAY_MODE_CLI
@ NCX_DISPLAY_MODE_CLI
yangcli-pro CLI mode
Definition: ncxtypes.h:469
val_dump_value_ex
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
logfns_t_::suppressVariableNames
boolean suppressVariableNames
suppress variable names in output
Definition: val.h:750
val_editvars_t_::pcookie
void * pcookie
user pointer cookie
Definition: val.h:797
val_child.h
Value Node Child Access Support.
VAL_FL_SUBTREE_DIRTY
#define VAL_FL_SUBTREE_DIRTY
if set, there was an edit operation in a descendant node; Used by agt_val_root_check to prune trees f...
Definition: val.h:214
val_get_prev_key
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
val_clean_index_chain
void val_clean_index_chain(val_value_t *val)
Clean out any indexQ entries.
Definition: val.c:14095
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
b64.h
Base64 Utilities.
ncx_obj_is_generic
boolean ncx_obj_is_generic(const obj_template_t *obj)
Check if the object is 1 of the gen_foo object templates.
Definition: ncx.c:13013
val_match_child_count
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
val_need_owner_string
boolean val_need_owner_string(val_value_t *val)
Check if the owner string is needed when generating ywx:owner attrs.
Definition: val.c:13622
NCX_BT_CONTAINER
@ NCX_BT_CONTAINER
internal container
Definition: ncxtypes.h:225
val_child_mark_undeleted
void val_child_mark_undeleted(val_value_t *child)
Re-Add a previously deleted child value node (unmark deleted)
Definition: val_child.c:2218
val_copy_xpathpcb
status_t val_copy_xpathpcb(val_value_t *val, const xpath_pcb_t *xpathpcb)
Set the xpathpcb field with a clone of the parameter.
Definition: val_util.c:4294
typ_get_listtyp
typ_template_t * typ_get_listtyp(typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3803
val_set_extra_instance_errors
void val_set_extra_instance_errors(val_value_t *val, const xmlChar *modname, const xmlChar *objname, uint32 maxelems)
mark ERR_NCX_EXTRA_VAL_INST errors for nodes > 'maxelems'
Definition: val.c:11630
val_editvars_t_::operset
boolean operset
nc:operation here
Definition: val.h:796
val_free_editvars
void val_free_editvars(val_value_t *val)
Free the editing variables for the value node.
Definition: val.c:13389
val_replace_stringval
void val_replace_stringval(val_value_t *val, const xmlChar *str)
Replace the string value, not the entire value.
Definition: val.c:8193
typ.h
Parameter Type Handler.
val_child_clean_hdrQ
void val_child_clean_hdrQ(dlq_hdr_t *child_hdrQ)
Empty and clean a Q of child headers.
Definition: val_child.c:2548
tk_get_btype_sym
const char * tk_get_btype_sym(ncx_btype_t btyp)
Get the symbolic token symbol for one of the base types.
Definition: tk.c:3324
val_liststr_count
uint32 val_liststr_count(const val_value_t *val)
Get the number of strings in the list type.
Definition: val.c:8995
xmlns_get_ns_prefix
const xmlChar * xmlns_get_ns_prefix(xmlns_id_t ns_id)
Get the prefix for the specified namespace.
Definition: xmlns.c:669
val_range_ok
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
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
val_extra_t_::getcb
void * getcb
Used by Agent only: GET1 callback for virtualval if this field is non-NULL, then the entire value nod...
Definition: val.h:820
val_get_first_leaf
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
val_parse_idref
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
val_all_whitespace
boolean val_all_whitespace(const xmlChar *str)
Check if a string is all whitespace.
Definition: val.c:11719
ncx_get_name_segment
const xmlChar * ncx_get_name_segment(const xmlChar *str, xmlChar *buff, uint32 buffsize)
Get the name string between the dots.
Definition: ncx.c:6836
val_move_config_false
status_t val_move_config_false(val_value_t *newval, val_value_t *curval)
Move the config false data nodes.
Definition: val_util.c:6611
VAL_FL_DEFVAL
#define VAL_FL_DEFVAL
if set, value is set to the YANG default value; only use if VAL_FL_DEFVALSET is 1
Definition: val.h:201
val_value_t_::v_::intbuff
xmlChar * intbuff
NCX_BT_INTERN.
Definition: val.h:1002
yangconst.h
Contains YANG constants separated to prevent H file include loops.
val_cvt_generic
status_t val_cvt_generic(val_value_t *val)
Convert all the database object pointers to generic object pointers.
Definition: val.c:12718
obj_get_config_flag
boolean obj_get_config_flag(const obj_template_t *obj)
Get the config flag for an obj_template_t Return the explicit value or the inherited value Also retur...
Definition: obj.c:11174
val_value_t_::last_modified
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:887
val_clear_dirty_flag
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
log_write
void void void log_write(const char *fstr,...) __attribute__((format(printf
Write a new entry to the main log.
val_new_deleted_value
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_simval_ok_max2
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
DUMP_VAL_STDOUT
@ DUMP_VAL_STDOUT
dump val to STDOUT
Definition: val.h:776
ncx_set_list
status_t ncx_set_list(ncx_btype_t btyp, const xmlChar *strval, ncx_list_t *list)
consume a generic string list with base type checking Parse the XML input as an NCX_BT_SLIST
Definition: ncx_list.c:751
val_create_allowed
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
val_add_meta
status_t val_add_meta(val_value_t *metaval, val_value_t *val)
Add a meta value to a value node.
Definition: val.c:15157
dlq_prevEntry
#define dlq_prevEntry(nodeP)
get the previous queue entry before the current entry
Definition: dlq.h:280
val_child_find_next
val_value_t * val_child_find_next(const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name, const val_value_t *lastmatch)
Find the next child header for the specified child.
Definition: val_child.c:1740
log_stdout
void log_stdout(const char *fstr,...) __attribute__((format(printf
Write output to STDOUT.
val_get_virtual_value
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
val_has_conditional_value
boolean val_has_conditional_value(val_value_t *val)
Check if the value is conditional.
Definition: val.c:14672
val_remove_false_when
status_t val_remove_false_when(val_value_t *val, boolean *deleteme)
Remove false when-stmt nodes.
Definition: val_util.c:4206
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
ncx_compare_nums
int32 ncx_compare_nums(const ncx_num_t *num1, const ncx_num_t *num2, ncx_btype_t btyp)
Compare 2 ncx_num_t union contents.
Definition: ncx_num.c:242
ERR_NCX_DEFSEG_NOT_FOUND
@ ERR_NCX_DEFSEG_NOT_FOUND
251
Definition: status_enum.h:290
val_set_binary
status_t val_set_binary(const xmlChar *valstr, uint32 valstrlen, val_value_t *val)
set and decode base64 value.
Definition: val.c:6758
ncx_get_gen_root
obj_template_t * ncx_get_gen_root(void)
Get the object template for the NCX generic root container.
Definition: ncx.c:6720
ncx_copy_str
status_t ncx_copy_str(const ncx_str_t *str1, ncx_str_t *str2, ncx_btype_t btyp)
Copy the contents of str1 to str2.
Definition: ncx_str.c:158
val_value_t_
one value to match one type
Definition: val.h:860
VAL_IDREF
#define VAL_IDREF(V)
Access the value as an identityref ONLY if NCX_BT_IDREF.
Definition: val.h:470
val_compare_as_string
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
logfns_t_
log functions control block used by manager code
Definition: val.h:746
tk_reset_chain
void tk_reset_chain(tk_chain_t *tkc)
Reset the token chain current pointer to the start.
Definition: tk.c:4042
TK_TT_LBRACK
@ TK_TT_LBRACK
left bracket '['
Definition: tk.h:291
GETCB_GET_VALUE
@ GETCB_GET_VALUE
GET request.
Definition: getcb.h:247
ncx_free_list
void ncx_free_list(ncx_list_t *list)
Clean and free an allocated ncx_list_t.
Definition: ncx_list.c:170
val_new_editvars
status_t val_new_editvars(val_value_t *val)
Malloc and initialize the val->editvars field.
Definition: val.c:13350
val_value_t_::owner_id
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:951
val_dump_value_max
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
val_instance_count_fast
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_extra_t_::dname
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:812
val_set_canonical
status_t val_set_canonical(val_value_t *val)
Invoke the canonical callback for the data type (if any)
Definition: val.c:15216
xpath1_validate_expr
status_t xpath1_validate_expr(ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb)
Validate the previously parsed expression string.
Definition: xpath1.c:5247
ncx_replace_list
status_t ncx_replace_list(const ncx_list_t *src, ncx_list_t *dest)
The replace function is handled specially for lists.
Definition: ncx_list.c:681
val_delete_default_leaf_list
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_compare_strs
int32 ncx_compare_strs(const ncx_str_t *str1, const ncx_str_t *str2, ncx_btype_t btyp)
Compare 2 ncx_str_t union contents.
Definition: ncx_str.c:115
OP_INSOP_LAST
@ OP_INSOP_LAST
insert last (default)
Definition: op.h:140
val_value_t_::v_::num
ncx_num_t num
Numeric data types:
Definition: val.h:986
val_make_sprintf_string
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
logfns_t_::errorfn
errfn_t errorfn
log error callback
Definition: val.h:748
ncx_get_display_mode
ncx_display_mode_t ncx_get_display_mode(void)
Get the current default display mode.
Definition: ncx.c:9816
val_extra_t_::dataruleQ
dlq_hdr_t * dataruleQ
back-ptr to the data access control rules that reference this node
Definition: val.h:847
obj_is_np_container
boolean obj_is_np_container(const obj_template_t *obj)
Check if the object is an Non-Presence-container.
Definition: obj.c:14487
val_clean_tree
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
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
val_init_value
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
NCX_DC_STATE
@ NCX_DC_STATE
state or statistics
Definition: ncxtypes.h:193
NCX_BT_UNION
@ NCX_BT_UNION
union (needs special processing)
Definition: ncxtypes.h:220
typ_get_qual_typdef
typ_def_t * typ_get_qual_typdef(typ_def_t *typdef, ncx_squal_t squal)
Get the final typ_def_t of the specified typ_def_t based on the qualifier.
Definition: typ.c:2403
val_has_withdef_default
boolean val_has_withdef_default(const val_value_t *val)
Check if the value contained the wd:default attribute.
Definition: val.c:12592
val_clear_defvalset_flag
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:13857
xpath_yang.h
YANG-specific Xpath support.
val_value_t_::nmda_origin
ncx_nmda_origin_t nmda_origin
NMDA origin enum.
Definition: val.h:954
val_first_child_match_fast
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
ncx_set_strlist
status_t ncx_set_strlist(const xmlChar *liststr, ncx_list_t *list)
Consume a generic string list with no type checking.
Definition: ncx_list.c:711
val_move_nonconfig_children
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
ERR_NCX_INVALID_PATTERN
@ ERR_NCX_INVALID_PATTERN
313
Definition: status_enum.h:356
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
NCX_MAX_NUMLEN
#define NCX_MAX_NUMLEN
max number len to use for static buffer allocation only
Definition: ncxconst.h:136
ERR_NCX_PREFIX_NOT_FOUND
@ ERR_NCX_PREFIX_NOT_FOUND
331
Definition: status_enum.h:374
val_value_t_::v_::child_hdrQ
dlq_hdr_t child_hdrQ
complex types have a Q of val_value_t representing the child nodes with values
Definition: val.h:975
val_child_mark_deleted
void val_child_mark_deleted(val_value_t *child)
Remove a deleted child value node (mark deleted only)
Definition: val_child.c:2185
val_get_icookie
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
val_find_child_que
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
b64_valid_base64
boolean b64_valid_base64(const char *b64str)
Check if a string match base64 encoding or not.
Definition: b64.c:369
ncx_sprintf_num
status_t ncx_sprintf_num(xmlChar *buff, const ncx_num_t *num, ncx_btype_t btyp, uint32 *len)
Sprintf a ncx_num_t contents.
Definition: ncx_num.c:2357
val_make_simval
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
VAL_CHILD_OP_SAME
@ VAL_CHILD_OP_SAME
get-exact
Definition: val_child.h:82
typ_get_xref_typdef
typ_def_t * typ_get_xref_typdef(typ_def_t *typdef)
Get the xrefdef target typdef from a leafref or instance-identifier.
Definition: typ.c:5009
val_value_t_::v_::binary
ncx_binary_t binary
NCX_BT_BINARY.
Definition: val.h:997
ncx_list_cnt
uint32 ncx_list_cnt(const ncx_list_t *list)
Get the number of entries in the list.
Definition: ncx_list.c:196
val_get_skip_sil_partial
boolean val_get_skip_sil_partial(const val_value_t *val)
Get the skip_sil_partial flag.
Definition: val.c:15675
val_convert_any_to_container
void val_convert_any_to_container(val_value_t *val)
Convert the extern parameter to a container instead of extern.
Definition: val.c:14071
VAL_SET_VALUE_SET
#define VAL_SET_VALUE_SET(V)
flag the value as a value has been set
Definition: val.h:606
val_parse_meta
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.
val_string_ok_ex
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)
val_has_content
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
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
ncx_get_owner_name
const xmlChar * ncx_get_owner_name(ncx_owner_id_t owner_id)
Get the registered YANG library owner namefor owner_id.
Definition: ncx.c:12615
ncx_clean_num
void ncx_clean_num(ncx_btype_t btyp, ncx_num_t *num)
Scrub the memory in a ncx_num_t by freeing all the sub-fields.
Definition: ncx_num.c:189
typ_is_simple
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3107
NCX_BT_ANY
@ NCX_BT_ANY
anyxml
Definition: ncxtypes.h:202
val_force_empty
void val_force_empty(val_value_t *val)
Convert a simple node to an empty type.
Definition: val.c:13101
val_value_t_::etag
ncx_etag_t etag
ETag for RESTCONF.
Definition: val.h:888
NCX_DISPLAY_MODE_PREFIX
@ NCX_DISPLAY_MODE_PREFIX
plain CLI display mode with YANG prefixes added to nodes
Definition: ncxtypes.h:454
val_enum_ok
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
NCX_BT_SLIST
@ NCX_BT_SLIST
ncx:xsdlist extension (internal, deprecated)
Definition: ncxtypes.h:223
val_insert_child
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
typ_get_first_pattern
typ_pattern_t * typ_get_first_pattern(typ_def_t *typdef)
Get the first pattern struct for a typdef.
Definition: typ.c:4272
EMPTY_STRING
#define EMPTY_STRING
empty string used to get const xmlChar * cast
Definition: ncxconst.h:289
typ_get_first_cidref
const typ_idref_t * typ_get_first_cidref(typ_def_t *typdef)
Get the idref field if this is an NCX_BT_IDREF typdef Const version.
Definition: typ.c:5195
val_child_cnt
uint32 val_child_cnt(val_value_t *parent)
Get the number of child nodes present.
Definition: val.c:8907
ERR_NCX_IMP_NOT_FOUND
@ ERR_NCX_IMP_NOT_FOUND
321
Definition: status_enum.h:364
val_value_t_::btyp
ncx_btype_t btyp
base type of this value
Definition: val.h:881
val_find_child_obj
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
TK_TT_EQUAL
@ TK_TT_EQUAL
equal sign '='
Definition: tk.h:294
xpath_get_first_resnode
xpath_resnode_t * xpath_get_first_resnode(xpath_result_t *result)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:3931
val_editvars_t_::insert_mode
val_insert_mode_t insert_mode
insert mode requested
Definition: val.h:794
val_value_t_::v_::idref
val_idref_t idref
NCX_BT_IDREF.
Definition: val.h:996
val_value_t_::typdef
typ_def_t * typdef
bptr to typdef if leaf
Definition: val.h:866
val_set_icookie
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
typ_get_range_errinfo
ncx_errinfo_t * typ_get_range_errinfo(typ_def_t *typdef)
Get the range errinfo for a typdef.
Definition: typ.c:4447
NCX_DISPLAY_MODE_PLAIN
@ NCX_DISPLAY_MODE_PLAIN
plain CLI display mode
Definition: ncxtypes.h:451
typ_is_schema_instance_string
boolean typ_is_schema_instance_string(const typ_def_t *typdef)
Find the ncx:schema-instance extension within the specified typdef chain.
Definition: typ.c:2789
ncx_init_enum
void ncx_init_enum(ncx_enum_t *enu)
Init the memory of a ncx_enum_t.
Definition: ncx.c:6381
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
val_free_solo_editvars
void val_free_solo_editvars(val_editvars_t *editvars)
Free the editing variables removed from a val_value_t.
Definition: val.c:13411
val_union_ok_binary
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
ERR_NCX_VAL_NOTINSET
@ ERR_NCX_VAL_NOTINSET
291
Definition: status_enum.h:334
val_is_real
boolean val_is_real(const val_value_t *val)
Check if the specified value is a real value.
Definition: val.c:11449
VAL_BOOL
#define VAL_BOOL(V)
Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
Definition: val.h:405
val_idref_derived_from
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:14201
ERR_NCX_WRONG_NUMTYP
@ ERR_NCX_WRONG_NUMTYP
289
Definition: status_enum.h:332
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
val_child_next_terminal
val_value_t * val_child_next_terminal(const val_value_t *curchild)
Get the next terminal node child present for the current node Parent must be set.
Definition: val_child.c:2447
val_ocpattern_match
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:14152
val_range_ok_errinfo
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
val_set_by_default
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
val_index_t_::val
val_value_t * val
points to a child node
Definition: val.h:1051
val_value_t_::parent
struct val_value_t_ * parent
back-ptr to parent if any
Definition: val.h:872
logfns_t_::outputFile
FILE * outputFile
manager redirect to file output
Definition: val.h:751
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
val_set_extern
void val_set_extern(val_value_t *val, xmlChar *fname)
Setup an NCX_BT_EXTERN value.
Definition: val.c:10893
val_get_mod_prefix
const xmlChar * val_get_mod_prefix(const val_value_t *val)
Get the module prefix associated with this value node.
Definition: val.c:12250
val_test_fn_t
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:1071
ERR_BUFF_OVFL
@ ERR_BUFF_OVFL
106
Definition: status_enum.h:218
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
val_child_first
val_value_t * val_child_first(const val_value_t *parent)
Get the first child present for this parent.
Definition: val_child.c:2294
obj_is_leaf
boolean obj_is_leaf(const obj_template_t *obj)
Check if object is a proper leaf.
Definition: obj.c:13323
val_extra_t_::xpathpcb
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:835
typ_get_next_typdef
typ_def_t * typ_get_next_typdef(typ_def_t *typdef)
Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2183
val_is_value_set
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:13936
VAL_FL_HDR_DIRTY
#define VAL_FL_HDR_DIRTY
one of the instances is dirty
Definition: val.h:359
val_dump_value_full
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
ncx_get_gen_empty
obj_template_t * ncx_get_gen_empty(void)
Get the object template for the NCX generic empty leaf.
Definition: ncx.c:6706
val_get_next_meta
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_simval_ok_max3
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
NCX_MERGE_LAST
@ NCX_MERGE_LAST
merge last
Definition: ncxtypes.h:307
VAL_IS_VAREXPR
#define VAL_IS_VAREXPR(V)
Check if the value is a var expression.
Definition: val.h:557
val_dirty_subtree
boolean val_dirty_subtree(const val_value_t *val)
Check the dirty or subtree_dirty flag.
Definition: val.c:12050
xml_wr_check_open_file
status_t xml_wr_check_open_file(FILE *fp, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, int32 startindent, int32 indent, val_nodetest_fn_t testfn)
Write the specified value to an open FILE in XML format.
Definition: xml_wr.c:3731
val_find_next_child_fast
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
obj_is_schema_instance_string
boolean obj_is_schema_instance_string(const obj_template_t *obj)
Check if object is a schema-instance string.
Definition: obj.c:14420
xpath_clone_pcb
xpath_pcb_t * xpath_clone_pcb(const xpath_pcb_t *srcpcb)
Clone an XPath PCB.
Definition: xpath.c:2822
xpath_pcb_t_
XPath parser control block.
Definition: xpath.h:668
val_value_t_::v_::list
ncx_list_t list
NCX_BT_BITS, NCX_BT_SLIST.
Definition: val.h:998
val_set_string
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
val_unique_t_::pcb
struct xpath_pcb_t_ * pcb
live XPath CB w/ result
Definition: val.h:1058
val_clean_value
void val_clean_value(val_value_t *val)
Clean a static val_value_t struct.
Definition: val.c:13667
ncx_num_zero
boolean ncx_num_zero(const ncx_num_t *num, ncx_btype_t btyp)
Compare a ncx_num_t to zero.
Definition: ncx_num.c:663
val_clone_config_save
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
VAL_INS_MODE_VALUE
@ VAL_INS_MODE_VALUE
YANG value attribute.
Definition: val.h:768
xpath_pcb_t_::cookie
void * cookie
The cookie registered with the getvar_fn.
Definition: xpath.h:799
VAL_FL_FORCE_CONFIG_VALUE
#define VAL_FL_FORCE_CONFIG_VALUE
if set then the forced config value is true if not set, then the forced config value is false Ignored...
Definition: val.h:254
NCX_BT_BITS
@ NCX_BT_BITS
bits
Definition: ncxtypes.h:203
ncx_list.h
NCX Module Library List Utility Functions.
NCX_BT_FLOAT64
@ NCX_BT_FLOAT64
hidden: just for XPath
Definition: ncxtypes.h:216
val_set_dname2
status_t val_set_dname2(val_value_t *val, const xmlChar *dname, uint32 dnamelen)
Set the dname field.
Definition: val.c:15422
val_match_child
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
val_clean_valQ
void val_clean_valQ(dlq_hdr_t *valQ)
Clean a queue of val_value_t.
Definition: val.c:13911
val_stdout_value_ex
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....
Definition: val.c:5819
NCX_BT_UINT32
@ NCX_BT_UINT32
uint32
Definition: ncxtypes.h:213
val_new_extra
status_t val_new_extra(val_value_t *val)
Create the val_extra struct if it does not exist.
Definition: val.c:15458
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
val_extra_t_
extra information not used very often within a val_value_t
Definition: val.h:805
val_next_child_match
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
val_free_unique
void val_free_unique(val_unique_t *valuni)
Clean and free a val_unique_t struct.
Definition: val.c:12525
log_stdout_level
void void log_stdout_level(log_debug_t level, const char *fstr,...) __attribute__((format(printf
Write output to STDOUT if debug level set.
xpath_yang_parse_path_ex
status_t xpath_yang_parse_path_ex(tk_chain_t *tkc, ncx_module_t *mod, xpath_source_t source, xpath_pcb_t *pcb, boolean logerrors, ncx_leafref_class_t *leafref_class)
Parse the leafref path as a leafref path (extended)
Definition: xpath_yang.c:2133
val_merge
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
val_dump_value_full2
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
val_meta_empty
boolean val_meta_empty(val_value_t *val)
Check if the metaQ is empty for the value node.
Definition: val.c:5499
val_get_next_key
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
obj_get_next_default
const xmlChar * obj_get_next_default(const obj_template_t *obj, ncx_backptr_t *lastdef, ncx_backptr_t **thisdef)
Get the next default value for the specified object.
Definition: obj.c:11662
typ_is_string
boolean typ_is_string(ncx_btype_t btyp)
Check if the base type is a simple string (not list)
Definition: typ.c:4097
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
val_child_swap
status_t val_child_swap(val_value_t *newchild, val_value_t *curchild)
Swap a child value node with a current value node.
Definition: val_child.c:2253
val_has_children
boolean val_has_children(const val_value_t *val)
Determine if there are any child nodes for this val.
Definition: val.c:13719
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
val_all_np_containers
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
VAL_FL_WITHDEF
#define VAL_FL_WITHDEF
if set, PDU value had the with-defaults wd:attribute set to true
Definition: val.h:206
VAL_IS_VALUE_SET
#define VAL_IS_VALUE_SET(V)
check if the value is a value has been set
Definition: val.h:612
xpath_yang_parse_path
status_t xpath_yang_parse_path(tk_chain_t *tkc, ncx_module_t *mod, xpath_source_t source, xpath_pcb_t *pcb)
Parse the leafref path as a leafref path.
Definition: xpath_yang.c:2080
xpath_pcb_t_::errinfo
ncx_errinfo_t errinfo
must-stmt error info.
Definition: xpath.h:704
b64_decode
status_t b64_decode(const uint8_t *inbuff, uint32_t inbufflen, uint8_t *outbuff, uint32_t outbufflen, uint32_t *retlen)
Decode a base64 string.
Definition: b64.c:310
ncx_get_gen_string
obj_template_t * ncx_get_gen_string(void)
Get the object template for the NCX generic string leaf.
Definition: ncx.c:6692
ncx_list_empty
boolean ncx_list_empty(const ncx_list_t *list)
Check if the list is empty or not.
Definition: ncx_list.c:315
VAL_TYPE
#define VAL_TYPE(V)
Access the base type : same as VAL_BTYPE.
Definition: val.h:387
obj_get_basetype
ncx_btype_t obj_get_basetype(const obj_template_t *obj)
Get the NCX base type enum for the object type.
Definition: obj.c:12077
val_get_index_string
status_t val_get_index_string(xml_msg_hdr_t *mhdr, ncx_instfmt_t format, boolean force_quotes, const val_value_t *val, xmlChar *buff, uint32 *len)
Get the index string for the specified table or container entry.
Definition: val_util.c:3707
val_extra_t_::varexpr
xmlChar * varexpr
malloced pointer to the variable expression found if this val node is part of a data template.
Definition: val.h:854
val_get_metaQ
dlq_hdr_t * val_get_metaQ(val_value_t *val)
Get the meta Q header for the value.
Definition: val.c:5391
typ_get_yang_typename
const xmlChar * typ_get_yang_typename(const typ_def_t *typdef)
Get the YANG type name for this typdef if there is one.
Definition: typ.c:5503
ses_cb_t_::reader
xmlTextReaderPtr reader
input stream reader
Definition: ses.h:612
NCX_IQUAL_OPT
@ NCX_IQUAL_OPT
'?' == 0 or 1
Definition: ncxtypes.h:298
obj_first_child_deep
obj_template_t * obj_first_child_deep(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7084
VAL_BTYPE
#define VAL_BTYPE(V)
Access the base type : same as VAL_TYPE.
Definition: val.h:548
val_stdout_value
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....
Definition: val.c:5787
ncx_get_backptr_node
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:11577
val_init_virtual
void val_init_virtual(val_value_t *val, void *cbfn, struct obj_template_t_ *obj)
Special function to initialize a virtual value node.
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
val_extra_t_::virtualval
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:826
obj_get_default
const xmlChar * obj_get_default(const obj_template_t *obj)
Get the default value for the specified object.
Definition: obj.c:11570
val_string_ok_errinfo
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
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
typ_first_unionnode
typ_unionnode_t * typ_first_unionnode(typ_def_t *typdef)
Get the first union node in the queue for a given typdef.
Definition: typ.c:3978
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ERR_NCX_MISSING_VAL_INST
@ ERR_NCX_MISSING_VAL_INST
310 - 13.5
Definition: status_enum.h:353
val_hdr_test_fn_t
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:1116
ncx.h
YANG module utility functions.
VAL_FL_DEFVALSET
#define VAL_FL_DEFVALSET
if set, value has been checked to see if it is the default value
Definition: val.h:196
VAL_INS_MODE_POINT
@ VAL_INS_MODE_POINT
YANG-API point param.
Definition: val.h:769
ncx_copy_num
status_t ncx_copy_num(const ncx_num_t *num1, ncx_num_t *num2, ncx_btype_t btyp)
Copy the contents of num1 to num2.
Definition: ncx_num.c:1451
VAL_IDREF_NSID
#define VAL_IDREF_NSID(V)
Access the namespace ID value as an identityref ONLY if NCX_BT_IDREF.
Definition: val.h:473
val_value_t_::flags
uint32 flags
internal status flags
Definition: val.h:878
val_next_child_qname
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
NCX_SQUAL_RANGE
@ NCX_SQUAL_RANGE
search range
Definition: ncxtypes.h:315
typ_get_next_cidref
const typ_idref_t * typ_get_next_cidref(const typ_def_t *typdef, const typ_idref_t *curdef)
Get the next idref field if this is an NCX_BT_IDREF typdef.
Definition: typ.c:5228
obj_get_level
uint32 obj_get_level(const obj_template_t *obj)
Get the nest level for the specified object Top-level is '1' Does not count groupings as a level.
Definition: obj.c:11833
val_get_child_inst_id
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
obj.h
Data Object Support.
val_clone_valQ
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:13880
ncx_is_false
boolean ncx_is_false(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:7714
val_make_from_insertxpcb
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
ncx_init_binary
void ncx_init_binary(ncx_binary_t *binary)
Init the memory of a ncx_binary_t struct.
Definition: ncx.c:5881
XP_SRC_INSTANCEID
@ XP_SRC_INSTANCEID
instance-identifier
Definition: xpath.h:377
val_child_hdr_t_::tree
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:1023
b64_get_encoded_str_len
uint32_t b64_get_encoded_str_len(uint32_t inbufflen, uint32_t linesize)
Get the output buffer size required for encoding the string.
Definition: b64.c:241
val_get_parent_nsid
xmlns_id_t val_get_parent_nsid(const val_value_t *val)
Try to get the parent namespace ID.
Definition: val.c:11476
val_walker_fn_t
boolean(* val_walker_fn_t)(val_value_t *val, void *cookie1, void *cookie2)
child or descendant node search walker function
Definition: val.h:1084
VAL_SET_VAREXPR
#define VAL_SET_VAREXPR(V)
Set the value as a var expression.
Definition: val.h:551
val_metadata_inst_count
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
xmlns_ids_equal
boolean xmlns_ids_equal(xmlns_id_t ns1, xmlns_id_t ns2)
compare 2 namespace IDs only if they are both non-zero and return TRUE if they are equal
Definition: xmlns.c:1363
val_get_last_key
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
val_get_nest_level
uint32 val_get_nest_level(val_value_t *val)
Get the next level of the value.
Definition: val.c:12157
val_tree_t_
wrapper for the height-balanced tree struct
Definition: val_tree.h:65
ncx_init_list
void ncx_init_list(ncx_list_t *list, ncx_btype_t btyp)
Initialize an allocated ncx_list_t.
Definition: ncx_list.c:113
typ_idref_t
YANG identityref struct the value is an identity-stmt QName that has a base-stmt that resolves to the...
Definition: typ.h:351
xpath1_eval_xmlexpr
xpath_result_t * xpath1_eval_xmlexpr(xmlTextReaderPtr reader, xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, status_t *res)
Evaluate an XML document expression.
Definition: xpath1.c:5643
logfns_t_::indentfn
indentfn_t indentfn
log indent callback
Definition: val.h:749
ncx_string_in_list
boolean ncx_string_in_list(const xmlChar *str, const ncx_list_t *list)
Check if the string value is in the list List type must be string based, or an enum.
Definition: ncx_list.c:343
val_get_index_count
uint32 val_get_index_count(const val_value_t *val)
Get the number of index nodes in this val.
Definition: val.c:10740
val_test2_fn_t
boolean(* val_test2_fn_t)(val_value_t *val, void *cookie)
get first or next child test function value test function
Definition: val.h:1130
val_reset_empty
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
ncx_get_gen_binary
obj_template_t * ncx_get_gen_binary(void)
Get the object template for the NCX generic binary leaf.
Definition: ncx.c:6735
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
val_idref_t_::nsid
xmlns_id_t nsid
namespace ID
Definition: val.h:757
val_instance_count
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
NCX_BT_EXTERN
@ NCX_BT_EXTERN
not a real type, points fo file for contents
Definition: ncxtypes.h:230
ncx_file_close
void ncx_file_close(FILE *fp)
Close a file; check result.
Definition: ncx.c:13235
val_binary_ok_errinfo
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
log_audit_write_level
void void void void void void void void void void log_audit_write_level(log_debug_t level, const char *fstr,...) __attribute__((format(printf
Write an new entry to the audit log file if the log level is set.
typ_get_leafref_pcb
struct xpath_pcb_t_ * typ_get_leafref_pcb(typ_def_t *typdef)
Get the XPath parser control block for the leafref data type returns xpath_pcb_t but cannot import du...
Definition: typ.c:4795
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
ERR_NCX_WRONG_DATATYP
@ ERR_NCX_WRONG_DATATYP
285
Definition: status_enum.h:328
plock_cb.h
RFC 57517 partial lock support Data structure definition.
val_sprintf_etag
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
val_clear_varexpr
void val_clear_varexpr(val_value_t *val)
Clear the varexpr field in the value node.
Definition: val.c:15538
val_string_ok_ex2
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
val_sprintf_simval_nc
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
ncx_find_pre_import
ncx_import_t * ncx_find_pre_import(const ncx_module_t *mod, const xmlChar *prefix)
Search the importQ for a specified prefix value.
Definition: ncx.c:5619
ncx_convert_num
status_t ncx_convert_num(const xmlChar *numstr, ncx_numfmt_t numfmt, ncx_btype_t btyp, ncx_num_t *val)
Convert a number string to a numeric type.
Definition: ncx_num.c:717
XP_SRC_SCHEMA_INSTANCEID
@ XP_SRC_SCHEMA_INSTANCEID
schema-instance-identifier
Definition: xpath.h:378
obj_is_data_db
boolean obj_is_data_db(const obj_template_t *obj)
Check if the object is some sort of data Constrained to only check the config DB objects,...
Definition: obj.c:13788
val_clone_config_data
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
val_child_next_same
val_value_t * val_child_next_same(val_value_t *curnode)
Get the next node of the same type.
Definition: val_child.c:2359
ncx_decode_dec64
status_t ncx_decode_dec64(const xmlChar *numstr, uint8 digits, ncx_num_t *retnum)
Handle some sort of decimal64 number string (NCX_BT_DECIMAL64)
Definition: ncx_num.c:1383
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
val_first_child_match
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
ncx_get_next_module
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:4751
val_simval_ok_max
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
val_dumpvalue_mode_t_
val_dumpvalue_mode_t_
dump value mode used in val_dump_value
Definition: val.h:774
val_compare_ex
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
ncx_find_module
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3227
b64_get_decoded_str_len
uint32_t b64_get_decoded_str_len(const uint8_t *inbuff, size_t inputlen)
Calculate the length of the buffer required to decode the base64 string.
Definition: b64.c:256
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
val_set_force_config
void val_set_force_config(val_value_t *val, boolean is_config)
Set the force config flags for the object.
Definition: val.c:13826
ERR_NCX_EMPTY_VAL
@ ERR_NCX_EMPTY_VAL
235
Definition: status_enum.h:274
NCX_CL_NAMED
@ NCX_CL_NAMED
a restriction of a named type
Definition: ncxtypes.h:247
val_walker2_fn_t
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:1100
val_compare_to_string
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
val_need_quotes
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_IFMT_CLI
@ NCX_IFMT_CLI
CLI syntax used in val_dump_value.
Definition: ncxtypes.h:401
val_insert_mode_t_
val_insert_mode_t_
type of protocol parameter used for insert operation
Definition: val.h:765
val_value_t_::dataclass
ncx_data_class_t dataclass
config or state data
Definition: val.h:882
xmlns_ncx_id
xmlns_id_t xmlns_ncx_id(void)
Get the ID for the NETCONF Extensions namespace or 0 if it doesn't exist.
Definition: xmlns.c:897
NCX_BT_DECIMAL64
@ NCX_BT_DECIMAL64
decimal64
Definition: ncxtypes.h:215
val_child_hdr_t_::count
uint32 count
que count of non-deleted nodes
Definition: val.h:1032
val_editvars_t_::curparent
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:789
VAL_IS_INDEX
#define VAL_IS_INDEX(V)
Check if the value is a key leaf.
Definition: val.h:666
xpath_yang_validate_path
status_t xpath_yang_validate_path(ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb, boolean schemainst, obj_template_t **leafobj)
Validate the previously parsed leafref path.
Definition: xpath_yang.c:2335
obj_is_xpath_string
boolean obj_is_xpath_string(const obj_template_t *obj)
Check if object is an XPath string.
Definition: obj.c:14394
NCX_BT_CHOICE
@ NCX_BT_CHOICE
internal choice, not really used
Definition: ncxtypes.h:226
val_move_fields_for_xml
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
val_set_subtree_dirty_up
void val_set_subtree_dirty_up(val_value_t *val)
Set the dirty flag for this value node.
Definition: val.c:11862
val_delete_allowed
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
NCX_BT_STRING
@ NCX_BT_STRING
string
Definition: ncxtypes.h:217
val_has_complex_child
boolean val_has_complex_child(const val_value_t *val)
Check if the value has complex children nodes.
Definition: val.c:15120
ncx_new_list
ncx_list_t * ncx_new_list(ncx_btype_t btyp)
Malloc Initialize an allocated ncx_list_t.
Definition: ncx_list.c:90
val_set_sil_priority
status_t val_set_sil_priority(val_value_t *val, uint8 silprio)
Set the secondary SIL priority.
Definition: val.c:14297
val_set_simval
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
WILDCARD_STRING
#define WILDCARD_STRING
yangcli test-suite allows wildcards in leafy nodes using the wildcar string
Definition: ncxconst.h:1678
val_expand_var_expr
status_t val_expand_var_expr(val_value_t *val, xmlChar **retstr)
Expand the variable expression if found.
Definition: val_util.c:6759
val_editvars_t_::silprio
uint8 silprio
2nd SIL priority for server
Definition: val.h:795
NCX_BT_INT8
@ NCX_BT_INT8
int8
Definition: ncxtypes.h:207
val_idref_t_::identity
ncx_identity_t * identity
ID back-ptr if found.
Definition: val.h:760
val_set_qname
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
ncx_fastpath_enabled
boolean ncx_fastpath_enabled(void)
Check if fast path value tree comparisons enabled.
Definition: ncx.c:11789
VAL_FL_DELETED
#define VAL_FL_DELETED
if set, value has been deleted or moved and awaiting commit or rollback
Definition: val.h:209
NCX_DISPLAY_MODE_JSON
@ NCX_DISPLAY_MODE_JSON
JSON (RFC 7951 format)
Definition: ncxtypes.h:466
val_get_sil_priority
uint8 val_get_sil_priority(val_value_t *val)
Get the secondary SIL priority; zero if not found.
Definition: val.c:14322
xmlns.h
XML namespace support.
val_find_root
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:15186
val_free_value
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
json_wr_check_open_file
status_t json_wr_check_open_file(FILE *fp, val_value_t *val, int32 startindent, int32 indent, val_nodetest_fn_t testfn)
Write the specified value to an open FILE in JSON format.
Definition: json_wr.c:2711
val_set_simval_max
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_editvars_t_::skip_sil_partial
boolean skip_sil_partial
TRUE is skip_sil_partial needed.
Definition: val.h:800
obj_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
ncx_txid2etag
ncx_etag_t ncx_txid2etag(ncx_transaction_id_t txid)
Cast ncx_txid_t to ncx_etag_t.
Definition: ncx.c:15358
dlq_destroyQue
void dlq_destroyQue(dlq_hdrT *listP)
free a dynamic queue header previously allocated with dlq_createQue
Definition: dlq.c:206
val_extra_t_::cachetime
time_t cachetime
timestamp for virtual val timeout
Definition: val.h:829
obj_get_iqualval
ncx_iqual_t obj_get_iqualval(obj_template_t *obj)
Get the instance qualifier for this object.
Definition: obj.c:12427
val_child_first_terminal
val_value_t * val_child_first_terminal(const val_value_t *parent)
Get the first terminal node child present for this parent.
Definition: val_child.c:2412
status.h
Global error messages for status code enumerations.
val_child_count
uint32 val_child_count(val_value_t *parent)
Get the number of non-deleted children in this parent.
Definition: val_child.c:2483
NCX_BT_NONE
@ NCX_BT_NONE
base type not set
Definition: ncxtypes.h:201
VAL_IS_DELETED
#define VAL_IS_DELETED(V)
Access the deleted flag.
Definition: val.h:533
val_set_intern
void val_set_intern(val_value_t *val, xmlChar *intbuff)
Setup an NCX_BT_INTERN value.
Definition: val.c:10921
val_editvars_t_::insertxpcb
struct xpath_pcb_t_ * insertxpcb
key attr for insert
Definition: val.h:792
val_value_t_::v_
union of all the NCX-specific sub-types note that the following invisible constructs should never sho...
Definition: val.h:965
log_alt_write
void log_alt_write(const char *fstr,...) __attribute__((format(printf
Write to the alternate log file.
obj_is_password
boolean obj_is_password(const obj_template_t *obj)
Check if object is marked as a password object.
Definition: obj.c:14195
NCX_DISPLAY_MODE_XML
@ NCX_DISPLAY_MODE_XML
XML display mode.
Definition: ncxtypes.h:460
VAL_FL_DUPDONE
#define VAL_FL_DUPDONE
starting val_value_t flags field if set the duplicates-ok test has been done
Definition: val.h:178
val_compare_max_def
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
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
dlq.h
dlq provides general double-linked list and queue support:
obj_has_get2cb
boolean obj_has_get2cb(obj_template_t *obj)
Check if current object has GET2 callback registered.
Definition: obj.c:18099
val_get_const_xpathpcb
const xpath_pcb_t * val_get_const_xpathpcb(const val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4351
val_value_t_::qhdr
dlq_hdr_t qhdr
queue header to insert in dlq_hdr list
Definition: val.h:862
val_fit_oneline
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
VAL_MAX_NUMLEN
#define VAL_MAX_NUMLEN
maximum number of bytes in a number string
Definition: val.h:152
ncx_new_backptr
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:11412
val_get_first_terminal_child
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
val_idref_ok_ex
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
val_simval_ok_ex
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
val_value_t_::nsid
xmlns_id_t nsid
namespace ID for this node
Definition: val.h:880
typ_has_children
boolean typ_has_children(ncx_btype_t btyp)
Check if this is a data type that uses the val.v.childQ.
Definition: typ.c:3056
val_replace
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
val_find_bit_name
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:14346
typ_idref_t::basename
xmlChar * basename
identity base name
Definition: typ.h:354
val_child_count_nsid
uint32 val_child_count_nsid(val_value_t *parent, xmlns_id_t nsid, const xmlChar *name, val_value_t **firstval)
Get the number of non-deleted children matching the NSID and namestring in this parent.
Definition: val_child.c:2515
VAL_FL_HDR_SUBTREE_DIRTY
#define VAL_FL_HDR_SUBTREE_DIRTY
one of the descendant instances is dirty
Definition: val.h:362
yang_typ_enubit_enabled
boolean yang_typ_enubit_enabled(typ_enum_t *enubit)
Check if an enum or bit is enabled.
Definition: yang_typ.c:5605
val_get_first_meta
val_value_t * val_get_first_meta(dlq_hdr_t *queue)
Get the first metaQ entry from the specified Queue.
Definition: val.c:5423
NCX_BT_INT16
@ NCX_BT_INT16
int16
Definition: ncxtypes.h:208
obj_template_t_
One YANG data-def-stmt.
Definition: obj.h:1056
ncx_transaction_id_t
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:548
b64_encode
status_t b64_encode(const unsigned char *inbuff, unsigned int inbufflen, unsigned char *outbuff, unsigned int outbufflen, unsigned int linesize, unsigned int *retlen)
base64 encode a stream adding padding and line breaks as per spec.
typ_get_iqualval_def
ncx_iqual_t typ_get_iqualval_def(const typ_def_t *typdef)
Find the instance qualifier value enum for the specified type template.
Definition: typ.c:2932
val_value_t_::v_::str
ncx_str_t str
String data types:
Definition: val.h:994
NCX_DEF_INDENT
#define NCX_DEF_INDENT
default indent amount for nesting XML or other structured output
Definition: ncxconst.h:441
val_get_first_index
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