yumapro  25.10-3
YumaPro SDK
Loading...
Searching...
No Matches
typ.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_typ
13#define _H_typ
14
15/* FILE: typ.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3622-oct-05 abb Begun
3713-oct-08 abb Moved pattern from typ_sval_t to ncx_pattern_t
38 to support N patterns per typdef
39*/
40
41// for XSD pattern: xmlRexexpPtr pattern
42#include <xmlstring.h>
43
44// for POSIX pattern; regex_t ocpattern
45#include <regex.h>
46
47#ifndef _H_ncxconst
48#include "ncxconst.h"
49#endif
50
51#ifndef _H_ncxtypes
52#include "ncxtypes.h"
53#endif
54
55#ifndef _H_status
56#include "status.h"
57#endif
58
59#ifndef _H_tk
60#include "tk.h"
61#endif
62
63#ifndef _H_xmlns
64#include "xmlns.h"
65#endif
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71
72/* Heading only */
73
120/********************************************************************
121* *
122* C O N S T A N T S *
123* *
124*********************************************************************/
125
126/* decimal64 constants */
127#define TYP_DEC64_MIN_DIGITS 1
128#define TYP_DEC64_MAX_DIGITS 18
129
130/* typ_rangedef_t flags field */
131#define TYP_FL_LBINF bit0 /* lower bound = -INF */
132#define TYP_FL_LBINF2 bit1 /* lower bound = INF */
133#define TYP_FL_UBINF bit2 /* upper bound = INF */
134#define TYP_FL_UBINF2 bit3 /* upper bound = -INF */
135#define TYP_FL_LBMIN bit4 /* lower bound is set to 'min' */
136#define TYP_FL_LBMAX bit5 /* lower bound is set to 'max' */
137#define TYP_FL_UBMAX bit6 /* upper bound is set to 'max' */
138#define TYP_FL_UBMIN bit7 /* upper bound is set to 'min' */
139
140#define TYP_RANGE_FLAGS 0xff
141
142/* typ_enum_t flags field */
143#define TYP_FL_ESET bit0 /* value explicitly set */
144#define TYP_FL_ISBITS bit1 /* enum really used in bits */
145#define TYP_FL_SEEN bit2 /* used by yangdiff */
146
147/* typ_sval_t flags field */
148#define TYP_FL_USTRING bit0 /* value is ustring, not string */
149
150/* typ_simple_t flags field */
151#define TYP_FL_REPLACE bit0 /* Replace if set; extend if not */
152#define TYP_FL_CONSET bit1 /* constrained field set */
153
154/* typ_def_t flags */
155#define TYP_FL_RESOLVE_SKIPPED bit0
156#define TYP_FL_DEVIATE_SKIPPED bit1
157#define TYP_FL_FIND_SKIPPED bit2
158#define TYP_FL_FROM_ANNOTATION bit3
159
160
161/* FL_RESOLVE_SKIPPED is se in yang_typ if a deviation cannot be
162 * resolved while in deviation mode; The type will be resolved
163 * later in the validation process
164 */
165#define TYP_IS_RESOLVE_SKIPPED(T) ((T)->flags & TYP_FL_RESOLVE_SKIPPED)
166
167#define TYP_SET_RESOLVE_SKIPPED(T) (T)->flags |= TYP_FL_RESOLVE_SKIPPED
168
169/* FL_DEVIATE_SKIPPED is set in yang_obj:resolve_deviation
170 * if the type is not known yet and deffered for later
171 */
172#define TYP_IS_DEVIATE_SKIPPED(T) ((T)->flags & TYP_FL_DEVIATE_SKIPPED)
173
174#define TYP_SET_DEVIATE_SKIPPED(T) (T)->flags |= TYP_FL_DEVIATE_SKIPPED
175
176/* FL_FIND_SKIPPED is set in yang_typ:consume_type
177 * if the type is not known yet and import deffered for later
178 */
179#define TYP_IS_FIND_SKIPPED(T) ((T)->flags & TYP_FL_FIND_SKIPPED)
180
181#define TYP_SET_FIND_SKIPPED(T) (T)->flags |= TYP_FL_FIND_SKIPPED
182
183
184
185/* FL_FROM_ANNOTATION is set in yang_typ:consume_annotation
186 * indicates the metaval is a user-data-node from a
187 * YANG module md:annotation-stmt
188 */
189#define TYP_IS_FROM_ANNOTATION(T) ((T)->flags & TYP_FL_FROM_ANNOTATION)
190
191#define TYP_SET_FROM_ANNOTATION(T) (T)->flags |= TYP_FL_FROM_ANNOTATION
192
193
194
195/********************************************************************
196* *
197* T Y P E S *
198* *
199*********************************************************************/
200
201
203typedef enum typ_pmode_t_ {
209
210
214typedef struct typ_listval_t_ {
215 dlq_hdr_t qhdr;
216 dlq_hdr_t strQ;
219
220
258typedef struct typ_rangedef_t_ {
259 dlq_hdr_t qhdr;
260 xmlChar *rangestr;
264 xmlChar *lbstr;
265 xmlChar *ubstr;
267 uint8 flags;
269
270
274typedef struct typ_enum_t_ {
275 dlq_hdr_t qhdr;
278 xmlChar *name;
279
281 xmlChar *descr;
282
284 xmlChar *ref;
285
288
290 int32 val;
291
293 uint32 pos;
294
296 dlq_hdr_t appinfoQ;
297
299 dlq_hdr_t iffeatureQ;
300
302 uint8 flags;
303
306} typ_enum_t;
307
308
312typedef struct typ_sval_t_ {
313 dlq_hdr_t qhdr;
315 uint8 flags;
316} typ_sval_t;
317
318
320typedef struct typ_range_t_ {
321 xmlChar *rangestr;
322 dlq_hdr_t rangeQ;
327
328
333typedef struct typ_pattern_t_ {
334 dlq_hdr_t qhdr;
337 union p_ {
338 xmlRegexpPtr pattern;
339 regex_t ocpattern;
340 } p;
341
343 xmlChar *pat_str;
344
347
348 // YANG 1.1 allows pattern modifier invert-match;
349 boolean pat_inverted;
350
353
356
365
367
368
373typedef struct typ_idref_t {
374 dlq_hdr_t qhdr;
375 xmlChar *baseprefix;
376 xmlChar *basename;
378 const xmlChar *modname;
380
381
409typedef struct typ_simple_t_ {
411 struct typ_template_t_ *listtyp;
412 struct xpath_pcb_t_ *xleafref;
415 struct typ_def_t_ *xrefdef;
416
419
420 boolean constrained;
422 dlq_hdr_t idrefQ;
423 dlq_hdr_t valQ;
424 dlq_hdr_t metaQ;
425 dlq_hdr_t unionQ;
426 dlq_hdr_t patternQ;
428 uint32 maxbit;
429 int32 maxenum;
430 uint8 digits;
431 uint8 flags;
433
434
444typedef struct typ_named_t_ {
445 struct typ_template_t_ *typ;
446 struct typ_def_t_ *newtyp;
449
450
458typedef struct typ_ref_t_ {
459 struct typ_def_t_ *typdef;
460} typ_ref_t;
461
462
464typedef union typ_def_u_t_ {
470
471
480typedef struct typ_def_t_ {
486 xmlChar *prefix;
487 xmlChar *typenamestr;
488 const xmlChar *yang_name;
489 dlq_hdr_t appinfoQ;
492 uint32 linenum;
493 uint8 flags;
494 struct typ_userdef_t_ *userdef;
495} typ_def_t;
496
497
501typedef struct typ_template_t_ {
502 dlq_hdr_t qhdr;
505 xmlChar *name;
506
508 xmlChar *descr;
509
511 xmlChar *ref;
512
514 xmlChar *defval;
515
517 xmlChar *units;
518
521
523 boolean used;
524
527
530
534 dlq_hdr_t appinfoQ;
535
537 dlq_hdr_t iffeatureQ;
538
540 void *grp;
541
544
547
550
553
555
556
562typedef struct typ_unionnode_t_ {
563 dlq_hdr_t qhdr;
566 boolean seen;
568
569
578typedef boolean
579 (*typ_union_walker_fn_t) (const xmlChar *the_typename,
580 void *cookie);
581
582
583
592typedef boolean
594 void *cookie);
595
596
609typedef boolean
611 typ_def_t *the_typdef,
612 void *cookie);
613
614
618/********************************************************************
619* *
620* F U N C T I O N S *
621* *
622*********************************************************************/
623
643extern status_t
644 typ_load_basetypes (void);
645
646
654extern void
656
657
663extern typ_template_t *
664 typ_new_template (void);
665
666
676extern void
678
679
685extern typ_def_t *
686 typ_new_typdef (void);
687
688
701extern void
702 typ_init_typdef (typ_def_t *typdef);
703
704
714extern void
716 ncx_btype_t btyp);
717
718
728extern void
730
731
738extern void
739 typ_free_typdef (typ_def_t *typdef);
740
741
747extern void
748 typ_clean_typdef (typ_def_t *typdef);
749
750
757extern void
759 typ_template_t *imptyp);
760
761
770extern void
772
773
780extern const xmlChar *
781 typ_get_named_typename (const typ_def_t *typdef);
782
783
790extern const xmlChar *
792
793
800extern uint32
802
803
811extern status_t
813 ncx_btype_t btyp);
814
815
822extern typ_def_t *
824
825
832extern const typ_def_t *
833 typ_cget_new_named (const typ_def_t *typdef);
834
835
842extern void
844 ncx_btype_t btyp);
845
846
856extern typ_enum_t *
857 typ_new_enum (const xmlChar *name);
858
859
871extern typ_enum_t *
872 typ_new_enum2 (xmlChar *name);
873
874
882extern void
884
885
891extern typ_rangedef_t *
892 typ_new_rangedef (void);
893
894
901extern void
903 ncx_btype_t btyp);
904
905
918extern void
919 typ_normalize_rangeQ (dlq_hdr_t *rangeQ,
920 ncx_btype_t btyp);
921
922
931extern dlq_hdr_t *
932 typ_get_rangeQ (typ_def_t *typdef);
933
934
942extern dlq_hdr_t *
944
945
954extern const dlq_hdr_t *
955 typ_get_crangeQ (const typ_def_t *typdef);
956
957
965extern const dlq_hdr_t *
966 typ_get_crangeQ_con (const typ_def_t *typdef);
967
968
976extern typ_range_t *
978
979
987extern const typ_range_t *
988 typ_get_crange_con (const typ_def_t *typdef);
989
990
997extern const xmlChar *
998 typ_get_rangestr (const typ_def_t *typdef);
999
1000
1009extern const typ_rangedef_t *
1010 typ_first_rangedef (const typ_def_t *typdef);
1011
1012
1020extern const typ_rangedef_t *
1021 typ_first_rangedef_con (const typ_def_t *typdef);
1022
1023
1039extern status_t
1040 typ_get_rangebounds_con (const typ_def_t *typdef,
1041 ncx_btype_t *btyp,
1042 const ncx_num_t **lb,
1043 const ncx_num_t **ub);
1044
1045
1052extern ncx_strrest_t
1053 typ_get_strrest (const typ_def_t *typdef);
1054
1055
1062extern void
1063 typ_set_strrest (typ_def_t *typdef,
1064 ncx_strrest_t strrest);
1065
1066
1075extern typ_sval_t *
1076 typ_new_sval (const xmlChar *str,
1077 ncx_btype_t btyp);
1078
1079
1086extern void
1088
1089
1096extern typ_listval_t *
1097 typ_new_listval (void);
1098
1099
1106extern void
1108
1109
1119extern ncx_btype_t
1121
1122
1132extern ncx_btype_t
1133 typ_get_basetype (const typ_def_t *typdef);
1134
1135
1146extern ncx_btype_t
1147 typ_get_basetype2 (typ_def_t *typdef);
1148
1149
1156extern const xmlChar *
1157 typ_get_name (const typ_def_t *typdef);
1158
1159
1166extern const xmlChar *
1168
1169
1176extern const xmlChar *
1178
1179
1187extern ncx_tclass_t
1188 typ_get_base_class (const typ_def_t *typdef);
1189
1190
1197extern typ_template_t *
1199
1200
1207extern typ_def_t *
1209
1210
1222extern typ_def_t *
1224
1225
1232extern const typ_template_t *
1234
1235
1245extern const typ_def_t *
1246 typ_get_cparent_typdef (const typ_def_t *typdef);
1247
1248
1259extern typ_def_t *
1261
1262
1274extern typ_def_t *
1276
1277
1287extern typ_def_t *
1289
1290
1301extern const typ_def_t *
1302 typ_get_cuserdef_typdef (const typ_def_t *typdef);
1303
1304
1312extern const typ_def_t *
1313 typ_get_cbase_typdef (const typ_def_t *typdef);
1314
1315
1335extern typ_def_t *
1337 ncx_squal_t squal);
1338
1339
1354extern const typ_def_t *
1355 typ_get_cqual_typdef (const typ_def_t *typdef,
1356 ncx_squal_t squal);
1357
1358
1367extern const ncx_appinfo_t *
1368 typ_find_appinfo (const typ_def_t *typdef,
1369 const xmlChar *prefix,
1370 const xmlChar *name);
1371
1372
1381extern const ncx_appinfo_t *
1382 typ_find_appinfo_con (const typ_def_t *typdef,
1383 const xmlChar *prefix,
1384 const xmlChar *name);
1385
1386
1394extern boolean
1395 typ_is_xpath_string (const typ_def_t *typdef);
1396
1397
1405extern boolean
1406 typ_is_qname_string (const typ_def_t *typdef);
1407
1408
1417extern boolean
1419
1420
1428extern const xmlChar *
1429 typ_get_defval (const typ_template_t *typ);
1430
1431
1439extern const xmlChar *
1440 typ_get_default (const typ_def_t *typdef);
1441
1442
1449extern ncx_iqual_t
1450 typ_get_iqualval (const typ_template_t *typ);
1451
1452
1459extern ncx_iqual_t
1460 typ_get_iqualval_def (const typ_def_t *typdef);
1461
1462
1469extern const xmlChar *
1470 typ_get_units (const typ_template_t *typ);
1471
1472
1483extern const xmlChar *
1484 typ_get_units_from_typdef (const typ_def_t *typdef);
1485
1486
1493extern boolean
1495
1496
1503extern boolean
1505
1506
1513extern boolean
1515
1516
1523extern boolean
1525
1526
1534extern typ_enum_t *
1535 typ_first_enumdef (typ_def_t *typdef);
1536
1537
1544extern typ_enum_t *
1545 typ_next_enumdef (typ_enum_t *enumdef);
1546
1547
1555extern typ_enum_t *
1557 uint32 num);
1558
1559
1567extern const typ_enum_t *
1568 typ_first_con_enumdef (const typ_def_t *typdef);
1569
1570
1578extern typ_enum_t *
1579 typ_find_enumdef (dlq_hdr_t *ebQ,
1580 const xmlChar *name);
1581
1582
1589extern uint32
1590 typ_enumdef_count (const typ_def_t *typdef);
1591
1592
1600extern boolean
1602 const xmlChar *valstr);
1603
1604
1611extern typ_def_t *
1613
1614
1622extern typ_enum_t *
1623 typ_get_enumdef (typ_def_t *typdef,
1624 const xmlChar *valstr);
1625
1626
1633extern const typ_sval_t *
1634 typ_first_strdef (const typ_def_t *typdef);
1635
1636
1643extern uint32
1644 typ_get_maxrows (const typ_def_t *typdef);
1645
1646
1656extern ncx_access_t
1657 typ_get_maxaccess (const typ_def_t *typdef);
1658
1659
1669extern ncx_data_class_t
1670 typ_get_dataclass (const typ_def_t *typdef);
1671
1672
1679extern ncx_merge_t
1680 typ_get_mergetype (const typ_def_t *typdef);
1681
1682
1689extern xmlns_id_t
1690 typ_get_nsid (const typ_template_t *typ);
1691
1692
1702extern typ_template_t *
1703 typ_get_listtyp (typ_def_t *typdef);
1704
1705
1715extern const typ_template_t *
1716 typ_get_clisttyp (const typ_def_t *typdef);
1717
1718
1725extern typ_unionnode_t *
1727
1728
1734extern void
1736
1737
1744extern typ_def_t *
1746
1747
1754extern typ_unionnode_t *
1756
1757
1765extern const typ_unionnode_t *
1766 typ_first_con_unionnode (const typ_def_t *typdef);
1767
1768
1776extern boolean
1778
1779
1787extern boolean
1789
1790
1798extern boolean
1799 typ_is_enum (ncx_btype_t btyp);
1800
1801
1809extern typ_pattern_t *
1810 typ_new_pattern (const xmlChar *pat_str,
1811 boolean ocmode);
1812
1813
1821extern void
1823
1824
1832extern status_t
1834
1835
1842extern typ_pattern_t *
1844
1845
1852extern typ_pattern_t *
1854
1855
1863extern const typ_pattern_t *
1864 typ_get_first_cpattern (const typ_def_t *typdef);
1865
1866
1874extern const typ_pattern_t *
1875 typ_get_next_cpattern (const typ_pattern_t *curpat);
1876
1877
1884extern uint32
1885 typ_get_pattern_count (const typ_def_t *typdef);
1886
1887
1894extern ncx_errinfo_t *
1896
1897
1903extern void
1904 typ_clean_typeQ (dlq_hdr_t *que);
1905
1906
1914extern boolean
1916 ncx_btype_t btyp);
1917
1918
1925extern boolean
1927
1928
1936extern boolean
1938 ncx_btype_t btyp);
1939
1940
1950extern boolean
1951 typ_ok (const typ_def_t *typdef);
1952
1953
1960extern boolean
1962
1963
1970extern const xmlChar *
1971 typ_get_leafref_path (const typ_def_t *typdef);
1972
1973
1980extern const void *
1981 typ_get_leafref_path_addr (const typ_def_t *typdef);
1982
1983
1990extern struct xpath_pcb_t_ *
1992
1993
2002
2003
2009extern void
2011
2012
2020extern boolean
2021 typ_get_constrained (const typ_def_t *typdef);
2022
2023
2030extern boolean
2031 typ_get_constrained_set (const typ_def_t *typdef);
2032
2033
2043extern void
2045 typ_def_t *target);
2046
2047
2057extern typ_def_t *
2059
2060
2070extern boolean
2071 typ_has_subclauses (const typ_def_t *typdef);
2072
2073
2080extern typ_idref_t *
2082
2083
2091extern typ_idref_t *
2093 typ_idref_t *curdef);
2094
2095
2103extern const typ_idref_t *
2105
2106
2114extern const typ_idref_t *
2115 typ_get_next_cidref (const typ_def_t *typdef,
2116 const typ_idref_t *curdef);
2117
2127extern uint8
2128 typ_get_fraction_digits (const typ_def_t *typdef);
2129
2130
2138extern status_t
2140 uint8 digits);
2141
2142
2149extern uint32
2151
2152
2159extern uint32
2160 typ_get_typdef_linenum (const typ_def_t *typdef);
2161
2162
2170extern void
2172 typ_union_walker_fn_t walkerfn,
2173 void *cookie);
2174
2175
2183extern void
2185 typ_union_walker2_fn_t walkerfn,
2186 void *cookie);
2187
2188
2196extern void
2198 typ_union_walker3_fn_t walkerfn,
2199 void *cookie);
2200
2201
2208extern const xmlChar *
2209 typ_get_yang_typename (const typ_def_t *typdef);
2210
2211
2222extern boolean
2224
2225
2231extern typ_idref_t *
2232 typ_new_idref (void);
2233
2234
2240extern void
2241 typ_free_idref (typ_idref_t *idref);
2242
2243
2247#ifdef __cplusplus
2248} /* end extern 'C' */
2249#endif
2250
2251#endif /* _H_typ */
status_t
global error return code
Definition: status_enum.h:219
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
ncx_leafref_class_t
Classification for the types of leafref path statements wrt/ how they can be cached.
Definition: ncxtypes.h:1625
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:607
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:1049
ncx_tclass_t
Enumeration of the basic value type classifications.
Definition: ncxtypes.h:430
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:841
ncx_iqual_t
The instance qualifier types are borrowed from ABNF and RelaxNG.
Definition: ncxtypes.h:483
ncx_strrest_t
Enumeration of string restriction types.
Definition: ncxtypes.h:511
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:236
ncx_access_t
NCX Access Control 'max-access' enumeration values Note that access control is applied to the session...
Definition: ncxtypes.h:205
ncx_data_class_t
NCX Persistence Control.
Definition: ncxtypes.h:226
ncx_merge_t
The merge type for the NETCONF merge operation.
Definition: ncxtypes.h:492
ncx_squal_t
typdef search qualifier list (internal compiler modes)
Definition: ncxtypes.h:501
const dlq_hdr_t * typ_get_crangeQ_con(const typ_def_t *typdef)
Return the rangeQ for the given typdef Do not follow typdef chains.
Definition: typ.c:1180
void typ_free_template(typ_template_t *typ)
Scrub the memory in a typ_template_t by freeing all the sub-fields and then freeing the entire struct...
Definition: typ.c:310
const typ_def_t * typ_get_cuserdef_typdef(const typ_def_t *typdef)
Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2317
uint32 typ_get_maxrows(const typ_def_t *typdef)
Get the maxrows value if it exists or zero if not.
Definition: typ.c:3582
void typ_free_rangedef(typ_rangedef_t *rv, ncx_btype_t btyp)
Free a typ_rangedef_t struct (range-stmt)
Definition: typ.c:901
const typ_def_t * typ_get_cparent_typdef(const typ_def_t *typdef)
Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2150
ncx_btype_t typ_get_range_type(ncx_btype_t btyp)
Get the correct typ_rangedef_t data type for the indicated base type.
Definition: typ.c:1724
typ_def_t * typ_get_unionnode_ptr(typ_unionnode_t *un)
Get the proper typdef pointer from a unionnode.
Definition: typ.c:3929
const typ_rangedef_t * typ_first_rangedef_con(const typ_def_t *typdef)
Return the lower bound range definition struct Constrain search to this typdef.
Definition: typ.c:1379
boolean typ_is_xpath_string(const typ_def_t *typdef)
Find the ncx:xpath extension within the specified typdef chain.
Definition: typ.c:2692
ncx_access_t typ_get_maxaccess(const typ_def_t *typdef)
Find the max-access value for the specified typdef.
Definition: typ.c:3620
const typ_def_t * typ_get_cbase_typdef(const typ_def_t *typdef)
Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed Also NCX_CL_REF pointer typdefs.
Definition: typ.c:2362
boolean typ_ok_for_metadata(ncx_btype_t btyp)
Check if the base type is okay to use in an XML attribute.
Definition: typ.c:4536
typ_def_t * typ_get_correct_enumdef(typ_def_t *typdef)
Get the typ_enum_t to use.
Definition: typ.c:3447
boolean typ_is_number(ncx_btype_t btyp)
Check if the base type is numeric.
Definition: typ.c:4042
ncx_strrest_t typ_get_strrest(const typ_def_t *typdef)
Get the string restrinvtion type set for this typdef.
Definition: typ.c:1521
const xmlChar * typ_get_named_type_modname(const typ_def_t *typdef)
Get the module name of the named typ.
Definition: typ.c:603
ncx_btype_t typ_get_basetype(const typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1770
ncx_data_class_t typ_get_dataclass(const typ_def_t *typdef)
Find the data-class value for the specified typdef.
Definition: typ.c:3664
const typ_idref_t * typ_get_first_cidref(typ_def_t *typdef)
Get the idref field if this is an NCX_BT_IDREF typdef Const version.
Definition: typ.c:5182
typ_def_t * typ_get_next_typdef(typ_def_t *typdef)
Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2189
uint32 typ_get_typ_linenum(const typ_template_t *typ)
Get the line number for the typ_template_t.
Definition: typ.c:5314
typ_idref_t * typ_get_next_idref(typ_def_t *typdef, typ_idref_t *curdef)
Get the next idref field if this is an NCX_BT_IDREF typdef.
Definition: typ.c:5156
void typ_free_sval(typ_sval_t *sv)
Free a typ_sval_t struct free a string descriptor.
Definition: typ.c:1645
ncx_iqual_t typ_get_iqualval_def(const typ_def_t *typdef)
Find the instance qualifier value enum for the specified type template.
Definition: typ.c:2938
void typ_clean_typeQ(dlq_hdr_t *que)
Clean a queue of typ_template_t structs.
Definition: typ.c:4460
typ_enum_t * typ_find_enumdef(dlq_hdr_t *ebQ, const xmlChar *name)
Get the specified enum def struct.
Definition: typ.c:3351
void typ_unload_basetypes(void)
Unload and destroy the typ_template_t structs for the base types unload the typ_template_t structs fo...
Definition: typ.c:252
struct xpath_pcb_t_ * typ_get_leafref_pcb(typ_def_t *typdef)
Get the XPath parser control block for the leafref data type returns xpath_pcb_t but cannot import du...
Definition: typ.c:4778
boolean typ_ok_for_union(ncx_yang_version_t langver, ncx_btype_t btyp)
Check if the base type is okay to use in an union decl.
Definition: typ.c:4554
ncx_btype_t typ_get_basetype2(typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1823
dlq_hdr_t * typ_get_rangeQ_con(typ_def_t *typdef)
Return the rangeQ for the given typdef Do not follow typdef chains.
Definition: typ.c:1093
const typ_idref_t * typ_get_next_cidref(const typ_def_t *typdef, const typ_idref_t *curdef)
Get the next idref field if this is an NCX_BT_IDREF typdef.
Definition: typ.c:5217
boolean typ_is_xsd_simple(ncx_btype_t btyp)
Check if this is a simple data type in XSD encoding.
Definition: typ.c:3168
ncx_merge_t typ_get_mergetype(const typ_def_t *typdef)
Get the merge type for a specified type def.
Definition: typ.c:3705
status_t typ_load_basetypes(void)
Create typ_template_t structs for the base types.
Definition: typ.c:196
typ_idref_t * typ_new_idref(void)
Malloc a new idref.
Definition: typ.c:5637
void typ_free_enum(typ_enum_t *en)
Free a typ_enum_t struct.
Definition: typ.c:851
const typ_def_t * typ_cget_new_named(const typ_def_t *typdef)
Access the new typdef inside a typ_named_t struct inside a typ_def_t.
Definition: typ.c:732
void typ_get_union_typdefs(typ_def_t *typdef, typ_union_walker3_fn_t walkerfn, void *cookie)
Walk the union type nodes to get the member typedefs
Definition: typ.c:5493
const xmlChar * typ_get_named_typename(const typ_def_t *typdef)
Get the type name of the named typ.
Definition: typ.c:577
const xmlChar * typ_get_rangestr(const typ_def_t *typdef)
Return the range string for the given typdef chain.
Definition: typ.c:1305
typ_enum_t * typ_new_enum(const xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:783
typ_range_t * typ_get_range_con(typ_def_t *typdef)
Return the range struct for the given typdef Do not follow typdef chains.
Definition: typ.c:1222
boolean typ_has_subclauses(const typ_def_t *typdef)
Check if the specified typdef has any sub-clauses.
Definition: typ.c:5039
const xmlChar * typ_get_yang_typename(const typ_def_t *typdef)
Get the YANG type name for this typdef if there is one.
Definition: typ.c:5560
const dlq_hdr_t * typ_get_crangeQ(const typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1135
typ_idref_t * typ_get_first_idref(typ_def_t *typdef)
Get the first idref field if this is an NCX_BT_IDREF typdef.
Definition: typ.c:5118
void typ_free_pattern(typ_pattern_t *pat)
Free a pattern struct.
Definition: typ.c:4168
const typ_def_t * typ_get_cqual_typdef(const typ_def_t *typdef, ncx_squal_t squal)
Get the final typ_def_t of the specified typ_def_t based on the qualifier.
Definition: typ.c:2511
typ_sval_t * typ_new_sval(const xmlChar *str, ncx_btype_t btyp)
Alloc and Init a typ_sval_t struct malloc and init a string descriptor.
Definition: typ.c:1606
boolean typ_ok_for_xsdlist(ncx_btype_t btyp)
Check if the base type is okay to use in an ncx:xsdlist typedef.
Definition: typ.c:4657
const ncx_appinfo_t * typ_find_appinfo_con(const typ_def_t *typdef, const xmlChar *prefix, const xmlChar *name)
Find the specified appinfo name, constrained to the current typdef.
Definition: typ.c:2663
typ_enum_t * typ_next_enumdef(typ_enum_t *enumdef)
Get the next enum def struct.
Definition: typ.c:3252
const typ_pattern_t * typ_get_first_cpattern(const typ_def_t *typdef)
Get the first pattern struct for a typdef Const version.
Definition: typ.c:4324
uint32 typ_get_named_type_linenum(const typ_def_t *typdef)
Get the line number of the type template of the named type.
Definition: typ.c:635
typ_pattern_t * typ_new_pattern(const xmlChar *pat_str, boolean ocmode)
Malloc and init a pattern struct.
Definition: typ.c:4129
typ_listval_t * typ_new_listval(void)
Alloc and Init a typ_listval_t struct malloc and init a list descriptor.
Definition: typ.c:1670
typ_enum_t * typ_get_enumdef(typ_def_t *typdef, const xmlChar *valstr)
Get the typ_enum_t.
Definition: typ.c:3494
boolean typ_is_enum(ncx_btype_t btyp)
Check if the base type is an enumeration.
Definition: typ.c:4105
uint32 typ_get_pattern_count(const typ_def_t *typdef)
Get the number of pattern structs in a typdef.
Definition: typ.c:4394
const ncx_appinfo_t * typ_find_appinfo(const typ_def_t *typdef, const xmlChar *prefix, const xmlChar *name)
Find the specified appinfo variable by its prefix and name.
Definition: typ.c:2610
typ_enum_t * typ_first_enumdef(typ_def_t *typdef)
Get the first enum def struct looks past named typedefs to base typedef.
Definition: typ.c:3224
void typ_normalize_rangeQ(dlq_hdr_t *rangeQ, ncx_btype_t btyp)
Start with a valid rangedef chain.
Definition: typ.c:942
const typ_template_t * typ_get_parent_type(const typ_template_t *typ)
Get the next typ_template_t in a chain – for NCX_CL_NAMED only.
Definition: typ.c:2114
boolean typ_has_children(ncx_btype_t btyp)
Check if this is a data type that uses the val.v.childQ.
Definition: typ.c:3062
const xmlChar * typ_get_defval(const typ_template_t *typ)
Find the default value string for the specified type template get default from template.
Definition: typ.c:2850
typ_unionnode_t * typ_first_unionnode(typ_def_t *typdef)
Get the first union node in the queue for a given typdef.
Definition: typ.c:3959
void typ_init_simple(typ_def_t *tdef, ncx_btype_t btyp)
Init a typ_simple_t struct inside a typ_def_t.
Definition: typ.c:404
status_t typ_set_new_named(typ_def_t *typdef, ncx_btype_t btyp)
Create a new typdef inside a typ_named_t struct inside a typ_def_t.
Definition: typ.c:663
void typ_unset_named_typdef(typ_def_t *typdef)
UnSet the typ link in a named typedef (used by YANG parser)
Definition: typ.c:556
void typ_free_unionnode(typ_unionnode_t *un)
Free a typ_unionnode_t struct.
Definition: typ.c:3902
const typ_unionnode_t * typ_first_con_unionnode(const typ_def_t *typdef)
Get the first union node in the queue for a given typdef constrained.
Definition: typ.c:4000
ncx_leafref_class_t typ_get_leafref_class(typ_def_t *typdef)
Get the leafref class for the leafref type.
Definition: typ.c:4811
status_t typ_set_fraction_digits(typ_def_t *typdef, uint8 digits)
Set the fraction-digits field from the typdef chain.
Definition: typ.c:5280
void typ_init_named(typ_def_t *tdef)
Init a typ_named_t struct inside a typ_def_t.
Definition: typ.c:447
boolean typ_is_schema_instance_string(const typ_def_t *typdef)
Find the ncx:schema-instance extension within the specified typdef chain.
Definition: typ.c:2795
boolean typ_get_constrained(const typ_def_t *typdef)
Get the constrained true/false field for the data type leafref or instance-identifier constrained fla...
Definition: typ.c:4869
const typ_pattern_t * typ_get_next_cpattern(const typ_pattern_t *curpat)
Get the next pattern struct for a typdef Const version.
Definition: typ.c:4370
const xmlChar * typ_get_basetype_name(const typ_template_t *typ)
Get the name of the final base type of the specified typ_template_t.
Definition: typ.c:1919
const typ_enum_t * typ_first_con_enumdef(const typ_def_t *typdef)
Get the first enum def struct constrained to this typdef.
Definition: typ.c:3313
typ_template_t * typ_new_template(void)
Malloc and initialize the fields in a typ_template_t.
Definition: typ.c:280
uint32 typ_enumdef_count(const typ_def_t *typdef)
Get the number of typ_enum_t Q entries.
Definition: typ.c:3384
const xmlChar * typ_get_name(const typ_def_t *typdef)
Get the name for the specified typdef.
Definition: typ.c:1877
const typ_range_t * typ_get_crange_con(const typ_def_t *typdef)
Return the range struct for the given typdef Do not follow typdef chains.
Definition: typ.c:1264
boolean typ_get_constrained_set(const typ_def_t *typdef)
Return TRUE if the require-instance stmt is set.
Definition: typ.c:4913
ncx_iqual_t typ_get_iqualval(const typ_template_t *typ)
Find the instance qualifier value enum for the specified type template.
Definition: typ.c:2916
void typ_set_strrest(typ_def_t *typdef, ncx_strrest_t strrest)
Set the string restrinvtion type set for this typdef.
Definition: typ.c:1565
boolean typ_ok_for_inline_index(ncx_yang_version_t langver, ncx_btype_t btyp)
Check if the base type is okay to use in an inline index decl.
Definition: typ.c:4485
typ_def_t * typ_get_userdef_typdef(typ_def_t *typdef)
Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2271
void typ_set_leafref_class_key(typ_def_t *typdef)
Change the leafref class for the type to NCX_LEAFREF_CLASS_KEY.
Definition: typ.c:4842
ncx_errinfo_t * typ_get_range_errinfo(typ_def_t *typdef)
Get the range errinfo for a typdef.
Definition: typ.c:4430
typ_def_t * typ_get_base_typdef(typ_def_t *typdef)
Get the base typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2233
typ_enum_t * typ_get_enumdef_n(typ_def_t *typdef, uint32 num)
Get the enum defs defined based on enum order.
Definition: typ.c:3276
dlq_hdr_t * typ_get_rangeQ(typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1049
const void * typ_get_leafref_path_addr(const typ_def_t *typdef)
Get the address of the path argument for the leafref data type.
Definition: typ.c:4742
ncx_tclass_t typ_get_base_class(const typ_def_t *typdef)
Follow any typdef links and get the class of the base typdef for the specified typedef.
Definition: typ.c:1978
typ_unionnode_t * typ_new_unionnode(typ_template_t *typ)
Alloc and Init a typ_unionnode_t struct.
Definition: typ.c:3877
void typ_clean_typdef(typ_def_t *typdef)
Clean a typ_def_t struct, but do not delete it.
Definition: typ.c:487
const typ_rangedef_t * typ_first_rangedef(const typ_def_t *typdef)
Return the lower bound range definition struct.
Definition: typ.c:1349
boolean typ_enumdef_conditional(typ_def_t *typdef, const xmlChar *valstr)
Check if the specified enumdef value is conditional on if-feature.
Definition: typ.c:3411
const xmlChar * typ_get_parenttype_name(const typ_template_t *typ)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1949
void typ_free_typdef(typ_def_t *typdef)
Scrub the memory in a typ_def_t by freeing all Then free the typdef itself.
Definition: typ.c:466
void typ_set_named_typdef(typ_def_t *typdef, typ_template_t *imptyp)
Set the fields in a named typedef (used by YANG parser)
Definition: typ.c:531
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3113
void typ_set_xref_typdef(typ_def_t *typdef, typ_def_t *target)
Set the target typdef for a leafref or instance-identifier NCX_BT_LEAFREF or NCX_BT_INSTANCE_ID.
Definition: typ.c:4956
void typ_init_typdef(typ_def_t *typdef)
init a pre-allocated typdef (done first)
Definition: typ.c:380
uint32 typ_get_typdef_linenum(const typ_def_t *typdef)
Get the line number for the typ_def_t.
Definition: typ.c:5337
status_t typ_compile_pattern(typ_pattern_t *pat)
Compile a pattern as into a regex_t struct.
Definition: typ.c:4212
boolean typ_ok(const typ_def_t *typdef)
Check if the typdef chain has any errors.
Definition: typ.c:4612
typ_pattern_t * typ_get_next_pattern(typ_pattern_t *curpat)
Get the next pattern struct for a typdef.
Definition: typ.c:4300
typ_def_t * typ_new_typdef(void)
Malloc and initialize the fields in a typ_def_t.
Definition: typ.c:353
boolean typ_is_string(ncx_btype_t btyp)
Check if the base type is a simple string (not list)
Definition: typ.c:4076
typ_template_t * typ_get_listtyp(typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3784
typ_rangedef_t * typ_new_rangedef(void)
Alloc and Init a typ_rangedef_t struct (range-stmt)
Definition: typ.c:878
uint8 typ_get_fraction_digits(const typ_def_t *typdef)
Get the fraction-digits field from the typdef chain typdef must be an NCX_BT_DECIMAL64 or 0 will be r...
Definition: typ.c:5245
boolean typ_has_index(ncx_btype_t btyp)
Check if this is a data type that has an index.
Definition: typ.c:3090
void typ_get_union_basetypes(typ_def_t *typdef, typ_union_walker2_fn_t walkerfn, void *cookie)
Walk the union type nodes to print the base type names.
Definition: typ.c:5428
void typ_set_simple_typdef(typ_template_t *typ, ncx_btype_t btyp)
Set the fields in a simple typedef (used by YANG parser)
Definition: typ.c:757
boolean typ_union_needs_xpath_check(typ_def_t *checkdef)
Walk the union type nodes to check if there are any unconstrained leafref or instance-identifier node...
Definition: typ.c:5585
typ_def_t * typ_get_qual_typdef(typ_def_t *typdef, ncx_squal_t squal)
Get the final typ_def_t of the specified typ_def_t based on the qualifier.
Definition: typ.c:2409
status_t typ_get_rangebounds_con(const typ_def_t *typdef, ncx_btype_t *btyp, const ncx_num_t **lb, const ncx_num_t **ub)
Return the lower and upper bound range number.
Definition: typ.c:1432
typ_def_t * typ_get_xref_typdef(typ_def_t *typdef)
Get the xrefdef target typdef from a leafref or instance-identifier.
Definition: typ.c:4994
const typ_sval_t * typ_first_strdef(const typ_def_t *typdef)
Get the first string def struct.
Definition: typ.c:3527
const typ_template_t * typ_get_clisttyp(const typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3832
typ_template_t * typ_get_basetype_typ(ncx_btype_t btyp)
Get the default typ_template_t for the specified base type.
Definition: typ.c:2019
const xmlChar * typ_get_default(const typ_def_t *typdef)
Check if this typdef has a default value defined get default from typdef.
Definition: typ.c:2884
typ_def_t * typ_get_parent_typdef(typ_def_t *typdef)
Get the next typ_def_t in a chain – for NCX_CL_NAMED chained typed.
Definition: typ.c:2075
const xmlChar * typ_get_units(const typ_template_t *typ)
Find the units string for the specified type template.
Definition: typ.c:2989
boolean typ_is_qname_string(const typ_def_t *typdef)
Find the ncx:qname extension within the specified typdef chain.
Definition: typ.c:2750
void typ_free_listval(typ_listval_t *lv)
Free a typ_listval_t struct free a list descriptor.
Definition: typ.c:1695
typ_enum_t * typ_new_enum2(xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:822
typ_def_t * typ_get_new_named(typ_def_t *typdef)
Access the new typdef inside a typ_named_t struct inside a typ_def_t.
Definition: typ.c:706
void typ_free_idref(typ_idref_t *idref)
Clean and freec an idref.
Definition: typ.c:5658
void typ_get_union_types(typ_def_t *typdef, typ_union_walker_fn_t walkerfn, void *cookie)
Walk the union type nodes to print the names.
Definition: typ.c:5358
typ_pattern_t * typ_get_first_pattern(typ_def_t *typdef)
Get the first pattern struct for a typdef.
Definition: typ.c:4255
typ_def_t * typ_get_basetype_typdef(ncx_btype_t btyp)
Get the default typdef for the specified base type.
Definition: typ.c:2045
xmlns_id_t typ_get_nsid(const typ_template_t *typ)
Return the namespace ID.
Definition: typ.c:3759
const xmlChar * typ_get_units_from_typdef(const typ_def_t *typdef)
Find the units string for the specified typdef template.
Definition: typ.c:3019
const xmlChar * typ_get_leafref_path(const typ_def_t *typdef)
Get the path argument for the leafref data type.
Definition: typ.c:4706
boolean(* typ_union_walker3_fn_t)(ncx_btype_t the_btype, typ_def_t *the_typdef, void *cookie)
CBOR parse union base type walker function.
Definition: typ.h:610
boolean(* typ_union_walker_fn_t)(const xmlChar *the_typename, void *cookie)
union typename walker function
Definition: typ.h:579
boolean(* typ_union_walker2_fn_t)(ncx_btype_t the_btype, void *cookie)
complex union base type walker function
Definition: typ.h:593
typ_pmode_t
type parser used in 3 separate modes
Definition: typ.h:203
@ TYP_PM_INDEX
index clause parse mode
Definition: typ.h:206
@ TYP_PM_NONE
not set
Definition: typ.h:204
@ TYP_PM_NORMAL
normal parse mode
Definition: typ.h:205
@ TYP_PM_MDATA
metadata clause parse mode
Definition: typ.h:207
Contains NCX constants.
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
YANG extension usage entry A nested external statement will produce a tree of ncx_appinfo_t.
Definition: ncxtypes.h:922
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1420
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:912
YANG identity entry.
Definition: ncxtypes.h:1143
Discriminated union for all data typedefs.
Definition: typ.h:480
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:490
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: typ.h:489
ncx_iqual_t iqual
instance qualifier (pre-YANG)
Definition: typ.h:482
ncx_data_class_t dataclass
data class (pre-YANG)
Definition: typ.h:484
typ_def_u_t def
union of type definition structs
Definition: typ.h:491
ncx_merge_t mergetype
merge type (pre-YANG
Definition: typ.h:485
xmlChar * typenamestr
typename used in type field
Definition: typ.h:487
xmlChar * prefix
pfix used in type field
Definition: typ.h:486
uint32 linenum
line number (internal use)
Definition: typ.h:492
ncx_access_t maxaccess
max-access
Definition: typ.h:483
uint8 flags
processing flags
Definition: typ.h:493
ncx_tclass_t tclass
type class
Definition: typ.h:481
const xmlChar * yang_name
name used in YANG typedef
Definition: typ.h:488
struct typ_userdef_t_ * userdef
user type def hooks
Definition: typ.h:494
one ENUM typdef value – stored in simple.valQ Used for NCX_BT_ENUM and NCX_BT_BITS data type
Definition: typ.h:274
dlq_hdr_t appinfoQ
any extensions found in the enum-stmt (not used by server)
Definition: typ.h:296
dlq_hdr_t iffeatureQ
YANG 1.1 or 1.0 if-feature statements.
Definition: typ.h:299
xmlChar * name
enum name
Definition: typ.h:278
int32 val
YANG value-stmt or implied value – used if NCX_BT_ENUM.
Definition: typ.h:290
ncx_status_t status
status-stmt (cannot be obsolete in the server
Definition: typ.h:287
xmlChar * ref
enum reference-stmt (not saved in server)
Definition: typ.h:284
dlq_hdr_t qhdr
queue header
Definition: typ.h:275
uint32 pos
YANG position-stmt or implied position – used if NCX_BT_BITS.
Definition: typ.h:293
xmlChar * descr
enum description-stmt (not saved in server)
Definition: typ.h:281
uint8 feature_flags
YANG 1.1 processing flags.
Definition: typ.h:305
uint8 flags
internal processing flags
Definition: typ.h:302
YANG identityref struct the value is an identity-stmt QName that has a base-stmt that resolves to the...
Definition: typ.h:373
xmlChar * basename
identity base name
Definition: typ.h:376
dlq_hdr_t qhdr
queue header
Definition: typ.h:374
xmlChar * baseprefix
identity base prefix
Definition: typ.h:375
ncx_identity_t * base
back-ptr to base (if found )
Definition: typ.h:377
const xmlChar * modname
back-ptr to the main mod name
Definition: typ.h:378
one list member stored in simple.queue of instance-qualified strings
Definition: typ.h:214
dlq_hdr_t strQ
Q of typ_sval_t.
Definition: typ.h:216
ncx_iqual_t iqual
instance qualifier for this listval
Definition: typ.h:217
dlq_hdr_t qhdr
queue header
Definition: typ.h:215
NCX_CL_NAMED.
Definition: typ.h:444
struct typ_template_t_ * typ
derived-from type
Definition: typ.h:445
struct typ_def_t_ * newtyp
opt.
Definition: typ.h:446
ncx_btype_t final_type
used for named types
Definition: typ.h:447
YANG pattern struct : N per typedef and also across N typdefs in a chain: all are ANDed together like...
Definition: typ.h:333
ncx_errinfo_t pat_errinfo
error override data for this pattern
Definition: typ.h:346
status_t pat_res
save error status for regex-filter usage if the pattern fails to compile the 'pat' will be saved in v...
Definition: typ.h:364
xmlChar * pat_str
pattern string
Definition: typ.h:343
boolean ocpattern_mode
YANG vs.
Definition: typ.h:352
dlq_hdr_t qhdr
queue header
Definition: typ.h:334
boolean ocpattern_set
make sure not to access ocpattern until set
Definition: typ.h:355
one YANG range description
Definition: typ.h:320
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:325
dlq_hdr_t rangeQ
Q of typ_rangedef_t.
Definition: typ.h:322
ncx_errinfo_t range_errinfo
error override data for this range
Definition: typ.h:323
xmlChar * rangestr
range string used in module
Definition: typ.h:321
ncx_status_t res
parser status
Definition: typ.h:324
one member of a range definition – stored in simple.rangeQ
Definition: typ.h:258
ncx_error_t tkerr
file and line infor for compiler
Definition: typ.h:266
ncx_num_t ub
upper bound
Definition: typ.h:262
xmlChar * ubstr
saved if range deferred
Definition: typ.h:265
ncx_num_t lb
lower bound
Definition: typ.h:261
dlq_hdr_t qhdr
queue header
Definition: typ.h:259
ncx_btype_t btyp
base type
Definition: typ.h:263
xmlChar * lbstr
saved if range deferred
Definition: typ.h:264
xmlChar * rangestr
saved in YANG only
Definition: typ.h:260
uint8 flags
internal processing flags
Definition: typ.h:267
NCX_CL_REF.
Definition: typ.h:458
struct typ_def_t_ * typdef
fwd pointer
Definition: typ.h:459
NCX_CL_SIMPLE.
Definition: typ.h:409
ncx_leafref_class_t leafref_class
if this is a leafref then it is classified for optimization
Definition: typ.h:418
struct typ_template_t_ * listtyp
template for NCX_BT_SLIST
Definition: typ.h:411
dlq_hdr_t idrefQ
for NCX_BT_IDREF only
Definition: typ.h:422
dlq_hdr_t unionQ
Q of typ_unionnode_t for NCX_BT_UNION.
Definition: typ.h:425
typ_range_t range
for all num types and string length
Definition: typ.h:421
uint32 maxbit
max bit position in valQ
Definition: typ.h:428
uint8 digits
fraction-digits for decimal64
Definition: typ.h:430
dlq_hdr_t patternQ
Q of ncx_pattern_t for NCX_BT_STRING.
Definition: typ.h:426
ncx_btype_t btyp
NCX base type.
Definition: typ.h:410
ncx_strrest_t strrest
string/type restriction type in valQ
Definition: typ.h:427
boolean constrained
set when require-instance=TRUE
Definition: typ.h:420
struct typ_def_t_ * xrefdef
pointer to resolved typedef for NCX_BT_LEAFREF/NCX_BT_INSTANCE_ID
Definition: typ.h:415
dlq_hdr_t metaQ
Q of obj_template_t structs.
Definition: typ.h:424
int32 maxenum
max enum value in valQ
Definition: typ.h:429
uint8 flags
TYP_FL_REPLACE, TYP_FL_CONSET used.
Definition: typ.h:431
struct xpath_pcb_t_ * xleafref
saved for NCX_BT_LEAFREF only
Definition: typ.h:412
dlq_hdr_t valQ
bit, enum, string, list vals/patterns
Definition: typ.h:423
one STRING typdef value, pattern value
Definition: typ.h:312
dlq_hdr_t qhdr
queue header
Definition: typ.h:313
ncx_str_t val
value string used in the pattern
Definition: typ.h:314
uint8 flags
internal processing flags
Definition: typ.h:315
One YANG 'typedef' definition – top-level type template Also used for a YANG Metadata Annotation.
Definition: typ.h:501
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:546
dlq_hdr_t appinfoQ
any external statements within the typedef several extensions supported in the server for this codepo...
Definition: typ.h:534
dlq_hdr_t iffeatureQ
YANG 1.1 or 1.0 if-feature statements for annotation only.
Definition: typ.h:537
xmlChar * name
typedef name
Definition: typ.h:505
ncx_status_t status
status-stmt
Definition: typ.h:526
xmlChar * ref
typedef reference-stmt (not saved in server)
Definition: typ.h:511
dlq_hdr_t qhdr
queue header
Definition: typ.h:502
typ_def_t typdef
each typedef has one type-stmt within it
Definition: typ.h:529
status_t res
compiler parse status
Definition: typ.h:543
xmlChar * descr
typedef description-stmt (not saved in server)
Definition: typ.h:508
boolean used
flag used by compiler for not used warning
Definition: typ.h:523
xmlChar * units
type units-stmt
Definition: typ.h:517
uint8 feature_flags
internal flags for YANG 1.1 annotation processing
Definition: typ.h:552
xmlChar * defval
type default-stmt : for typedef only!
Definition: typ.h:514
boolean is_annotation
flag to indicate this entry is for an annotation
Definition: typ.h:549
void * grp
const back-ptr to direct grp parent for typedef only
Definition: typ.h:540
xmlns_id_t nsid
namespace ID for the typedef
Definition: typ.h:520
One YANG union node One of the 2 pointers (typ or typdef will be NULL If a named type is used,...
Definition: typ.h:562
dlq_hdr_t qhdr
queue header
Definition: typ.h:563
typ_def_t * typdef
malloced for unnamed inline type
Definition: typ.h:565
typ_template_t * typ
not malloced, just back-ptr
Definition: typ.h:564
boolean seen
needed for yangdiff
Definition: typ.h:566
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:819
Union of all the typdef variants.
Definition: typ.h:464
ncx_btype_t base
base type used
Definition: typ.h:465
typ_ref_t ref
internal type reference
Definition: typ.h:468
typ_named_t named
named type
Definition: typ.h:467
typ_simple_t simple
simple type inline
Definition: typ.h:466
union contains either a YANG pattern or an OC pattern
Definition: typ.h:337
regex_t ocpattern
openconfig patterm (POSIX)
Definition: typ.h:339
xmlRegexpPtr pattern
YANG pattern (XSD)
Definition: typ.h:338
XML namespace support.