blob: 0fbbefec15cbd630b19d5e83f4fba6dd437a1448 [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 Walkin59b176e2005-11-26 11:25:14 +00008 AFT_CANON_CHOICE = 0x08, /* Fetch the minimal CHOICE root tag */
Lev Walkin8945e0e2004-09-10 06:07:04 +00009};
10
Lev Walkin8945e0e2004-09-10 06:07:04 +000011/*
12 * Allocate and return an array of tags for the given type.
13 * Type1 ::= [2] EXPLICIT Type2
14 * Type2 ::= [3] IMPLICIT Type3
15 * Type3 ::= [4] EXPLICIT SEQUENCE { ... }
16 * Will return [2][3][UNIVERSAL 16] for the Type1.
17 */
18int asn1f_fetch_tags(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr,
19 struct asn1p_type_tag_s **tags, enum asn1f_aft_flags_e flags);
20
21/*
22 * Fetch the outmost tag of the given type.
23 * Type1 ::= Type2
24 * Type2 ::= [2] Type3
25 * Type3 ::= SEQUENCE { ... }
26 * Will yield [2] for Type1.
27 */
Lev Walkin59b176e2005-11-26 11:25:14 +000028int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e);
Lev Walkinf15320b2004-06-03 03:38:44 +000029
30#endif /* _ASN1FIX_TAGS_H_ */