127#define TYP_DEC64_MIN_DIGITS 1
128#define TYP_DEC64_MAX_DIGITS 18
131#define TYP_FL_LBINF bit0
132#define TYP_FL_LBINF2 bit1
133#define TYP_FL_UBINF bit2
134#define TYP_FL_UBINF2 bit3
135#define TYP_FL_LBMIN bit4
136#define TYP_FL_LBMAX bit5
137#define TYP_FL_UBMAX bit6
138#define TYP_FL_UBMIN bit7
140#define TYP_RANGE_FLAGS 0xff
143#define TYP_FL_ESET bit0
144#define TYP_FL_ISBITS bit1
145#define TYP_FL_SEEN bit2
148#define TYP_FL_USTRING bit0
151#define TYP_FL_REPLACE bit0
152#define TYP_FL_CONSET bit1
155#define TYP_FL_RESOLVE_SKIPPED bit0
156#define TYP_FL_DEVIATE_SKIPPED bit1
157#define TYP_FL_FIND_SKIPPED bit2
164#define TYP_IS_RESOLVE_SKIPPED(T) ((T)->flags & TYP_FL_RESOLVE_SKIPPED)
166#define TYP_SET_RESOLVE_SKIPPED(T) (T)->flags |= TYP_FL_RESOLVE_SKIPPED
171#define TYP_IS_DEVIATE_SKIPPED(T) ((T)->flags & TYP_FL_DEVIATE_SKIPPED)
173#define TYP_SET_DEVIATE_SKIPPED(T) (T)->flags |= TYP_FL_DEVIATE_SKIPPED
178#define TYP_IS_FIND_SKIPPED(T) ((T)->flags & TYP_FL_FIND_SKIPPED)
180#define TYP_SET_FIND_SKIPPED(T) (T)->flags |= TYP_FL_FIND_SKIPPED
191typedef enum typ_pmode_t_ {
202typedef struct typ_listval_t_ {
246typedef struct typ_rangedef_t_ {
262typedef struct typ_enum_t_ {
300typedef struct typ_sval_t_ {
308typedef struct typ_range_t_ {
321typedef struct typ_pattern_t_ {
337 boolean pat_inverted;
387typedef struct typ_simple_t_ {
422typedef struct typ_named_t_ {
423 struct typ_template_t_ *
typ;
436typedef struct typ_ref_t_ {
442typedef union typ_def_u_t_ {
458typedef struct typ_def_t_ {
477typedef struct typ_template_t_ {
528typedef struct typ_unionnode_t_ {
746extern const xmlChar *
756extern const xmlChar *
920extern const dlq_hdr_t *
931extern const dlq_hdr_t *
963extern const xmlChar *
1122extern const xmlChar *
1132extern const xmlChar *
1142extern const xmlChar *
1335 const xmlChar *prefix,
1336 const xmlChar *name);
1349 const xmlChar *prefix,
1350 const xmlChar *name);
1394extern const xmlChar *
1405extern const xmlChar *
1435extern const xmlChar *
1449extern const xmlChar *
1546 const xmlChar *name);
1568 const xmlChar *valstr);
1590 const xmlChar *valstr);
1936extern const xmlChar *
1956extern struct xpath_pcb_t_ *
2174extern const xmlChar *
status_t
global error return code
Definition: status_enum.h:210
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:1571
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:1013
ncx_tclass_t
Enumeration of the basic value type classifications.
Definition: ncxtypes.h:407
xmlChar * ncx_str_t
string alias for data types:
Definition: ncxtypes.h:806
ncx_iqual_t
The instance qualifier types are borrowed from ABNF and RelaxNG.
Definition: ncxtypes.h:460
ncx_strrest_t
Enumeration of string restriction types.
Definition: ncxtypes.h:488
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:213
ncx_access_t
NCX Access Control 'max-access' enumeration values Note that access control is applied to the session...
Definition: ncxtypes.h:182
ncx_data_class_t
NCX Persistence Control.
Definition: ncxtypes.h:203
ncx_merge_t
The merge type for the NETCONF merge operation.
Definition: ncxtypes.h:469
ncx_squal_t
typdef search qualifier list (internal compiler modes)
Definition: ncxtypes.h:478
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:1179
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:309
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:2316
uint32 typ_get_maxrows(const typ_def_t *typdef)
Get the maxrows value if it exists or zero if not.
Definition: typ.c:3581
void typ_free_rangedef(typ_rangedef_t *rv, ncx_btype_t btyp)
Free a typ_rangedef_t struct (range-stmt)
Definition: typ.c:900
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:2149
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:1723
typ_def_t * typ_get_unionnode_ptr(typ_unionnode_t *un)
Get the proper typdef pointer from a unionnode.
Definition: typ.c:3928
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:1378
boolean typ_is_xpath_string(const typ_def_t *typdef)
Find the ncx:xpath extension within the specified typdef chain.
Definition: typ.c:2691
ncx_access_t typ_get_maxaccess(const typ_def_t *typdef)
Find the max-access value for the specified typdef.
Definition: typ.c:3619
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:2361
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:4531
typ_def_t * typ_get_correct_enumdef(typ_def_t *typdef)
Get the typ_enum_t to use.
Definition: typ.c:3446
boolean typ_is_number(ncx_btype_t btyp)
Check if the base type is numeric.
Definition: typ.c:4041
ncx_strrest_t typ_get_strrest(const typ_def_t *typdef)
Get the string restrinvtion type set for this typdef.
Definition: typ.c:1520
const xmlChar * typ_get_named_type_modname(const typ_def_t *typdef)
Get the module name of the named typ.
Definition: typ.c:602
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:1769
ncx_data_class_t typ_get_dataclass(const typ_def_t *typdef)
Find the data-class value for the specified typdef.
Definition: typ.c:3663
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:5177
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:2188
uint32 typ_get_typ_linenum(const typ_template_t *typ)
Get the line number for the typ_template_t.
Definition: typ.c:5309
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:5151
void typ_free_sval(typ_sval_t *sv)
Free a typ_sval_t struct free a string descriptor.
Definition: typ.c:1644
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:2937
void typ_clean_typeQ(dlq_hdr_t *que)
Clean a queue of typ_template_t structs.
Definition: typ.c:4455
typ_enum_t * typ_find_enumdef(dlq_hdr_t *ebQ, const xmlChar *name)
Get the specified enum def struct.
Definition: typ.c:3350
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:4773
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:4549
ncx_btype_t typ_get_basetype2(typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1822
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:1092
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:5212
boolean typ_is_xsd_simple(ncx_btype_t btyp)
Check if this is a simple data type in XSD encoding.
Definition: typ.c:3167
ncx_merge_t typ_get_mergetype(const typ_def_t *typdef)
Get the merge type for a specified type def.
Definition: typ.c:3704
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:5632
void typ_free_enum(typ_enum_t *en)
Free a typ_enum_t struct.
Definition: typ.c:850
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:731
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:5488
const xmlChar * typ_get_named_typename(const typ_def_t *typdef)
Get the type name of the named typ.
Definition: typ.c:576
const xmlChar * typ_get_rangestr(const typ_def_t *typdef)
Return the range string for the given typdef chain.
Definition: typ.c:1304
typ_enum_t * typ_new_enum(const xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:782
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:1221
boolean typ_has_subclauses(const typ_def_t *typdef)
Check if the specified typdef has any sub-clauses.
Definition: typ.c:5034
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:5555
const dlq_hdr_t * typ_get_crangeQ(const typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1134
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:5113
void typ_free_pattern(typ_pattern_t *pat)
Free a pattern struct.
Definition: typ.c:4166
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:2510
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:1605
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:4652
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:2662
typ_enum_t * typ_next_enumdef(typ_enum_t *enumdef)
Get the next enum def struct.
Definition: typ.c:3251
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:4319
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:634
typ_pattern_t * typ_new_pattern(const xmlChar *pat_str, boolean ocmode)
Malloc and init a pattern struct.
Definition: typ.c:4128
typ_listval_t * typ_new_listval(void)
Alloc and Init a typ_listval_t struct malloc and init a list descriptor.
Definition: typ.c:1669
typ_enum_t * typ_get_enumdef(typ_def_t *typdef, const xmlChar *valstr)
Get the typ_enum_t.
Definition: typ.c:3493
boolean typ_is_enum(ncx_btype_t btyp)
Check if the base type is an enumeration.
Definition: typ.c:4104
uint32 typ_get_pattern_count(const typ_def_t *typdef)
Get the number of pattern structs in a typdef.
Definition: typ.c:4389
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:2609
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:3223
void typ_normalize_rangeQ(dlq_hdr_t *rangeQ, ncx_btype_t btyp)
Start with a valid rangedef chain.
Definition: typ.c:941
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:2113
boolean typ_has_children(ncx_btype_t btyp)
Check if this is a data type that uses the val.v.childQ.
Definition: typ.c:3061
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:2849
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:3958
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:403
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:662
void typ_unset_named_typdef(typ_def_t *typdef)
UnSet the typ link in a named typedef (used by YANG parser)
Definition: typ.c:555
void typ_free_unionnode(typ_unionnode_t *un)
Free a typ_unionnode_t struct.
Definition: typ.c:3901
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:3999
ncx_leafref_class_t typ_get_leafref_class(typ_def_t *typdef)
Get the leafref class for the leafref type.
Definition: typ.c:4806
status_t typ_set_fraction_digits(typ_def_t *typdef, uint8 digits)
Set the fraction-digits field from the typdef chain.
Definition: typ.c:5275
void typ_init_named(typ_def_t *tdef)
Init a typ_named_t struct inside a typ_def_t.
Definition: typ.c:446
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:2794
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:4864
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:4365
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:1918
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:3312
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:3383
const xmlChar * typ_get_name(const typ_def_t *typdef)
Get the name for the specified typdef.
Definition: typ.c:1876
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:1263
boolean typ_get_constrained_set(const typ_def_t *typdef)
Return TRUE if the require-instance stmt is set.
Definition: typ.c:4908
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:2915
void typ_set_strrest(typ_def_t *typdef, ncx_strrest_t strrest)
Set the string restrinvtion type set for this typdef.
Definition: typ.c:1564
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:4480
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:2270
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:4837
ncx_errinfo_t * typ_get_range_errinfo(typ_def_t *typdef)
Get the range errinfo for a typdef.
Definition: typ.c:4425
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:2232
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:3275
dlq_hdr_t * typ_get_rangeQ(typ_def_t *typdef)
Return the rangeQ for the given typdef.
Definition: typ.c:1048
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:4737
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:1977
typ_unionnode_t * typ_new_unionnode(typ_template_t *typ)
Alloc and Init a typ_unionnode_t struct.
Definition: typ.c:3876
void typ_clean_typdef(typ_def_t *typdef)
Clean a typ_def_t struct, but do not delete it.
Definition: typ.c:486
const typ_rangedef_t * typ_first_rangedef(const typ_def_t *typdef)
Return the lower bound range definition struct.
Definition: typ.c:1348
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:3410
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:1948
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:465
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:530
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3112
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:4951
void typ_init_typdef(typ_def_t *typdef)
init a pre-allocated typdef (done first)
Definition: typ.c:379
uint32 typ_get_typdef_linenum(const typ_def_t *typdef)
Get the line number for the typ_def_t.
Definition: typ.c:5332
status_t typ_compile_pattern(typ_pattern_t *pat)
Compile a pattern as into a regex_t struct.
Definition: typ.c:4210
boolean typ_ok(const typ_def_t *typdef)
Check if the typdef chain has any errors.
Definition: typ.c:4607
typ_pattern_t * typ_get_next_pattern(typ_pattern_t *curpat)
Get the next pattern struct for a typdef.
Definition: typ.c:4295
typ_def_t * typ_new_typdef(void)
Malloc and initialize the fields in a typ_def_t.
Definition: typ.c:352
boolean typ_is_string(ncx_btype_t btyp)
Check if the base type is a simple string (not list)
Definition: typ.c:4075
typ_template_t * typ_get_listtyp(typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3783
typ_rangedef_t * typ_new_rangedef(void)
Alloc and Init a typ_rangedef_t struct (range-stmt)
Definition: typ.c:877
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:5240
boolean typ_has_index(ncx_btype_t btyp)
Check if this is a data type that has an index.
Definition: typ.c:3089
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:5423
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:756
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:5580
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:2408
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:1431
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:4989
const typ_sval_t * typ_first_strdef(const typ_def_t *typdef)
Get the first string def struct.
Definition: typ.c:3526
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:3831
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:2018
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:2883
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:2074
const xmlChar * typ_get_units(const typ_template_t *typ)
Find the units string for the specified type template.
Definition: typ.c:2988
boolean typ_is_qname_string(const typ_def_t *typdef)
Find the ncx:qname extension within the specified typdef chain.
Definition: typ.c:2749
void typ_free_listval(typ_listval_t *lv)
Free a typ_listval_t struct free a list descriptor.
Definition: typ.c:1694
typ_enum_t * typ_new_enum2(xmlChar *name)
Alloc and Init a typ_enum_t struct.
Definition: typ.c:821
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:705
void typ_free_idref(typ_idref_t *idref)
Clean and freec an idref.
Definition: typ.c:5653
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:5353
typ_pattern_t * typ_get_first_pattern(typ_def_t *typdef)
Get the first pattern struct for a typdef.
Definition: typ.c:4250
typ_def_t * typ_get_basetype_typdef(ncx_btype_t btyp)
Get the default typdef for the specified base type.
Definition: typ.c:2044
xmlns_id_t typ_get_nsid(const typ_template_t *typ)
Return the namespace ID.
Definition: typ.c:3758
const xmlChar * typ_get_units_from_typdef(const typ_def_t *typdef)
Find the units string for the specified typdef template.
Definition: typ.c:3018
const xmlChar * typ_get_leafref_path(const typ_def_t *typdef)
Get the path argument for the leafref data type.
Definition: typ.c:4701
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:576
boolean(* typ_union_walker_fn_t)(const xmlChar *the_typename, void *cookie)
union typename walker function
Definition: typ.h:545
boolean(* typ_union_walker2_fn_t)(ncx_btype_t the_btype, void *cookie)
complex union base type walker function
Definition: typ.h:559
typ_pmode_t
type parser used in 3 separate modes
Definition: typ.h:191
@ TYP_PM_INDEX
index clause parse mode
Definition: typ.h:194
@ TYP_PM_NONE
not set
Definition: typ.h:192
@ TYP_PM_NORMAL
normal parse mode
Definition: typ.h:193
@ TYP_PM_MDATA
metadata clause parse mode
Definition: typ.h:195
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:887
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1366
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:877
YANG identity entry.
Definition: ncxtypes.h:1104
Discriminated union for all data typedefs.
Definition: typ.h:458
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:468
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: typ.h:467
ncx_iqual_t iqual
instance qualifier (pre-YANG)
Definition: typ.h:460
ncx_data_class_t dataclass
data class (pre-YANG)
Definition: typ.h:462
typ_def_u_t def
union of type definition structs
Definition: typ.h:469
ncx_merge_t mergetype
merge type (pre-YANG
Definition: typ.h:463
xmlChar * typenamestr
typename used in type field
Definition: typ.h:465
xmlChar * prefix
pfix used in type field
Definition: typ.h:464
uint32 linenum
line number (internal use)
Definition: typ.h:470
ncx_access_t maxaccess
max-access
Definition: typ.h:461
uint8 flags
processing flags
Definition: typ.h:471
ncx_tclass_t tclass
type class
Definition: typ.h:459
const xmlChar * yang_name
name used in YANG typedef
Definition: typ.h:466
struct typ_userdef_t_ * userdef
user type def hooks
Definition: typ.h:472
one ENUM typdef value – stored in simple.valQ Used for NCX_BT_ENUM and NCX_BT_BITS data type
Definition: typ.h:262
dlq_hdr_t appinfoQ
any extensions found in the enum-stmt (not used by server)
Definition: typ.h:284
dlq_hdr_t iffeatureQ
YANG 1.1 or 1.0 if-feature statements.
Definition: typ.h:287
xmlChar * name
enum name
Definition: typ.h:266
int32 val
YANG value-stmt or implied value – used if NCX_BT_ENUM.
Definition: typ.h:278
ncx_status_t status
status-stmt (cannot be obsolete in the server
Definition: typ.h:275
xmlChar * ref
enum reference-stmt (not saved in server)
Definition: typ.h:272
dlq_hdr_t qhdr
queue header
Definition: typ.h:263
uint32 pos
YANG position-stmt or implied position – used if NCX_BT_BITS.
Definition: typ.h:281
xmlChar * descr
enum description-stmt (not saved in server)
Definition: typ.h:269
uint8 feature_flags
YANG 1.1 processing flags.
Definition: typ.h:293
uint8 flags
internal processing flags
Definition: typ.h:290
YANG identityref struct the value is an identity-stmt QName that has a base-stmt that resolves to the...
Definition: typ.h:351
xmlChar * basename
identity base name
Definition: typ.h:354
dlq_hdr_t qhdr
queue header
Definition: typ.h:352
xmlChar * baseprefix
identity base prefix
Definition: typ.h:353
ncx_identity_t * base
back-ptr to base (if found )
Definition: typ.h:355
const xmlChar * modname
back-ptr to the main mod name
Definition: typ.h:356
one list member stored in simple.queue of instance-qualified strings
Definition: typ.h:202
dlq_hdr_t strQ
Q of typ_sval_t.
Definition: typ.h:204
ncx_iqual_t iqual
instance qualifier for this listval
Definition: typ.h:205
dlq_hdr_t qhdr
queue header
Definition: typ.h:203
NCX_CL_NAMED.
Definition: typ.h:422
struct typ_template_t_ * typ
derived-from type
Definition: typ.h:423
struct typ_def_t_ * newtyp
opt.
Definition: typ.h:424
ncx_btype_t final_type
used for named types
Definition: typ.h:425
YANG pattern struct : N per typedef and also across N typdefs in a chain: all are ANDed together like...
Definition: typ.h:321
ncx_errinfo_t pat_errinfo
error override data for this pattern
Definition: typ.h:334
xmlChar * pat_str
pattern string
Definition: typ.h:331
boolean ocpattern_mode
YANG vs.
Definition: typ.h:340
dlq_hdr_t qhdr
queue header
Definition: typ.h:322
boolean ocpattern_set
make sure not to access ocpattern until set
Definition: typ.h:343
one YANG range description
Definition: typ.h:308
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:313
dlq_hdr_t rangeQ
Q of typ_rangedef_t.
Definition: typ.h:310
ncx_errinfo_t range_errinfo
error override data for this range
Definition: typ.h:311
xmlChar * rangestr
range string used in module
Definition: typ.h:309
ncx_status_t res
parser status
Definition: typ.h:312
one member of a range definition – stored in simple.rangeQ
Definition: typ.h:246
ncx_error_t tkerr
file and line infor for compiler
Definition: typ.h:254
ncx_num_t ub
upper bound
Definition: typ.h:250
xmlChar * ubstr
saved if range deferred
Definition: typ.h:253
ncx_num_t lb
lower bound
Definition: typ.h:249
dlq_hdr_t qhdr
queue header
Definition: typ.h:247
ncx_btype_t btyp
base type
Definition: typ.h:251
xmlChar * lbstr
saved if range deferred
Definition: typ.h:252
xmlChar * rangestr
saved in YANG only
Definition: typ.h:248
uint8 flags
internal processing flags
Definition: typ.h:255
NCX_CL_REF.
Definition: typ.h:436
struct typ_def_t_ * typdef
fwd pointer
Definition: typ.h:437
NCX_CL_SIMPLE.
Definition: typ.h:387
ncx_leafref_class_t leafref_class
if this is a leafref then it is classified for optimization
Definition: typ.h:396
struct typ_template_t_ * listtyp
template for NCX_BT_SLIST
Definition: typ.h:389
dlq_hdr_t idrefQ
for NCX_BT_IDREF only
Definition: typ.h:400
dlq_hdr_t unionQ
Q of typ_unionnode_t for NCX_BT_UNION.
Definition: typ.h:403
typ_range_t range
for all num types and string length
Definition: typ.h:399
uint32 maxbit
max bit position in valQ
Definition: typ.h:406
uint8 digits
fraction-digits for decimal64
Definition: typ.h:408
dlq_hdr_t patternQ
Q of ncx_pattern_t for NCX_BT_STRING.
Definition: typ.h:404
ncx_btype_t btyp
NCX base type.
Definition: typ.h:388
ncx_strrest_t strrest
string/type restriction type in valQ
Definition: typ.h:405
boolean constrained
set when require-instance=TRUE
Definition: typ.h:398
struct typ_def_t_ * xrefdef
pointer to resolved typedef for NCX_BT_LEAFREF/NCX_BT_INSTANCE_ID
Definition: typ.h:393
dlq_hdr_t metaQ
Q of obj_template_t structs.
Definition: typ.h:402
int32 maxenum
max enum value in valQ
Definition: typ.h:407
uint8 flags
TYP_FL_REPLACE, TYP_FL_CONSET used.
Definition: typ.h:409
struct xpath_pcb_t_ * xleafref
saved for NCX_BT_LEAFREF only
Definition: typ.h:390
dlq_hdr_t valQ
bit, enum, string, list vals/patterns
Definition: typ.h:401
one STRING typdef value, pattern value
Definition: typ.h:300
dlq_hdr_t qhdr
queue header
Definition: typ.h:301
ncx_str_t val
value string used in the pattern
Definition: typ.h:302
uint8 flags
internal processing flags
Definition: typ.h:303
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
ncx_error_t tkerr
file and line info for compiler
Definition: typ.h:519
dlq_hdr_t appinfoQ
any external statements within the typedef several extensions supported in the server for this codepo...
Definition: typ.h:510
xmlChar * name
typedef name
Definition: typ.h:481
ncx_status_t status
status-stmt
Definition: typ.h:502
xmlChar * ref
typedef reference-stmt (not saved in server)
Definition: typ.h:487
dlq_hdr_t qhdr
queue header
Definition: typ.h:478
typ_def_t typdef
each typedef has one type-stmt within it
Definition: typ.h:505
status_t res
compiler parse status
Definition: typ.h:516
xmlChar * descr
typedef description-stmt (not saved in server)
Definition: typ.h:484
boolean used
flag used by compiler for not used warning
Definition: typ.h:499
xmlChar * units
type units-stmt
Definition: typ.h:493
xmlChar * defval
type default-stmt
Definition: typ.h:490
void * grp
const back-ptr to direct grp parent
Definition: typ.h:513
xmlns_id_t nsid
namespace ID for the typedef
Definition: typ.h:496
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
dlq_hdr_t qhdr
queue header
Definition: typ.h:529
typ_def_t * typdef
malloced for unnamed inline type
Definition: typ.h:531
typ_template_t * typ
not malloced, just back-ptr
Definition: typ.h:530
boolean seen
needed for yangdiff
Definition: typ.h:532
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:784
Union of all the typdef variants.
Definition: typ.h:442
ncx_btype_t base
base type used
Definition: typ.h:443
typ_ref_t ref
internal type reference
Definition: typ.h:446
typ_named_t named
named type
Definition: typ.h:445
typ_simple_t simple
simple type inline
Definition: typ.h:444
union contains either a YANG pattern or an OC pattern
Definition: typ.h:325
regex_t ocpattern
openconfig patterm (POSIX)
Definition: typ.h:327
xmlRegexpPtr pattern
YANG pattern (XSD)
Definition: typ.h:326