yumapro  20.10-12
YumaPro SDK
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 
34 date init comment
35 ----------------------------------------------------------------------
36 22-oct-05 abb Begun
37 13-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
68 extern "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 
159 
160 /* FL_RESOLVE_SKIPPED is se in yang_typ if a deviation cannot be
161  * resolved while in deviation mode; The type will be resolved
162  * later in the validation process
163  */
164 #define TYP_IS_RESOLVE_SKIPPED(T) ((T)->flags & TYP_FL_RESOLVE_SKIPPED)
165 
166 #define TYP_SET_RESOLVE_SKIPPED(T) (T)->flags |= TYP_FL_RESOLVE_SKIPPED
167 
168 /* FL_DEVIATE_SKIPPED is set in yang_obj:resolve_deviation
169  * if the type is not known yet and deffered for later
170  */
171 #define TYP_IS_DEVIATE_SKIPPED(T) ((T)->flags & TYP_FL_DEVIATE_SKIPPED)
172 
173 #define TYP_SET_DEVIATE_SKIPPED(T) (T)->flags |= TYP_FL_DEVIATE_SKIPPED
174 
175 /* FL_FIND_SKIPPED is set in yang_typ:consume_type
176  * if the type is not known yet and import deffered for later
177  */
178 #define TYP_IS_FIND_SKIPPED(T) ((T)->flags & TYP_FL_FIND_SKIPPED)
179 
180 #define TYP_SET_FIND_SKIPPED(T) (T)->flags |= TYP_FL_FIND_SKIPPED
181 
182 
183 /********************************************************************
184 * *
185 * T Y P E S *
186 * *
187 *********************************************************************/
188 
189 
191 typedef enum typ_pmode_t_ {
192  TYP_PM_NONE,
193  TYP_PM_NORMAL,
194  TYP_PM_INDEX,
195  TYP_PM_MDATA
196 } typ_pmode_t;
197 
198 
202 typedef struct typ_listval_t_ {
203  dlq_hdr_t qhdr;
204  dlq_hdr_t strQ;
205  ncx_iqual_t iqual;
206 } typ_listval_t;
207 
208 
246 typedef struct typ_rangedef_t_ {
247  dlq_hdr_t qhdr;
248  xmlChar *rangestr;
249  ncx_num_t lb;
250  ncx_num_t ub;
251  ncx_btype_t btyp;
252  xmlChar *lbstr;
253  xmlChar *ubstr;
254  ncx_error_t tkerr;
255  uint8 flags;
256 } typ_rangedef_t;
257 
258 
262 typedef struct typ_enum_t_ {
263  dlq_hdr_t qhdr;
266  xmlChar *name;
267 
269  xmlChar *descr;
270 
272  xmlChar *ref;
273 
275  ncx_status_t status;
276 
278  int32 val;
279 
281  uint32 pos;
282 
284  dlq_hdr_t appinfoQ;
285 
287  dlq_hdr_t iffeatureQ;
288 
290  uint8 flags;
291 
294 } typ_enum_t;
295 
296 
300 typedef struct typ_sval_t_ {
301  dlq_hdr_t qhdr;
303  uint8 flags;
304 } typ_sval_t;
305 
306 
308 typedef struct typ_range_t_ {
309  xmlChar *rangestr;
310  dlq_hdr_t rangeQ;
311  ncx_errinfo_t range_errinfo;
312  ncx_status_t res;
313  ncx_error_t tkerr;
314 } typ_range_t;
315 
316 
321 typedef struct typ_pattern_t_ {
322  dlq_hdr_t qhdr;
325  union p_ {
326  xmlRegexpPtr pattern;
327  regex_t ocpattern;
328  } p;
329 
331  xmlChar *pat_str;
332 
334  ncx_errinfo_t pat_errinfo;
335 
336  // YANG 1.1 allows pattern modifier invert-match;
337  boolean pat_inverted;
338 
340  boolean ocpattern_mode;
341 
343  boolean ocpattern_set;
344 } typ_pattern_t;
345 
346 
351 typedef struct typ_idref_t {
352  dlq_hdr_t qhdr;
353  xmlChar *baseprefix;
354  xmlChar *basename;
355  ncx_identity_t *base;
356  const xmlChar *modname;
357 } typ_idref_t;
358 
359 
387 typedef struct typ_simple_t_ {
388  ncx_btype_t btyp;
394 
396  ncx_leafref_class_t leafref_class;
397 
398  boolean constrained;
399  typ_range_t range;
400  dlq_hdr_t idrefQ;
401  dlq_hdr_t valQ;
402  dlq_hdr_t metaQ;
403  dlq_hdr_t unionQ;
404  dlq_hdr_t patternQ;
405  ncx_strrest_t strrest;
406  uint32 maxbit;
407  int32 maxenum;
408  uint8 digits;
409  uint8 flags;
410 } typ_simple_t;
411 
412 
422 typedef struct typ_named_t_ {
424  struct typ_def_t_ *newtyp;
425  ncx_btype_t final_type;
426 } typ_named_t;
427 
428 
436 typedef struct typ_ref_t_ {
437  struct typ_def_t_ *typdef;
438 } typ_ref_t;
439 
440 
442 typedef union typ_def_u_t_ {
443  ncx_btype_t base;
444  typ_simple_t simple;
445  typ_named_t named;
446  typ_ref_t ref;
447 } typ_def_u_t;
448 
449 
458 typedef struct typ_def_t_ {
459  ncx_tclass_t tclass;
460  ncx_iqual_t iqual;
461  ncx_access_t maxaccess;
462  ncx_data_class_t dataclass;
463  ncx_merge_t mergetype;
464  xmlChar *prefix;
465  xmlChar *typenamestr;
466  const xmlChar *yang_name;
467  dlq_hdr_t appinfoQ;
468  ncx_error_t tkerr;
469  typ_def_u_t def;
470  uint32 linenum;
471  uint8 flags;
473 } typ_def_t;
474 
475 
477 typedef struct typ_template_t_ {
478  dlq_hdr_t qhdr;
481  xmlChar *name;
482 
484  xmlChar *descr;
485 
487  xmlChar *ref;
488 
490  xmlChar *defval;
491 
493  xmlChar *units;
494 
497 
499  boolean used;
500 
502  ncx_status_t status;
503 
505  typ_def_t typdef;
506 
510  dlq_hdr_t appinfoQ;
511 
513  void *grp;
514 
516  status_t res;
517 
519  ncx_error_t tkerr;
520 } typ_template_t;
521 
522 
528 typedef struct typ_unionnode_t_ {
529  dlq_hdr_t qhdr;
530  typ_template_t *typ;
531  typ_def_t *typdef;
532  boolean seen;
533 } typ_unionnode_t;
534 
535 
544 typedef boolean
545  (*typ_union_walker_fn_t) (const xmlChar *the_typename,
546  void *cookie);
547 
548 
549 
558 typedef boolean
559  (*typ_union_walker2_fn_t) (ncx_btype_t the_btype,
560  void *cookie);
561 
562 
566 /********************************************************************
567 * *
568 * F U N C T I O N S *
569 * *
570 *********************************************************************/
571 
591 extern status_t
592  typ_load_basetypes (void);
593 
594 
602 extern void
603  typ_unload_basetypes (void);
604 
605 
611 extern typ_template_t *
612  typ_new_template (void);
613 
614 
624 extern void
625  typ_free_template (typ_template_t *typ);
626 
627 
633 extern typ_def_t *
634  typ_new_typdef (void);
635 
636 
649 extern void
650  typ_init_typdef (typ_def_t *typdef);
651 
652 
662 extern void
663  typ_init_simple (typ_def_t *tdef,
664  ncx_btype_t btyp);
665 
666 
676 extern void
677  typ_init_named (typ_def_t *tdef);
678 
679 
686 extern void
687  typ_free_typdef (typ_def_t *typdef);
688 
689 
695 extern void
696  typ_clean_typdef (typ_def_t *typdef);
697 
698 
705 extern void
706  typ_set_named_typdef (typ_def_t *typdef,
707  typ_template_t *imptyp);
708 
709 
718 extern void
719  typ_unset_named_typdef (typ_def_t *typdef);
720 
721 
728 extern const xmlChar *
729  typ_get_named_typename (const typ_def_t *typdef);
730 
731 
738 extern const xmlChar *
739  typ_get_named_type_modname (const typ_def_t *typdef);
740 
741 
748 extern uint32
749  typ_get_named_type_linenum (const typ_def_t *typdef);
750 
751 
759 extern status_t
760  typ_set_new_named (typ_def_t *typdef,
761  ncx_btype_t btyp);
762 
763 
770 extern typ_def_t *
771  typ_get_new_named (typ_def_t *typdef);
772 
773 
780 extern const typ_def_t *
781  typ_cget_new_named (const typ_def_t *typdef);
782 
783 
790 extern void
791  typ_set_simple_typdef (typ_template_t *typ,
792  ncx_btype_t btyp);
793 
794 
804 extern typ_enum_t *
805  typ_new_enum (const xmlChar *name);
806 
807 
819 extern typ_enum_t *
820  typ_new_enum2 (xmlChar *name);
821 
822 
830 extern void
831  typ_free_enum (typ_enum_t *en);
832 
833 
839 extern typ_rangedef_t *
840  typ_new_rangedef (void);
841 
842 
849 extern void
850  typ_free_rangedef (typ_rangedef_t *rv,
851  ncx_btype_t btyp);
852 
853 
866 extern void
867  typ_normalize_rangeQ (dlq_hdr_t *rangeQ,
868  ncx_btype_t btyp);
869 
870 
879 extern dlq_hdr_t *
880  typ_get_rangeQ (typ_def_t *typdef);
881 
882 
890 extern dlq_hdr_t *
891  typ_get_rangeQ_con (typ_def_t *typdef);
892 
893 
902 extern const dlq_hdr_t *
903  typ_get_crangeQ (const typ_def_t *typdef);
904 
905 
913 extern const dlq_hdr_t *
914  typ_get_crangeQ_con (const typ_def_t *typdef);
915 
916 
924 extern typ_range_t *
925  typ_get_range_con (typ_def_t *typdef);
926 
927 
935 extern const typ_range_t *
936  typ_get_crange_con (const typ_def_t *typdef);
937 
938 
945 extern const xmlChar *
946  typ_get_rangestr (const typ_def_t *typdef);
947 
948 
957 extern const typ_rangedef_t *
958  typ_first_rangedef (const typ_def_t *typdef);
959 
960 
968 extern const typ_rangedef_t *
969  typ_first_rangedef_con (const typ_def_t *typdef);
970 
971 
987 extern status_t
988  typ_get_rangebounds_con (const typ_def_t *typdef,
989  ncx_btype_t *btyp,
990  const ncx_num_t **lb,
991  const ncx_num_t **ub);
992 
993 
1000 extern ncx_strrest_t
1001  typ_get_strrest (const typ_def_t *typdef);
1002 
1003 
1010 extern void
1011  typ_set_strrest (typ_def_t *typdef,
1012  ncx_strrest_t strrest);
1013 
1014 
1023 extern typ_sval_t *
1024  typ_new_sval (const xmlChar *str,
1025  ncx_btype_t btyp);
1026 
1027 
1034 extern void
1035  typ_free_sval (typ_sval_t *sv);
1036 
1037 
1044 extern typ_listval_t *
1045  typ_new_listval (void);
1046 
1047 
1054 extern void
1055  typ_free_listval (typ_listval_t *lv);
1056 
1057 
1067 extern ncx_btype_t
1068  typ_get_range_type (ncx_btype_t btyp);
1069 
1070 
1080 extern ncx_btype_t
1081  typ_get_basetype (const typ_def_t *typdef);
1082 
1083 
1094 extern ncx_btype_t
1095  typ_get_basetype2 (typ_def_t *typdef);
1096 
1097 
1104 extern const xmlChar *
1105  typ_get_name (const typ_def_t *typdef);
1106 
1107 
1114 extern const xmlChar *
1115  typ_get_basetype_name (const typ_template_t *typ);
1116 
1117 
1124 extern const xmlChar *
1125  typ_get_parenttype_name (const typ_template_t *typ);
1126 
1127 
1135 extern ncx_tclass_t
1136  typ_get_base_class (const typ_def_t *typdef);
1137 
1138 
1145 extern typ_template_t *
1146  typ_get_basetype_typ (ncx_btype_t btyp);
1147 
1148 
1155 extern typ_def_t *
1156  typ_get_basetype_typdef (ncx_btype_t btyp);
1157 
1158 
1170 extern typ_def_t *
1171  typ_get_parent_typdef (typ_def_t *typdef);
1172 
1173 
1180 extern const typ_template_t *
1181  typ_get_parent_type (const typ_template_t *typ);
1182 
1183 
1193 extern const typ_def_t *
1194  typ_get_cparent_typdef (const typ_def_t *typdef);
1195 
1196 
1207 extern typ_def_t *
1208  typ_get_next_typdef (typ_def_t *typdef);
1209 
1210 
1222 extern typ_def_t *
1223  typ_get_base_typdef (typ_def_t *typdef);
1224 
1225 
1235 extern typ_def_t *
1236  typ_get_userdef_typdef (typ_def_t *typdef);
1237 
1238 
1249 extern const typ_def_t *
1250  typ_get_cuserdef_typdef (const typ_def_t *typdef);
1251 
1252 
1260 extern const typ_def_t *
1261  typ_get_cbase_typdef (const typ_def_t *typdef);
1262 
1263 
1283 extern typ_def_t *
1284  typ_get_qual_typdef (typ_def_t *typdef,
1285  ncx_squal_t squal);
1286 
1287 
1302 extern const typ_def_t *
1303  typ_get_cqual_typdef (const typ_def_t *typdef,
1304  ncx_squal_t squal);
1305 
1306 
1315 extern const ncx_appinfo_t *
1316  typ_find_appinfo (const typ_def_t *typdef,
1317  const xmlChar *prefix,
1318  const xmlChar *name);
1319 
1320 
1329 extern const ncx_appinfo_t *
1330  typ_find_appinfo_con (const typ_def_t *typdef,
1331  const xmlChar *prefix,
1332  const xmlChar *name);
1333 
1334 
1342 extern boolean
1343  typ_is_xpath_string (const typ_def_t *typdef);
1344 
1345 
1353 extern boolean
1354  typ_is_qname_string (const typ_def_t *typdef);
1355 
1356 
1365 extern boolean
1366  typ_is_schema_instance_string (const typ_def_t *typdef);
1367 
1368 
1376 extern const xmlChar *
1377  typ_get_defval (const typ_template_t *typ);
1378 
1379 
1387 extern const xmlChar *
1388  typ_get_default (const typ_def_t *typdef);
1389 
1390 
1397 extern ncx_iqual_t
1398  typ_get_iqualval (const typ_template_t *typ);
1399 
1400 
1407 extern ncx_iqual_t
1408  typ_get_iqualval_def (const typ_def_t *typdef);
1409 
1410 
1417 extern const xmlChar *
1418  typ_get_units (const typ_template_t *typ);
1419 
1420 
1431 extern const xmlChar *
1432  typ_get_units_from_typdef (const typ_def_t *typdef);
1433 
1434 
1441 extern boolean
1442  typ_has_children (ncx_btype_t btyp);
1443 
1444 
1451 extern boolean
1452  typ_has_index (ncx_btype_t btyp);
1453 
1454 
1461 extern boolean
1462  typ_is_simple (ncx_btype_t btyp);
1463 
1464 
1471 extern boolean
1472  typ_is_xsd_simple (ncx_btype_t btyp);
1473 
1474 
1482 extern typ_enum_t *
1483  typ_first_enumdef (typ_def_t *typdef);
1484 
1485 
1492 extern typ_enum_t *
1493  typ_next_enumdef (typ_enum_t *enumdef);
1494 
1495 
1503 extern typ_enum_t *
1504  typ_get_enumdef_n (typ_def_t *typdef,
1505  uint32 num);
1506 
1507 
1514 extern typ_enum_t *
1515  typ_first_enumdef2 (typ_def_t *typdef);
1516 
1517 
1525 extern const typ_enum_t *
1526  typ_first_con_enumdef (const typ_def_t *typdef);
1527 
1528 
1536 extern typ_enum_t *
1537  typ_find_enumdef (dlq_hdr_t *ebQ,
1538  const xmlChar *name);
1539 
1540 
1547 extern uint32
1548  typ_enumdef_count (const typ_def_t *typdef);
1549 
1550 
1558 extern boolean
1559  typ_enumdef_conditional (typ_def_t *typdef,
1560  const xmlChar *valstr);
1561 
1562 
1569 extern typ_def_t *
1570  typ_get_correct_enumdef (typ_def_t *typdef);
1571 
1572 
1580 extern typ_enum_t *
1581  typ_get_enumdef (typ_def_t *typdef,
1582  const xmlChar *valstr);
1583 
1584 
1591 extern const typ_sval_t *
1592  typ_first_strdef (const typ_def_t *typdef);
1593 
1594 
1601 extern uint32
1602  typ_get_maxrows (const typ_def_t *typdef);
1603 
1604 
1614 extern ncx_access_t
1615  typ_get_maxaccess (const typ_def_t *typdef);
1616 
1617 
1627 extern ncx_data_class_t
1628  typ_get_dataclass (const typ_def_t *typdef);
1629 
1630 
1637 extern ncx_merge_t
1638  typ_get_mergetype (const typ_def_t *typdef);
1639 
1640 
1647 extern xmlns_id_t
1648  typ_get_nsid (const typ_template_t *typ);
1649 
1650 
1660 extern typ_template_t *
1661  typ_get_listtyp (typ_def_t *typdef);
1662 
1663 
1673 extern const typ_template_t *
1674  typ_get_clisttyp (const typ_def_t *typdef);
1675 
1676 
1683 extern typ_unionnode_t *
1684  typ_new_unionnode (typ_template_t *typ);
1685 
1686 
1692 extern void
1693  typ_free_unionnode (typ_unionnode_t *un);
1694 
1695 
1702 extern typ_def_t *
1703  typ_get_unionnode_ptr (typ_unionnode_t *un);
1704 
1705 
1712 extern typ_unionnode_t *
1713  typ_first_unionnode (typ_def_t *typdef);
1714 
1715 
1723 extern const typ_unionnode_t *
1724  typ_first_con_unionnode (const typ_def_t *typdef);
1725 
1726 
1734 extern boolean
1735  typ_is_number (ncx_btype_t btyp);
1736 
1737 
1745 extern boolean
1746  typ_is_string (ncx_btype_t btyp);
1747 
1748 
1756 extern boolean
1757  typ_is_enum (ncx_btype_t btyp);
1758 
1759 
1767 extern typ_pattern_t *
1768  typ_new_pattern (const xmlChar *pat_str,
1769  boolean ocmode);
1770 
1771 
1779 extern void
1780  typ_free_pattern (typ_pattern_t *pat);
1781 
1782 
1790 extern status_t
1791  typ_compile_pattern (typ_pattern_t *pat);
1792 
1793 
1800 extern typ_pattern_t *
1801  typ_get_first_pattern (typ_def_t *typdef);
1802 
1803 
1810 extern typ_pattern_t *
1811  typ_get_next_pattern (typ_pattern_t *curpat);
1812 
1813 
1821 extern const typ_pattern_t *
1822  typ_get_first_cpattern (const typ_def_t *typdef);
1823 
1824 
1832 extern const typ_pattern_t *
1833  typ_get_next_cpattern (const typ_pattern_t *curpat);
1834 
1835 
1842 extern uint32
1843  typ_get_pattern_count (const typ_def_t *typdef);
1844 
1845 
1852 extern ncx_errinfo_t *
1853  typ_get_range_errinfo (typ_def_t *typdef);
1854 
1855 
1861 extern void
1862  typ_clean_typeQ (dlq_hdr_t *que);
1863 
1864 
1872 extern boolean
1873  typ_ok_for_inline_index (ncx_yang_version_t langver,
1874  ncx_btype_t btyp);
1875 
1876 
1883 extern boolean
1884  typ_ok_for_metadata (ncx_btype_t btyp);
1885 
1886 
1894 extern boolean
1895  typ_ok_for_union (ncx_yang_version_t langver,
1896  ncx_btype_t btyp);
1897 
1898 
1908 extern boolean
1909  typ_ok (const typ_def_t *typdef);
1910 
1911 
1918 extern boolean
1919  typ_ok_for_xsdlist (ncx_btype_t btyp);
1920 
1921 
1928 extern const xmlChar *
1929  typ_get_leafref_path (const typ_def_t *typdef);
1930 
1931 
1938 extern const void *
1939  typ_get_leafref_path_addr (const typ_def_t *typdef);
1940 
1941 
1948 extern struct xpath_pcb_t_ *
1949  typ_get_leafref_pcb (typ_def_t *typdef);
1950 
1951 
1958 extern ncx_leafref_class_t
1959  typ_get_leafref_class (typ_def_t *typdef);
1960 
1961 
1968 extern void
1969  typ_set_leafref_class_key (typ_def_t *typdef);
1970 
1971 
1979 extern boolean
1980  typ_get_constrained (const typ_def_t *typdef);
1981 
1982 
1989 extern boolean
1990  typ_get_constrained_set (const typ_def_t *typdef);
1991 
1992 
2001 extern void
2002  typ_set_xref_typdef (typ_def_t *typdef,
2003  typ_def_t *target);
2004 
2005 
2015 extern typ_def_t *
2016  typ_get_xref_typdef (typ_def_t *typdef);
2017 
2018 
2028 extern boolean
2029  typ_has_subclauses (const typ_def_t *typdef);
2030 
2031 
2038 extern typ_idref_t *
2039  typ_get_first_idref (typ_def_t *typdef);
2040 
2041 
2049 extern typ_idref_t *
2050  typ_get_next_idref (typ_def_t *typdef,
2051  typ_idref_t *curdef);
2052 
2053 
2061 extern const typ_idref_t *
2062  typ_get_first_cidref (typ_def_t *typdef);
2063 
2064 
2072 extern const typ_idref_t *
2073  typ_get_next_cidref (const typ_def_t *typdef,
2074  const typ_idref_t *curdef);
2075 
2085 extern uint8
2086  typ_get_fraction_digits (const typ_def_t *typdef);
2087 
2088 
2096 extern status_t
2097  typ_set_fraction_digits (typ_def_t *typdef,
2098  uint8 digits);
2099 
2100 
2107 extern uint32
2108  typ_get_typ_linenum (const typ_template_t *typ);
2109 
2110 
2117 extern uint32
2118  typ_get_typdef_linenum (const typ_def_t *typdef);
2119 
2120 
2128 extern void
2129  typ_get_union_types (typ_def_t *typdef,
2130  typ_union_walker_fn_t walkerfn,
2131  void *cookie);
2132 
2133 
2141 extern void
2142  typ_get_union_basetypes (typ_def_t *typdef,
2143  typ_union_walker2_fn_t walkerfn,
2144  void *cookie);
2145 
2146 
2153 extern const xmlChar *
2154  typ_get_yang_typename (const typ_def_t *typdef);
2155 
2156 
2167 extern boolean
2168  typ_union_needs_xpath_check (typ_def_t *checkdef);
2169 
2170 
2176 extern typ_idref_t *
2177  typ_new_idref (void);
2178 
2179 
2185 extern void
2186  typ_free_idref (typ_idref_t *idref);
2187 
2188 
2192 #ifdef __cplusplus
2193 } /* end extern 'C' */
2194 #endif
2195 
2196 #endif /* _H_typ */
typ_named_t_::typ
struct typ_template_t_ * typ
derived-from type
Definition: typ.h:423
typ_get_basetype
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:1764
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
typ_get_cparent_typdef
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:2144
typ_find_appinfo_con
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:2657
typ_first_con_unionnode
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:4020
NCX_MERGE_SORT
@ NCX_MERGE_SORT
merge sorted
Definition: ncxtypes.h:308
typ_get_unionnode_ptr
typ_def_t * typ_get_unionnode_ptr(typ_unionnode_t *un)
Get the proper typdef pointer from a unionnode.
Definition: typ.c:3948
typ_union_walker_fn_t
boolean(* typ_union_walker_fn_t)(const xmlChar *the_typename, void *cookie)
union typename walker function
Definition: typ.h:545
ncx_feature.h
NCX Module Library YANG Feature Utility Functions.
NCX_BT_INT32
@ NCX_BT_INT32
int32
Definition: ncxtypes.h:209
ncx_appinfo.h
NCX Module Library Extension (Application Info) Utility Functions.
typ_ok_for_union
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:4571
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
NCX_BT_CASE
@ NCX_BT_CASE
internal, not a real type
Definition: ncxtypes.h:227
NCX_BT_BINARY
@ NCX_BT_BINARY
binary (base64)
Definition: ncxtypes.h:218
typ_rangedef_t_::flags
uint8 flags
internal processing flags
Definition: typ.h:255
typ_set_fraction_digits
status_t typ_set_fraction_digits(typ_def_t *typdef, uint8 digits)
Set the fraction-digits field from the typdef chain.
Definition: typ.c:5288
typ_set_simple_typdef
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:758
typ_is_xpath_string
boolean typ_is_xpath_string(const typ_def_t *typdef)
Find the ncx:xpath extension within the specified typdef chain.
Definition: typ.c:2686
typ_get_nsid
xmlns_id_t typ_get_nsid(const typ_template_t *typ)
Return the namespace ID.
Definition: typ.c:3778
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
typ_simple_t_::range
typ_range_t range
for all num types and string length
Definition: typ.h:399
typ_init_typdef
void typ_init_typdef(typ_def_t *typdef)
init a pre-allocated typdef (done first)
Definition: typ.c:381
NCX_IQUAL_ONE
@ NCX_IQUAL_ONE
no iqual == 1
Definition: ncxtypes.h:297
typ_get_named_typename
const xmlChar * typ_get_named_typename(const typ_def_t *typdef)
Get the type name of the named typ.
Definition: typ.c:578
typ_set_leafref_class_key
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:4857
TYP_PM_INDEX
@ TYP_PM_INDEX
index clause parse mode
Definition: typ.h:198
typ_is_xsd_simple
boolean typ_is_xsd_simple(ncx_btype_t btyp)
Check if this is a simple data type in XSD encoding.
Definition: typ.c:3163
typ_pattern_t_::ocpattern_mode
boolean ocpattern_mode
YANG vs.
Definition: typ.h:340
typ_ok_for_metadata
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:4553
typ_first_rangedef_con
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:1376
typ_def_t_::linenum
uint32 linenum
line number (internal use)
Definition: typ.h:470
typ_get_named_type_linenum
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:636
NCX_PREFIX
#define NCX_PREFIX
default prefix to use for NCX namespace
Definition: ncxconst.h:244
typ_template_t_::typdef
typ_def_t typdef
each typedef has one type-stmt within it
Definition: typ.h:505
typ_ok_for_inline_index
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:4502
typ_pattern_t_::p_
union contains either a YANG pattern or an OC pattern
Definition: typ.h:325
typ_get_parent_typdef
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:2069
typ_get_constrained
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:4884
typ_unionnode_t_::typdef
typ_def_t * typdef
malloced for unnamed inline type
Definition: typ.h:531
NCX_CL_REF
@ NCX_CL_REF
internal reference to another type
Definition: ncxtypes.h:248
NCX_BT_BOOLEAN
@ NCX_BT_BOOLEAN
boolean
Definition: ncxtypes.h:206
typ_def_t_::def
typ_def_u_t def
union of type definition structs
Definition: typ.h:469
NCX_BT_INSTANCE_ID
@ NCX_BT_INSTANCE_ID
instance-identifier
Definition: ncxtypes.h:219
typ_def_u_t_::ref
typ_ref_t ref
internal type reference
Definition: typ.h:446
xml_util.h
XML Utilities.
typ_simple_t_::strrest
ncx_strrest_t strrest
string/type restriction type in valQ
Definition: typ.h:405
NCX_BT_IDREF
@ NCX_BT_IDREF
identityref
Definition: ncxtypes.h:222
typ_first_con_enumdef
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:3336
typ_rangedef_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:247
typ_get_rangeQ_con
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:1090
typ_get_next_pattern
typ_pattern_t * typ_get_next_pattern(typ_pattern_t *curpat)
Get the next pattern struct for a typdef.
Definition: typ.c:4317
NCX_BT_INTERN
@ NCX_BT_INTERN
not a real type, string buffer for contents
Definition: ncxtypes.h:231
ncx_clean_appinfoQ
void ncx_clean_appinfoQ(dlq_hdr_t *appinfoQ)
Check an initialized appinfoQ for any entries Remove them from the queue and delete them.
Definition: ncx_appinfo.c:723
typ_get_leafref_path
const xmlChar * typ_get_leafref_path(const typ_def_t *typdef)
Get the path argument for the leafref data type.
Definition: typ.c:4723
typ_ref_t_
NCX_CL_REF.
Definition: typ.h:436
typ_get_rangestr
const xmlChar * typ_get_rangestr(const typ_def_t *typdef)
Return the range string for the given typdef chain.
Definition: typ.c:1302
typ_is_number
boolean typ_is_number(ncx_btype_t btyp)
Check if the base type is numeric.
Definition: typ.c:4063
typ_named_t_
NCX_CL_NAMED.
Definition: typ.h:422
NCX_BT_LEAFREF
@ NCX_BT_LEAFREF
leafref (needs special processing)
Definition: ncxtypes.h:221
ncx_find_const_appinfo
const ncx_appinfo_t * ncx_find_const_appinfo(const dlq_hdr_t *appinfoQ, const xmlChar *prefix, const xmlChar *varname)
Find an appinfo entry by name (First match is returned) The entry returned is not removed from the Q ...
Definition: ncx_appinfo.c:544
tk.h
NCX Syntax Token Handler.
typ_union_walker2_fn_t
boolean(* typ_union_walker2_fn_t)(ncx_btype_t the_btype, void *cookie)
complex union base type walker function
Definition: typ.h:559
typ_simple_t_::unionQ
dlq_hdr_t unionQ
Q of typ_unionnode_t for NCX_BT_UNION.
Definition: typ.h:403
typ_set_new_named
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:664
typ_template_t_::res
status_t res
compiler parse status
Definition: typ.h:516
ncx_num.h
NCX Module Library Number Utility Functions.
typ_idref_t::baseprefix
xmlChar * baseprefix
identity base prefix
Definition: typ.h:353
typ_next_enumdef
typ_enum_t * typ_next_enumdef(typ_enum_t *enumdef)
Get the next enum def struct.
Definition: typ.c:3247
typ_find_appinfo
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:2604
typ_first_strdef
const typ_sval_t * typ_first_strdef(const typ_def_t *typdef)
Get the first string def struct.
Definition: typ.c:3546
typ_get_named_type_modname
const xmlChar * typ_get_named_type_modname(const typ_def_t *typdef)
Get the module name of the named typ.
Definition: typ.c:604
typ_new_idref
typ_idref_t * typ_new_idref(void)
Malloc a new idref.
Definition: typ.c:5574
typ_sval_t_::val
ncx_str_t val
value string used in the pattern
Definition: typ.h:302
typ_is_enum
boolean typ_is_enum(ncx_btype_t btyp)
Check if the base type is an enumeration.
Definition: typ.c:4126
typ_simple_t_::maxbit
uint32 maxbit
max bit position in valQ
Definition: typ.h:406
ncx_clean_iffeatureQ
void ncx_clean_iffeatureQ(dlq_hdr_t *iffeatureQ)
Clean a Q of malloced ncx_iffeature_t struct.
Definition: ncx_feature.c:720
typ_new_pattern
typ_pattern_t * typ_new_pattern(const xmlChar *pat_str, boolean ocmode)
Malloc and init a pattern struct.
Definition: typ.c:4150
typ_simple_t_::maxenum
int32 maxenum
max enum value in valQ
Definition: typ.h:407
typ_def_t_::userdef
struct typ_userdef_t_ * userdef
user type def hooks
Definition: typ.h:472
typ_range_t_::range_errinfo
ncx_errinfo_t range_errinfo
error override data for this range
Definition: typ.h:311
NCX_BT_ANYDATA
@ NCX_BT_ANYDATA
YANG 1.1 anydata.
Definition: ncxtypes.h:229
typ_template_t_::descr
xmlChar * descr
typedef description-stmt (not saved in server)
Definition: typ.h:484
dlq_lastEntry
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:352
NCX_IQUAL_NONE
@ NCX_IQUAL_NONE
value not set
Definition: ncxtypes.h:296
typ_range_t_::rangestr
xmlChar * rangestr
range string used in module
Definition: typ.h:309
YANG_SII_STRING
#define YANG_SII_STRING
schema instance identifier
Definition: yangconst.h:103
typ_unionnode_t_
One YANG union node One of the 2 pointers (typ or typdef will be NULL If a named type is used,...
Definition: typ.h:528
typ_userdef.h
User Defined Types.
typ_get_cqual_typdef
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:2505
typ_enum_t_::val
int32 val
YANG value-stmt or implied value – used if NCX_BT_ENUM.
Definition: typ.h:278
ncxconst.h
Contains NCX constants.
typ_userdef_clean_typdef
void typ_userdef_clean_typdef(typ_def_t *typdef)
Clean the user typedef fields.
Definition: typ_userdef.c:180
typ_rangedef_t_::rangestr
xmlChar * rangestr
saved in YANG only
Definition: typ.h:248
typ_get_mergetype
ncx_merge_t typ_get_mergetype(const typ_def_t *typdef)
Get the merge type for a specified type def.
Definition: typ.c:3724
typ_unionnode_t_::seen
boolean seen
needed for yangdiff
Definition: typ.h:532
typ_get_correct_enumdef
typ_def_t * typ_get_correct_enumdef(typ_def_t *typdef)
Get the typ_enum_t to use.
Definition: typ.c:3469
typ_sval_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:301
typ_simple_t_::xrefdef
struct typ_def_t_ * xrefdef
pointer to resolved typedef for NCX_BT_LEAFREF/NCX_BT_INSTANCE_ID
Definition: typ.h:393
NCX_IQUAL_ZMORE
@ NCX_IQUAL_ZMORE
'*' == 0 or more
Definition: ncxtypes.h:300
typ_clean_typdef
void typ_clean_typdef(typ_def_t *typdef)
Clean a typ_def_t struct, but do not delete it.
Definition: typ.c:488
typ_listval_t_::iqual
ncx_iqual_t iqual
instance qualifier for this listval
Definition: typ.h:205
typ_unionnode_t_::typ
typ_template_t * typ
not malloced, just back-ptr
Definition: typ.h:530
typ_free_enum
void typ_free_enum(typ_enum_t *en)
Free a typ_enum_t struct.
Definition: typ.c:848
NCX_BT_UINT8
@ NCX_BT_UINT8
uint8
Definition: ncxtypes.h:211
typ_free_sval
void typ_free_sval(typ_sval_t *sv)
Free a typ_sval_t struct free a string descriptor.
Definition: typ.c:1639
typ_new_listval
typ_listval_t * typ_new_listval(void)
Alloc and Init a typ_listval_t struct malloc and init a list descriptor.
Definition: typ.c:1664
typ_get_range_type
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:1718
typ_get_first_cpattern
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:4341
typ_get_iqualval
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:2910
typ_sval_t_::flags
uint8 flags
internal processing flags
Definition: typ.h:303
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
typ_enum_t_::feature_flags
uint8 feature_flags
YANG 1.1 processing flags.
Definition: typ.h:293
typ_get_clisttyp
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:3851
NCX_MERGE_NONE
@ NCX_MERGE_NONE
value not set
Definition: ncxtypes.h:305
typ_get_basetype_typdef
typ_def_t * typ_get_basetype_typdef(ncx_btype_t btyp)
Get the default typdef for the specified base type.
Definition: typ.c:2039
typ_set_named_typdef
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:532
typ_idref_t::modname
const xmlChar * modname
back-ptr to the main mod name
Definition: typ.h:356
NCX_BT_ENUM
@ NCX_BT_ENUM
enumeration
Definition: ncxtypes.h:204
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
typ_rangedef_t_
one member of a range definition – stored in simple.rangeQ
Definition: typ.h:246
NCX_BT_LIST
@ NCX_BT_LIST
internal, YANG list
Definition: ncxtypes.h:228
typ_template_t_::units
xmlChar * units
type units-stmt
Definition: typ.h:493
typ_enum_t_::status
ncx_status_t status
status-stmt (cannot be obsolete in the server
Definition: typ.h:275
typ_compile_pattern
status_t typ_compile_pattern(typ_pattern_t *pat)
Compile a pattern as into a regex_t struct.
Definition: typ.c:4232
typ_rangedef_t_::ub
ncx_num_t ub
upper bound
Definition: typ.h:250
typ_ok
boolean typ_ok(const typ_def_t *typdef)
Check if the typdef chain has any errors.
Definition: typ.c:4629
NCX_CL_SIMPLE
@ NCX_CL_SIMPLE
a restriction of a base type
Definition: ncxtypes.h:245
typ_get_leafref_path_addr
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:4759
NCX_BT_UINT64
@ NCX_BT_UINT64
uint64
Definition: ncxtypes.h:214
typ_get_first_idref
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:5136
NCX_SR_NONE
@ NCX_SR_NONE
not set
Definition: ncxtypes.h:324
typ_enum_t_::appinfoQ
dlq_hdr_t appinfoQ
any extensions found in the enum-stmt (not used by server)
Definition: typ.h:284
typ_ref_t_::typdef
struct typ_def_t_ * typdef
fwd pointer
Definition: typ.h:437
typ_get_fraction_digits
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:5253
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
typ_def_t_::yang_name
const xmlChar * yang_name
name used in YANG typedef
Definition: typ.h:466
typ_range_t_::tkerr
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:313
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
ncx_str_t
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:589
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
NCX_ACCESS_NONE
@ NCX_ACCESS_NONE
enum not explicitly set
Definition: ncxtypes.h:175
typ_get_parenttype_name
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:1943
typ_get_pattern_count
uint32 typ_get_pattern_count(const typ_def_t *typdef)
Get the number of pattern structs in a typdef.
Definition: typ.c:4411
typ_enumdef_count
uint32 typ_enumdef_count(const typ_def_t *typdef)
Get the number of typ_enum_t Q entries.
Definition: typ.c:3407
typ_cget_new_named
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:733
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
typ_get_union_basetypes
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:5436
NCX_CL_COMPLEX
@ NCX_CL_COMPLEX
a complex type
Definition: ncxtypes.h:246
NCX_SQUAL_META
@ NCX_SQUAL_META
search metadata
Definition: ncxtypes.h:317
typ_get_name
const xmlChar * typ_get_name(const typ_def_t *typdef)
Get the name for the specified typdef.
Definition: typ.c:1871
typ_get_next_cpattern
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:4387
NCX_BT_INT64
@ NCX_BT_INT64
int64
Definition: ncxtypes.h:210
typ_simple_t_
NCX_CL_SIMPLE.
Definition: typ.h:387
typ_simple_t_::constrained
boolean constrained
set when require-instance=TRUE
Definition: typ.h:398
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
typ_enumdef_conditional
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:3434
typ_rangedef_t_::tkerr
ncx_error_t tkerr
file and line infor for compiler
Definition: typ.h:254
typ_simple_t_::xleafref
struct xpath_pcb_t_ * xleafref
saved for NCX_BT_LEAFREF only
Definition: typ.h:390
typ_template_t_::tkerr
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:519
typ_is_qname_string
boolean typ_is_qname_string(const typ_def_t *typdef)
Find the ncx:qname extension within the specified typdef chain.
Definition: typ.c:2744
NCX_CL_NONE
@ NCX_CL_NONE
not set
Definition: ncxtypes.h:243
NCX_BT_EMPTY
@ NCX_BT_EMPTY
empty
Definition: ncxtypes.h:205
NCX_BT_UINT16
@ NCX_BT_UINT16
uint16
Definition: ncxtypes.h:212
typ_range_t_::rangeQ
dlq_hdr_t rangeQ
Q of typ_rangedef_t.
Definition: typ.h:310
TYP_PM_NORMAL
@ TYP_PM_NORMAL
normal parse mode
Definition: typ.h:197
typ_simple_t_::flags
uint8 flags
TYP_FL_REPLACE, TYP_FL_CONSET used.
Definition: typ.h:409
typ_get_range_con
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:1219
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
typ_simple_t_::listtyp
struct typ_template_t_ * listtyp
template for NCX_BT_SLIST
Definition: typ.h:389
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
typ_pattern_t_::p_::ocpattern
regex_t ocpattern
openconfig patterm (POSIX)
Definition: typ.h:327
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
typ_set_strrest
void typ_set_strrest(typ_def_t *typdef, ncx_strrest_t strrest)
Set the string restrinvtion type set for this typdef.
Definition: typ.c:1559
NCX_BT_CONTAINER
@ NCX_BT_CONTAINER
internal container
Definition: ncxtypes.h:225
ncx_clean_errinfo
void ncx_clean_errinfo(ncx_errinfo_t *err)
Scrub the memory in a ncx_errinfo_t by freeing all the sub-fields.
Definition: ncx.c:8015
typ_get_listtyp
typ_template_t * typ_get_listtyp(typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3803
typ.h
Parameter Type Handler.
tk_get_btype_sym
const char * tk_get_btype_sym(ncx_btype_t btyp)
Get the symbolic token symbol for one of the base types.
Definition: tk.c:3324
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
typ_get_rangeQ
dlq_hdr_t * typ_get_rangeQ(typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1046
yangconst.h
Contains YANG constants separated to prevent H file include loops.
typ_pattern_t_::pat_errinfo
ncx_errinfo_t pat_errinfo
error override data for this pattern
Definition: typ.h:334
typ_get_union_types
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:5366
NCX_STATUS_CURRENT
@ NCX_STATUS_CURRENT
current (default)
Definition: ncxtypes.h:420
typ_new_rangedef
typ_rangedef_t * typ_new_rangedef(void)
Alloc and Init a typ_rangedef_t struct (range-stmt)
Definition: typ.c:875
typ_template_t_::defval
xmlChar * defval
type default-stmt
Definition: typ.h:490
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
NCX_SQUAL_NONE
@ NCX_SQUAL_NONE
not set
Definition: ncxtypes.h:314
typ_enum_t_
one ENUM typdef value – stored in simple.valQ Used for NCX_BT_ENUM and NCX_BT_BITS data type
Definition: typ.h:262
typ_get_typ_linenum
uint32 typ_get_typ_linenum(const typ_template_t *typ)
Get the line number for the typ_template_t.
Definition: typ.c:5322
typ_idref_t::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:352
typ_has_index
boolean typ_has_index(ncx_btype_t btyp)
Check if this is a data type that has an index.
Definition: typ.c:3084
typ_new_unionnode
typ_unionnode_t * typ_new_unionnode(typ_template_t *typ)
Alloc and Init a typ_unionnode_t struct.
Definition: typ.c:3896
NCX_LEAFREF_CLASS_KEY
@ NCX_LEAFREF_CLASS_KEY
the key class with have the same result for any context node (static, absolute path) and the target i...
Definition: ncxtypes.h:1288
typ_union_needs_xpath_check
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:5525
typ_get_crange_con
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:1261
typ_get_defval
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:2844
typ_new_template
typ_template_t * typ_new_template(void)
Malloc and initialize the fields in a typ_template_t.
Definition: typ.c:282
typ_get_dataclass
ncx_data_class_t typ_get_dataclass(const typ_def_t *typdef)
Find the data-class value for the specified typdef.
Definition: typ.c:3683
ncx_init_errinfo
void ncx_init_errinfo(ncx_errinfo_t *err)
Init the fields in an ncx_errinfo_t struct.
Definition: ncx.c:7998
typ_load_basetypes
status_t typ_load_basetypes(void)
Create typ_template_t structs for the base types.
Definition: typ.c:198
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
typ_unload_basetypes
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:254
typ_template_t_::appinfoQ
dlq_hdr_t appinfoQ
any external statements within the typedef several extensions supported in the server for this codepo...
Definition: typ.h:510
NCX_BT_UNION
@ NCX_BT_UNION
union (needs special processing)
Definition: ncxtypes.h:220
typ_get_qual_typdef
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:2403
typ_def_t_::tkerr
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:468
ERR_NCX_INVALID_PATTERN
@ ERR_NCX_INVALID_PATTERN
313
Definition: status_enum.h:356
typ_get_strrest
ncx_strrest_t typ_get_strrest(const typ_def_t *typdef)
Get the string restrinvtion type set for this typdef.
Definition: typ.c:1515
typ_get_basetype_name
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:1913
typ_free_pattern
void typ_free_pattern(typ_pattern_t *pat)
Free a pattern struct.
Definition: typ.c:4188
typ_first_enumdef
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:3219
typ_get_xref_typdef
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:5009
typ_get_parent_type
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:2108
typ_get_crangeQ
const dlq_hdr_t * typ_get_crangeQ(const typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1132
typ_template_t_::ref
xmlChar * ref
typedef reference-stmt (not saved in server)
Definition: typ.h:487
typ_template_t_::grp
void * grp
const back-ptr to direct grp parent
Definition: typ.h:513
typ_first_rangedef
const typ_rangedef_t * typ_first_rangedef(const typ_def_t *typdef)
Return the lower bound range definition struct.
Definition: typ.c:1346
ncx_clean_num
void ncx_clean_num(ncx_btype_t btyp, ncx_num_t *num)
Scrub the memory in a ncx_num_t by freeing all the sub-fields.
Definition: ncx_num.c:189
typ_is_simple
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3107
NCX_BT_ANY
@ NCX_BT_ANY
anyxml
Definition: ncxtypes.h:202
TYP_PM_MDATA
@ TYP_PM_MDATA
metadata clause parse mode
Definition: typ.h:199
typ_new_sval
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:1600
NCX_BT_SLIST
@ NCX_BT_SLIST
ncx:xsdlist extension (internal, deprecated)
Definition: ncxtypes.h:223
typ_get_first_pattern
typ_pattern_t * typ_get_first_pattern(typ_def_t *typdef)
Get the first pattern struct for a typdef.
Definition: typ.c:4272
EMPTY_STRING
#define EMPTY_STRING
empty string used to get const xmlChar * cast
Definition: ncxconst.h:289
typ_get_first_cidref
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:5195
typ_listval_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:203
NCX_SQUAL_APPINFO
@ NCX_SQUAL_APPINFO
search appinfo
Definition: ncxtypes.h:318
typ_simple_t_::leafref_class
ncx_leafref_class_t leafref_class
if this is a leafref then it is classified for optimization
Definition: typ.h:396
typ_idref_t::base
ncx_identity_t * base
back-ptr to base (if found )
Definition: typ.h:355
typ_def_t_::tclass
ncx_tclass_t tclass
type class
Definition: typ.h:459
typ_def_u_t_::base
ncx_btype_t base
base type used
Definition: typ.h:443
typ_pattern_t_
YANG pattern struct : N per typedef and also across N typdefs in a chain: all are ANDed together like...
Definition: typ.h:321
typ_get_range_errinfo
ncx_errinfo_t * typ_get_range_errinfo(typ_def_t *typdef)
Get the range errinfo for a typdef.
Definition: typ.c:4447
typ_is_schema_instance_string
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:2789
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
typ_def_u_t_
Union of all the typdef variants.
Definition: typ.h:442
typ_pattern_t_::p_::pattern
xmlRegexpPtr pattern
YANG pattern (XSD)
Definition: typ.h:326
typ_range_t_
one YANG range description
Definition: typ.h:308
typ_simple_t_::idrefQ
dlq_hdr_t idrefQ
for NCX_BT_IDREF only
Definition: typ.h:400
typ_simple_t_::btyp
ncx_btype_t btyp
NCX base type.
Definition: typ.h:388
typ_rangedef_t_::lb
ncx_num_t lb
lower bound
Definition: typ.h:249
typ_rangedef_t_::lbstr
xmlChar * lbstr
saved if range deferred
Definition: typ.h:252
typ_sval_t_
one STRING typdef value, pattern value
Definition: typ.h:300
typ_get_leafref_class
ncx_leafref_class_t typ_get_leafref_class(typ_def_t *typdef)
Get the leafref class for the leafref type.
Definition: typ.c:4826
typ_get_maxrows
uint32 typ_get_maxrows(const typ_def_t *typdef)
Get the maxrows value if it exists or zero if not.
Definition: typ.c:3601
typ_pmode_t_
typ_pmode_t_
type parser used in 3 separate modes
Definition: typ.h:191
typ_listval_t_::strQ
dlq_hdr_t strQ
Q of typ_sval_t.
Definition: typ.h:204
typ_free_idref
void typ_free_idref(typ_idref_t *idref)
Clean and freec an idref.
Definition: typ.c:5595
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
typ_enum_t_::name
xmlChar * name
enum name
Definition: typ.h:266
typ_template_t_::status
ncx_status_t status
status-stmt
Definition: typ.h:502
typ_get_next_typdef
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:2183
NCX_SQUAL_VAL
@ NCX_SQUAL_VAL
search values
Definition: ncxtypes.h:316
NCX_CL_BASE
@ NCX_CL_BASE
a built-in base type
Definition: ncxtypes.h:244
typ_normalize_rangeQ
void typ_normalize_rangeQ(dlq_hdr_t *rangeQ, ncx_btype_t btyp)
Start with a valid rangedef chain.
Definition: typ.c:939
typ_def_t_::flags
uint8 flags
processing flags
Definition: typ.h:471
typ_named_t_::newtyp
struct typ_def_t_ * newtyp
opt.
Definition: typ.h:424
typ_unionnode_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:529
typ_free_listval
void typ_free_listval(typ_listval_t *lv)
Free a typ_listval_t struct free a list descriptor.
Definition: typ.c:1689
typ_new_enum2
typ_enum_t * typ_new_enum2(xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:821
typ_get_basetype2
ncx_btype_t typ_get_basetype2(typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1817
typ_get_cbase_typdef
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:2356
typ_template_t_
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
typ_free_template
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:311
typ_get_basetype_typ
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:2013
typ_rangedef_t_::btyp
ncx_btype_t btyp
base type
Definition: typ.h:251
typ_template_t_::name
xmlChar * name
typedef name
Definition: typ.h:481
typ_unset_named_typdef
void typ_unset_named_typdef(typ_def_t *typdef)
UnSet the typ link in a named typedef (used by YANG parser)
Definition: typ.c:557
typ_def_t_::prefix
xmlChar * prefix
pfix used in type field
Definition: typ.h:464
xpath_pcb_t_
XPath parser control block.
Definition: xpath.h:668
typ_def_u_t_::named
typ_named_t named
named type
Definition: typ.h:445
typ_def_t_::iqual
ncx_iqual_t iqual
instance qualifier (pre-YANG)
Definition: typ.h:460
xmlns_xs_id
xmlns_id_t xmlns_xs_id(void)
Get the ID for the XSD namespace or 0 if it doesn't exist.
Definition: xmlns.c:948
typ_pattern_t_::pat_str
xmlChar * pat_str
pattern string
Definition: typ.h:331
typ_simple_t_::digits
uint8 digits
fraction-digits for decimal64
Definition: typ.h:408
typ_find_enumdef
typ_enum_t * typ_find_enumdef(dlq_hdr_t *ebQ, const xmlChar *name)
Get the specified enum def struct.
Definition: typ.c:3374
typ_ok_for_xsdlist
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:4674
typ_get_base_typdef
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:2227
xpath_pcb_t_::cookie
void * cookie
The cookie registered with the getvar_fn.
Definition: xpath.h:799
NCX_BT_BITS
@ NCX_BT_BITS
bits
Definition: ncxtypes.h:203
typ_def_t_::typenamestr
xmlChar * typenamestr
typename used in type field
Definition: typ.h:465
NCX_BT_FLOAT64
@ NCX_BT_FLOAT64
hidden: just for XPath
Definition: ncxtypes.h:216
NCX_BT_UINT32
@ NCX_BT_UINT32
uint32
Definition: ncxtypes.h:213
typ_pattern_t_::ocpattern_set
boolean ocpattern_set
make sure not to access ocpattern until set
Definition: typ.h:343
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
typ_get_constrained_set
boolean typ_get_constrained_set(const typ_def_t *typdef)
Return TRUE if the require-instance stmt is set.
Definition: typ.c:4928
typ_pattern_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:322
typ_is_string
boolean typ_is_string(ncx_btype_t btyp)
Check if the base type is a simple string (not list)
Definition: typ.c:4097
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
typ_first_enumdef2
typ_enum_t * typ_first_enumdef2(typ_def_t *typdef)
Get the first enum def struct.
Definition: typ.c:3307
typ_listval_t_
one list member stored in simple.queue of instance-qualified strings
Definition: typ.h:202
typ_new_typdef
typ_def_t * typ_new_typdef(void)
Malloc and initialize the fields in a typ_def_t.
Definition: typ.c:354
typ_simple_t_::valQ
dlq_hdr_t valQ
bit, enum, string, list vals/patterns
Definition: typ.h:401
typ_get_maxaccess
ncx_access_t typ_get_maxaccess(const typ_def_t *typdef)
Find the max-access value for the specified typdef.
Definition: typ.c:3639
typ_init_simple
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:405
typ_get_rangebounds_con
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:1429
typ_enum_t_::descr
xmlChar * descr
enum description-stmt (not saved in server)
Definition: typ.h:269
typ_get_enumdef
typ_enum_t * typ_get_enumdef(typ_def_t *typdef, const xmlChar *valstr)
Get the typ_enum_t.
Definition: typ.c:3514
typ_set_xref_typdef
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:4971
typ_get_crangeQ_con
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:1177
typ_free_rangedef
void typ_free_rangedef(typ_rangedef_t *rv, ncx_btype_t btyp)
Free a typ_rangedef_t struct (range-stmt)
Definition: typ.c:898
typ_get_yang_typename
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:5503
typ_get_enumdef_n
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:3271
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
typ_simple_t_::patternQ
dlq_hdr_t patternQ
Q of ncx_pattern_t for NCX_BT_STRING.
Definition: typ.h:404
typ_first_unionnode
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:3978
ncx.h
YANG module utility functions.
typ_simple_t_::metaQ
dlq_hdr_t metaQ
Q of obj_template_t structs.
Definition: typ.h:402
TYP_PM_NONE
@ TYP_PM_NONE
not set
Definition: typ.h:196
typ_def_t_
Discriminated union for all data typedefs.
Definition: typ.h:458
typ_get_units
const xmlChar * typ_get_units(const typ_template_t *typ)
Find the units string for the specified type template.
Definition: typ.c:2983
NCX_SQUAL_RANGE
@ NCX_SQUAL_RANGE
search range
Definition: ncxtypes.h:315
typ_get_next_cidref
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:5228
typ_new_enum
typ_enum_t * typ_new_enum(const xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:784
typ_has_subclauses
boolean typ_has_subclauses(const typ_def_t *typdef)
Check if the specified typdef has any sub-clauses.
Definition: typ.c:5057
typ_free_unionnode
void typ_free_unionnode(typ_unionnode_t *un)
Free a typ_unionnode_t struct.
Definition: typ.c:3921
typ_clean_typeQ
void typ_clean_typeQ(dlq_hdr_t *que)
Clean a queue of typ_template_t structs.
Definition: typ.c:4477
typ_enum_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:263
typ_rangedef_t_::ubstr
xmlChar * ubstr
saved if range deferred
Definition: typ.h:253
typ_idref_t
YANG identityref struct the value is an identity-stmt QName that has a base-stmt that resolves to the...
Definition: typ.h:351
typ_get_userdef_typdef
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:2265
typ_get_base_class
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:1972
typ_get_cuserdef_typdef
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:2311
typ_get_new_named
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:707
typ_named_t_::final_type
ncx_btype_t final_type
used for named types
Definition: typ.h:425
typ_template_t_::nsid
xmlns_id_t nsid
namespace ID for the typedef
Definition: typ.h:496
typ_enum_t_::flags
uint8 flags
internal processing flags
Definition: typ.h:290
NCX_BT_EXTERN
@ NCX_BT_EXTERN
not a real type, points fo file for contents
Definition: ncxtypes.h:230
typ_get_leafref_pcb
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:4795
ERR_NCX_WRONG_DATATYP
@ ERR_NCX_WRONG_DATATYP
285
Definition: status_enum.h:328
typ_def_u_t_::simple
typ_simple_t simple
simple type inline
Definition: typ.h:444
typ_enum_t_::ref
xmlChar * ref
enum reference-stmt (not saved in server)
Definition: typ.h:272
typ_def_t_::appinfoQ
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: typ.h:467
NCX_DC_NONE
@ NCX_DC_NONE
not set
Definition: ncxtypes.h:191
typ_template_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: typ.h:478
typ_get_next_idref
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:5172
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
NCX_CL_NAMED
@ NCX_CL_NAMED
a restriction of a named type
Definition: ncxtypes.h:247
NCX_BT_DECIMAL64
@ NCX_BT_DECIMAL64
decimal64
Definition: ncxtypes.h:215
NCX_BT_CHOICE
@ NCX_BT_CHOICE
internal choice, not really used
Definition: ncxtypes.h:226
NCX_BT_STRING
@ NCX_BT_STRING
string
Definition: ncxtypes.h:217
typ_def_t_::maxaccess
ncx_access_t maxaccess
max-access
Definition: typ.h:461
NCX_BT_INT8
@ NCX_BT_INT8
int8
Definition: ncxtypes.h:207
typ_free_typdef
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:467
xmlns.h
XML namespace support.
typ_userdef_t_
one userdef control block The CB will exist if one or more callbacks are registered
Definition: typ_userdef.h:146
typ_def_t_::dataclass
ncx_data_class_t dataclass
data class (pre-YANG)
Definition: typ.h:462
NCX_DEF_MERGETYPE
#define NCX_DEF_MERGETYPE
NETCONF default insert type.
Definition: ncxconst.h:301
typ_init_named
void typ_init_named(typ_def_t *tdef)
Init a typ_named_t struct inside a typ_def_t.
Definition: typ.c:448
status.h
Global error messages for status code enumerations.
NCX_BT_NONE
@ NCX_BT_NONE
base type not set
Definition: ncxtypes.h:201
typ_get_typdef_linenum
uint32 typ_get_typdef_linenum(const typ_def_t *typdef)
Get the line number for the typ_def_t.
Definition: typ.c:5345
typ_range_t_::res
ncx_status_t res
parser status
Definition: typ.h:312
typ_enum_t_::iffeatureQ
dlq_hdr_t iffeatureQ
YANG 1.1 or 1.0 if-feature statements.
Definition: typ.h:287
dlq.h
dlq provides general double-linked list and queue support:
typ_template_t_::used
boolean used
flag used by compiler for not used warning
Definition: typ.h:499
typ_enum_t_::pos
uint32 pos
YANG position-stmt or implied position – used if NCX_BT_BITS.
Definition: typ.h:281
typ_has_children
boolean typ_has_children(ncx_btype_t btyp)
Check if this is a data type that uses the val.v.childQ.
Definition: typ.c:3056
typ_get_default
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:2878
typ_idref_t::basename
xmlChar * basename
identity base name
Definition: typ.h:354
typ_get_units_from_typdef
const xmlChar * typ_get_units_from_typdef(const typ_def_t *typdef)
Find the units string for the specified typdef template.
Definition: typ.c:3013
typ_def_t_::mergetype
ncx_merge_t mergetype
merge type (pre-YANG
Definition: typ.h:463
NCX_BT_INT16
@ NCX_BT_INT16
int16
Definition: ncxtypes.h:208
typ_get_iqualval_def
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:2932