4 struct asn1_namespace_s; /* Forward declaration */
6 enum asn1f_aft_flags_e {
7 AFT_IMAGINARY_ANY = 0x01, /* Treat ANY tag as [IMAGINARY ANY] */
8 AFT_FETCH_OUTMOST = 0x02, /* Fetch only outmost tag */
9 AFT_FULL_COLLECT = 0x04, /* Collect all tags */
10 AFT_CANON_CHOICE = 0x08, /* Fetch the minimal CHOICE root tag */
14 * Allocate and return an array of tags for the given type.
15 * Type1 ::= [2] EXPLICIT Type2
16 * Type2 ::= [3] IMPLICIT Type3
17 * Type3 ::= [4] EXPLICIT SEQUENCE { ... }
18 * Will return [2][3][UNIVERSAL 16] for the Type1.
20 int asn1f_fetch_tags(asn1p_t *asn, struct asn1_namespace_s *ns,
21 asn1p_module_t *mod, asn1p_expr_t *expr,
22 struct asn1p_type_tag_s **tags,
23 enum asn1f_aft_flags_e flags);
26 * Fetch the outmost tag of the given type.
29 * Type3 ::= SEQUENCE { ... }
30 * Will yield [2] for Type1.
32 int asn1f_fetch_outmost_tag(asn1p_t *asn, struct asn1_namespace_s *ns,
33 asn1p_module_t *mod, asn1p_expr_t *expr,
34 struct asn1p_type_tag_s *tag,
35 enum asn1f_aft_flags_e);
37 #endif /* ASN1FIX_TAGS_H */