blob: a4c31ad90c5e97bcbfe0f9bcda6c9efac2b6d676 [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 */
Lev Walkin188ed2c2004-09-13 08:31:01 +00007 AFT_FULL_COLLECT = 0x04, /* Collect all tags */
Lev Walkin8945e0e2004-09-10 06:07:04 +00008};
9
Lev Walkin8945e0e2004-09-10 06:07:04 +000010/*
11 * Allocate and return an array of tags for the given type.
12 * Type1 ::= [2] EXPLICIT Type2
13 * Type2 ::= [3] IMPLICIT Type3
14 * Type3 ::= [4] EXPLICIT SEQUENCE { ... }
15 * Will return [2][3][UNIVERSAL 16] for the Type1.
16 */
17int asn1f_fetch_tags(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr,
18 struct asn1p_type_tag_s **tags, enum asn1f_aft_flags_e flags);
19
20/*
21 * Fetch the outmost tag of the given type.
22 * Type1 ::= Type2
23 * Type2 ::= [2] Type3
24 * Type3 ::= SEQUENCE { ... }
25 * Will yield [2] for Type1.
26 */
27int 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 +000028
29#endif /* _ASN1FIX_TAGS_H_ */