yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
val_util.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2024, 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_util
13#define _H_val_util
14
15/* FILE: val_util.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3519-dec-05 abb Begun
3621jul08 abb start obj-based rewrite
3729jul08 abb split out from val.h
38
39*/
40
41#include <xmlstring.h>
42
43#ifndef _H_ncxtypes
44#include "ncxtypes.h"
45#endif
46
47#ifndef _H_obj
48#include "obj.h"
49#endif
50
51#ifndef _H_op
52#include "op.h"
53#endif
54
55#ifndef _H_plock
56#include "plock.h"
57#endif
58
59#ifndef _H_ses
60#include "ses.h"
61#endif
62
63#ifndef _H_runstack
64#include "runstack.h"
65#endif
66
67#ifndef _H_status
68#include "status.h"
69#endif
70
71#ifndef _H_val
72#include "val.h"
73#endif
74
75#ifndef _H_xml_msg
76#include "xml_msg.h"
77#endif
78
79#ifndef _H_xmlns
80#include "xmlns.h"
81#endif
82
83#ifndef _H_xpath
84#include "xpath.h"
85#endif
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91/********************************************************************
92* *
93* T Y P E S *
94* *
95*********************************************************************/
96
131typedef boolean
133 ncx_withdefaults_t withdef,
134 boolean realtest,
135 val_value_t *node);
136
137
154typedef struct val_getbulk_return_t_ {
156 struct val_value_t_ *retval[NCX_MAX_GETBULK_COUNT];
157
159 uint32 retcount;
160
162 boolean retdone;
164
165
187typedef status_t
189 uint32 start_idx,
190 uint32 max_count,
191 uint32 max_depth,
192 val_nodetest_fn_t node_test_fn,
193 val_getbulk_return_t *getbulk_return);
194
195
196
197
198/********************************************************************
199* *
200* F U N C T I O N S *
201* *
202*********************************************************************/
203
204
248extern void
250
251
261extern status_t
262 val_gen_index_comp (const obj_key_t *in,
263 val_value_t *val);
264
265
275extern status_t
277
278
292extern status_t
294 val_value_t *val);
295
296
326extern status_t
328 boolean scriptmode);
329
330
365extern status_t
367 boolean scriptmode,
368 runstack_context_t *rcxt,
369 time_t last_modified,
370 ncx_etag_t etag);
371
372
388extern status_t
390 val_value_t *val,
391 boolean scriptmode,
392 time_t last_modified,
393 ncx_etag_t etag);
394
395
409extern status_t
411
412
429 val_value_t *val,
430 obj_template_t *obj);
431
432
448extern status_t
450 val_value_t *val,
451 obj_template_t *obj,
452 boolean check_when);
453
454
473extern status_t
475 val_value_t *val,
476 obj_template_t *obj,
477 boolean check_when,
478 boolean check_deep,
479 ses_cb_t *scb,
480 xml_msg_hdr_t *msg);
481
482
498extern val_value_t *
500 const obj_template_t *obj);
501
502
515extern val_value_t *
517 const obj_template_t *obj);
518
519
532extern val_value_t *
534 const obj_template_t *obj,
535 boolean nondef);
536
537
548extern val_value_t *
550 val_value_t *curchild);
551
552
564extern boolean
566 obj_template_t *obj);
567
568
575extern void
577
578
592extern val_value_t *
594 const xmlChar *name,
595 boolean copyname,
596 val_value_t *parent,
597 op_editop_t editop,
598 obj_template_t *obj);
599
600
614extern status_t
616 const val_value_t *val,
617 ncx_instfmt_t format,
618 xmlChar **buff);
619
620
636extern status_t
638 const val_value_t *val,
639 ncx_instfmt_t format,
640 boolean stop_at_root,
641 xmlChar **buff);
642
643
664extern status_t
666 const val_value_t *val,
667 const val_value_t *stopval,
668 ncx_instfmt_t format,
669 boolean stop_at_root,
670 xmlChar **buff);
671
672
693extern status_t
695 const val_value_t *val,
696 ncx_instfmt_t format,
697 xmlns_id_t leaf_nsid,
698 const xmlChar *leaf_name,
699 boolean stop_at_root,
700 xmlChar **buff);
701
702
721extern status_t
723 ncx_instfmt_t format,
724 boolean force_quotes,
725 const val_value_t *val,
726 xmlChar *buff,
727 uint32 *len);
728
729
750extern status_t
752 val_value_t *valroot,
753 val_value_t *objval,
754 obj_template_t *obj,
755 boolean *condresult,
756 uint32 *whencount);
757
758
812extern status_t
814 val_value_t *valroot,
815 val_value_t *objval,
816 obj_template_t *obj,
817 xml_msg_hdr_t *mhdr,
818 boolean configonly,
819 boolean get_when,
820 ses_cb_t *pcb_session,
821 struct xpath_get2_cb_t_ *parent_cb,
822 boolean *condresult,
823 uint32 *whencount);
824
825
844extern status_t
846 boolean *deleteme);
847
848
866extern status_t
867 val_remove_false_when_error (const xmlChar *name,
868 val_value_t *val,
869 obj_template_t *obj,
870 boolean is_error,
871 boolean real_delete,
872 boolean *deleteme);
873
874
881extern xpath_pcb_t *
883
884
891extern const xpath_pcb_t *
893
894
902extern status_t
904 const xpath_pcb_t *xpathpcb);
905
906
914extern status_t
916 xpath_pcb_t *xpathpcb);
917
918
935extern val_value_t *
937 const xmlChar *valstr,
938 status_t *res);
939
940
956extern status_t
958 obj_template_t *obj,
959 const xmlChar *valstr);
960
961
972extern val_value_t *
974 const xmlChar *binstr,
975 uint32 binstrlen,
976 status_t *res);
977
978
979
989extern val_value_t *
991 const val_idref_t *leafval,
992 status_t *res);
993
994
1008extern val_value_t *
1010 typ_def_t *typdef,
1011 ncx_identity_t *ident,
1012 status_t *res);
1013
1014
1034extern status_t
1036
1037
1058extern status_t
1060
1061
1097extern status_t
1099 const xmlChar *fhs_logfile);
1100
1101
1121extern status_t
1122 val_set_path_parms (val_value_t *parentval);
1123
1124
1135extern status_t
1136 val_set_subdirs_parm (val_value_t *parentval);
1137
1138
1159extern status_t
1161
1162
1171extern status_t
1173
1174
1184extern status_t
1186 val_value_t *parentval);
1187
1188
1197extern status_t
1199
1200
1212extern status_t
1213 val_set_home_parms (val_value_t *parentval);
1214
1215
1224extern status_t
1226
1227
1237extern status_t
1238 val_set_errmsg_parm (val_value_t *parentval);
1239
1240
1254extern status_t
1256 ses_id_t sesid,
1257 ses_id_t *lockowner);
1258
1259
1271extern status_t
1273 plock_cb_t *plcb);
1274
1275
1282extern void
1284 plock_cb_t *plcb);
1285
1286
1304extern status_t
1306 op_editop_t editop,
1307 ses_id_t sesid,
1308 boolean checkup,
1309 uint32 *lockid);
1310
1311
1322extern void
1324 val_value_t *newval);
1325
1326
1333extern void
1335
1336
1343extern void
1345 const val_value_t *val);
1346
1347
1354extern void
1356 const val_value_t *val);
1357
1358
1383extern val_value_t *
1384 val_get_value (ses_cb_t *scb,
1385 xml_msg_hdr_t *msg,
1386 val_value_t *val,
1387 val_nodetest_fn_t testfn,
1388 boolean acmcheck,
1389 boolean *malloced,
1390 status_t *res);
1391
1392
1420extern val_value_t *
1422 xml_msg_hdr_t *msg,
1423 val_value_t *val,
1424 val_nodetest_fn_t testfn,
1425 boolean acmcheck,
1426 boolean *malloced,
1427 status_t *res,
1428 void *get2cb); // getcb_get2_t *
1429
1430
1444extern void
1446 void *cookie1,
1447 void *cookie2,
1448 val_walker_fn_t walkerfn);
1449
1450
1462extern status_t
1464
1465
1475extern status_t
1477 void *rule);
1478
1479
1488extern void
1490 const void *rule);
1491
1492
1500extern boolean
1501 val_match_datarule (const val_value_t *val,
1502 void *rule);
1503
1504
1516extern val_value_t *
1518 val_value_t *firstmatch,
1519 dlq_hdr_t *keyvalQ,
1520 status_t *res);
1521
1522
1541extern status_t
1543 val_value_t *curval);
1544
1545
1553extern status_t
1555 op_editop_t op);
1556
1557
1563extern val_value_t *
1564 val_make_config_root (void);
1565
1566
1584extern status_t
1586 xmlChar **retstr);
1587
1588
1602extern void
1604 xmlns_id_t fixup_id);
1605
1606
1618extern status_t
1620 dlq_hdr_t *keyptrQ);
1621
1622
1633extern status_t
1635 dlq_hdr_t *keyQ);
1636
1637
1646extern status_t
1648 obj_template_t *obj);
1649
1650
1658extern status_t
1660
1661
1669extern boolean
1671
1672
1680extern status_t
1682 ncx_btype_t btype);
1683
1684
1708extern status_t
1710 val_value_t *real_val,
1711 val_value_t **error_val);
1712
1713
1725extern val_value_t *
1726 val_make_internal_value (const xmlChar *name,
1727 const xmlChar *value);
1728
1729
1737extern val_value_t *
1739 xmlChar *fname);
1740
1741
1748extern boolean
1749 val_simple_anyxml (const val_value_t *val);
1750
1751
1761extern status_t
1762 val_apply_template (val_value_t *template_val,
1763 val_value_t *target_val);
1764
1765
1778extern status_t
1780 val_value_t *destval);
1781
1782
1796extern void
1798
1799
1807extern void
1808 val_merge_return_vals (dlq_hdr_t *srcQ,
1809 dlq_hdr_t *dstQ);
1810
1811
1820extern status_t
1822
1823
1836extern status_t
1838
1839
1846extern boolean
1847 val_type_is_any (const val_value_t *val);
1848
1849
1856extern ncx_nmda_origin_t
1857 val_get_origin (const val_value_t *val);
1858
1859
1860
1867extern void
1869 ncx_nmda_origin_t origin);
1870
1871
1878extern obj_template_t *
1880
1881
1888extern void
1890 obj_template_t *obj);
1891
1892
1904extern void
1906 boolean *iskey,
1907 boolean *isconfig,
1908 boolean *isunknown);
1909
1910
1917extern xmlns_id_t
1918 val_get_idref_nsid (const val_value_t *val);
1919
1920
1927extern void
1928 val_dump_cli_valset (const char *progname,
1929 val_value_t *valset);
1930
1931
1932
1949extern status_t
1951 dlq_hdr_t *keyQ,
1952 val_value_t **topval,
1953 val_value_t **targetval);
1954
1955
1966extern val_value_t *
1968 const xmlChar *modname,
1969 const xmlChar *name);
1970
1971
1981extern val_value_t *
1983 int32 enumval,
1984 status_t *res);
1985
1986
1987
1999extern val_value_t *
2001 typ_def_t *typdef,
2002 ncx_btype_t btyp,
2003 const ncx_num_t *num,
2004 status_t *res);
2005
2006
2007
2025extern val_value_t *
2027 typ_def_t *typdef,
2028 const xmlChar *buff,
2029 uint32 bufflen,
2030 status_t *res);
2031
2048extern status_t
2050
2051
2062extern val_value_t *
2063 val_find_notif (val_value_t *topval);
2064
2073extern void
2075
2076
2093extern status_t
2095
2096
2100#ifdef __cplusplus
2101} /* end extern 'C' */
2102#endif
2103
2104#endif /* _H_val_util */
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
boolean(* val_walker_fn_t)(val_value_t *val, void *cookie1, void *cookie2)
child or descendant node search walker function
Definition: val.h:1141
void val_clear_partial_lock(val_value_t *val, plock_cb_t *plcb)
Clear the partial lock throughout the value tree.
Definition: val_util.c:6211
status_t val_remove_false_when_error(const xmlChar *name, val_value_t *val, obj_template_t *obj, boolean is_error, boolean real_delete, boolean *deleteme)
Remove false when-stmt nodes with error.
Definition: val_util.c:4645
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:4701
val_value_t * val_make_binary_obj(obj_template_t *obj, const xmlChar *binstr, uint32 binstrlen, status_t *res)
Malloc and set a val_value_t as a NCX_BT_BINARY type.
Definition: val_util.c:4889
void val_purge_errors_from_root(val_value_t *val)
Remove any error nodes under a root container that were saved for error recording purposes.
Definition: val_util.c:3682
status_t val_cache_datarule(val_value_t *val, void *rule)
Set the data-rule back-ptr for this node.
Definition: val_util.c:6888
status_t val_set_errmsg_parm(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the errmsg parameter.
Definition: val_util.c:6014
void val_merge_return_vals(dlq_hdr_t *srcQ, dlq_hdr_t *dstQ)
Merge return values into a dest Q Remove duplicates.
Definition: val_util.c:8221
val_value_t * val_get_choice_first_set_ex(val_value_t *val, const obj_template_t *obj, boolean nondef)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3436
val_value_t * val_make_from_bitstring(obj_template_t *obj, typ_def_t *typdef, const xmlChar *buff, uint32 bufflen, status_t *res)
Make a val_value_t with the bits set in the octet string.
Definition: val_util.c:8935
status_t val_check_obj_when(val_value_t *val, val_value_t *valroot, val_value_t *objval, obj_template_t *obj, boolean *condresult, uint32 *whencount)
checks when-stmt only
Definition: val_util.c:4217
void val_set_origin(val_value_t *val, ncx_nmda_origin_t origin)
Set the NMDA value origin.
Definition: val_util.c:8414
status_t val_make_subtree(obj_template_t *obj, dlq_hdr_t *keyQ, val_value_t **topval, val_value_t **targetval)
Create a hierarchy from root to the target object.
Definition: val_util.c:8628
status_t val_remove_false_when(val_value_t *val, boolean *deleteme)
Remove false when-stmt nodes.
Definition: val_util.c:4615
status_t val_set_path_parms(val_value_t *parentval)
Set the main search paths for files.
Definition: val_util.c:5548
status_t val_add_fixed_value_attr(val_value_t *val)
Add the ywx:fixed-value attribute to a key value node Set it to true since false is the default.
Definition: val_util.c:7618
val_value_t * val_get_value(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, val_nodetest_fn_t testfn, boolean acmcheck, boolean *malloced, status_t *res)
Get the value for a node after lots of internal processing.
Definition: val_util.c:6611
void val_traverse_keys(val_value_t *val, void *cookie1, void *cookie2, val_walker_fn_t walkerfn)
Check ancestor-or-self nodes until root reached.
Definition: val_util.c:6773
val_value_t * val_make_from_enumval(obj_template_t *obj, int32 enumval, status_t *res)
Create an enumeration leaf from its enum value.
Definition: val_util.c:8726
status_t val_instance_check_ex(val_value_t *root, val_value_t *val, obj_template_t *obj, boolean check_when)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3179
void val_write_intern(ses_cb_t *scb, const val_value_t *val)
Write an internal buffer to the session.
Definition: val_util.c:6575
void val_set_children_load(val_value_t *val)
Flag the CLI parameters coming from the command line.
Definition: val_util.c:8188
status_t val_gen_index_comp(const obj_key_t *in, val_value_t *val)
Create an index component.
Definition: val_util.c:2800
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:2943
status_t val_set_with_ocpattern_parm(val_value_t *parentval)
Handle the –with-ocpattern parameter.
Definition: val_util.c:5975
boolean(* val_nodetest_fn_t)(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
user function callback template to test output of a specified node.
Definition: val_util.h:132
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:4797
void val_force_dataclass_config(val_value_t *val)
Set the dataclass field to NCX_DC_CONFIG in the 'val' data tree
Definition: val_util.c:9073
val_value_t * val_find_notif(val_value_t *topval)
Check the 'topval' node for a nested notification node.
Definition: val_util.c:9039
status_t(* val_getbulk_cbfn_t)(obj_template_t *obj, uint32 start_idx, uint32 max_count, uint32 max_depth, val_nodetest_fn_t node_test_fn, val_getbulk_return_t *getbulk_return)
user function callback template to bulk get operational values of a specified node.
Definition: val_util.h:188
status_t val_write_ok(val_value_t *val, op_editop_t editop, ses_id_t sesid, boolean checkup, uint32 *lockid)
Check if there are any partial-locks owned by another session in the node that is going to be written...
Definition: val_util.c:6277
status_t val_set_partial_lock(val_value_t *val, plock_cb_t *plcb)
Set the partial lock throughout the value tree.
Definition: val_util.c:6150
status_t val_set_home_parms(val_value_t *parentval)
Handle the home and yumapro-home parameters.
Definition: val_util.c:5929
status_t val_gen_split_instance_id(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, xmlns_id_t leaf_nsid, const xmlChar *leaf_name, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node, Add the last node from the parameters...
Definition: val_util.c:3942
status_t val_validate_value(val_value_t *useval)
Verify that the value is valid and can be safely used later Used in the SIL code to ensure that the c...
Definition: val_util.c:8318
status_t val_add_one_operation_attr(val_value_t *val, op_editop_t op)
Add the nc:operation attribute to a value node.
Definition: val_util.c:7161
boolean val_match_datarule(const val_value_t *val, void *rule)
Check if the data-rule back-ptr applies to this node.
Definition: val_util.c:6955
status_t val_check_deprecated_warning(val_value_t *val)
Check if any values in the val_value_t are deprecated YANG nodes.
Definition: val_util.c:9105
void val_set_canonical_order(val_value_t *val)
Set canonical order No longer used.
Definition: val_util.c:2777
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:4049
status_t val_add_btype_attr(val_value_t *val, ncx_btype_t btype)
Add the ye:btype attribute to a <key> node for a SIL-SA edit.
Definition: val_util.c:7705
status_t val_set_warning_parms(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the common warning control par...
Definition: val_util.c:5092
status_t val_set_logging_parms_ex(val_value_t *parentval, const xmlChar *fhs_logfile)
Check the parent value struct (expected to be a container or list) for the full set of logging contro...
Definition: val_util.c:5232
boolean val_choice_is_set(val_value_t *val, obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3602
status_t val_gen_instance_id(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3767
val_value_t * val_new_child_val(xmlns_id_t nsid, const xmlChar *name, boolean copyname, val_value_t *parent, op_editop_t editop, obj_template_t *obj)
Internal function used by server to create a new child value.
Definition: val_util.c:3709
void val_check_swap_resnode(val_value_t *curval, val_value_t *newval)
Maintain partial locks; Used by server only.
Definition: val_util.c:6391
status_t val_set_tcp_connect_parms(val_value_t *parentval)
Set TCP Connect parameters.
Definition: val_util.c:9004
status_t val_set_logging_parms(val_value_t *parentval)
Check the parent value struct (expected to be a container or list) for the common logging control par...
Definition: val_util.c:5190
status_t val_set_message_indent_parm(val_value_t *parentval)
Handle the message-indent parameter.
Definition: val_util.c:5891
void val_fixup_config_subtree(val_value_t *val, xmlns_id_t fixup_id)
Look for a config subtree (obj_is_root) and make sure all the value nodes in the subtree have proper ...
Definition: val_util.c:7384
status_t val_move_config_false(val_value_t *newval, val_value_t *curval)
Move the config false data nodes.
Definition: val_util.c:7114
val_value_t * val_make_from_num(obj_template_t *obj, typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num, status_t *res)
Create a numeric leaf from a ncx_num_t struct.
Definition: val_util.c:8782
val_value_t * val_get_choice_first_set_full(val_value_t *val, const obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3502
status_t val_gen_instance_id_ex(xml_msg_hdr_t *mhdr, const val_value_t *val, ncx_instfmt_t format, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3805
void val_dump_cli_valset(const char *progname, val_value_t *valset)
dump the parameter set with and without defaults
Definition: val_util.c:8561
status_t val_convert_anyxml_to_real(val_value_t *anyxml_val, val_value_t *real_val, val_value_t **error_val)
Convert anydata nodes to match a real template.
Definition: val_util.c:7765
void val_check_delete_resnode(val_value_t *curval)
Check if the curnode has any partial locks and if so, remove them from the final result.
Definition: val_util.c:6444
status_t val_set_subdirs_parm(val_value_t *parentval)
set the subdirs parameter
Definition: val_util.c:5605
status_t val_gen_instance_id_ex2(xml_msg_hdr_t *mhdr, const val_value_t *val, const val_value_t *stopval, ncx_instfmt_t format, boolean stop_at_root, xmlChar **buff)
Malloc and Generate the instance ID string for this value node,.
Definition: val_util.c:3846
status_t val_gen_keyclones(val_value_t *val, dlq_hdr_t *keyQ)
Get all the keys for the specified data node object.
Definition: val_util.c:7495
status_t val_ok_to_partial_lock(val_value_t *val, ses_id_t sesid, ses_id_t *lockowner)
Check if the specified root val could be locked right now by the specified session.
Definition: val_util.c:6070
status_t val_set_feature_parms(val_value_t *parentval)
Handle the YANG feature parameter set.
Definition: val_util.c:5649
val_value_t * val_get_choice_next_set(const obj_template_t *obj, val_value_t *curchild)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3562
void val_clear_datarule(val_value_t *val, const void *rule)
Clear the datarule back-ptr for this node.
Definition: val_util.c:6925
status_t val_add_defaults_ex(val_value_t *val, boolean scriptmode, runstack_context_t *rcxt, time_t last_modified, ncx_etag_t etag)
add defaults to an initialized complex value (extended)
Definition: val_util.c:3049
val_value_t * val_make_external_value(obj_template_t *obj, xmlChar *fname)
Make an external value node.
Definition: val_util.c:7831
status_t val_expand_var_expr(val_value_t *val, xmlChar **retstr)
Expand the variable expression if found.
Definition: val_util.c:7263
status_t val_set_simval_obj(val_value_t *val, obj_template_t *obj, const xmlChar *valstr)
Set an initialized val_value_t as a simple type.
Definition: val_util.c:4855
void val_set_anyxml_tracking(val_value_t *val, obj_template_t *obj)
Set the anyxml tracking data for this node.
Definition: val_util.c:8464
val_value_t * val_get_value_ex(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, val_nodetest_fn_t testfn, boolean acmcheck, boolean *malloced, status_t *res, void *get2cb)
Get the value for a node after lots of internal processing (extended)
Definition: val_util.c:6658
status_t val_build_index_chains(val_value_t *val)
Build index chains for a value if needed.
Definition: val_util.c:6835
status_t val_add_npcons(val_value_t *val)
Check/Add empty NP containers.
Definition: val_util.c:3117
status_t val_set_binary_display_maxlen_parm(val_value_t *parentval)
Handle the –binary-display-maxlen parameter.
Definition: val_util.c:8277
status_t val_gen_keyptrs(val_value_t *val, dlq_hdr_t *keyptrQ)
Get all the keys for the specified data node object.
Definition: val_util.c:7435
val_value_t * val_find_list_from_keyvalQ(val_value_t *parentval, val_value_t *firstmatch, dlq_hdr_t *keyvalQ, status_t *res)
Find the list entry identified by the Q of yangapi_keyval_t strings.
Definition: val_util.c:7011
val_value_t * val_find_descendant(val_value_t *val, const xmlChar *modname, const xmlChar *name)
Find the fist available descendant matching the name also check seld.
Definition: val_util.c:8681
void val_get_anyxml_tracking(const val_value_t *val, boolean *iskey, boolean *isconfig, boolean *isunknown)
Set the anyxml tracking data for this node.
Definition: val_util.c:8502
val_value_t * val_make_idref_obj(obj_template_t *obj, const val_idref_t *leafval, status_t *res)
make a val_value_t for a specified leaf or leaf-list identityref
Definition: val_util.c:4938
void val_write_extern(ses_cb_t *scb, const val_value_t *val)
Write an external file to the session.
Definition: val_util.c:6479
boolean val_simple_anyxml(const val_value_t *val)
Check if val_value node is a proper simple type ANYXML.
Definition: val_util.c:7865
val_value_t * val_get_choice_first_set(val_value_t *val, const obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3413
ncx_nmda_origin_t val_get_origin(const val_value_t *val)
Get the NMDA origin value for this node.
Definition: val_util.c:8383
xpath_pcb_t * val_get_xpathpcb(val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4673
val_value_t * val_make_config_root(void)
Make a <config> element.
Definition: val_util.c:7219
status_t val_add_datapath_attr(val_value_t *val, obj_template_t *obj)
Add the ye:datapath attribute to a node that is tagged as an ywx:datapath node.
Definition: val_util.c:7544
status_t val_add_node_defaults(obj_template_t *chobj, val_value_t *val, boolean scriptmode, time_t last_modified, ncx_etag_t etag)
Check/Add defaults for the specified node and descendant nodes.
Definition: val_util.c:3081
status_t val_apply_template(val_value_t *template_val, val_value_t *target_val)
Apply the specified template to the val_value_t node.
Definition: val_util.c:7892
status_t val_convert_children(val_value_t *srcval, val_value_t *destval)
Convert children nodes to the template node.
Definition: val_util.c:8090
xmlns_id_t val_get_idref_nsid(const val_value_t *val)
get the true namespace ID for the identityref value
Definition: val_util.c:8531
obj_template_t * val_get_casobj(val_value_t *val)
Get the case object for the value node.
Definition: val_util.c:8436
status_t val_set_ses_protocols_parm(ses_cb_t *scb, val_value_t *parentval)
Handle the -protocols parameter for a session.
Definition: val_util.c:5824
status_t val_add_defaults(val_value_t *val, boolean scriptmode)
Add defaults to an initialized complex value.
Definition: val_util.c:3003
status_t val_set_protocols_parm(val_value_t *parentval)
Handle the –protocols parameter.
Definition: val_util.c:5749
status_t val_set_xpathpcb(val_value_t *val, xpath_pcb_t *xpathpcb)
Set the xpathpcb field with passed field;.
Definition: val_util.c:4733
status_t val_instance_check_max(val_value_t *root, val_value_t *val, obj_template_t *obj, boolean check_when, boolean check_deep, ses_cb_t *scb, xml_msg_hdr_t *msg)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3213
val_value_t * val_make_identity_obj(obj_template_t *obj, typ_def_t *typdef, ncx_identity_t *ident, status_t *res)
make a val_value_t for a specified leaf or leaf-list from an identity
Definition: val_util.c:5005
status_t val_instance_check(val_value_t *root, val_value_t *val, obj_template_t *obj)
Check for the proper number of object instances for the specified value struct.
Definition: val_util.c:3149
boolean val_is_fixed_value(val_value_t *val)
Check if the specified value has a fixed-value=true attribute set in it.
Definition: val_util.c:7672
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:8356
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:4762
val_value_t * val_make_internal_value(const xmlChar *name, const xmlChar *value)
Create an NCX_BT_INTERNAL value that contains the raw XML for the value node.
Definition: val_util.c:7796
status_t val_check_obj_when_ex(val_value_t *val, val_value_t *valroot, val_value_t *objval, obj_template_t *obj, xml_msg_hdr_t *mhdr, boolean configonly, boolean get_when, ses_cb_t *pcb_session, struct xpath_get2_cb_t_ *parent_cb, boolean *condresult, uint32 *whencount)
checks when-stmt only (extended)
status_t val_gen_key_entry(val_value_t *keyval)
Create a key record within an index comp.
Definition: val_util.c:2871
status_t
global error return code
Definition: status_enum.h:210
uint32 ses_id_t
Session ID.
Definition: ses.h:335
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
#define NCX_MAX_GETBULK_COUNT
size of the val_getbulk_array_t in val_util.h
Definition: ncxconst.h:186
uint32 ncx_etag_t
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t.
Definition: ncxtypes.h:771
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:213
ncx_nmda_origin_t
internal enumerations for standard NMDA origins
Definition: ncxtypes.h:1642
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1278
ncx_instfmt_t
instance identifier string format types
Definition: ncxtypes.h:561
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
NETCONF protocol operations.
RFC 57517 partial lock support.
CLI run stack manager.
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
YANG identity entry.
Definition: ncxtypes.h:1104
One YANG list key component.
Definition: obj.h:810
One YANG data-def-stmt.
Definition: obj.h:1229
struct representing 1 configuration database
Definition: plock_cb.h:81
Main runstact context control block used by yangcli to process script input loops and conditional sta...
Definition: runstack.h:256
Session Control Block.
Definition: ses.h:573
Discriminated union for all data typedefs.
Definition: typ.h:458
return value for a getbulk callback function
Definition: val_util.h:154
uint32 retcount
actual return count
Definition: val_util.h:159
boolean retdone
flag to indicate return is complete
Definition: val_util.h:162
one QName for the NCX_BT_IDREF value
Definition: val.h:795
one value to match one type
Definition: val.h:912
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:404
XPath parser control block.
Definition: xpath.h:754
union of all the basic number types if float not supported, then it is stored as an int64
Definition: ncxtypes.h:784
Value Node Basic Support.
XML and JSON Message send and receive support.
XML namespace support.
Schema and data model Xpath search support.