vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | #ifndef _ASN1FIX_TAGS_H_ |
| 2 | #define _ASN1FIX_TAGS_H_ |
| 3 | |
vlm | 8fbd562 | 2004-09-10 06:07:04 +0000 | [diff] [blame] | 4 | enum asn1f_aft_flags_e { |
| 5 | AFT_IMAGINARY_ANY = 0x01, /* Treat ANY tag as [IMAGINARY ANY] */ |
| 6 | AFT_FETCH_OUTMOST = 0x02, /* Fetch only outmost tag */ |
vlm | 72425de | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 7 | AFT_FULL_COLLECT = 0x04, /* Collect all tags */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 8 | AFT_CANON_CHOICE = 0x08, /* Fetch the minimal CHOICE root tag */ |
vlm | 8fbd562 | 2004-09-10 06:07:04 +0000 | [diff] [blame] | 9 | }; |
| 10 | |
vlm | 8fbd562 | 2004-09-10 06:07:04 +0000 | [diff] [blame] | 11 | /* |
| 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 | */ |
| 18 | int 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 | */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 28 | int 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); |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 29 | |
| 30 | #endif /* _ASN1FIX_TAGS_H_ */ |