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