yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
yang.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2022, 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_yang
13#define _H_yang
14
15/* FILE: 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----------------------------------------------------------------------
3515-nov-07 abb Begun; start from yang_parse.c
36
37*/
38
39#include <xmlstring.h>
40
41#ifndef _H_dlq
42#include "dlq.h"
43#endif
44
45#ifndef _H_ext
46#include "ext.h"
47#endif
48
49#ifndef _H_grp
50#include "grp.h"
51#endif
52
53#ifndef _H_ncxtypes
54#include "ncxtypes.h"
55#endif
56
57#ifndef _H_obj
58#include "obj.h"
59#endif
60
61#ifndef _H_status
62#include "status.h"
63#endif
64
65#ifndef _H_tk
66#include "tk.h"
67#endif
68
69#ifndef _H_typ
70#include "typ.h"
71#endif
72
73#ifdef __cplusplus
74extern "C" {
75#endif
76
77/********************************************************************
78* *
79* T Y P E S *
80* *
81*********************************************************************/
82
83/* Group yangcomp defined in ncx.h */
84
85 // BEGIN ncxlib/yang/yangcomp/yangcomp-parse
92
93 // BEGIN ncxlib/yang/yangcomp/yangcompparse
101
102
104typedef enum yang_parsetype_t_ {
110
111
112/* YANG statement types for yang_stmt_t order struct */
113typedef enum yang_stmttype_t_ {
114 YANG_ST_NONE,
115 YANG_ST_TYPEDEF, /* node is typ_template_t */
116 YANG_ST_GROUPING, /* node is grp_template_t */
117 YANG_ST_EXTENSION, /* node is ext_template_t */
118 YANG_ST_OBJECT, /* node is obj_template_t */
119 YANG_ST_IDENTITY, /* node is ncx_identity_t */
120 YANG_ST_FEATURE, /* node is ncx_feature_t */
121 YANG_ST_DEVIATION /* node is ncx_deviation_t */
122} yang_stmttype_t;
123
124
126typedef struct yang_stmt_t_ {
128 dlq_hdr_t qhdr;
129
131 yang_stmttype_t stmttype;
132
134 union s_ {
142 } s;
144
145
147typedef struct yang_node_t_ {
148 dlq_hdr_t qhdr;
149 const xmlChar *name;
150 const xmlChar *revision;
153 xmlChar *failed;
154 xmlChar *failedrev;
158
159
161typedef struct yang_import_ptr_t_ {
162 dlq_hdr_t qhdr;
163 xmlChar *modname;
164 xmlChar *modprefix;
165 xmlChar *revision;
166 xmlChar *descr;
167 xmlChar *ref;
169
170
174typedef struct failed_ptr_t_ {
175 dlq_hdr_t qhdr;
176 xmlChar *modname;
177 xmlChar *revision;
180
181
204typedef struct yang_pcb_t_ {
205 struct ncx_module_t_ *top;
206 struct ncx_module_t_ *retmod;
207 struct ncx_module_t_ *parentparm;
208 const xmlChar *revision;
209 boolean with_submods;
210 boolean stmtmode;
211 boolean diffmode;
213 boolean annotation;
214 boolean searchmode;
215 boolean parsemode;
216 boolean keepmode;
217 boolean topfound;
218 boolean topadded;
219 boolean savetkc;
220 boolean docmode;
221 boolean trackmode;
222 boolean reparse;
224 boolean res_dev;
225 boolean autoloadmode;
226 boolean in_grouping;
227 boolean in_yangdata;
229 boolean swaptop;
230 boolean freetop;
231 dlq_hdr_t allimpQ;
233 dlq_hdr_t *topfailedQ;
234 dlq_hdr_t *savedevQ;
235 dlq_hdr_t *savemodQ;
239 dlq_hdr_t impchainQ;
240 dlq_hdr_t failedQ;
244 struct ncx_sm_rootcb_t_ *rootcb;
246} yang_pcb_t;
247
248
249/********************************************************************
250* *
251* F U N C T I O N S *
252* *
253*********************************************************************/
254
255
272extern status_t
274 ncx_module_t *mod,
275 dlq_hdr_t *appinfoQ);
276
277
278
279
297extern status_t
299 ncx_module_t *mod,
300 dlq_hdr_t *appinfoQ,
301 boolean plain_ok);
302
303
304
320extern status_t
322 ncx_module_t *mod,
323 xmlChar **field);
324
325
342extern status_t
344 ncx_module_t *mod,
345 xmlChar **prefix,
346 xmlChar **field);
347
348
366extern status_t
368 ncx_module_t *mod,
369 xmlChar **field);
370
371
389extern status_t
391 ncx_module_t *mod,
392 xmlChar **field);
393
394
415extern status_t
417 ncx_module_t *mod,
418 xmlChar **prefix,
419 xmlChar **field);
420
421
445extern status_t
447 ncx_module_t *mod,
448 ncx_errinfo_t *errinfo,
449 dlq_hdr_t *appinfoQ,
450 boolean allow_modifier,
451 boolean *gotinverted);
452
453
474extern status_t
476 ncx_module_t *mod,
477 xmlChar **str,
478 boolean *dupflag,
479 dlq_hdr_t *appinfoQ);
480
481
509extern status_t
511 ncx_module_t *mod,
512 xmlChar **prefixstr,
513 xmlChar **str,
514 boolean *dupflag,
515 dlq_hdr_t *appinfoQ);
516
517
518
541extern status_t
543 ncx_module_t *mod,
544 xmlChar **str,
545 boolean *dupflag,
546 dlq_hdr_t *appinfoQ);
547
548
570extern status_t
572 ncx_module_t *mod,
573 ncx_status_t *status,
574 boolean *dupflag,
575 dlq_hdr_t *appinfoQ);
576
577
600extern status_t
602 ncx_module_t *mod,
603 boolean *ordsys,
604 boolean *dupflag,
605 dlq_hdr_t *appinfoQ);
606
607
629extern status_t
631 ncx_module_t *mod,
632 uint32 *maxelems,
633 boolean *dupflag,
634 dlq_hdr_t *appinfoQ);
635
636
657extern status_t
659 ncx_module_t *mod,
660 dlq_hdr_t *mustQ,
661 dlq_hdr_t *appinfoQ,
662 boolean do_parse);
663
664
687extern status_t
689 ncx_module_t *mod,
690 obj_template_t *obj,
691 boolean *whenflag);
692
693
694
715extern status_t
717 ncx_module_t *mod,
718 boolean *boolval,
719 boolean *dupflag,
720 dlq_hdr_t *appinfoQ);
721
722
743extern status_t
745 ncx_module_t *mod,
746 int32 *num,
747 boolean *dupflag,
748 dlq_hdr_t *appinfoQ);
749
750
772extern status_t
774 ncx_module_t *mod,
775 uint32 *num,
776 boolean *dupflag,
777 dlq_hdr_t *appinfoQ);
778
779
801extern status_t
803 ncx_module_t *mod,
804 boolean *dupflag,
805 dlq_hdr_t *appinfoQ);
806
807
824extern status_t
826 tk_chain_t *tkc,
827 ncx_module_t *mod,
828 const xmlChar *prefix,
829 const xmlChar *name,
830 ncx_error_t *tkerr,
831 typ_template_t **typ);
832
833
850extern status_t
852 tk_chain_t *tkc,
853 ncx_module_t *mod,
854 const xmlChar *prefix,
855 const xmlChar *name,
856 ncx_error_t *tkerr,
857 grp_template_t **grp);
858
859
876extern status_t
878 tk_chain_t *tkc,
879 ncx_module_t *mod,
880 const xmlChar *prefix,
881 const xmlChar *name,
882 ncx_error_t *tkerr,
883 ext_template_t **ext);
884
885
902extern status_t
904 tk_chain_t *tkc,
905 ncx_module_t *mod,
906 const xmlChar *prefix,
907 const xmlChar *name,
908 ncx_error_t *tkerr,
909 ncx_feature_t **feature);
910
911
928extern status_t
930 tk_chain_t *tkc,
931 ncx_module_t *mod,
932 const xmlChar *prefix,
933 const xmlChar *name,
934 ncx_error_t *tkerr,
935 ncx_identity_t **identity);
936
937
952extern void
954 ncx_module_t *mod,
955 dlq_hdr_t *typeQ,
956 dlq_hdr_t *grpQ);
957
958
972extern void
974 ncx_module_t *mod);
975
976
982extern yang_node_t *
983 yang_new_node (void);
984
985
991extern void
993
994
1000extern void
1001 yang_clean_nodeQ (dlq_hdr_t *que);
1002
1003
1012extern yang_node_t *
1013 yang_find_node (const dlq_hdr_t *que,
1014 const xmlChar *name,
1015 const xmlChar *revision);
1016
1017
1024extern void
1025 yang_dump_nodeQ (dlq_hdr_t *que,
1026 const char *name);
1027
1028
1034extern yang_pcb_t *
1035 yang_new_pcb (void);
1036
1037
1043extern void
1045
1046
1053extern yang_stmt_t *
1055
1056
1063extern yang_stmt_t *
1065
1066
1067
1074extern yang_stmt_t *
1076
1077
1084extern yang_stmt_t *
1086
1087
1094extern yang_stmt_t *
1095 yang_new_id_stmt (ncx_identity_t *identity);
1096
1097
1104extern yang_stmt_t *
1106
1107
1114extern yang_stmt_t *
1116
1117
1123extern void
1125
1126
1132extern void
1133 yang_clean_stmtQ (dlq_hdr_t *que);
1134
1135
1154extern status_t
1156 ncx_module_t *mod,
1157 ncx_error_t *tkerr,
1158 const xmlChar *datestr);
1159
1160
1168extern void
1170 ncx_module_t *mod);
1171
1172
1179extern boolean
1180 yang_top_keyword (const xmlChar *keyword);
1181
1182
1193extern yang_import_ptr_t *
1194 yang_new_import_ptr (const xmlChar *modname,
1195 const xmlChar *modprefix,
1196 const xmlChar *revision,
1197 const xmlChar *descr,
1198 const xmlChar *ref);
1199
1200
1206extern void
1208
1209
1215extern void
1216 yang_clean_import_ptrQ (dlq_hdr_t *que);
1217
1218
1226extern yang_import_ptr_t *
1227 yang_find_import_ptr (dlq_hdr_t *que,
1228 const xmlChar *name);
1229
1230
1243extern int32
1244 yang_compare_revision_dates (const xmlChar *revstring1,
1245 const xmlChar *revstring2);
1246
1247
1258extern xmlChar *
1259 yang_make_filename (const xmlChar *modname,
1260 const xmlChar *revision,
1261 boolean isyang);
1262
1263
1276extern status_t
1277 yang_copy_filename (const xmlChar *modname,
1278 const xmlChar *revision,
1279 xmlChar *buffer,
1280 uint32 bufflen,
1281 boolean isyang);
1282
1283
1294extern boolean
1295 yang_split_filename (const xmlChar *filename,
1296 uint32 *modnamelen);
1297
1298
1306extern boolean
1307 yang_fileext_is_yang (const xmlChar *filename);
1308
1309
1317extern boolean
1318 yang_fileext_is_yin (const xmlChar *filename);
1319
1320
1328extern boolean
1329 yang_fileext_is_xml (const xmlChar *filename);
1330
1331
1339extern boolean
1340 yang_fileext_is_json (const xmlChar *filename);
1341
1342
1347extern void
1348 yang_final_memcheck (void);
1349
1350
1357extern void
1358 yang_set_in_yangdata (yang_pcb_t *pcb, boolean val);
1359
1360
1367extern boolean
1368 yang_is_in_yangdata (const yang_pcb_t *pcb);
1369
1370
1383extern status_t
1384 yang_extract_filespec_info (const char *filespec,
1385 xmlChar **modname,
1386 xmlChar **revision,
1387 boolean *isyang);
1388
1389
1396extern void
1398
1399
1400
1409extern xmlChar *
1410 yang_make_sid_filename (const xmlChar *modname,
1411 const xmlChar *revision);
1412
1413
1418#ifdef __cplusplus
1419} /* end extern 'C' */
1420#endif
1421
1422#endif /* _H_yang */
dlq provides general double-linked list and queue support:
YANG Extension Handler.
status_t
global error return code
Definition: status_enum.h:210
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
boolean yang_top_keyword(const xmlChar *keyword)
Check if the string is a top-level YANG keyword.
Definition: yang.c:3458
status_t yang_consume_uint32(tk_chain_t *tkc, ncx_module_t *mod, uint32 *num, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one uint32 clause
Definition: yang.c:1951
status_t yang_consume_keyword(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **prefix, xmlChar **field)
consume 1 YANG keyword or vendor extension keyword
Definition: yang.c:379
boolean yang_is_in_yangdata(const yang_pcb_t *pcb)
Get the in_yangdata mode.
Definition: yang.c:4071
xmlChar * yang_make_sid_filename(const xmlChar *modname, const xmlChar *revision)
Malloc and construct a SID filename.
Definition: yang.c:4217
status_t yang_consume_boolean(tk_chain_t *tkc, ncx_module_t *mod, boolean *boolval, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one boolean clause Parse the boolean parameter based statement
Definition: yang.c:1776
int32 yang_compare_revision_dates(const xmlChar *revstring1, const xmlChar *revstring2)
Compare 2 revision strings, which either may be NULL.
Definition: yang.c:3674
status_t yang_consume_semiapp2(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ, boolean plain_ok)
consume a stmtsep clause, check plain_ok
Definition: yang.c:145
void yang_skip_statement(tk_chain_t *tkc, ncx_module_t *mod)
Skip past the current invalid statement, starting at an invalid keyword.
Definition: yang.c:3400
yang_parsetype_t
YANG parser mode entry types.
Definition: yang.h:104
void yang_free_stmt(yang_stmt_t *stmt)
Delete a YANG statement node.
Definition: yang.c:3185
void yang_free_import_ptr(yang_import_ptr_t *impptr)
Delete a YANG import pointer node.
Definition: yang.c:3570
yang_import_ptr_t * yang_new_import_ptr(const xmlChar *modname, const xmlChar *modprefix, const xmlChar *revision, const xmlChar *descr, const xmlChar *ref)
Create a new YANG import pointer node.
Definition: yang.c:3501
yang_stmt_t * yang_new_grp_stmt(grp_template_t *grp)
Create a new YANG stmt node for a grouping.
Definition: yang.c:2989
boolean yang_fileext_is_yang(const xmlChar *filename)
Check if the filespec ends with the .yang extension.
Definition: yang.c:3900
status_t yang_consume_int32(tk_chain_t *tkc, ncx_module_t *mod, int32 *num, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one int32 clause Parse the int32 based parameter statement
Definition: yang.c:1868
yang_pcb_t * yang_new_pcb(void)
Create a new YANG parser control block.
Definition: yang.c:2876
status_t yang_consume_error_stmts(tk_chain_t *tkc, ncx_module_t *mod, ncx_errinfo_t *errinfo, dlq_hdr_t *appinfoQ, boolean allow_modifier, boolean *gotinverted)
consume the range.
Definition: yang.c:794
yang_node_t * yang_new_node(void)
Create a new YANG parser node.
Definition: yang.c:2679
status_t yang_find_imp_extension(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *prefix, const xmlChar *name, ncx_error_t *tkerr, ext_template_t **ext)
Find the specified imported extension.
Definition: yang.c:2264
yang_stmt_t * yang_new_deviation_stmt(obj_deviation_t *deviation)
Create a new YANG stmt node for a deviation definition.
Definition: yang.c:3154
status_t yang_consume_pid_string(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **prefix, xmlChar **field)
consume an identifier-ref-str token
Definition: yang.c:623
void yang_set_in_yangdata(yang_pcb_t *pcb, boolean val)
Set the in_yangdata mode.
Definition: yang.c:4054
status_t yang_find_imp_grouping(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *prefix, const xmlChar *name, ncx_error_t *tkerr, grp_template_t **grp)
Find the specified imported grouping.
Definition: yang.c:2187
status_t yang_consume_ordered_by(tk_chain_t *tkc, ncx_module_t *mod, boolean *ordsys, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one ordered-by clause
Definition: yang.c:1240
status_t yang_consume_semiapp(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ)
consume a stmtsep clause
Definition: yang.c:234
status_t yang_consume_strclause(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **str, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one normative string clause
Definition: yang.c:1085
status_t yang_consume_must(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *mustQ, dlq_hdr_t *appinfoQ, boolean do_parse)
consume one must-stmt into mustQ
Definition: yang.c:1399
yang_stmt_t * yang_new_feature_stmt(ncx_feature_t *feature)
Create a new YANG stmt node for a feature definition.
Definition: yang.c:3121
status_t yang_consume_nowsp_string(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **field)
consume 1 string without any whitespace
Definition: yang.c:475
boolean yang_fileext_is_json(const xmlChar *filename)
Check if the filespec ends with the .json extension.
Definition: yang.c:4008
void yang_clean_nodeQ(dlq_hdr_t *que)
Delete all the node entries in a YANG parser node Q.
Definition: yang.c:2751
yang_node_t * yang_find_node(const dlq_hdr_t *que, const xmlChar *name, const xmlChar *revision)
Find a YANG parser node in the specified Q.
Definition: yang.c:2782
status_t yang_consume_max_elements(tk_chain_t *tkc, ncx_module_t *mod, uint32 *maxelems, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one max-elements clause
Definition: yang.c:1329
yang_stmt_t * yang_new_obj_stmt(obj_template_t *obj)
Create a new YANG stmt node for an object.
Definition: yang.c:3055
void yang_dump_nodeQ(dlq_hdr_t *que, const char *name)
log_debug output for contents of the specified nodeQ
Definition: yang.c:2822
boolean yang_fileext_is_xml(const xmlChar *filename)
Check if the filespec ends with the .xml extension.
Definition: yang.c:3972
status_t yang_find_imp_typedef(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *prefix, const xmlChar *name, ncx_error_t *tkerr, typ_template_t **typ)
Find the specified imported typedef.
Definition: yang.c:2110
yang_stmt_t * yang_new_id_stmt(ncx_identity_t *identity)
Create a new YANG stmt node for an identity.
Definition: yang.c:3088
status_t yang_find_imp_identity(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *prefix, const xmlChar *name, ncx_error_t *tkerr, ncx_identity_t **identity)
Find the specified imported identity.
Definition: yang.c:2427
void yang_check_obj_used(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *typeQ, dlq_hdr_t *grpQ)
generate warnings if local typedefs/groupings not used
Definition: yang.c:2528
status_t yang_consume_status(tk_chain_t *tkc, ncx_module_t *mod, ncx_status_t *status, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one status clause
Definition: yang.c:1153
void yang_clean_pcb_top(yang_pcb_t *pcb)
Make sure pcb->top is freed before the pcb is reused after the bestmatch failed and NULL revision is ...
Definition: yang.c:4190
yang_import_ptr_t * yang_find_import_ptr(dlq_hdr_t *que, const xmlChar *name)
Find a YANG import pointer node in the specified Q.
Definition: yang.c:3636
void yang_free_node(yang_node_t *node)
Clean and delete the memory for a YANG parser node.
Definition: yang.c:2711
status_t yang_extract_filespec_info(const char *filespec, xmlChar **modname, xmlChar **revision, boolean *isyang)
Split a filespec into its filename components.
Definition: yang.c:4100
status_t yang_consume_pid(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **prefixstr, xmlChar **str, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one [prefix:]name clause
Definition: yang.c:1007
boolean yang_fileext_is_yin(const xmlChar *filename)
Check if the filespec ends with the .yin extension.
Definition: yang.c:3936
xmlChar * yang_make_filename(const xmlChar *modname, const xmlChar *revision, boolean isyang)
Malloc and construct a YANG filename.
Definition: yang.c:3708
void yang_clean_stmtQ(dlq_hdr_t *que)
Delete a Q of YANG statement node.
Definition: yang.c:3206
status_t yang_validate_date_string(tk_chain_t *tkc, ncx_module_t *mod, ncx_error_t *tkerr, const xmlChar *datestr)
Validate a YANG date string for a revision entry.
Definition: yang.c:3243
status_t yang_consume_modifier(tk_chain_t *tkc, ncx_module_t *mod, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one modifier-stmt
Definition: yang.c:2033
void yang_clean_import_ptrQ(dlq_hdr_t *que)
Delete all the node entries in a YANG import pointer node Q.
Definition: yang.c:3607
yang_stmt_t * yang_new_ext_stmt(ext_template_t *ext)
Create a new YANG stmt node for an extension.
Definition: yang.c:3022
void yang_check_imports_used(tk_chain_t *tkc, ncx_module_t *mod)
generate warnings if imports not used
Definition: yang.c:2595
yang_stmt_t * yang_new_typ_stmt(typ_template_t *typ)
Create a new YANG stmt node for a typedef.
Definition: yang.c:2956
void yang_free_pcb(yang_pcb_t *pcb)
Delete a YANG parser control block.
Definition: yang.c:2911
status_t yang_consume_descr(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **str, boolean *dupflag, dlq_hdr_t *appinfoQ)
consume one descriptive string clause
Definition: yang.c:930
status_t yang_consume_string(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **field)
consume 1 string token
Definition: yang.c:270
status_t yang_consume_when(tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *obj, boolean *whenflag)
consume one when-stmt into obj->when
Definition: yang.c:1594
void yang_final_memcheck(void)
Check the node malloc and free counts.
Definition: yang.c:4035
status_t yang_copy_filename(const xmlChar *modname, const xmlChar *revision, xmlChar *buffer, uint32 bufflen, boolean isyang)
Construct a YANG filename into a provided buffer.
Definition: yang.c:3770
boolean yang_split_filename(const xmlChar *filename, uint32 *modnamelen)
Split a module parameter into its filename components.
Definition: yang.c:3830
status_t yang_find_imp_feature(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *prefix, const xmlChar *name, ncx_error_t *tkerr, ncx_feature_t **feature)
Find the specified imported feature.
Definition: yang.c:2344
status_t yang_consume_id_string(tk_chain_t *tkc, ncx_module_t *mod, xmlChar **field)
consume an identifier-str token
Definition: yang.c:552
@ YANG_PT_NONE
not set
Definition: yang.h:105
@ YANG_PT_INCLUDE
called from module include-stmt
Definition: yang.h:107
@ YANG_PT_IMPORT
called from module import-stmt
Definition: yang.h:108
@ YANG_PT_TOP
called from top level [sub]module
Definition: yang.h:106
YANG Grouping Statement Handler.
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
One YANG 'extension' definition – language extension template.
Definition: ext.h:130
pointer to failed modules to track all of them Prevents loading a broken module multiple times
Definition: yang.h:174
xmlChar * modname
module name
Definition: yang.h:176
dlq_hdr_t qhdr
queue header
Definition: yang.h:175
xmlChar * revision
module revision
Definition: yang.h:177
status_t status
reason for failure
Definition: yang.h:178
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1366
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:877
YANG feature entry.
Definition: ncxtypes.h:1021
YANG identity entry.
Definition: ncxtypes.h:1104
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
YANG deviation statement struct.
Definition: obj.h:1454
One YANG data-def-stmt.
Definition: obj.h:1229
token parsing chain (main parser control block)
Definition: tk.h:415
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
YANG import pointer node to track all imports used.
Definition: yang.h:161
xmlChar * modname
import module name
Definition: yang.h:163
xmlChar * modprefix
import module prefix
Definition: yang.h:164
xmlChar * ref
import reference
Definition: yang.h:167
dlq_hdr_t qhdr
queue header
Definition: yang.h:162
xmlChar * descr
import module revision date
Definition: yang.h:166
YANG node entry to track if a module has been used already.
Definition: yang.h:147
ncx_error_t tkerr
file and line infor for compiler
Definition: yang.h:156
xmlChar * failedrev
saved revision for failed entries
Definition: yang.h:154
xmlChar * failed
saved name for failed entries
Definition: yang.h:153
dlq_hdr_t qhdr
queue header
Definition: yang.h:148
const xmlChar * revision
revision date in imp/inc/failed
Definition: yang.h:150
status_t res
saved result for 'failed'
Definition: yang.h:155
ncx_module_t * submod
submod for allincQ
Definition: yang.h:152
ncx_module_t * mod
back-ptr to module w/ imp/inc
Definition: yang.h:151
const xmlChar * name
module name in imp/inc/failed
Definition: yang.h:149
YANG parser control block.
Definition: yang.h:204
boolean searchmode
TRUE if just getting ns & version.
Definition: yang.h:214
boolean keepmode
TRUE to keep new mod even if loaded.
Definition: yang.h:216
boolean swaptop
T: keepmode found top already so swap.
Definition: yang.h:229
dlq_hdr_t allimpQ
Q of yang_import_ptr_t.
Definition: yang.h:231
boolean savetkc
TRUE if tkc should be kept in tkc.
Definition: yang.h:219
boolean deviationmode
TRUE if keeping deviations only.
Definition: yang.h:212
dlq_hdr_t * savedevQ
ptr to Q of ncx_save_deviations_t
Definition: yang.h:234
boolean topfound
TRUE if top found, not added.
Definition: yang.h:217
dlq_hdr_t failedQ
load mod or submod failed
Definition: yang.h:240
struct ncx_module_t_ * retmod
nested [sub]mod being returned
Definition: yang.h:206
boolean trackmode
TRUE if yangdump to track re-parse.
Definition: yang.h:221
const xmlChar * revision
back-ptr to rev to match
Definition: yang.h:208
boolean set_supported
TRUE: load, FALSE: import only.
Definition: yang.h:223
boolean res_dev
TRUE: currently resolving a deviation.
Definition: yang.h:224
struct ncx_sm_rootcb_t_ * rootcb
Schema Mount pointers.
Definition: yang.h:244
boolean freetop
T: keeptop=T and wasadd=F and top=live mem.
Definition: yang.h:230
boolean stmtmode
save top-level stmt order
Definition: yang.h:210
struct ncx_module_t_ * parentparm
parent passed for submodule
Definition: yang.h:207
boolean in_yangdata
T: resolving datadefs in rc:yang-data.
Definition: yang.h:227
tk_chain_t * tkc
live or NULL parse chain
Definition: yang.h:236
boolean topadded
TRUE if top in registry; F: need free.
Definition: yang.h:218
struct ncx_module_t_ * top
top-level file
Definition: yang.h:205
boolean docmode
TRUE if saving strings in origtkQ.
Definition: yang.h:220
boolean in_grouping
T: resolving datadefs in a grouping.
Definition: yang.h:226
dlq_hdr_t * topfailedQ
ptr to Q of failed_ptr_t
Definition: yang.h:233
boolean diffmode
TRUE = yangdiff old ver.
Definition: yang.h:211
boolean reparse
TRUE if trackmode + mod already parsed.
Definition: yang.h:222
boolean annotation
TRUE if deviation really annotation.
Definition: yang.h:213
boolean parsemode
TRUE if full parse but no reg-load.
Definition: yang.h:215
dlq_hdr_t impchainQ
2 Qs of yang_node_t
Definition: yang.h:239
dlq_hdr_t * savemodQ
ptr to Q of ncx_module_t: parse mode
Definition: yang.h:235
boolean retmod_malloced
T: if retmod live ncx_new_module.
Definition: yang.h:228
boolean autoloadmode
TRUE if yangcli autoload.
Definition: yang.h:225
boolean with_submods
include submodules
Definition: yang.h:209
YANG statement node to track top-level statement order for doc output.
Definition: yang.h:126
dlq_hdr_t qhdr
queue header
Definition: yang.h:128
yang_stmttype_t stmttype
statement type
Definition: yang.h:131
NCX Syntax Token Handler.
Parameter Type Handler.
these node pointers are back-pointers and not malloced here
Definition: yang.h:134
obj_template_t * obj
data-def-stmt
Definition: yang.h:138
ext_template_t * ext
extension-stmt
Definition: yang.h:137
ncx_feature_t * feature
feature-stmt
Definition: yang.h:140
ncx_identity_t * identity
identity-stmt
Definition: yang.h:139
grp_template_t * grp
grouping-stmt
Definition: yang.h:136
typ_template_t * typ
typdef-stmt
Definition: yang.h:135
obj_deviation_t * deviation
deviation-stmt
Definition: yang.h:141