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