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 <VariablePartSet.h> |
| 6 | #include <asn_SEQUENCE_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 7 | #include <constr_SEQUENCE_OF.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 8 | #include <constr_SEQUENCE.h> |
| 9 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 10 | /*** <<< DEPS [LogLine] >>> ***/ |
| 11 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 12 | extern asn1_TYPE_descriptor_t asn1_DEF_LogLine; |
| 13 | |
| 14 | /*** <<< TYPE-DECLS [LogLine] >>> ***/ |
| 15 | |
| 16 | |
| 17 | typedef struct LogLine { |
| 18 | IA5String_t line_digest; |
| 19 | struct varsets { |
Lev Walkin | 8dd0eed | 2004-09-17 06:32:12 +0000 | [diff] [blame] | 20 | A_SEQUENCE_OF(VariablePartSet_t) list; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 21 | |
| 22 | /* Context for parsing across buffer boundaries */ |
| 23 | ber_dec_ctx_t _ber_dec_ctx; |
| 24 | } varsets; |
| 25 | /* |
| 26 | * This type is extensible, |
| 27 | * possible extensions are below. |
| 28 | */ |
| 29 | |
| 30 | /* Context for parsing across buffer boundaries */ |
| 31 | ber_dec_ctx_t _ber_dec_ctx; |
| 32 | } LogLine_t; |
| 33 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 34 | /*** <<< CODE [LogLine] >>> ***/ |
| 35 | |
| 36 | static int |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 37 | memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 38 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 39 | size_t size; |
| 40 | |
| 41 | if(!sptr) { |
| 42 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 43 | "%s: value not given (%s:%d)", |
| 44 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 45 | return -1; |
| 46 | } |
| 47 | |
| 48 | { /* Determine the number of elements */ |
| 49 | const A_SEQUENCE_OF(void) *list; |
| 50 | (const void *)list = sptr; |
| 51 | size = list->count; |
| 52 | } |
| 53 | |
| 54 | if((size >= 1)) { |
| 55 | /* Constraint check succeeded */ |
Lev Walkin | 775885e | 2004-08-22 12:47:03 +0000 | [diff] [blame] | 56 | return 0; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 57 | } else { |
| 58 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 59 | "%s: constraint failed (%s:%d)", |
| 60 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 61 | return -1; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 66 | /*** <<< STAT-DEFS [LogLine] >>> ***/ |
| 67 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 68 | static asn1_TYPE_member_t asn1_MBR_varsets[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 69 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 70 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 71 | .tag_mode = 0, |
| 72 | .type = (void *)&asn1_DEF_VariablePartSet, |
| 73 | .memb_constraints = 0, /* Defer to actual type */ |
| 74 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 75 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 76 | }; |
| 77 | static ber_tlv_tag_t asn1_DEF_varsets_tags[] = { |
| 78 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 79 | }; |
| 80 | static asn1_SET_OF_specifics_t asn1_DEF_varsets_specs = { |
| 81 | sizeof(struct varsets), |
| 82 | offsetof(struct varsets, _ber_dec_ctx), |
| 83 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 84 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 85 | asn1_TYPE_descriptor_t asn1_DEF_varsets = { |
| 86 | "varsets", |
| 87 | SEQUENCE_OF_constraint, |
| 88 | SEQUENCE_OF_decode_ber, |
| 89 | SEQUENCE_OF_encode_der, |
| 90 | SEQUENCE_OF_print, |
| 91 | SEQUENCE_OF_free, |
| 92 | 0, /* Use generic outmost tag fetcher */ |
| 93 | asn1_DEF_varsets_tags, |
| 94 | sizeof(asn1_DEF_varsets_tags) |
| 95 | /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 96 | asn1_DEF_varsets_tags, /* Same as above */ |
| 97 | sizeof(asn1_DEF_varsets_tags) |
| 98 | /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 99 | 1, /* Whether CONSTRUCTED */ |
| 100 | asn1_MBR_varsets, |
| 101 | 1, /* Single element */ |
| 102 | &asn1_DEF_varsets_specs /* Additional specs */ |
| 103 | }; |
| 104 | |
| 105 | static asn1_TYPE_member_t asn1_MBR_LogLine[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 106 | { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 107 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), |
| 108 | .tag_mode = 0, |
| 109 | .type = (void *)&asn1_DEF_IA5String, |
| 110 | .memb_constraints = 0, /* Defer to actual type */ |
| 111 | .name = "line-digest" |
| 112 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 113 | { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 114 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 115 | .tag_mode = 0, |
| 116 | .type = (void *)&asn1_DEF_varsets, |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 117 | .memb_constraints = memb_varsets_1_constraint, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 118 | .name = "varsets" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 119 | }, |
| 120 | }; |
| 121 | static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = { |
| 122 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 123 | }; |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 124 | static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 125 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */ |
| 126 | { (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] | 127 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 128 | static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = { |
| 129 | sizeof(struct LogLine), |
| 130 | offsetof(struct LogLine, _ber_dec_ctx), |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 131 | asn1_DEF_LogLine_tag2el, |
| 132 | 2, /* Count of tags in the map */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 133 | 1, /* Start extensions */ |
| 134 | 3 /* Stop extensions */ |
| 135 | }; |
| 136 | asn1_TYPE_descriptor_t asn1_DEF_LogLine = { |
| 137 | "LogLine", |
| 138 | SEQUENCE_constraint, |
| 139 | SEQUENCE_decode_ber, |
| 140 | SEQUENCE_encode_der, |
| 141 | SEQUENCE_print, |
| 142 | SEQUENCE_free, |
| 143 | 0, /* Use generic outmost tag fetcher */ |
| 144 | asn1_DEF_LogLine_tags, |
| 145 | sizeof(asn1_DEF_LogLine_tags) |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 146 | /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 147 | asn1_DEF_LogLine_tags, /* Same as above */ |
| 148 | sizeof(asn1_DEF_LogLine_tags) |
| 149 | /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 150 | 1, /* Whether CONSTRUCTED */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 151 | asn1_MBR_LogLine, |
| 152 | 2, /* Elements count */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 153 | &asn1_DEF_LogLine_specs /* Additional specs */ |
| 154 | }; |
| 155 | |
| 156 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 157 | /*** <<< INCLUDES [VariablePartSet] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 158 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 159 | #include <ActionItem.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 160 | #include <VariablePart.h> |
| 161 | #include <asn_SEQUENCE_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 162 | #include <constr_SEQUENCE_OF.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 163 | #include <constr_SEQUENCE.h> |
| 164 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 165 | /*** <<< DEPS [VariablePartSet] >>> ***/ |
| 166 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 167 | extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet; |
| 168 | |
| 169 | /*** <<< TYPE-DECLS [VariablePartSet] >>> ***/ |
| 170 | |
| 171 | |
| 172 | typedef struct VariablePartSet { |
| 173 | struct vparts { |
Lev Walkin | 8dd0eed | 2004-09-17 06:32:12 +0000 | [diff] [blame] | 174 | A_SEQUENCE_OF(VariablePart_t) list; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 175 | |
| 176 | /* Context for parsing across buffer boundaries */ |
| 177 | ber_dec_ctx_t _ber_dec_ctx; |
| 178 | } vparts; |
| 179 | ActionItem_t resolution; |
| 180 | /* |
| 181 | * This type is extensible, |
| 182 | * possible extensions are below. |
| 183 | */ |
| 184 | |
| 185 | /* Context for parsing across buffer boundaries */ |
| 186 | ber_dec_ctx_t _ber_dec_ctx; |
| 187 | } VariablePartSet_t; |
| 188 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 189 | /*** <<< CODE [VariablePartSet] >>> ***/ |
| 190 | |
| 191 | static int |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 192 | memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 193 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 194 | |
| 195 | if(!sptr) { |
| 196 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 197 | "%s: value not given (%s:%d)", |
| 198 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 199 | return -1; |
| 200 | } |
| 201 | |
| 202 | |
| 203 | if(1 /* No applicable constraints whatsoever */) { |
| 204 | /* Nothing is here. See below */ |
| 205 | } |
| 206 | |
| 207 | return td->check_constraints |
| 208 | (td, sptr, app_errlog, app_key); |
| 209 | } |
| 210 | |
| 211 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 212 | /*** <<< STAT-DEFS [VariablePartSet] >>> ***/ |
| 213 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 214 | static asn1_TYPE_member_t asn1_MBR_vparts[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 215 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | b918973 | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 216 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 217 | .tag_mode = 0, |
| 218 | .type = (void *)&asn1_DEF_VariablePart, |
| 219 | .memb_constraints = 0, /* Defer to actual type */ |
| 220 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 221 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 222 | }; |
| 223 | static ber_tlv_tag_t asn1_DEF_vparts_tags[] = { |
| 224 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 225 | }; |
| 226 | static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = { |
| 227 | sizeof(struct vparts), |
| 228 | offsetof(struct vparts, _ber_dec_ctx), |
| 229 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 230 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 231 | asn1_TYPE_descriptor_t asn1_DEF_vparts = { |
| 232 | "vparts", |
| 233 | SEQUENCE_OF_constraint, |
| 234 | SEQUENCE_OF_decode_ber, |
| 235 | SEQUENCE_OF_encode_der, |
| 236 | SEQUENCE_OF_print, |
| 237 | SEQUENCE_OF_free, |
| 238 | 0, /* Use generic outmost tag fetcher */ |
| 239 | asn1_DEF_vparts_tags, |
| 240 | sizeof(asn1_DEF_vparts_tags) |
| 241 | /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 242 | asn1_DEF_vparts_tags, /* Same as above */ |
| 243 | sizeof(asn1_DEF_vparts_tags) |
| 244 | /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 245 | 1, /* Whether CONSTRUCTED */ |
| 246 | asn1_MBR_vparts, |
| 247 | 1, /* Single element */ |
| 248 | &asn1_DEF_vparts_specs /* Additional specs */ |
| 249 | }; |
| 250 | |
| 251 | static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 252 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 253 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 254 | .tag_mode = 0, |
| 255 | .type = (void *)&asn1_DEF_vparts, |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 256 | .memb_constraints = memb_vparts_2_constraint, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 257 | .name = "vparts" |
| 258 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 259 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 260 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 261 | .tag_mode = 0, |
| 262 | .type = (void *)&asn1_DEF_ActionItem, |
| 263 | .memb_constraints = 0, /* Defer to actual type */ |
| 264 | .name = "resolution" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 265 | }, |
| 266 | }; |
| 267 | static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = { |
| 268 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 269 | }; |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 270 | static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 271 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */ |
| 272 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 273 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 274 | static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = { |
| 275 | sizeof(struct VariablePartSet), |
| 276 | offsetof(struct VariablePartSet, _ber_dec_ctx), |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 277 | asn1_DEF_VariablePartSet_tag2el, |
| 278 | 2, /* Count of tags in the map */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 279 | 1, /* Start extensions */ |
| 280 | 3 /* Stop extensions */ |
| 281 | }; |
| 282 | asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = { |
| 283 | "VariablePartSet", |
| 284 | SEQUENCE_constraint, |
| 285 | SEQUENCE_decode_ber, |
| 286 | SEQUENCE_encode_der, |
| 287 | SEQUENCE_print, |
| 288 | SEQUENCE_free, |
| 289 | 0, /* Use generic outmost tag fetcher */ |
| 290 | asn1_DEF_VariablePartSet_tags, |
| 291 | sizeof(asn1_DEF_VariablePartSet_tags) |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 292 | /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 293 | asn1_DEF_VariablePartSet_tags, /* Same as above */ |
| 294 | sizeof(asn1_DEF_VariablePartSet_tags) |
| 295 | /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 296 | 1, /* Whether CONSTRUCTED */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 297 | asn1_MBR_VariablePartSet, |
| 298 | 2, /* Elements count */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 299 | &asn1_DEF_VariablePartSet_specs /* Additional specs */ |
| 300 | }; |
| 301 | |
| 302 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 303 | /*** <<< INCLUDES [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 304 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 305 | #include <VisibleString.h> |
| 306 | #include <asn_SET_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 307 | #include <constr_SET_OF.h> |
| 308 | #include <constr_SEQUENCE.h> |
| 309 | #include <constr_CHOICE.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 310 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 311 | /*** <<< DEPS [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 312 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 313 | typedef enum VariablePart_PR { |
| 314 | VariablePart_PR_NOTHING, /* No components present */ |
| 315 | VariablePart_PR_vset, |
| 316 | VariablePart_PR_vrange, |
| 317 | /* Extensions may appear below */ |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 318 | } VariablePart_PR; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 319 | extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart; |
| 320 | |
| 321 | /*** <<< TYPE-DECLS [VariablePart] >>> ***/ |
| 322 | |
| 323 | |
| 324 | typedef struct VariablePart { |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 325 | VariablePart_PR present; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 326 | union { |
| 327 | struct vset { |
| 328 | A_SET_OF(VisibleString_t) list; |
| 329 | |
| 330 | /* Context for parsing across buffer boundaries */ |
| 331 | ber_dec_ctx_t _ber_dec_ctx; |
| 332 | } vset; |
| 333 | struct vrange { |
| 334 | VisibleString_t from; |
| 335 | VisibleString_t to; |
| 336 | /* |
| 337 | * This type is extensible, |
| 338 | * possible extensions are below. |
| 339 | */ |
| 340 | |
| 341 | /* Context for parsing across buffer boundaries */ |
| 342 | ber_dec_ctx_t _ber_dec_ctx; |
| 343 | } vrange; |
| 344 | /* |
| 345 | * This type is extensible, |
| 346 | * possible extensions are below. |
| 347 | */ |
| 348 | } choice; |
| 349 | |
| 350 | /* Context for parsing across buffer boundaries */ |
| 351 | ber_dec_ctx_t _ber_dec_ctx; |
| 352 | } VariablePart_t; |
| 353 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 354 | /*** <<< CODE [VariablePart] >>> ***/ |
| 355 | |
| 356 | static int |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 357 | memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 358 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 359 | size_t size; |
| 360 | |
| 361 | if(!sptr) { |
| 362 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 363 | "%s: value not given (%s:%d)", |
| 364 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 365 | return -1; |
| 366 | } |
| 367 | |
| 368 | { /* Determine the number of elements */ |
| 369 | const A_SET_OF(void) *list; |
| 370 | (const void *)list = sptr; |
| 371 | size = list->count; |
| 372 | } |
| 373 | |
| 374 | if((size >= 1)) { |
| 375 | /* Constraint check succeeded */ |
Lev Walkin | 775885e | 2004-08-22 12:47:03 +0000 | [diff] [blame] | 376 | return 0; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 377 | } else { |
| 378 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 379 | "%s: constraint failed (%s:%d)", |
| 380 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 381 | return -1; |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 386 | /*** <<< STAT-DEFS [VariablePart] >>> ***/ |
| 387 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 388 | static asn1_TYPE_member_t asn1_MBR_vset[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 389 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 390 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 391 | .tag_mode = 0, |
| 392 | .type = (void *)&asn1_DEF_VisibleString, |
| 393 | .memb_constraints = 0, /* Defer to actual type */ |
| 394 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 395 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 396 | }; |
| 397 | static ber_tlv_tag_t asn1_DEF_vset_tags[] = { |
| 398 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 399 | }; |
| 400 | static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = { |
| 401 | sizeof(struct vset), |
| 402 | offsetof(struct vset, _ber_dec_ctx), |
| 403 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 404 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 405 | asn1_TYPE_descriptor_t asn1_DEF_vset = { |
| 406 | "vset", |
| 407 | SET_OF_constraint, |
| 408 | SET_OF_decode_ber, |
| 409 | SET_OF_encode_der, |
| 410 | SET_OF_print, |
| 411 | SET_OF_free, |
| 412 | 0, /* Use generic outmost tag fetcher */ |
| 413 | asn1_DEF_vset_tags, |
| 414 | sizeof(asn1_DEF_vset_tags) |
| 415 | /sizeof(asn1_DEF_vset_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 416 | asn1_DEF_vset_tags, /* Same as above */ |
| 417 | sizeof(asn1_DEF_vset_tags) |
| 418 | /sizeof(asn1_DEF_vset_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 419 | 1, /* Whether CONSTRUCTED */ |
| 420 | asn1_MBR_vset, |
| 421 | 1, /* Single element */ |
| 422 | &asn1_DEF_vset_specs /* Additional specs */ |
| 423 | }; |
| 424 | |
| 425 | static asn1_TYPE_member_t asn1_MBR_vrange[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 426 | { ATF_NOFLAGS, 0, offsetof(struct vrange, from), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 427 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 428 | .tag_mode = 0, |
| 429 | .type = (void *)&asn1_DEF_VisibleString, |
| 430 | .memb_constraints = 0, /* Defer to actual type */ |
| 431 | .name = "from" |
| 432 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 433 | { ATF_NOFLAGS, 0, offsetof(struct vrange, to), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 434 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 435 | .tag_mode = 0, |
| 436 | .type = (void *)&asn1_DEF_VisibleString, |
| 437 | .memb_constraints = 0, /* Defer to actual type */ |
| 438 | .name = "to" |
| 439 | }, |
| 440 | }; |
| 441 | static ber_tlv_tag_t asn1_DEF_vrange_tags[] = { |
| 442 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 443 | }; |
| 444 | static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = { |
| 445 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */ |
| 446 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */ |
| 447 | }; |
| 448 | static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = { |
| 449 | sizeof(struct vrange), |
| 450 | offsetof(struct vrange, _ber_dec_ctx), |
| 451 | asn1_DEF_vrange_tag2el, |
| 452 | 2, /* Count of tags in the map */ |
| 453 | 1, /* Start extensions */ |
| 454 | 3 /* Stop extensions */ |
| 455 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 456 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 457 | asn1_TYPE_descriptor_t asn1_DEF_vrange = { |
| 458 | "vrange", |
| 459 | SEQUENCE_constraint, |
| 460 | SEQUENCE_decode_ber, |
| 461 | SEQUENCE_encode_der, |
| 462 | SEQUENCE_print, |
| 463 | SEQUENCE_free, |
| 464 | 0, /* Use generic outmost tag fetcher */ |
| 465 | asn1_DEF_vrange_tags, |
| 466 | sizeof(asn1_DEF_vrange_tags) |
| 467 | /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 468 | asn1_DEF_vrange_tags, /* Same as above */ |
| 469 | sizeof(asn1_DEF_vrange_tags) |
| 470 | /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 471 | 1, /* Whether CONSTRUCTED */ |
| 472 | asn1_MBR_vrange, |
| 473 | 2, /* Elements count */ |
| 474 | &asn1_DEF_vrange_specs /* Additional specs */ |
| 475 | }; |
| 476 | |
| 477 | static asn1_TYPE_member_t asn1_MBR_VariablePart[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 478 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 479 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 480 | .tag_mode = 0, |
| 481 | .type = (void *)&asn1_DEF_vset, |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 482 | .memb_constraints = memb_vset_3_constraint, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 483 | .name = "vset" |
| 484 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 485 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 486 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 487 | .tag_mode = 0, |
| 488 | .type = (void *)&asn1_DEF_vrange, |
| 489 | .memb_constraints = 0, /* Defer to actual type */ |
| 490 | .name = "vrange" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 491 | }, |
| 492 | }; |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 493 | static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 494 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */ |
| 495 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 496 | }; |
| 497 | static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = { |
| 498 | sizeof(struct VariablePart), |
| 499 | offsetof(struct VariablePart, _ber_dec_ctx), |
| 500 | offsetof(struct VariablePart, present), |
| 501 | sizeof(((struct VariablePart *)0)->present), |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 502 | asn1_DEF_VariablePart_tag2el, |
| 503 | 2, /* Count of tags in the map */ |
Lev Walkin | d64497c | 2004-07-01 00:49:55 +0000 | [diff] [blame] | 504 | 1 /* Whether extensible */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 505 | }; |
| 506 | asn1_TYPE_descriptor_t asn1_DEF_VariablePart = { |
| 507 | "VariablePart", |
| 508 | CHOICE_constraint, |
| 509 | CHOICE_decode_ber, |
| 510 | CHOICE_encode_der, |
| 511 | CHOICE_print, |
| 512 | CHOICE_free, |
| 513 | CHOICE_outmost_tag, |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 514 | 0, /* No effective tags (pointer) */ |
| 515 | 0, /* No effective tags (count) */ |
| 516 | 0, /* No tags (pointer) */ |
| 517 | 0, /* No tags (count) */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 518 | 1, /* Whether CONSTRUCTED */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 519 | asn1_MBR_VariablePart, |
| 520 | 2, /* Elements count */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 521 | &asn1_DEF_VariablePart_specs /* Additional specs */ |
| 522 | }; |
| 523 | |
| 524 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 525 | /*** <<< INCLUDES [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 526 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 527 | #include <ENUMERATED.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 528 | #include <BOOLEAN.h> |
| 529 | #include <VisibleString.h> |
| 530 | #include <asn_SET_OF.h> |
| 531 | #include <constr_SET_OF.h> |
| 532 | #include <constr_SEQUENCE.h> |
| 533 | |
| 534 | /*** <<< DEPS [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 535 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 536 | typedef enum accept_as { |
| 537 | accept_as_unknown = 0, |
| 538 | accept_as_safe = 1, |
| 539 | accept_as_unsafe = 2, |
| 540 | /* |
| 541 | * Enumeration is extensible |
| 542 | */ |
| 543 | } accept_as_e; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 544 | extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem; |
| 545 | |
| 546 | /*** <<< TYPE-DECLS [ActionItem] >>> ***/ |
| 547 | |
| 548 | |
| 549 | typedef struct ActionItem { |
| 550 | ENUMERATED_t accept_as; |
| 551 | struct notify { |
| 552 | BOOLEAN_t critical; |
| 553 | struct email { |
| 554 | A_SET_OF(VisibleString_t) list; |
| 555 | |
| 556 | /* Context for parsing across buffer boundaries */ |
| 557 | ber_dec_ctx_t _ber_dec_ctx; |
| 558 | } email; |
| 559 | /* |
| 560 | * This type is extensible, |
| 561 | * possible extensions are below. |
| 562 | */ |
| 563 | |
| 564 | /* Context for parsing across buffer boundaries */ |
| 565 | ber_dec_ctx_t _ber_dec_ctx; |
| 566 | } *notify; |
| 567 | /* |
| 568 | * This type is extensible, |
| 569 | * possible extensions are below. |
| 570 | */ |
| 571 | |
| 572 | /* Context for parsing across buffer boundaries */ |
| 573 | ber_dec_ctx_t _ber_dec_ctx; |
| 574 | } ActionItem_t; |
| 575 | |
| 576 | /*** <<< STAT-DEFS [ActionItem] >>> ***/ |
| 577 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 578 | static asn1_TYPE_member_t asn1_MBR_email[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 579 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 580 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 581 | .tag_mode = 0, |
| 582 | .type = (void *)&asn1_DEF_VisibleString, |
| 583 | .memb_constraints = 0, /* Defer to actual type */ |
| 584 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 585 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 586 | }; |
| 587 | static ber_tlv_tag_t asn1_DEF_email_tags[] = { |
| 588 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 589 | }; |
| 590 | static asn1_SET_OF_specifics_t asn1_DEF_email_specs = { |
| 591 | sizeof(struct email), |
| 592 | offsetof(struct email, _ber_dec_ctx), |
| 593 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 594 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 595 | asn1_TYPE_descriptor_t asn1_DEF_email = { |
| 596 | "email", |
| 597 | SET_OF_constraint, |
| 598 | SET_OF_decode_ber, |
| 599 | SET_OF_encode_der, |
| 600 | SET_OF_print, |
| 601 | SET_OF_free, |
| 602 | 0, /* Use generic outmost tag fetcher */ |
| 603 | asn1_DEF_email_tags, |
| 604 | sizeof(asn1_DEF_email_tags) |
| 605 | /sizeof(asn1_DEF_email_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 606 | asn1_DEF_email_tags, /* Same as above */ |
| 607 | sizeof(asn1_DEF_email_tags) |
| 608 | /sizeof(asn1_DEF_email_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 609 | 1, /* Whether CONSTRUCTED */ |
| 610 | asn1_MBR_email, |
| 611 | 1, /* Single element */ |
| 612 | &asn1_DEF_email_specs /* Additional specs */ |
| 613 | }; |
| 614 | |
| 615 | static asn1_TYPE_member_t asn1_MBR_notify[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 616 | { ATF_NOFLAGS, 0, offsetof(struct notify, critical), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 617 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 618 | .tag_mode = 0, |
| 619 | .type = (void *)&asn1_DEF_BOOLEAN, |
| 620 | .memb_constraints = 0, /* Defer to actual type */ |
| 621 | .name = "critical" |
| 622 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 623 | { ATF_NOFLAGS, 0, offsetof(struct notify, email), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 624 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 625 | .tag_mode = 0, |
| 626 | .type = (void *)&asn1_DEF_email, |
| 627 | .memb_constraints = 0, /* Defer to actual type */ |
| 628 | .name = "email" |
| 629 | }, |
| 630 | }; |
| 631 | static ber_tlv_tag_t asn1_DEF_notify_tags[] = { |
| 632 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 633 | }; |
| 634 | static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = { |
| 635 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */ |
| 636 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */ |
| 637 | }; |
| 638 | static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = { |
| 639 | sizeof(struct notify), |
| 640 | offsetof(struct notify, _ber_dec_ctx), |
| 641 | asn1_DEF_notify_tag2el, |
| 642 | 2, /* Count of tags in the map */ |
| 643 | 1, /* Start extensions */ |
| 644 | 3 /* Stop extensions */ |
| 645 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 646 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 647 | asn1_TYPE_descriptor_t asn1_DEF_notify = { |
| 648 | "notify", |
| 649 | SEQUENCE_constraint, |
| 650 | SEQUENCE_decode_ber, |
| 651 | SEQUENCE_encode_der, |
| 652 | SEQUENCE_print, |
| 653 | SEQUENCE_free, |
| 654 | 0, /* Use generic outmost tag fetcher */ |
| 655 | asn1_DEF_notify_tags, |
| 656 | sizeof(asn1_DEF_notify_tags) |
| 657 | /sizeof(asn1_DEF_notify_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 658 | asn1_DEF_notify_tags, /* Same as above */ |
| 659 | sizeof(asn1_DEF_notify_tags) |
| 660 | /sizeof(asn1_DEF_notify_tags[0]), /* 1 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 661 | 1, /* Whether CONSTRUCTED */ |
| 662 | asn1_MBR_notify, |
| 663 | 2, /* Elements count */ |
| 664 | &asn1_DEF_notify_specs /* Additional specs */ |
| 665 | }; |
| 666 | |
| 667 | static asn1_TYPE_member_t asn1_MBR_ActionItem[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 668 | { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 669 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 670 | .tag_mode = 0, |
| 671 | .type = (void *)&asn1_DEF_ENUMERATED, |
| 672 | .memb_constraints = 0, /* Defer to actual type */ |
| 673 | .name = "accept-as" |
| 674 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 675 | { ATF_POINTER, 1, offsetof(struct ActionItem, notify), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 676 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 677 | .tag_mode = 0, |
| 678 | .type = (void *)&asn1_DEF_notify, |
| 679 | .memb_constraints = 0, /* Defer to actual type */ |
| 680 | .name = "notify" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 681 | }, |
| 682 | }; |
| 683 | static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = { |
| 684 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 685 | }; |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 686 | static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 687 | { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */ |
| 688 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 689 | }; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 690 | static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = { |
| 691 | sizeof(struct ActionItem), |
| 692 | offsetof(struct ActionItem, _ber_dec_ctx), |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 693 | asn1_DEF_ActionItem_tag2el, |
| 694 | 2, /* Count of tags in the map */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 695 | 1, /* Start extensions */ |
| 696 | 3 /* Stop extensions */ |
| 697 | }; |
| 698 | asn1_TYPE_descriptor_t asn1_DEF_ActionItem = { |
| 699 | "ActionItem", |
| 700 | SEQUENCE_constraint, |
| 701 | SEQUENCE_decode_ber, |
| 702 | SEQUENCE_encode_der, |
| 703 | SEQUENCE_print, |
| 704 | SEQUENCE_free, |
| 705 | 0, /* Use generic outmost tag fetcher */ |
| 706 | asn1_DEF_ActionItem_tags, |
| 707 | sizeof(asn1_DEF_ActionItem_tags) |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 708 | /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */ |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 709 | asn1_DEF_ActionItem_tags, /* Same as above */ |
| 710 | sizeof(asn1_DEF_ActionItem_tags) |
| 711 | /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 712 | 1, /* Whether CONSTRUCTED */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 713 | asn1_MBR_ActionItem, |
| 714 | 2, /* Elements count */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 715 | &asn1_DEF_ActionItem_specs /* Additional specs */ |
| 716 | }; |
| 717 | |