Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 2 | /*** <<< INCLUDES [LogLine] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 3 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4 | #include <IA5String.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 5 | #include <asn_SEQUENCE_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 6 | #include <constr_SEQUENCE_OF.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 7 | #include <constr_SEQUENCE.h> |
| 8 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 9 | /*** <<< FWD-DECLS [LogLine] >>> ***/ |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 10 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 11 | struct VariablePartSet; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 12 | |
| 13 | /*** <<< TYPE-DECLS [LogLine] >>> ***/ |
| 14 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 15 | typedef struct LogLine { |
| 16 | IA5String_t line_digest; |
| 17 | struct varsets { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 18 | A_SEQUENCE_OF(struct VariablePartSet) list; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 19 | |
| 20 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 21 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 22 | } varsets; |
| 23 | /* |
| 24 | * This type is extensible, |
| 25 | * possible extensions are below. |
| 26 | */ |
| 27 | |
| 28 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 29 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 30 | } LogLine_t; |
| 31 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 32 | /*** <<< FUNC-DECLS [LogLine] >>> ***/ |
| 33 | |
| 34 | extern asn_TYPE_descriptor_t asn_DEF_LogLine; |
| 35 | |
| 36 | /*** <<< POST-INCLUDE [LogLine] >>> ***/ |
| 37 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 38 | #include "VariablePartSet.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 39 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 40 | /*** <<< CODE [LogLine] >>> ***/ |
| 41 | |
| 42 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 43 | memb_varsets_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 44 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 45 | size_t size; |
| 46 | |
| 47 | if(!sptr) { |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 48 | _ASN_CTFAIL(app_key, td, sptr, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 49 | "%s: value not given (%s:%d)", |
| 50 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 51 | return -1; |
| 52 | } |
| 53 | |
Lev Walkin | 66d542b | 2005-07-04 02:03:57 +0000 | [diff] [blame] | 54 | /* Determine the number of elements */ |
| 55 | size = _A_CSEQUENCE_FROM_VOID(sptr)->count; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 56 | |
| 57 | if((size >= 1)) { |
Lev Walkin | 29a8219 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 58 | /* Perform validation of the inner elements */ |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 59 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 60 | } else { |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 61 | _ASN_CTFAIL(app_key, td, sptr, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 62 | "%s: constraint failed (%s:%d)", |
| 63 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 64 | return -1; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 69 | /*** <<< STAT-DEFS [LogLine] >>> ***/ |
| 70 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 71 | static asn_TYPE_member_t asn_MBR_varsets_3[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 72 | { ATF_POINTER, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 73 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 74 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 75 | .type = &asn_DEF_VariablePartSet, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 76 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 77 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 78 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 79 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 80 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 81 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 82 | static ber_tlv_tag_t asn_DEF_varsets_tags_3[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 83 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 84 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 85 | static asn_SET_OF_specifics_t asn_SPC_varsets_specs_3 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 86 | sizeof(struct varsets), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 87 | offsetof(struct varsets, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 88 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 89 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 90 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 91 | asn_TYPE_descriptor_t asn_DEF_varsets_3 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 92 | "varsets", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 93 | "varsets", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 94 | SEQUENCE_OF_free, |
| 95 | SEQUENCE_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 96 | SEQUENCE_OF_constraint, |
| 97 | SEQUENCE_OF_decode_ber, |
| 98 | SEQUENCE_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 99 | SEQUENCE_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 100 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 101 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 102 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 103 | asn_DEF_varsets_tags_3, |
| 104 | sizeof(asn_DEF_varsets_tags_3) |
| 105 | /sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */ |
| 106 | asn_DEF_varsets_tags_3, /* Same as above */ |
| 107 | sizeof(asn_DEF_varsets_tags_3) |
| 108 | /sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */ |
| 109 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 110 | asn_MBR_varsets_3, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 111 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 112 | &asn_SPC_varsets_specs_3 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 113 | }; |
| 114 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 115 | static asn_TYPE_member_t asn_MBR_LogLine_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 116 | { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 117 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), |
| 118 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 119 | .type = &asn_DEF_IA5String, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 120 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 121 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 122 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 123 | .name = "line-digest" |
| 124 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 125 | { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 126 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 127 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 128 | .type = &asn_DEF_varsets_3, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 129 | .memb_constraints = memb_varsets_constraint_1, |
| 130 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 131 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 132 | .name = "varsets" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 133 | }, |
| 134 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 135 | static ber_tlv_tag_t asn_DEF_LogLine_tags_1[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 136 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 137 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 138 | static asn_TYPE_tag2member_t asn_MAP_LogLine_tag2el_1[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 139 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 140 | { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 } /* line-digest at 23 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 141 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 142 | static asn_SEQUENCE_specifics_t asn_SPC_LogLine_specs_1 = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 143 | sizeof(struct LogLine), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 144 | offsetof(struct LogLine, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 145 | asn_MAP_LogLine_tag2el_1, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 146 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 147 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 148 | 1, /* Start extensions */ |
| 149 | 3 /* Stop extensions */ |
| 150 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 151 | asn_TYPE_descriptor_t asn_DEF_LogLine = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 152 | "LogLine", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 153 | "LogLine", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 154 | SEQUENCE_free, |
| 155 | SEQUENCE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 156 | SEQUENCE_constraint, |
| 157 | SEQUENCE_decode_ber, |
| 158 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 159 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 160 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 161 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 162 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 163 | asn_DEF_LogLine_tags_1, |
| 164 | sizeof(asn_DEF_LogLine_tags_1) |
| 165 | /sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */ |
| 166 | asn_DEF_LogLine_tags_1, /* Same as above */ |
| 167 | sizeof(asn_DEF_LogLine_tags_1) |
| 168 | /sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */ |
| 169 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 170 | asn_MBR_LogLine_1, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 171 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 172 | &asn_SPC_LogLine_specs_1 /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 173 | }; |
| 174 | |
| 175 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 176 | /*** <<< INCLUDES [VariablePartSet] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 177 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 178 | #include "ActionItem.h" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 179 | #include <asn_SEQUENCE_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 180 | #include <constr_SEQUENCE_OF.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 181 | #include <constr_SEQUENCE.h> |
| 182 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 183 | /*** <<< FWD-DECLS [VariablePartSet] >>> ***/ |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 184 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 185 | struct VariablePart; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 186 | |
| 187 | /*** <<< TYPE-DECLS [VariablePartSet] >>> ***/ |
| 188 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 189 | typedef struct VariablePartSet { |
| 190 | struct vparts { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 191 | A_SEQUENCE_OF(struct VariablePart) list; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 192 | |
| 193 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 194 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 195 | } vparts; |
| 196 | ActionItem_t resolution; |
| 197 | /* |
| 198 | * This type is extensible, |
| 199 | * possible extensions are below. |
| 200 | */ |
| 201 | |
| 202 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 203 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 204 | } VariablePartSet_t; |
| 205 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 206 | /*** <<< FUNC-DECLS [VariablePartSet] >>> ***/ |
| 207 | |
| 208 | extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet; |
| 209 | |
| 210 | /*** <<< POST-INCLUDE [VariablePartSet] >>> ***/ |
| 211 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 212 | #include "VariablePart.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 213 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 214 | /*** <<< CODE [VariablePartSet] >>> ***/ |
| 215 | |
| 216 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 217 | memb_vparts_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 218 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 219 | |
| 220 | if(!sptr) { |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 221 | _ASN_CTFAIL(app_key, td, sptr, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 222 | "%s: value not given (%s:%d)", |
| 223 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 224 | return -1; |
| 225 | } |
| 226 | |
| 227 | |
| 228 | if(1 /* No applicable constraints whatsoever */) { |
| 229 | /* Nothing is here. See below */ |
| 230 | } |
| 231 | |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 232 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 236 | /*** <<< STAT-DEFS [VariablePartSet] >>> ***/ |
| 237 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 238 | static asn_TYPE_member_t asn_MBR_vparts_2[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 239 | { ATF_POINTER, 0, 0, |
Lev Walkin | b918973 | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 240 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 241 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 242 | .type = &asn_DEF_VariablePart, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 243 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 244 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 245 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 246 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 247 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 248 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 249 | static ber_tlv_tag_t asn_DEF_vparts_tags_2[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 250 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 251 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 252 | static asn_SET_OF_specifics_t asn_SPC_vparts_specs_2 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 253 | sizeof(struct vparts), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 254 | offsetof(struct vparts, _asn_ctx), |
Lev Walkin | d1bfea6 | 2005-11-08 03:06:16 +0000 | [diff] [blame] | 255 | 2, /* XER encoding is XMLValueList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 256 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 257 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 258 | asn_TYPE_descriptor_t asn_DEF_vparts_2 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 259 | "vparts", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 260 | "vparts", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 261 | SEQUENCE_OF_free, |
| 262 | SEQUENCE_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 263 | SEQUENCE_OF_constraint, |
| 264 | SEQUENCE_OF_decode_ber, |
| 265 | SEQUENCE_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 266 | SEQUENCE_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 267 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 268 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 269 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 270 | asn_DEF_vparts_tags_2, |
| 271 | sizeof(asn_DEF_vparts_tags_2) |
| 272 | /sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */ |
| 273 | asn_DEF_vparts_tags_2, /* Same as above */ |
| 274 | sizeof(asn_DEF_vparts_tags_2) |
| 275 | /sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */ |
| 276 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 277 | asn_MBR_vparts_2, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 278 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 279 | &asn_SPC_vparts_specs_2 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 280 | }; |
| 281 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 282 | static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 283 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 284 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 285 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 286 | .type = &asn_DEF_vparts_2, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 287 | .memb_constraints = memb_vparts_constraint_1, |
| 288 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 289 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 290 | .name = "vparts" |
| 291 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 292 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 293 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 294 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 295 | .type = &asn_DEF_ActionItem, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 296 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 297 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 298 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 299 | .name = "resolution" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 300 | }, |
| 301 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 302 | static ber_tlv_tag_t asn_DEF_VariablePartSet_tags_1[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 303 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 304 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 305 | static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_tag2el_1[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 306 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 307 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* resolution at 35 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 308 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 309 | static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_specs_1 = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 310 | sizeof(struct VariablePartSet), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 311 | offsetof(struct VariablePartSet, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 312 | asn_MAP_VariablePartSet_tag2el_1, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 313 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 314 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 315 | 1, /* Start extensions */ |
| 316 | 3 /* Stop extensions */ |
| 317 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 318 | asn_TYPE_descriptor_t asn_DEF_VariablePartSet = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 319 | "VariablePartSet", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 320 | "VariablePartSet", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 321 | SEQUENCE_free, |
| 322 | SEQUENCE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 323 | SEQUENCE_constraint, |
| 324 | SEQUENCE_decode_ber, |
| 325 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 326 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 327 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 328 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 329 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 330 | asn_DEF_VariablePartSet_tags_1, |
| 331 | sizeof(asn_DEF_VariablePartSet_tags_1) |
| 332 | /sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */ |
| 333 | asn_DEF_VariablePartSet_tags_1, /* Same as above */ |
| 334 | sizeof(asn_DEF_VariablePartSet_tags_1) |
| 335 | /sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */ |
| 336 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 337 | asn_MBR_VariablePartSet_1, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 338 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 339 | &asn_SPC_VariablePartSet_specs_1 /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 340 | }; |
| 341 | |
| 342 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 343 | /*** <<< INCLUDES [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 344 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 345 | #include <VisibleString.h> |
| 346 | #include <asn_SET_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 347 | #include <constr_SET_OF.h> |
| 348 | #include <constr_SEQUENCE.h> |
| 349 | #include <constr_CHOICE.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 350 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 351 | /*** <<< DEPS [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 352 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 353 | typedef enum VariablePart_PR { |
| 354 | VariablePart_PR_NOTHING, /* No components present */ |
| 355 | VariablePart_PR_vset, |
| 356 | VariablePart_PR_vrange, |
| 357 | /* Extensions may appear below */ |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 358 | |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 359 | } VariablePart_PR; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 360 | |
| 361 | /*** <<< TYPE-DECLS [VariablePart] >>> ***/ |
| 362 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 363 | typedef struct VariablePart { |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 364 | VariablePart_PR present; |
Lev Walkin | 0f5d74c | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 365 | union VariablePart_u { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 366 | struct vset { |
| 367 | A_SET_OF(VisibleString_t) list; |
| 368 | |
| 369 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 370 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 371 | } vset; |
| 372 | struct vrange { |
| 373 | VisibleString_t from; |
| 374 | VisibleString_t to; |
| 375 | /* |
| 376 | * This type is extensible, |
| 377 | * possible extensions are below. |
| 378 | */ |
| 379 | |
| 380 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 381 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 382 | } vrange; |
| 383 | /* |
| 384 | * This type is extensible, |
| 385 | * possible extensions are below. |
| 386 | */ |
| 387 | } choice; |
| 388 | |
| 389 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 390 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 391 | } VariablePart_t; |
| 392 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 393 | /*** <<< FUNC-DECLS [VariablePart] >>> ***/ |
| 394 | |
| 395 | extern asn_TYPE_descriptor_t asn_DEF_VariablePart; |
| 396 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 397 | /*** <<< CODE [VariablePart] >>> ***/ |
| 398 | |
| 399 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 400 | memb_vset_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 401 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 402 | size_t size; |
| 403 | |
| 404 | if(!sptr) { |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 405 | _ASN_CTFAIL(app_key, td, sptr, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 406 | "%s: value not given (%s:%d)", |
| 407 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 408 | return -1; |
| 409 | } |
| 410 | |
Lev Walkin | 66d542b | 2005-07-04 02:03:57 +0000 | [diff] [blame] | 411 | /* Determine the number of elements */ |
| 412 | size = _A_CSET_FROM_VOID(sptr)->count; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 413 | |
| 414 | if((size >= 1)) { |
Lev Walkin | 29a8219 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 415 | /* Perform validation of the inner elements */ |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 416 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 417 | } else { |
Lev Walkin | 739d9bf | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 418 | _ASN_CTFAIL(app_key, td, sptr, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 419 | "%s: constraint failed (%s:%d)", |
| 420 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 421 | return -1; |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 426 | /*** <<< STAT-DEFS [VariablePart] >>> ***/ |
| 427 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 428 | static asn_TYPE_member_t asn_MBR_vset_2[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 429 | { ATF_POINTER, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 430 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 431 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 432 | .type = &asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 433 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 434 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 435 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 436 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 437 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 438 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 439 | static ber_tlv_tag_t asn_DEF_vset_tags_2[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 440 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 441 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 442 | static asn_SET_OF_specifics_t asn_SPC_vset_specs_2 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 443 | sizeof(struct vset), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 444 | offsetof(struct vset, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 445 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 446 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 447 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 448 | asn_TYPE_descriptor_t asn_DEF_vset_2 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 449 | "vset", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 450 | "vset", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 451 | SET_OF_free, |
| 452 | SET_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 453 | SET_OF_constraint, |
| 454 | SET_OF_decode_ber, |
| 455 | SET_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 456 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 457 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 458 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 459 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 460 | asn_DEF_vset_tags_2, |
| 461 | sizeof(asn_DEF_vset_tags_2) |
| 462 | /sizeof(asn_DEF_vset_tags_2[0]), /* 1 */ |
| 463 | asn_DEF_vset_tags_2, /* Same as above */ |
| 464 | sizeof(asn_DEF_vset_tags_2) |
| 465 | /sizeof(asn_DEF_vset_tags_2[0]), /* 1 */ |
| 466 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 467 | asn_MBR_vset_2, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 468 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 469 | &asn_SPC_vset_specs_2 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 470 | }; |
| 471 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 472 | static asn_TYPE_member_t asn_MBR_vrange_4[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 473 | { ATF_NOFLAGS, 0, offsetof(struct vrange, from), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 474 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 475 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 476 | .type = &asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 477 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 478 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 479 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 480 | .name = "from" |
| 481 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 482 | { ATF_NOFLAGS, 0, offsetof(struct vrange, to), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 483 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 484 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 485 | .type = &asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 486 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 487 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 488 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 489 | .name = "to" |
| 490 | }, |
| 491 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 492 | static ber_tlv_tag_t asn_DEF_vrange_tags_4[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 493 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 494 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 495 | static asn_TYPE_tag2member_t asn_MAP_vrange_tag2el_4[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 496 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 497 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 498 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 499 | static asn_SEQUENCE_specifics_t asn_SPC_vrange_specs_4 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 500 | sizeof(struct vrange), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 501 | offsetof(struct vrange, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 502 | asn_MAP_vrange_tag2el_4, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 503 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 504 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 505 | 1, /* Start extensions */ |
| 506 | 3 /* Stop extensions */ |
| 507 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 508 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 509 | asn_TYPE_descriptor_t asn_DEF_vrange_4 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 510 | "vrange", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 511 | "vrange", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 512 | SEQUENCE_free, |
| 513 | SEQUENCE_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 514 | SEQUENCE_constraint, |
| 515 | SEQUENCE_decode_ber, |
| 516 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 517 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 518 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 519 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 520 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 521 | asn_DEF_vrange_tags_4, |
| 522 | sizeof(asn_DEF_vrange_tags_4) |
| 523 | /sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */ |
| 524 | asn_DEF_vrange_tags_4, /* Same as above */ |
| 525 | sizeof(asn_DEF_vrange_tags_4) |
| 526 | /sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */ |
| 527 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 528 | asn_MBR_vrange_4, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 529 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 530 | &asn_SPC_vrange_specs_4 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 531 | }; |
| 532 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 533 | static asn_TYPE_member_t asn_MBR_VariablePart_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 534 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 535 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 536 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 537 | .type = &asn_DEF_vset_2, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 538 | .memb_constraints = memb_vset_constraint_1, |
| 539 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 540 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 541 | .name = "vset" |
| 542 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 543 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 544 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 545 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 546 | .type = &asn_DEF_vrange_4, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 547 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 548 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 549 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 550 | .name = "vrange" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 551 | }, |
| 552 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 553 | static asn_TYPE_tag2member_t asn_MAP_VariablePart_tag2el_1[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 554 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 555 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 556 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 557 | static asn_CHOICE_specifics_t asn_SPC_VariablePart_specs_1 = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 558 | sizeof(struct VariablePart), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 559 | offsetof(struct VariablePart, _asn_ctx), |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 560 | offsetof(struct VariablePart, present), |
| 561 | sizeof(((struct VariablePart *)0)->present), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 562 | asn_MAP_VariablePart_tag2el_1, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 563 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 564 | .canonical_order = 0, |
| 565 | .ext_start = 2 /* Extensions start */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 566 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 567 | asn_TYPE_descriptor_t asn_DEF_VariablePart = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 568 | "VariablePart", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 569 | "VariablePart", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 570 | CHOICE_free, |
| 571 | CHOICE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 572 | CHOICE_constraint, |
| 573 | CHOICE_decode_ber, |
| 574 | CHOICE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 575 | CHOICE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 576 | CHOICE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 577 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 578 | CHOICE_outmost_tag, |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 579 | 0, /* No effective tags (pointer) */ |
| 580 | 0, /* No effective tags (count) */ |
| 581 | 0, /* No tags (pointer) */ |
| 582 | 0, /* No tags (count) */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 583 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 584 | asn_MBR_VariablePart_1, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 585 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 586 | &asn_SPC_VariablePart_specs_1 /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 587 | }; |
| 588 | |
| 589 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 590 | /*** <<< INCLUDES [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 591 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 592 | #include <ENUMERATED.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 593 | #include <BOOLEAN.h> |
| 594 | #include <VisibleString.h> |
| 595 | #include <asn_SET_OF.h> |
| 596 | #include <constr_SET_OF.h> |
| 597 | #include <constr_SEQUENCE.h> |
| 598 | |
| 599 | /*** <<< DEPS [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 600 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 601 | typedef enum accept_as { |
| 602 | accept_as_unknown = 0, |
| 603 | accept_as_safe = 1, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 604 | accept_as_unsafe = 2 |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 605 | /* |
| 606 | * Enumeration is extensible |
| 607 | */ |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 608 | } e_accept_as; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 609 | |
| 610 | /*** <<< TYPE-DECLS [ActionItem] >>> ***/ |
| 611 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 612 | typedef struct ActionItem { |
| 613 | ENUMERATED_t accept_as; |
| 614 | struct notify { |
| 615 | BOOLEAN_t critical; |
| 616 | struct email { |
| 617 | A_SET_OF(VisibleString_t) list; |
| 618 | |
| 619 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 620 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 621 | } email; |
| 622 | /* |
| 623 | * This type is extensible, |
| 624 | * possible extensions are below. |
| 625 | */ |
| 626 | |
| 627 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 628 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 629 | } *notify; |
| 630 | /* |
| 631 | * This type is extensible, |
| 632 | * possible extensions are below. |
| 633 | */ |
| 634 | |
| 635 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 636 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 637 | } ActionItem_t; |
| 638 | |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 639 | /*** <<< FUNC-DECLS [ActionItem] >>> ***/ |
| 640 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 641 | /* extern asn_TYPE_descriptor_t asn_DEF_accept_as_2; // (Use -fall-defs-global to expose) */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 642 | extern asn_TYPE_descriptor_t asn_DEF_ActionItem; |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 643 | |
| 644 | /*** <<< CODE [ActionItem] >>> ***/ |
| 645 | |
| 646 | static int |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 647 | accept_as_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 648 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 649 | /* Replace with underlying type checker */ |
| 650 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 651 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 652 | } |
| 653 | |
| 654 | /* |
| 655 | * This type is implemented using ENUMERATED, |
| 656 | * so here we adjust the DEF accordingly. |
| 657 | */ |
| 658 | static void |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 659 | accept_as_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 660 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 661 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 662 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 663 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 664 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 665 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 666 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 667 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 668 | if(!td->per_constraints) |
| 669 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 670 | td->elements = asn_DEF_ENUMERATED.elements; |
| 671 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
Lev Walkin | 29a8219 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 672 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 673 | } |
| 674 | |
| 675 | static void |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 676 | accept_as_2_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 677 | void *struct_ptr, int contents_only) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 678 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 679 | td->free_struct(td, struct_ptr, contents_only); |
| 680 | } |
| 681 | |
| 682 | static int |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 683 | accept_as_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 684 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 685 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 686 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 687 | } |
| 688 | |
| 689 | static asn_dec_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 690 | accept_as_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 3ebc65a | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 691 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 692 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 693 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 694 | } |
| 695 | |
| 696 | static asn_enc_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 697 | accept_as_2_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 698 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 699 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 700 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 701 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 702 | } |
| 703 | |
| 704 | static asn_dec_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 705 | accept_as_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 3ebc65a | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 706 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 707 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 708 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 709 | } |
| 710 | |
| 711 | static asn_enc_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 712 | accept_as_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 713 | int ilevel, enum xer_encoder_flags_e flags, |
| 714 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 715 | accept_as_2_inherit_TYPE_descriptor(td); |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 716 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 717 | } |
| 718 | |
| 719 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 720 | /*** <<< STAT-DEFS [ActionItem] >>> ***/ |
| 721 | |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 722 | static asn_INTEGER_enum_map_t asn_MAP_accept_as_value2enum_2[] = { |
Lev Walkin | 9f30ef1 | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 723 | { 0, 7, "unknown" }, |
| 724 | { 1, 4, "safe" }, |
| 725 | { 2, 6, "unsafe" } |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 726 | /* This list is extensible */ |
| 727 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 728 | static unsigned int asn_MAP_accept_as_enum2value_2[] = { |
Lev Walkin | 9f30ef1 | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 729 | 1, /* safe(1) */ |
| 730 | 0, /* unknown(0) */ |
| 731 | 2 /* unsafe(2) */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 732 | /* This list is extensible */ |
| 733 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 734 | static asn_INTEGER_specifics_t asn_SPC_accept_as_specs_2 = { |
| 735 | asn_MAP_accept_as_value2enum_2, /* "tag" => N; sorted by tag */ |
| 736 | asn_MAP_accept_as_enum2value_2, /* N => "tag"; sorted by N */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 737 | 3, /* Number of elements in the maps */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 738 | 4, /* Extensions before this member */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 739 | 1, /* Strict enumeration */ |
| 740 | 0, /* Native long size */ |
| 741 | 0 |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 742 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 743 | static ber_tlv_tag_t asn_DEF_accept_as_tags_2[] = { |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 744 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 745 | }; |
| 746 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 747 | asn_TYPE_descriptor_t asn_DEF_accept_as_2 = { |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 748 | "accept-as", |
| 749 | "accept-as", |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 750 | accept_as_2_free, |
| 751 | accept_as_2_print, |
| 752 | accept_as_2_constraint, |
| 753 | accept_as_2_decode_ber, |
| 754 | accept_as_2_encode_der, |
| 755 | accept_as_2_decode_xer, |
| 756 | accept_as_2_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 757 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 758 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 759 | asn_DEF_accept_as_tags_2, |
| 760 | sizeof(asn_DEF_accept_as_tags_2) |
| 761 | /sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */ |
| 762 | asn_DEF_accept_as_tags_2, /* Same as above */ |
| 763 | sizeof(asn_DEF_accept_as_tags_2) |
| 764 | /sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */ |
| 765 | 0, /* No PER visible constraints */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 766 | 0, 0, /* Defined elsewhere */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 767 | &asn_SPC_accept_as_specs_2 /* Additional specs */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 768 | }; |
| 769 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 770 | static asn_TYPE_member_t asn_MBR_email_9[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 771 | { ATF_POINTER, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 772 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 773 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 774 | .type = &asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 775 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 776 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 777 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 778 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 779 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 780 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 781 | static ber_tlv_tag_t asn_DEF_email_tags_9[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 782 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 783 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 784 | static asn_SET_OF_specifics_t asn_SPC_email_specs_9 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 785 | sizeof(struct email), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 786 | offsetof(struct email, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 787 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 788 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 789 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 790 | asn_TYPE_descriptor_t asn_DEF_email_9 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 791 | "email", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 792 | "email", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 793 | SET_OF_free, |
| 794 | SET_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 795 | SET_OF_constraint, |
| 796 | SET_OF_decode_ber, |
| 797 | SET_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 798 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 799 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 800 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 801 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 802 | asn_DEF_email_tags_9, |
| 803 | sizeof(asn_DEF_email_tags_9) |
| 804 | /sizeof(asn_DEF_email_tags_9[0]), /* 1 */ |
| 805 | asn_DEF_email_tags_9, /* Same as above */ |
| 806 | sizeof(asn_DEF_email_tags_9) |
| 807 | /sizeof(asn_DEF_email_tags_9[0]), /* 1 */ |
| 808 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 809 | asn_MBR_email_9, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 810 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 811 | &asn_SPC_email_specs_9 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 812 | }; |
| 813 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 814 | static asn_TYPE_member_t asn_MBR_notify_7[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 815 | { ATF_NOFLAGS, 0, offsetof(struct notify, critical), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 816 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 817 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 818 | .type = &asn_DEF_BOOLEAN, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 819 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 820 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 821 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 822 | .name = "critical" |
| 823 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 824 | { ATF_NOFLAGS, 0, offsetof(struct notify, email), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 825 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 826 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 827 | .type = &asn_DEF_email_9, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 828 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 829 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 830 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 831 | .name = "email" |
| 832 | }, |
| 833 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 834 | static ber_tlv_tag_t asn_DEF_notify_tags_7[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 835 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 836 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 837 | static asn_TYPE_tag2member_t asn_MAP_notify_tag2el_7[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 838 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 839 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 840 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 841 | static asn_SEQUENCE_specifics_t asn_SPC_notify_specs_7 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 842 | sizeof(struct notify), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 843 | offsetof(struct notify, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 844 | asn_MAP_notify_tag2el_7, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 845 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 846 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 847 | 1, /* Start extensions */ |
| 848 | 3 /* Stop extensions */ |
| 849 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 850 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 851 | asn_TYPE_descriptor_t asn_DEF_notify_7 = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 852 | "notify", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 853 | "notify", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 854 | SEQUENCE_free, |
| 855 | SEQUENCE_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 856 | SEQUENCE_constraint, |
| 857 | SEQUENCE_decode_ber, |
| 858 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 859 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 860 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 861 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 862 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 863 | asn_DEF_notify_tags_7, |
| 864 | sizeof(asn_DEF_notify_tags_7) |
| 865 | /sizeof(asn_DEF_notify_tags_7[0]), /* 1 */ |
| 866 | asn_DEF_notify_tags_7, /* Same as above */ |
| 867 | sizeof(asn_DEF_notify_tags_7) |
| 868 | /sizeof(asn_DEF_notify_tags_7[0]), /* 1 */ |
| 869 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 870 | asn_MBR_notify_7, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 871 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 872 | &asn_SPC_notify_specs_7 /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 873 | }; |
| 874 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 875 | static asn_TYPE_member_t asn_MBR_ActionItem_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 876 | { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 877 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 878 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 879 | .type = &asn_DEF_accept_as_2, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 880 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 881 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 882 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 883 | .name = "accept-as" |
| 884 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 885 | { ATF_POINTER, 1, offsetof(struct ActionItem, notify), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 886 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 887 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 888 | .type = &asn_DEF_notify_7, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 889 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 890 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 891 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 892 | .name = "notify" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 893 | }, |
| 894 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 895 | static ber_tlv_tag_t asn_DEF_ActionItem_tags_1[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 896 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 897 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 898 | static asn_TYPE_tag2member_t asn_MAP_ActionItem_tag2el_1[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 899 | { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 900 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 901 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 902 | static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_specs_1 = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 903 | sizeof(struct ActionItem), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 904 | offsetof(struct ActionItem, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 905 | asn_MAP_ActionItem_tag2el_1, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 906 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 907 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 908 | 1, /* Start extensions */ |
| 909 | 3 /* Stop extensions */ |
| 910 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 911 | asn_TYPE_descriptor_t asn_DEF_ActionItem = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 912 | "ActionItem", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 913 | "ActionItem", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 914 | SEQUENCE_free, |
| 915 | SEQUENCE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 916 | SEQUENCE_constraint, |
| 917 | SEQUENCE_decode_ber, |
| 918 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 919 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 920 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 921 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 922 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 923 | asn_DEF_ActionItem_tags_1, |
| 924 | sizeof(asn_DEF_ActionItem_tags_1) |
| 925 | /sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */ |
| 926 | asn_DEF_ActionItem_tags_1, /* Same as above */ |
| 927 | sizeof(asn_DEF_ActionItem_tags_1) |
| 928 | /sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */ |
| 929 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 930 | asn_MBR_ActionItem_1, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 931 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 932 | &asn_SPC_ActionItem_specs_1 /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 933 | }; |
| 934 | |