blob: 394c3e842bb8715605c096ee081cff26faea833b [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001#ifndef _ASN1FIX_TAGS_H_
2#define _ASN1FIX_TAGS_H_
3
Lev Walkin8945e0e2004-09-10 06:07:04 +00004enum asn1f_aft_flags_e {
5 AFT_IMAGINARY_ANY = 0x01, /* Treat ANY tag as [IMAGINARY ANY] */
6 AFT_FETCH_OUTMOST = 0x02, /* Fetch only outmost tag */
7};
8
Lev Walkin8945e0e2004-09-10 06:07:04 +00009/*
10 * Allocate and return an array of tags for the given type.
11 * Type1 ::= [2] EXPLICIT Type2
12 * Type2 ::= [3] IMPLICIT Type3
13 * Type3 ::= [4] EXPLICIT SEQUENCE { ... }
14 * Will return [2][3][UNIVERSAL 16] for the Type1.
15 */
16int asn1f_fetch_tags(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr,
17 struct asn1p_type_tag_s **tags, enum asn1f_aft_flags_e flags);
18
19/*
20 * Fetch the outmost tag of the given type.
21 * Type1 ::= Type2
22 * Type2 ::= [2] Type3
23 * Type3 ::= SEQUENCE { ... }
24 * Will yield [2] for Type1.
25 */
26int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, int _aft_imaginary_any);
Lev Walkinf15320b2004-06-03 03:38:44 +000027
28#endif /* _ASN1FIX_TAGS_H_ */