yumapro  23.10T-8
YumaPro SDK
Loading...
Searching...
No Matches
xpath_yang.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_yang
13#define _H_xpath_yang
14
15/* FILE: xpath_yang.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----------------------------------------------------------------------
3513-nov-08 abb Begun
36
37*/
38
39#include <xmlstring.h>
40#include <xmlreader.h>
41#include <xmlregexp.h>
42
43#ifndef _H_dlq
44#include "dlq.h"
45#endif
46
47#ifndef _H_ncxtypes
48#include "ncxtypes.h"
49#endif
50
51#ifndef _H_status
52#include "status.h"
53#endif
54
55#ifndef _H_obj
56#include "obj.h"
57#endif
58
59#ifndef _H_tk
60#include "tk.h"
61#endif
62
63#ifndef _H_val
64#include "val.h"
65#endif
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71/********************************************************************
72* *
73* F U N C T I O N S *
74* *
75*********************************************************************/
76
77
110extern status_t
112 ncx_module_t *mod,
113 xpath_source_t source,
114 xpath_pcb_t *pcb);
115
116
117
146extern status_t
148 ncx_module_t *mod,
149 xpath_source_t source,
150 xpath_pcb_t *pcb,
151 boolean logerrors,
152 ncx_leafref_class_t *leafref_class);
153
154
186extern status_t
188 ncx_module_t *mod,
189 xpath_source_t source,
190 xpath_pcb_t *pcb,
191 boolean logerrors,
192 boolean is_xpath,
193 ncx_leafref_class_t *leafref_class);
194
195
196
228extern status_t
230 obj_template_t *obj,
231 xpath_pcb_t *pcb,
232 boolean schemainst,
233 obj_template_t **leafobj);
234
235
271extern status_t
273 obj_template_t *obj,
274 xpath_pcb_t *pcb,
275 boolean schemainst,
276 obj_template_t **leafobj,
277 boolean logerrors,
278 boolean is_xpath);
279
280
325extern status_t
327 obj_template_t *obj,
328 xpath_pcb_t *pcb,
329 boolean schemainst,
330 obj_template_t **leafobj,
331 boolean logerrors,
332 boolean is_xpath,
333 ncx_module_t *rootmod);
334
335
356extern status_t
357 xpath_yang_validate_xmlpath (xmlTextReaderPtr reader,
358 xpath_pcb_t *pcb,
359 obj_template_t *pathobj,
360 boolean logerrors,
361 obj_template_t **targobj);
362
363
387extern status_t
388 xpath_yang_validate_xmlkey (xmlTextReaderPtr reader,
389 xpath_pcb_t *pcb,
390 obj_template_t *obj,
391 boolean logerrors);
392
393
411extern val_value_t *
413 status_t *retres,
414 val_value_t **deepest);
415
416
438extern status_t
440 ncx_prefix_info_t *nsid_array,
441 uint32 max_nsids,
442 uint32 *num_nsids);
443
444
460extern val_value_t *
461 xpath_yang_make_instanceid_str (const xmlChar *target,
462 status_t *retres,
463 val_value_t **targval);
464
465
469#ifdef __cplusplus
470} /* end extern 'C' */
471#endif
472
473#endif /* _H_xpath_yang */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
xpath_source_t
XPath expression source type.
Definition: xpath.h:412
ncx_leafref_class_t
Classification for the types of leafref path statements wrt/ how they can be cached.
Definition: ncxtypes.h:1567
status_t xpath_yang_validate_xmlpath(xmlTextReaderPtr reader, xpath_pcb_t *pcb, obj_template_t *pathobj, boolean logerrors, obj_template_t **targobj)
Validate an instance-identifier expression (XML path) within an XML PDU context.
Definition: xpath_yang.c:2668
status_t xpath_yang_parse_path_ex2(tk_chain_t *tkc, ncx_module_t *mod, xpath_source_t source, xpath_pcb_t *pcb, boolean logerrors, boolean is_xpath, ncx_leafref_class_t *leafref_class)
Parse the leafref path as a leafref path (extended2)
Definition: xpath_yang.c:2209
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:2353
status_t xpath_yang_validate_path_dev(ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb, boolean schemainst, obj_template_t **leafobj, boolean logerrors, boolean is_xpath, ncx_module_t *rootmod)
Validate the previously parsed leafref path (deviation)
Definition: xpath_yang.c:2483
val_value_t * xpath_yang_make_instanceid_val(xpath_pcb_t *pcb, status_t *retres, val_value_t **deepest)
Make a value subtree out of an instance-identifier Used by yangcli to send PDUs from CLI target param...
Definition: xpath_yang.c:2853
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:2413
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:2099
val_value_t * xpath_yang_make_instanceid_str(const xmlChar *target, status_t *retres, val_value_t **targval)
Return the instance ID string for the target object.
Definition: xpath_yang.c:3424
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:2152
status_t xpath_yang_get_namespaces(const xpath_pcb_t *pcb, ncx_prefix_info_t *nsid_array, uint32 max_nsids, uint32 *num_nsids)
Get the namespace URI IDs used in the specified XPath expression;.
Definition: xpath_yang.c:3309
status_t xpath_yang_validate_xmlkey(xmlTextReaderPtr reader, xpath_pcb_t *pcb, obj_template_t *obj, boolean logerrors)
Validate a key XML attribute value given in (XML Key)
Definition: xpath_yang.c:2772
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1134
gather the prefix/nsid bindings used in an XPath string needed to generate the correct xmlns directiv...
Definition: ncxtypes.h:1744
One YANG data-def-stmt.
Definition: obj.h:1220
token parsing chain (main parser control block)
Definition: tk.h:415
one value to match one type
Definition: val.h:911
XPath parser control block.
Definition: xpath.h:754
NCX Syntax Token Handler.
Value Node Basic Support.