yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
xpath.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_xpath
13#define _H_xpath
14
15/* FILE: xpath.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----------------------------------------------------------------------
3530-dec-07 abb Begun
3606-jul-11 abb add wildcard match support
3711-dec-16 abb add GET2 retrieval support
38*/
39
40#include <xmlstring.h>
41#include <xmlreader.h>
42#include <xmlregexp.h>
43
44#ifndef _H_dlq
45#include "dlq.h"
46#endif
47
48#ifndef _H_ncxtypes
49#include "ncxtypes.h"
50#endif
51
52#ifndef _H_status
53#include "status.h"
54#endif
55
56#ifndef _H_obj
57#include "obj.h"
58#endif
59
60#ifndef _H_tk
61#include "tk.h"
62#endif
63
64#ifndef _H_val
65#include "val.h"
66#endif
67
68#ifndef _H_var
69#include "var.h"
70#endif
71
72#ifndef _H_yang
73#include "yang.h"
74#endif
75
76#ifdef __cplusplus
77extern "C" {
78#endif
79
80/********************************************************************
81* *
82* C O N S T A N T S *
83* *
84*********************************************************************/
85
86/* max size of the pcb->result_cacheQ */
87#define XPATH_RESULT_CACHE_MAX 16
88
89/* max size of the pcb->resnode_cacheQ */
90#define XPATH_RESNODE_CACHE_MAX 64
91
92
93/* XPath 1.0 sec 2.2 AxisName */
94#define XP_AXIS_ANCESTOR (const xmlChar *)"ancestor"
95#define XP_AXIS_ANCESTOR_OR_SELF (const xmlChar *)"ancestor-or-self"
96#define XP_AXIS_ATTRIBUTE (const xmlChar *)"attribute"
97#define XP_AXIS_CHILD (const xmlChar *)"child"
98#define XP_AXIS_DESCENDANT (const xmlChar *)"descendant"
99#define XP_AXIS_DESCENDANT_OR_SELF (const xmlChar *)"descendant-or-self"
100#define XP_AXIS_FOLLOWING (const xmlChar *)"following"
101#define XP_AXIS_FOLLOWING_SIBLING (const xmlChar *)"following-sibling"
102#define XP_AXIS_NAMESPACE (const xmlChar *)"namespace"
103#define XP_AXIS_PARENT (const xmlChar *)"parent"
104#define XP_AXIS_PRECEDING (const xmlChar *)"preceding"
105#define XP_AXIS_PRECEDING_SIBLING (const xmlChar *)"preceding-sibling"
106#define XP_AXIS_SELF (const xmlChar *)"self"
107
108/* Xpath 1.0 Function library + current() from XPath 2.0 */
109#define XP_FN_BOOLEAN (const xmlChar *)"boolean"
110#define XP_FN_CEILING (const xmlChar *)"ceiling"
111#define XP_FN_CONCAT (const xmlChar *)"concat"
112#define XP_FN_CONTAINS (const xmlChar *)"contains"
113#define XP_FN_COUNT (const xmlChar *)"count"
114#define XP_FN_CURRENT (const xmlChar *)"current"
115#define XP_FN_FALSE (const xmlChar *)"false"
116#define XP_FN_FLOOR (const xmlChar *)"floor"
117#define XP_FN_ID (const xmlChar *)"id"
118#define XP_FN_LANG (const xmlChar *)"lang"
119#define XP_FN_LAST (const xmlChar *)"last"
120#define XP_FN_LOCAL_NAME (const xmlChar *)"local-name"
121#define XP_FN_NAME (const xmlChar *)"name"
122#define XP_FN_NAMESPACE_URI (const xmlChar *)"namespace-uri"
123#define XP_FN_NORMALIZE_SPACE (const xmlChar *)"normalize-space"
124#define XP_FN_NOT (const xmlChar *)"not"
125#define XP_FN_NUMBER (const xmlChar *)"number"
126#define XP_FN_POSITION (const xmlChar *)"position"
127#define XP_FN_ROUND (const xmlChar *)"round"
128#define XP_FN_STARTS_WITH (const xmlChar *)"starts-with"
129#define XP_FN_STRING (const xmlChar *)"string"
130#define XP_FN_STRING_LENGTH (const xmlChar *)"string-length"
131#define XP_FN_SUBSTRING (const xmlChar *)"substring"
132#define XP_FN_SUBSTRING_AFTER (const xmlChar *)"substring-after"
133#define XP_FN_SUBSTRING_BEFORE (const xmlChar *)"substring-before"
134#define XP_FN_SUM (const xmlChar *)"sum"
135#define XP_FN_TRANSLATE (const xmlChar *)"translate"
136#define XP_FN_TRUE (const xmlChar *)"true"
137
138
139/* yuma function extensions */
140#define XP_FN_MODULE_LOADED (const xmlChar *)"module-loaded"
141#define XP_FN_FEATURE_ENABLED (const xmlChar *)"feature-enabled"
142
143/* XPath functions added to YANG 1.1 */
144#define XP_FN_REMATCH (const xmlChar *)"re-match"
145#define XP_FN_DEREF (const xmlChar *)"deref"
146#define XP_FN_DERIVED_FROM (const xmlChar *)"derived-from"
147#define XP_FN_DERIVED_FROM_OR_SELF (const xmlChar *)"derived-from-or-self"
148#define XP_FN_ENUM_VALUE (const xmlChar *)"enum-value"
149#define XP_FN_BIT_IS_SET (const xmlChar *)"bit-is-set"
150
151/* XPath NodeType values */
152#define XP_NT_COMMENT (const xmlChar *)"comment"
153#define XP_NT_TEXT (const xmlChar *)"text"
154#define XP_NT_PROCESSING_INSTRUCTION \
155 (const xmlChar *)"processing-instruction"
156#define XP_NT_NODE (const xmlChar *)"node"
157
158/* XPath 1.0 operator names */
159#define XP_OP_AND (const xmlChar *)"and"
160#define XP_OP_OR (const xmlChar *)"or"
161#define XP_OP_DIV (const xmlChar *)"div"
162#define XP_OP_MOD (const xmlChar *)"mod"
163
164
165/* Header only */
166
185#define XP_URL_ESC_WILDCARD '-'
186
187/********* PCB flags field **********/
188
201#define XP_FL_DYNNODE bit0
202
203
207#define XP_FL_SKIP_MODE bit1
208
209
213#define XP_FL_LOAD_IMPORT bit2
214
215
217#define XP_FL_ABSPATH bit3
218
219
223#define XP_FL_CONFIGONLY bit4
224
229#define XP_FL_USEROOT bit5
230
234#define XP_FL_INSTANCEID bit6
235
236
240#define XP_FL_SCHEMA_INSTANCEID bit7
241
249#define XP_FL_TOP_RPC_INPUT bit8
250
258#define XP_FL_ACTION_INPUT bit9
259
264#define XP_FL_NACM_GET2 bit10
265
270#define XP_FL_KEEP_RESULT bit11
271
272
274#define XP_FL_FOUND_PRED bit12
275
279#define XP_FL_GET_WHEN bit13
280
285#define XP_FL_FROM_DBLSLASH bit14
286
291#define XP_FL_EMPTY_GET bit15
292
293
294
295
296
297/***** backptr_flags definitions *****/
298
300#define XP_FL_BACKPTR_CDIRTY bit0
301
303#define XP_FL_BACKPTR_RDIRTY bit1
304
306#define XP_FL_BACKPTR_SDIRTY bit2
307
308
309/********************************************************************
310* *
311* M A C R O S *
312* *
313*********************************************************************/
314
316#define XPATH_GET_TYPE(P) (P)->xpath_type
317
319#define XPATH_GET_RESTYPE(R) (R)->restype
320
322#define XPATH_NACM_GET2(P) ((P)->flags & XP_FL_NACM_GET2)
323
325#define XPATH_NONCONFIG_WARN(P) (P)->nonconfig_warn_obj
326
328#define XPATH_VAL_CXT(P) ((P)->val || (P)->val_get2)
329
331#define XPATH_ANY_CXT(P) ((P)->val || (P)->val_get2 || (P)->obj)
332
334#define XPATH_SCB(P) (P)->scb
335
337#define XPATH_GET2CB_OBJ(N) (N)->cb->obj
338
340#define XPATH_MHDR(P) (P)->mhdr
341
343#define XPATH_EXPRSTR(P) (P)->exprstr
344
346#define XPATH_SET_DISABLED_OBJ_OK(P) (P)->disabled_obj_ok = TRUE
347
349#define XPATH_CLR_DISABLED_OBJ_OK(P) (P)->disabled_obj_ok = FALSE
350
352#define XPATH_DISABLED_OBJ_OK(P) (P)->disabled_obj_ok
353
355#define XPATH_ROOTCB(P) (P)->rootcb
356
358#define XPATH_SET_FROM_DBLSLASH(P) (P)->flags |= XP_FL_FROM_DBLSLASH
359
361#define XPATH_IS_FROM_DBLSLASH(P) ((P)->flags & XP_FL_FROM_DBLSLASH)
362
364#define XPATH_SET_EMPTY_GET(P) (P)->flags |= XP_FL_EMPTY_GET
365
367#define XPATH_IS_EMPTY_GET(P) ((P)->flags & XP_FL_EMPTY_GET)
368
369
370
371/********************************************************************
372* *
373* T Y P E S *
374* *
375*********************************************************************/
376
378typedef enum xpath_restype_t_ {
385
387typedef enum xpath_curmode_t_ {
393
394
398typedef enum xpath_document_t_ {
405
406
410typedef enum xpath_source_t_ {
418
419
421typedef enum xpath_exop_t_ {
441
442
446typedef enum xpath_nodetype_t_ {
453
454
458typedef enum xpath_rntype_t_ {
465
466
470typedef enum xpath_get2_state_t_ {
478
479
483typedef enum xpath_get2_form_t_ {
489
490
507typedef ncx_var_t *
508 (*xpath_getvar_fn_t) (struct xpath_pcb_t_ *pcb,
509 const xmlChar *varname,
510 status_t *res);
511
512
513
514
548typedef status_t
549 (*xpath_bool_eval_fn_t) (struct xpath_pcb_t_ *pcb,
550 val_value_t *context,
551 val_value_t *docroot,
552 boolean *result);
553
554
560typedef struct xpath_get2_cb_t_ {
561 dlq_hdr_t qhdr;
565
568
573
578
580 struct xpath_get2_cb_t_ *parent_cb;
581
585 struct getcb_get2_t_ *get2cb;
586
597 dlq_hdr_t return_keyQ;
598 dlq_hdr_t return_termQ;
600 dlq_hdr_t lookupQ;
603
604
608typedef struct xpath_get2_node_t_ {
615
621
654
656
657
664typedef struct xpath_resnode_t_ {
666 dlq_hdr_t qhdr;
667
671 boolean dblslash;
672
676 boolean aioval;
677
680
690 union node_ {
695 } node;
697
698
703typedef struct xpath_result_t_ {
705 dlq_hdr_t qhdr;
706
709
710 /* flag to identify node types in the nodeQ if XP_RT_NODESET */
711 boolean isval;
712
714 union r_ {
715 /* result node Q of xpath_resnode_t */
716 dlq_hdr_t nodeQ;
717
719 boolean boo;
720
723
725 xmlChar *str;
726 } r;
727
729
730
734typedef struct xpath_pred_ent_t_ {
735 dlq_hdr_t qhdr;
737 const xmlChar *keyval;
739
740
752typedef struct xpath_pcb_t_ {
754 dlq_hdr_t qhdr;
755
761
762 /* XPath expression to evaluate provided by the caller.
763 * This is a mandatory parameter.
764 */
765 xmlChar *exprstr;
766
767 /* XmlTextReader is needed when the evaluation is inside
768 * an XML instance document (rpc request)
769 */
770 xmlTextReaderPtr reader;
771
783
789
795 boolean logerrors;
796
804
807
813
816
819
822
827
833
836
844
847
850
853
856
865 struct xpath_get2_node_t_ *val_get2;
866
868 uint32 flags;
869
872
879 /* Need to save original context for current() fn */
880 xpath_resnode_t orig_context;
881
884
889
891 void *cookie;
892
897 dlq_hdr_t varbindQ;
898
903 const struct xpath_fncb_t_ *functions;
904
919 dlq_hdr_t result_cacheQ;
920
925 dlq_hdr_t resnode_cacheQ;
926
929
932
937
940
943
946
949
955
958
961
964
966 boolean seen;
967
972 void *yang_pcb;
973
979 dlq_hdr_t get2_cbQ; /* Q of xpath_get2_cb_t */
980
987
992
994 struct getcb_get2_t_ *get2cb;
995
997 dlq_hdr_t pred_entQ;
998
1003
1011 dlq_hdr_t get2_aio_cbQ;
1020
1021
1022 /* YPW-2079: backptr for current ROOTCB; used in leafref processing */
1023 ncx_sm_rootcb_t *rootcb;
1024
1025} xpath_pcb_t;
1026
1027
1043 (*xpath_fn_t) (xpath_pcb_t *pcb,
1044 dlq_hdr_t *parmQ,
1045 status_t *res);
1046
1047
1053typedef struct xpath_fncb_t_ {
1055 const xmlChar *name;
1056
1059
1061 int32 parmcnt;
1062
1065} xpath_fncb_t;
1066
1067
1069typedef struct xpath_walkerparms_t_ {
1071 dlq_hdr_t *resnodeQ;
1072
1076
1077
1079typedef struct xpath_compwalkerparms_t_ {
1082
1084 xmlChar *cmpstring;
1085
1088
1090 xmlChar *buffer;
1091
1093 uint32 buffsize;
1094
1097
1099 boolean cmpresult;
1100
1104
1105
1107typedef struct xpath_stringwalkerparms_t_ {
1109 xmlChar *buffer;
1110
1112 uint32 buffsize;
1113
1115 uint32 buffpos;
1116
1120
1121
1123typedef struct xpath_aio_cb_t_ {
1125 dlq_hdr_t qhdr;
1126
1131
1132
1135
1142 dlq_hdr_t valQ;
1143
1145
1146
1150/********************************************************************
1151* *
1152* F U N C T I O N S *
1153* *
1154*********************************************************************/
1155
1192extern status_t
1194 tk_chain_t *tkc,
1195 ncx_module_t *mod,
1196 obj_template_t *obj,
1197 dlq_hdr_t *datadefQ,
1198 const xmlChar *target,
1199 obj_template_t **targobj,
1200 dlq_hdr_t **targQ);
1201
1202
1236extern status_t
1238 tk_chain_t *tkc,
1239 ncx_module_t *mod,
1240 ncx_module_t *force_mod,
1241 obj_template_t *obj,
1242 dlq_hdr_t *datadefQ,
1243 const xmlChar *target,
1244 obj_template_t **targobj,
1245 dlq_hdr_t **targQ);
1246
1247
1275extern status_t
1277 tk_chain_t *tkc,
1278 ncx_module_t *mod,
1279 obj_template_t *obj,
1280 dlq_hdr_t *datadefQ,
1281 const xmlChar *target,
1282 obj_template_t **targobj,
1283 dlq_hdr_t **targQ,
1284 ncx_error_t *tkerr);
1285
1286
1305extern status_t
1306 xpath_find_schema_target_int (const xmlChar *target,
1307 obj_template_t **targobj);
1308
1309
1338extern status_t
1340 ncx_module_t *mod,
1341 const xmlChar *target,
1342 val_value_t **targval);
1343
1344
1358extern status_t
1359 xpath_find_schema_target_restconf (const xmlChar *target,
1360 obj_template_t **targobj);
1361
1362
1363
1384extern status_t
1385 xpath_find_schema_target_load (const xmlChar *target,
1386 boolean for_mp,
1387 obj_template_t **targobj);
1388
1389
1390
1409extern status_t
1411 obj_template_t **targobj);
1412
1413
1441extern status_t
1443 ncx_module_t *mod,
1444 const xmlChar *target,
1445 val_value_t *root,
1446 boolean logerrors,
1447 boolean configonly,
1448 xpath_pcb_t **retpcb);
1449
1450
1466extern xpath_pcb_t *
1467 xpath_new_pcb (const xmlChar *xpathstr,
1468 xpath_getvar_fn_t getvar_fn);
1469
1470
1487extern xpath_pcb_t *
1488 xpath_new_pcb_ex (const xmlChar *xpathstr,
1489 xpath_getvar_fn_t getvar_fn,
1490 void *cookie);
1491
1492
1505extern xpath_pcb_t *
1506 xpath_clone_pcb (const xpath_pcb_t *srcpcb);
1507
1508
1518extern xpath_pcb_t *
1519 xpath_find_pcb (dlq_hdr_t *pcbQ,
1520 const xmlChar *exprstr);
1521
1522
1528extern void
1530
1531
1542extern xpath_result_t *
1544
1545
1552extern void
1554 xpath_restype_t restype);
1555
1556
1562extern void
1564
1565
1571extern void
1573
1574
1580extern xpath_resnode_t *
1581 xpath_new_resnode (void);
1582
1583
1589extern void
1591
1592
1598extern void
1600
1601
1607extern void
1609
1610
1616extern void
1618
1619
1636extern status_t
1638 const xmlChar *prefix,
1639 ncx_module_t *mod,
1640 ncx_module_t **targmod);
1641
1642
1662extern status_t
1664 const xmlChar *prefix,
1665 ncx_module_t *mod,
1666 ncx_module_t **targmod,
1667 const xmlChar **modname);
1668
1669
1687extern status_t
1688 xpath_get_modinfo_from_prefix (const xmlChar *prefix,
1689 ncx_module_t *mod,
1690 const xmlChar **modname,
1691 const xmlChar **modrev);
1692
1693
1712extern status_t
1714 const xmlChar *prefix,
1715 uint32 prefixlen,
1716 ncx_module_t *mod,
1717 ncx_module_t **targmod);
1718
1719
1732extern status_t
1734 tk_type_t tktype);
1735
1736
1743extern boolean
1744 xpath_cvt_boolean (const xpath_result_t *result);
1745
1746
1754extern void
1755 xpath_cvt_number (const xpath_result_t *result,
1756 ncx_num_t *num);
1757
1758
1768extern status_t
1770 const xpath_result_t *result,
1771 xmlChar **str);
1772
1773
1780extern dlq_hdr_t *
1782
1783
1790extern xpath_resnode_t *
1792
1793
1800extern xpath_resnode_t *
1802
1803
1810extern val_value_t *
1812
1813
1821extern val_value_t *
1823 val_value_t *valptr);
1824
1825
1832extern obj_template_t *
1834
1835
1842extern obj_template_t *
1844
1845
1852extern val_value_t *
1854
1855
1864extern obj_template_t *
1866
1867
1874extern dlq_hdr_t *
1876
1877
1890extern void
1892 xpath_result_t *destresult);
1893
1894
1895
1903extern boolean
1904 xpath_nodeset_empty (const xpath_result_t *result);
1905
1906
1915extern void
1917 val_value_t *oldval,
1918 val_value_t *newval);
1919
1920
1928extern void
1930 val_value_t *oldval);
1931
1932
1958extern xmlChar *
1959 xpath_convert_url_to_path (const xmlChar *urlpath,
1960 ncx_name_match_t match_names,
1961 boolean alt_naming,
1962 boolean wildcards,
1963 boolean withkeys,
1964 boolean fullkeys,
1965 boolean withmod,
1966 ncx_protocol_t proto,
1967 status_t *res);
1968
1969
1977extern void
1979 ncx_cfg_t cfg_id,
1980 boolean dirty);
1981
1982
1991extern boolean
1993 ncx_cfg_t cfg_id);
1994
1995
2004extern boolean
2006
2007
2013extern void
2015
2016
2026extern status_t
2028 xpath_result_t *target);
2029
2030
2037extern uint32
2039
2040
2046extern void
2048
2049
2055extern void
2057
2058
2070extern xpath_pcb_t *
2072 const xmlChar *expr,
2073 status_t *res);
2074
2075
2084extern void
2086 void *yang_pcb);
2087
2088
2096extern void
2098
2099
2108extern void *
2110
2111
2118extern boolean
2120
2121
2130extern const xmlChar *
2132
2133
2139extern void
2141
2142
2150extern boolean
2152 obj_template_t *obj);
2153
2154
2161extern boolean
2163
2164
2173extern boolean
2175
2176
2184extern xpath_pred_ent_t *
2186 const xmlChar *keyval);
2187
2188
2194extern void xpath_free_pred_ent (xpath_pred_ent_t *ent);
2195
2196
2207extern boolean xpath_expr_ok_for_nolock_get (xpath_pcb_t *pcb);
2208
2209
2219extern xpath_resnode_t *
2221
2222
2231extern boolean
2233
2234
2244extern status_t
2246 xpath_result_t *result);
2247
2248
2255extern xpath_result_t *
2257
2258
2277extern status_t
2278 xpath_make_load_path (const xmlChar *target,
2279 xmlChar **retbuff);
2280
2281
2285#ifdef __cplusplus
2286} /* end extern 'C' */
2287#endif
2288
2289#endif /* _H_xpath */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
void xpath_clear_load_import(xpath_pcb_t *pcb)
Clear the PCB out of load import mode.
Definition: xpath.c:4915
void xpath_nodeset_swap_valptr(xpath_result_t *result, val_value_t *oldval, val_value_t *newval)
Check if the result has the oldval ptr and if so, replace it with the newval ptr.
Definition: xpath.c:4414
val_value_t * xpath_get_resnode_val(xpath_resnode_t *resnode)
Get the resnode value pointer from a resnode, if any.
Definition: xpath.c:4266
void xpath_clear_nodeset_result(xpath_result_t *result)
Clear all the nodes from the node-set result.
Definition: xpath.c:4805
boolean xpath_check_backptrs_dirty(xpath_pcb_t *pcb, ncx_cfg_t cfg_id)
Check the backptrs_dirty flag in the PCB.
Definition: xpath.c:4640
status_t xpath_set_result(xpath_pcb_t *pcb, xpath_result_t *result)
Set the result field to save a result with the PCB.
Definition: xpath.c:5376
void xpath_init_result(xpath_result_t *result, xpath_restype_t restype)
Initialize an XPath result struct.
Definition: xpath.c:3166
uint32 xpath_resnode_count(xpath_result_t *result)
Get the number of resnodes in the node-set.
Definition: xpath.c:4759
xpath_pcb_t * xpath_new_session_pcb(ses_cb_t *scb, const xmlChar *expr, status_t *res)
Get a new XPath parser control block for a session.
Definition: xpath.c:4842
const xmlChar * xpath_get_restype_str(xpath_restype_t restype)
Get the string for the specific result type.
Definition: xpath.c:4997
boolean xpath_cvt_boolean(const xpath_result_t *result)
Convert an XPath result to a boolean answer.
Definition: xpath.c:3742
obj_template_t * xpath_get_resnode_obj(xpath_resnode_t *resnode)
Get the resnode object pointer from a value resnode.
Definition: xpath.c:4203
void xpath_init_resnode(xpath_resnode_t *resnode)
Initialize an XPath result node struct.
Definition: xpath.c:3312
status_t xpath_find_schema_target_int(const xmlChar *target, obj_template_t **targobj)
@
Definition: xpath.c:2547
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:3689
boolean xpath_result_is_get2(xpath_result_t *result)
Check if the result is a node-set for GET2 nodes.
Definition: xpath.c:5346
val_value_t * xpath_next_resnode_valptr(xpath_resnode_t *resnode, val_value_t *valptr)
Get the next node val pointer from a result node struct.
Definition: xpath.c:4150
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:4053
dlq_hdr_t * xpath_get_varbindQ(xpath_pcb_t *pcb)
Get the varbindQ from a parser control block struct.
Definition: xpath.c:4324
status_t xpath_find_schema_target_force_mod(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, ncx_module_t *force_mod, obj_template_t *obj, dlq_hdr_t *datadefQ, const xmlChar *target, obj_template_t **targobj, dlq_hdr_t **targQ)
find target, save in *targobj, force the module
Definition: xpath.c:2411
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:3063
void xpath_move_nodeset(xpath_result_t *srcresult, xpath_result_t *destresult)
Move the nodes from a nodeset reult into the target nodeset result.
Definition: xpath.c:4353
void * xpath_get_load_import(xpath_pcb_t *pcb)
Get the PCB in load import mode.
Definition: xpath.c:4937
boolean xpath_check_manual_clear(xpath_pcb_t *pcb)
Check the backptrs_dirty flag in the PCB is clearly manually only.
Definition: xpath.c:4684
void xpath_set_load_import(xpath_pcb_t *pcb, void *yang_pcb)
Set the PCB in load import mode.
Definition: xpath.c:4893
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:2843
void xpath_discard_resnode(xpath_resnode_t *resnode)
Discard a result node.
Definition: xpath.c:4784
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3205
void xpath_cvt_number(const xpath_result_t *result, ncx_num_t *num)
Convert an XPath result to a number answer.
Definition: xpath.c:3805
status_t xpath_find_schema_target_restconf(const xmlChar *target, obj_template_t **targobj)
Find a schema target for RESTCONF.
Definition: xpath.c:2585
status_t xpath_add_to_result(xpath_result_t *source, xpath_result_t *target)
Move the resnodes from 1 XPath result to another.
Definition: xpath.c:4729
boolean xpath_need_get2_processing(xpath_result_t *result)
Check if the result nodeset contains any XP_RNT_GET2 nodes.
Definition: xpath.c:4963
status_t xpath_find_data_target_pcb(xpath_pcb_t *pcb, obj_template_t **targobj)
Find schema target for a datastore node.
Definition: xpath.c:2668
xpath_resnode_t * xpath_get_next_resnode(xpath_resnode_t *resnode)
Get the next result in the renodeQ from a result struct.
Definition: xpath.c:4081
void xpath_set_manual_clear(xpath_pcb_t *pcb)
Set the manual clear mode flag in the PCB.
Definition: xpath.c:4704
xpath_resnode_t * xpath_get_first_real_resnode(xpath_result_t *result)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:5312
status_t xpath_find_val_unique(val_value_t *startval, ncx_module_t *mod, const xmlChar *target, val_value_t *root, boolean logerrors, boolean configonly, xpath_pcb_t **retpcb)
Find the data node for a unique-stmt target.
Definition: xpath.c:2765
void xpath_free_resnode(xpath_resnode_t *resnode)
Free a malloced XPath result node struct.
Definition: xpath.c:3333
status_t xpath_cvt_string(xpath_pcb_t *pcb, const xpath_result_t *result, xmlChar **str)
Convert an XPath result to a string answer.
Definition: xpath.c:3941
boolean xpath_find_obj_in_result(xpath_result_t *result, obj_template_t *obj)
Find the object pointer in the specified result.
Definition: xpath.c:5050
xpath_pcb_t * xpath_find_pcb(dlq_hdr_t *pcbQ, const xmlChar *exprstr)
Find an XPath PCB.
Definition: xpath.c:3034
void xpath_delete_resnode(xpath_resnode_t *resnode)
Delete and free a malloced XPath result node struct.
Definition: xpath.c:3360
void xpath_free_pred_ent(xpath_pred_ent_t *ent)
Free a malloced XPath predicate entry struct.
Definition: xpath.c:5172
xpath_result_t * xpath_new_result(xpath_restype_t restype)
malloc an XPath result
Definition: xpath.c:3133
status_t xpath_make_load_path(const xmlChar *target, xmlChar **retbuff)
Convert the schema path string to the internal canonical format.
Definition: xpath.c:5431
void xpath_set_backptrs_dirty(xpath_pcb_t *pcb, ncx_cfg_t cfg_id, boolean dirty)
Set the backptrs_dirty flag in the PCB.
Definition: xpath.c:4591
xmlChar * xpath_convert_url_to_path(const xmlChar *urlpath, ncx_name_match_t match_names, boolean alt_naming, boolean wildcards, boolean withkeys, boolean fullkeys, boolean withmod, ncx_protocol_t proto, status_t *res)
Convert a URL format path to XPath format path.
Definition: xpath.c:4524
boolean xpath_expr_ok_for_nolock_get(xpath_pcb_t *pcb)
Check an XPath expression to see if it contains any top-level config=true data nodes or not.
Definition: xpath.c:5196
xpath_resnode_t * xpath_new_resnode(void)
Create and initialize an XPath result node struct.
Definition: xpath.c:3284
status_t xpath_get_curmod_from_prefix_str(xpath_pcb_t *pcb, const xmlChar *prefix, uint32 prefixlen, ncx_module_t *mod, ncx_module_t **targmod)
Get the correct module to use for a given prefix Unended string version.
Definition: xpath.c:3636
xpath_pcb_t * xpath_new_pcb_ex(const xmlChar *xpathstr, xpath_getvar_fn_t getvar_fn, void *cookie)
malloc a new XPath parser control block Extended
Definition: xpath.c:2873
status_t xpath_get_modinfo_from_prefix(const xmlChar *prefix, ncx_module_t *mod, const xmlChar **modname, const xmlChar **modrev)
Get the correct module name/revision to use for a given prefix.
Definition: xpath.c:3556
status_t xpath_find_schema_target_load(const xmlChar *target, boolean for_mp, obj_template_t **targobj)
@
Definition: xpath.c:2623
void xpath_set_keep_result(xpath_pcb_t *pcb)
Set the keep-result flag in the PCB.
Definition: xpath.c:5026
boolean xpath_expr_has_predicates(xpath_pcb_t *pcb)
Check if any predicates parsed in the expression.
Definition: xpath.c:5089
xpath_result_t * xpath_get_result(xpath_pcb_t *pcb)
Get the result from a PCB.
Definition: xpath.c:5397
status_t xpath_find_schema_target_err(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *obj, dlq_hdr_t *datadefQ, const xmlChar *target, obj_template_t **targobj, dlq_hdr_t **targQ, ncx_error_t *tkerr)
find target, save in *targobj, use the errtk if error
Definition: xpath.c:2480
status_t xpath_get_curmod_from_prefix(xpath_pcb_t *pcb, const xmlChar *prefix, ncx_module_t *mod, ncx_module_t **targmod)
Get the correct module to use for a given prefix.
Definition: xpath.c:3415
obj_template_t * xpath_get_cxt_obj(xpath_pcb_t *pcb)
Get the object pointer for the context node.
Definition: xpath.c:4249
void xpath_nodeset_delete_valptr(xpath_result_t *result, val_value_t *oldval)
Check if the result has the oldval ptr and if so, delete it.
Definition: xpath.c:4448
boolean xpath_nodeset_empty(const xpath_result_t *result)
Check if the result is an empty nodeset.
Definition: xpath.c:4385
dlq_hdr_t * xpath_get_resnodeQ(xpath_result_t *result)
Get the renodeQ from a result struct.
Definition: xpath.c:4027
boolean xpath_expr_scan_predicates(xpath_pcb_t *pcb)
Check if any predicates parsed in the expression.
Definition: xpath.c:5112
void xpath_clean_resnode(xpath_resnode_t *resnode)
Clean an XPath result node struct.
Definition: xpath.c:3382
status_t xpath_find_schema_target(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *obj, dlq_hdr_t *datadefQ, const xmlChar *target, obj_template_t **targobj, dlq_hdr_t **targQ)
Find the schema target, save in *targobj.
Definition: xpath.c:2349
xpath_pred_ent_t * xpath_new_pred_ent(obj_template_t *keyobj, const xmlChar *keyval)
Malloc and init an XPath predicate entry struct.
Definition: xpath.c:5148
val_value_t * xpath_first_resnode_valptr(xpath_resnode_t *resnode)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:4104
xpath_pcb_t * xpath_clone_pcb(const xpath_pcb_t *srcpcb)
Clone an XPath PCB.
Definition: xpath.c:2926
status_t xpath_find_val_target(val_value_t *startval, ncx_module_t *mod, const xmlChar *target, val_value_t **targval)
Find the XPath value node target.
Definition: xpath.c:2717
void xpath_clean_result(xpath_result_t *result)
Clean an XPath result struct.
Definition: xpath.c:3233
status_t xpath_get_curmod_from_prefix2(xpath_pcb_t *pcb, const xmlChar *prefix, ncx_module_t *mod, ncx_module_t **targmod, const xmlChar **modname)
Get the correct module to use for a given prefix Return found module name if returning not-found erro...
Definition: xpath.c:3453
obj_template_t * xpath_get_resnode_objptr(xpath_resnode_t *resnode)
Get the result node object pointer (obsolete)
Definition: xpath.c:4301
xpath_source_t
XPath expression source type.
Definition: xpath.h:410
xpath_curmode_t
XPath dynamic parsing mode for leafref.
Definition: xpath.h:387
xpath_restype_t
XPath expression result type.
Definition: xpath.h:378
xpath_rntype_t
XPath resnode union types.
Definition: xpath.h:458
xpath_exop_t
XPath expression operation type.
Definition: xpath.h:421
xpath_nodetype_t
XPath expression node types.
Definition: xpath.h:446
xpath_get2_form_t
GET2 control block forms.
Definition: xpath.h:483
xpath_get2_state_t
GET2 retrieval states.
Definition: xpath.h:470
xpath_document_t
document root type.
Definition: xpath.h:398
ncx_var_t *(* xpath_getvar_fn_t)(struct xpath_pcb_t_ *pcb, const xmlChar *varname, status_t *res)
XPath GET variable callback function.
Definition: xpath.h:508
status_t(* xpath_bool_eval_fn_t)(struct xpath_pcb_t_ *pcb, val_value_t *context, val_value_t *docroot, boolean *result)
XPath Boolean EVAL Replacement Callback.
Definition: xpath.h:549
xpath_result_t *(* xpath_fn_t)(xpath_pcb_t *pcb, dlq_hdr_t *parmQ, status_t *res)
XPath function prototype.
Definition: xpath.h:1043
@ XP_SRC_NONE
not set
Definition: xpath.h:411
@ XP_SRC_SCHEMA_INSTANCEID
schema-instance-identifier
Definition: xpath.h:415
@ XP_SRC_INSTANCEID
instance-identifier
Definition: xpath.h:414
@ XP_SRC_LEAFREF
leafref path
Definition: xpath.h:412
@ XP_SRC_XML
NETCONF select filter.
Definition: xpath.h:416
@ XP_SRC_YANG
YANG must or when.
Definition: xpath.h:413
@ XP_CM_NONE
not set
Definition: xpath.h:388
@ XP_CM_TARGET
target mode (normal)
Definition: xpath.h:389
@ XP_CM_KEYVAR
key variable mode
Definition: xpath.h:391
@ XP_CM_ALT
alternate mode
Definition: xpath.h:390
@ XP_RT_NODESET
node-set result
Definition: xpath.h:380
@ XP_RT_STRING
string result
Definition: xpath.h:382
@ XP_RT_NONE
not set
Definition: xpath.h:379
@ XP_RT_NUMBER
number result
Definition: xpath.h:381
@ XP_RT_BOOLEAN
boolean result
Definition: xpath.h:383
@ XP_RNT_NONE
not set
Definition: xpath.h:459
@ XP_RNT_VAL
valptr
Definition: xpath.h:461
@ XP_RNT_GET2
get2ptr
Definition: xpath.h:463
@ XP_RNT_OBJ
objnode
Definition: xpath.h:460
@ XP_RNT_VALHDR
valhdr
Definition: xpath.h:462
@ XP_EXOP_NEGATE
unary '-'
Definition: xpath.h:436
@ XP_EXOP_SUBTRACT
minus '-'
Definition: xpath.h:432
@ XP_EXOP_DIV
keyword 'div'
Definition: xpath.h:434
@ XP_EXOP_GT
right angle bracket '>'
Definition: xpath.h:428
@ XP_EXOP_OR
keyword 'or'
Definition: xpath.h:424
@ XP_EXOP_AND
keyword 'and'
Definition: xpath.h:423
@ XP_EXOP_NONE
not set
Definition: xpath.h:422
@ XP_EXOP_LEQUAL
l.
Definition: xpath.h:429
@ XP_EXOP_NOTEQUAL
bang equals '!='
Definition: xpath.h:426
@ XP_EXOP_FILTER2
double fwd slash (C++ comment)
Definition: xpath.h:439
@ XP_EXOP_MULTIPLY
asterisk '*'
Definition: xpath.h:433
@ XP_EXOP_FILTER1
fwd slash '/'
Definition: xpath.h:438
@ XP_EXOP_UNION
vert.
Definition: xpath.h:437
@ XP_EXOP_GEQUAL
r.
Definition: xpath.h:430
@ XP_EXOP_MOD
keyword 'mod'
Definition: xpath.h:435
@ XP_EXOP_EQUAL
equals '='
Definition: xpath.h:425
@ XP_EXOP_LT
left angle bracket '<'
Definition: xpath.h:427
@ XP_EXOP_ADD
plus sign '+'
Definition: xpath.h:431
@ XP_EXNT_TEXT
text node
Definition: xpath.h:449
@ XP_EXNT_PROC_INST
processing instruction
Definition: xpath.h:450
@ XP_EXNT_COMMENT
comment node
Definition: xpath.h:448
@ XP_EXNT_NODE
XML start, empty, or end tag.
Definition: xpath.h:451
@ XP_EXNT_NONE
not set
Definition: xpath.h:447
@ XP_FORM_GETCB
normal GET2 CB
Definition: xpath.h:485
@ XP_FORM_GETCB_CHILD
child node CB
Definition: xpath.h:487
@ XP_FORM_GETCB_TERM
terminal node CB
Definition: xpath.h:486
@ XP_FORM_NONE
not set
Definition: xpath.h:484
@ XP_RST_GET2_DONE
GET2 callback done.
Definition: xpath.h:475
@ XP_RST_GET2_SKIPPED
GET2 callback skipped.
Definition: xpath.h:473
@ XP_RST_GET2_ERROR
GET2 callback error happened.
Definition: xpath.h:476
@ XP_RST_GET2_START
GET2 callback starting.
Definition: xpath.h:474
@ XP_RST_GET2_PENDING
GET2 callback pending.
Definition: xpath.h:472
@ XP_RST_NONE
not set
Definition: xpath.h:471
@ XP_DOC_DATABASE
datastore context
Definition: xpath.h:400
@ XP_DOC_NONE
not set
Definition: xpath.h:399
@ XP_DOC_RPC_REPLY
rpc-output context
Definition: xpath.h:402
@ XP_DOC_NOTIFICATION
notification context
Definition: xpath.h:403
@ XP_DOC_RPC
rpc-input context
Definition: xpath.h:401
ncx_cfg_t
hardwire the 3 standard configs
Definition: ncxtypes.h:548
ncx_protocol_t
NCX session protocol versions supported.
Definition: ncxtypes.h:997
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:695
ncx_xpath_type_t
enumeration for different XPath back pointer types
Definition: ncxtypes.h:1283
tk_type_t
different types of tokens parsed during 1st pass
Definition: tk.h:279
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1362
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:873
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1134
Schema Mount Root Control Block used in the object template.
Definition: ncxtypes.h:1888
struct of NCX user variable mapping for yangcli
Definition: var.h:131
One YANG data-def-stmt.
Definition: obj.h:1209
Session Control Block.
Definition: ses.h:573
token parsing chain (main parser control block)
Definition: tk.h:415
this struct is inserted in the val->v.child_hdrQ for container and list value nodes
Definition: val.h:1073
one value to match one type
Definition: val.h:911
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:397
AIO Subtree respresentation.
Definition: xpath.h:1123
obj_template_t * obj
backptr to object for this subtree
Definition: xpath.h:1134
dlq_hdr_t qhdr
queue header
Definition: xpath.h:1125
xpath_get2_cb_t * get2cb_cb
backptr to parent GET2CB XPath node control block for the top AIO object
Definition: xpath.h:1130
dlq_hdr_t valQ
Queue of val_value that represent the current complex level object.
Definition: xpath.h:1142
Value node compare walker fn callback parameters.
Definition: xpath.h:1079
ncx_num_t * cmpnum
compare number
Definition: xpath.h:1087
uint32 buffsize
size of internal buffer
Definition: xpath.h:1093
xmlChar * cmpstring
compare string
Definition: xpath.h:1084
xpath_exop_t exop
relational expression operation
Definition: xpath.h:1096
status_t res
status of walker operation
Definition: xpath.h:1102
boolean cmpresult
compare result
Definition: xpath.h:1099
xmlChar * buffer
buffer for internal use
Definition: xpath.h:1090
xpath_result_t * result2
internal result storage
Definition: xpath.h:1081
XPath function control block.
Definition: xpath.h:1053
xpath_fn_t fn
callback pointer for XPath function
Definition: xpath.h:1064
xpath_restype_t restype
expected result type
Definition: xpath.h:1058
int32 parmcnt
parameter count: -1 == N, 0..N == actual cnt
Definition: xpath.h:1061
const xmlChar * name
function name
Definition: xpath.h:1055
Special XPath GET2 state record to be used instead of val_value_t or val_child_hdr_t pointers.
Definition: xpath.h:560
obj_template_t * obj
the GET2 callback is expected to be in this object
Definition: xpath.h:567
dlq_hdr_t return_keyQ
If the get2cb is NULL then this is an expanded get2 CB for a YANG list.
Definition: xpath.h:597
xpath_get2_state_t get2_state
current state of this entry
Definition: xpath.h:564
dlq_hdr_t return_termQ
Q of val_value_t *.
Definition: xpath.h:598
struct xpath_get2_cb_t_ * parent_cb
parent control block used if parent_val not used
Definition: xpath.h:580
dlq_hdr_t qhdr
queue header
Definition: xpath.h:561
val_value_t * parent_val
only 1 of these 2 pointers should be set they are both back-pointers and not malloced here
Definition: xpath.h:577
struct getcb_get2_t_ * get2cb
the getcb for this retrieval, ancestor keys in parent_val or parent_cb
Definition: xpath.h:585
val_value_t * val
dummy value for container or list control block DO NOT USE DIRECTLY FOR CHILDREN OR PARENT
Definition: xpath.h:572
dlq_hdr_t lookupQ
Q of getcb_get2_lookup_t.
Definition: xpath.h:600
Special XPath GET2 resnode.
Definition: xpath.h:608
xpath_get2_form_t form
the form field determines the type of get2 node
Definition: xpath.h:653
val_value_t * val
if 'val' is not set then this resnode represents the object node for a container or list; if set then...
Definition: xpath.h:620
xpath_get2_cb_t * cb
the 'cb' is always set and is a back-pointer to the xpath_cb_t stored in the pcb get2_cbQ the 'val' p...
Definition: xpath.h:614
XPath parser control block.
Definition: xpath.h:752
ncx_error_t tkerr
saved error info for the agent to process
Definition: xpath.h:963
obj_template_t * obj
these parms are used by leafref and XPath1 parsing obj is a bptr to start object
Definition: xpath.h:826
obj_template_t * docroot
document root.
Definition: xpath.h:843
boolean missing_errors
T: missing node is error.
Definition: xpath.h:806
xpath_source_t source
the prefixes in the QNames in the exprstr MUST be resolved in different contexts.
Definition: xpath.h:782
void * yang_pcb
backptr to yang parser control block in progress used to force an inline import instead of returning ...
Definition: xpath.h:972
uint32 resnode_count
The count of entries in the resnode_cacheQ.
Definition: xpath.h:931
boolean backptrs_mode
must/when/data-rule obj_template_t backptr caching support backptrs in use
Definition: xpath.h:936
ncx_module_t * objmod
module containing obj.
Definition: xpath.h:832
obj_template_t * altobj
bptr to pred.
Definition: xpath.h:815
dlq_hdr_t resnode_cacheQ
Q of xpath_resnode_t.
Definition: xpath.h:925
dlq_hdr_t get2_aio_cbQ
if AIO GET2 callbacks needed to process the XPath expression then The Subtree returned from AIO GET2 ...
Definition: xpath.h:1011
uint8 backptrs_flags
internal state for backptr handling
Definition: xpath.h:942
ncx_xpath_type_t xpath_type
expression context
Definition: xpath.h:945
obj_template_t * nonconfig_warn_obj
backptr to object causing nonconfig warning if that is being checked in the obj_walker_fn callback in...
Definition: xpath.h:1002
ncx_errinfo_t errinfo
must-stmt error info.
Definition: xpath.h:788
boolean backptrs_manual_clear
manual clear of backptrs needed
Definition: xpath.h:939
obj_template_t * varobj
bptr to key-expr LHS object
Definition: xpath.h:818
xpath_curmode_t curmode
select targ/alt/var obj
Definition: xpath.h:821
boolean logerrors
T: use log_error F: suppress error messages.
Definition: xpath.h:795
dlq_hdr_t qhdr
queue header in case saved in a Q
Definition: xpath.h:754
const struct xpath_fncb_t_ * functions
The function Q is a copy of the global Q It is not hardwired in case app-specific extensions are adde...
Definition: xpath.h:903
struct getcb_get2_t_ * get2cb
the getcb for a NACM data rule test
Definition: xpath.h:994
void * cookie
The cookie registered with the getvar_fn.
Definition: xpath.h:891
obj_template_t * targobj
these parms are used to parse leafref path-arg limited object tree syntax allowed only targobj is bpt...
Definition: xpath.h:812
ncx_module_t * rootmod
YPW-1416: track module in progress during deviation validation of leafref type replacement.
Definition: xpath.h:840
dlq_hdr_t result_cacheQ
Performance Caches.
Definition: xpath.h:919
xpath_resnode_t context
additive XPath1 context back- pointer to current step results.
Definition: xpath.h:877
uint32 flags
internal processing flags for managing XPath state
Definition: xpath.h:868
obj_template_t * startobj
start object set for rpc,notif validation
Definition: xpath.h:846
ses_cb_t * scb
backptr to session control block in progress.
Definition: xpath.h:986
status_t validateres
validation stage result
Definition: xpath.h:957
xpath_getvar_fn_t getvar_fn
The getvar_fn callback function may be set to allow user variables to be supported in this XPath expr...
Definition: xpath.h:888
boolean disabled_obj_ok
YPW-1774: need to ignore if-feature=false while validating leafref path-stmt.
Definition: xpath.h:1019
xpath_result_t * context_result
internal context result during processing
Definition: xpath.h:883
xml_msg_hdr_t * mhdr
backptr to the message header in progress if processing an XPath select filter for NETCONF
Definition: xpath.h:991
dlq_hdr_t pred_entQ
Internal state processing, Q of xpath_pred_ent_t.
Definition: xpath.h:997
tk_chain_t * tkc
token chain for exprstr, Often saved and reset each evaluation so the parse is done only once
Definition: xpath.h:760
val_value_t * val
saved state for the current() function result
Definition: xpath.h:849
struct xpath_get2_node_t_ * val_get2
YPW-1342 the context node can be one of the following nodes.
Definition: xpath.h:865
xpath_document_t doctype
document context for this evaluation
Definition: xpath.h:855
dlq_hdr_t get2_cbQ
if GET2 callbacks needed to process the XPath expression then they will be stored in this queue and x...
Definition: xpath.h:979
status_t valueres
evaluation stage result
Definition: xpath.h:960
status_t parseres
first and second pass parsing results.
Definition: xpath.h:954
val_value_t * val_docroot
cfg->root for db
Definition: xpath.h:852
boolean logwrongtype
T: log wrong-type warnings.
Definition: xpath.h:803
boolean seen
internal yangdiff support
Definition: xpath.h:966
ncx_module_t * impmod
[sub]module containing obj
Definition: xpath.h:835
xpath_result_t * result
The XPath result for this evaluation.
Definition: xpath.h:871
uint32 result_count
The count of entries in the result_cacheQ.
Definition: xpath.h:928
boolean xpath_predicate
true when processing a predicate
Definition: xpath.h:948
dlq_hdr_t varbindQ
The varbindQ may be used instead of the getvar_fn to store user variables to be supported in this XPa...
Definition: xpath.h:897
quick processing of NACM data rule predicates.
Definition: xpath.h:734
obj_template_t * keyobj
backptr to schema tree
Definition: xpath.h:736
dlq_hdr_t qhdr
queue header
Definition: xpath.h:735
const xmlChar * keyval
backptr to token value
Definition: xpath.h:737
XPath result node struct.
Definition: xpath.h:664
dlq_hdr_t qhdr
queue header
Definition: xpath.h:666
boolean aioval
flag indicating the XP_RNT_VAL node type came from a GET2 AIO value tree
Definition: xpath.h:676
boolean dblslash
double slash mode means the shorthand for the descendant-or-self axis was used
Definition: xpath.h:671
xpath_rntype_t rntype
The result node type is the union discriminator for node_.
Definition: xpath.h:679
XPath expression result.
Definition: xpath.h:703
dlq_hdr_t qhdr
queue header in case saved in a Q
Definition: xpath.h:705
xpath_restype_t restype
XPath result type.
Definition: xpath.h:708
Value node stringify walker fn callback parameters.
Definition: xpath.h:1107
uint32 buffsize
size of buffer
Definition: xpath.h:1112
status_t res
result of stringify operation
Definition: xpath.h:1118
xmlChar * buffer
buffer used for stringifying the node-set
Definition: xpath.h:1109
uint32 buffpos
current buffer position
Definition: xpath.h:1115
Value or object node walker fn callback parameters.
Definition: xpath.h:1069
status_t res
status field to continue or exit walk
Definition: xpath.h:1074
dlq_hdr_t * resnodeQ
Q of xpath_resnode_t being checked.
Definition: xpath.h:1071
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
union of all the basic number types if float not supported, then it is stored as an int64
Definition: ncxtypes.h:780
if the result->isval flag is false then the objptr is used in all resnodes in that result
Definition: xpath.h:690
val_child_hdr_t * valhdr
result is a value node header
Definition: xpath.h:693
obj_template_t * objptr
object for YANG validation mode
Definition: xpath.h:691
val_value_t * valptr
result is a plain value node
Definition: xpath.h:692
xpath_get2_node_t get2node
result is a GET2 state node
Definition: xpath.h:694
result r contains the appropiate data depending on restype
Definition: xpath.h:714
ncx_num_t num
numeric result
Definition: xpath.h:722
boolean boo
boolean result
Definition: xpath.h:719
xmlChar * str
string result
Definition: xpath.h:725
Value Node Basic Support.
NCX Variable Support.
YANG Module parser utilities.