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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 12 | extern asn_TYPE_descriptor_t asn_DEF_LogLine; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 23 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 24 | } varsets; |
| 25 | /* |
| 26 | * This type is extensible, |
| 27 | * possible extensions are below. |
| 28 | */ |
| 29 | |
| 30 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 31 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 37 | memb_varsets_1_constraint(asn_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; |
Lev Walkin | 64d99e9 | 2005-01-30 18:34:07 +0000 | [diff] [blame] | 50 | (const void *)list = sptr; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 68 | static asn_TYPE_member_t asn_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, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 72 | .type = (void *)&asn_DEF_VariablePartSet, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 73 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 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 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 77 | static ber_tlv_tag_t asn_DEF_varsets_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 78 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 79 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 80 | static asn_SET_OF_specifics_t asn_DEF_varsets_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 81 | sizeof(struct varsets), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 82 | offsetof(struct varsets, _asn_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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 86 | asn_TYPE_descriptor_t asn_DEF_varsets = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 87 | "varsets", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 88 | "varsets", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 89 | SEQUENCE_OF_free, |
| 90 | SEQUENCE_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 91 | SEQUENCE_OF_constraint, |
| 92 | SEQUENCE_OF_decode_ber, |
| 93 | SEQUENCE_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 94 | SEQUENCE_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 95 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 96 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 97 | asn_DEF_varsets_tags, |
| 98 | sizeof(asn_DEF_varsets_tags) |
| 99 | /sizeof(asn_DEF_varsets_tags[0]), /* 1 */ |
| 100 | asn_DEF_varsets_tags, /* Same as above */ |
| 101 | sizeof(asn_DEF_varsets_tags) |
| 102 | /sizeof(asn_DEF_varsets_tags[0]), /* 1 */ |
| 103 | asn_MBR_varsets, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 104 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 105 | &asn_DEF_varsets_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 106 | }; |
| 107 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 108 | static asn_TYPE_member_t asn_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, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 112 | .type = (void *)&asn_DEF_IA5String, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 113 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 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, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 119 | .type = (void *)&asn_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 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 124 | static ber_tlv_tag_t asn_DEF_LogLine_tags[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 125 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 126 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 127 | static asn_TYPE_tag2member_t asn_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 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 131 | static asn_SEQUENCE_specifics_t asn_DEF_LogLine_specs = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 132 | sizeof(struct LogLine), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 133 | offsetof(struct LogLine, _asn_ctx), |
| 134 | asn_DEF_LogLine_tag2el, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 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 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 139 | asn_TYPE_descriptor_t asn_DEF_LogLine = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 140 | "LogLine", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 141 | "LogLine", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 142 | SEQUENCE_free, |
| 143 | SEQUENCE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 144 | SEQUENCE_constraint, |
| 145 | SEQUENCE_decode_ber, |
| 146 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 147 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 148 | SEQUENCE_encode_xer, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 149 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 150 | asn_DEF_LogLine_tags, |
| 151 | sizeof(asn_DEF_LogLine_tags) |
| 152 | /sizeof(asn_DEF_LogLine_tags[0]), /* 1 */ |
| 153 | asn_DEF_LogLine_tags, /* Same as above */ |
| 154 | sizeof(asn_DEF_LogLine_tags) |
| 155 | /sizeof(asn_DEF_LogLine_tags[0]), /* 1 */ |
| 156 | asn_MBR_LogLine, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 157 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 158 | &asn_DEF_LogLine_specs /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 172 | extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 182 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 191 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 197 | memb_vparts_2_constraint(asn_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 | |
Lev Walkin | 154aa18 | 2004-09-26 13:12:56 +0000 | [diff] [blame] | 212 | return td->check_constraints(td, sptr, app_errlog, app_key); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 216 | /*** <<< STAT-DEFS [VariablePartSet] >>> ***/ |
| 217 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 218 | static asn_TYPE_member_t asn_MBR_vparts[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 219 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | b918973 | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 220 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 221 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 222 | .type = (void *)&asn_DEF_VariablePart, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 223 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 224 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 225 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 226 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 227 | static ber_tlv_tag_t asn_DEF_vparts_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 228 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 229 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 230 | static asn_SET_OF_specifics_t asn_DEF_vparts_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 231 | sizeof(struct vparts), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 232 | offsetof(struct vparts, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 233 | 1, /* XER encoding is XMLValueList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 234 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 235 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 236 | asn_TYPE_descriptor_t asn_DEF_vparts = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 237 | "vparts", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 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 | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 244 | SEQUENCE_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 245 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 246 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 247 | asn_DEF_vparts_tags, |
| 248 | sizeof(asn_DEF_vparts_tags) |
| 249 | /sizeof(asn_DEF_vparts_tags[0]), /* 1 */ |
| 250 | asn_DEF_vparts_tags, /* Same as above */ |
| 251 | sizeof(asn_DEF_vparts_tags) |
| 252 | /sizeof(asn_DEF_vparts_tags[0]), /* 1 */ |
| 253 | asn_MBR_vparts, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 254 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 255 | &asn_DEF_vparts_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 256 | }; |
| 257 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 258 | static asn_TYPE_member_t asn_MBR_VariablePartSet[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 259 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 260 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 261 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 262 | .type = (void *)&asn_DEF_vparts, |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 263 | .memb_constraints = memb_vparts_2_constraint, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 264 | .name = "vparts" |
| 265 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 266 | { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 267 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 268 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 269 | .type = (void *)&asn_DEF_ActionItem, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 270 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 271 | .name = "resolution" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 272 | }, |
| 273 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 274 | static ber_tlv_tag_t asn_DEF_VariablePartSet_tags[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 275 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 276 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 277 | static asn_TYPE_tag2member_t asn_DEF_VariablePartSet_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 278 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 279 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* resolution at 35 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 280 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 281 | static asn_SEQUENCE_specifics_t asn_DEF_VariablePartSet_specs = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 282 | sizeof(struct VariablePartSet), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 283 | offsetof(struct VariablePartSet, _asn_ctx), |
| 284 | asn_DEF_VariablePartSet_tag2el, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 285 | 2, /* Count of tags in the map */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 286 | 1, /* Start extensions */ |
| 287 | 3 /* Stop extensions */ |
| 288 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 289 | asn_TYPE_descriptor_t asn_DEF_VariablePartSet = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 290 | "VariablePartSet", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 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 | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 297 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 298 | SEQUENCE_encode_xer, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 299 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 300 | asn_DEF_VariablePartSet_tags, |
| 301 | sizeof(asn_DEF_VariablePartSet_tags) |
| 302 | /sizeof(asn_DEF_VariablePartSet_tags[0]), /* 1 */ |
| 303 | asn_DEF_VariablePartSet_tags, /* Same as above */ |
| 304 | sizeof(asn_DEF_VariablePartSet_tags) |
| 305 | /sizeof(asn_DEF_VariablePartSet_tags[0]), /* 1 */ |
| 306 | asn_MBR_VariablePartSet, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 307 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 308 | &asn_DEF_VariablePartSet_specs /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 309 | }; |
| 310 | |
| 311 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 312 | /*** <<< INCLUDES [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 313 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 314 | #include <VisibleString.h> |
| 315 | #include <asn_SET_OF.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 316 | #include <constr_SET_OF.h> |
| 317 | #include <constr_SEQUENCE.h> |
| 318 | #include <constr_CHOICE.h> |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 319 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 320 | /*** <<< DEPS [VariablePart] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 321 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 322 | typedef enum VariablePart_PR { |
| 323 | VariablePart_PR_NOTHING, /* No components present */ |
| 324 | VariablePart_PR_vset, |
| 325 | VariablePart_PR_vrange, |
| 326 | /* Extensions may appear below */ |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 327 | } VariablePart_PR; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 328 | extern asn_TYPE_descriptor_t asn_DEF_VariablePart; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 329 | |
| 330 | /*** <<< TYPE-DECLS [VariablePart] >>> ***/ |
| 331 | |
| 332 | |
| 333 | typedef struct VariablePart { |
Lev Walkin | 6439972 | 2004-08-11 07:17:22 +0000 | [diff] [blame] | 334 | VariablePart_PR present; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 335 | union { |
| 336 | struct vset { |
| 337 | A_SET_OF(VisibleString_t) list; |
| 338 | |
| 339 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 340 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 341 | } vset; |
| 342 | struct vrange { |
| 343 | VisibleString_t from; |
| 344 | VisibleString_t to; |
| 345 | /* |
| 346 | * This type is extensible, |
| 347 | * possible extensions are below. |
| 348 | */ |
| 349 | |
| 350 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 351 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 352 | } vrange; |
| 353 | /* |
| 354 | * This type is extensible, |
| 355 | * possible extensions are below. |
| 356 | */ |
| 357 | } choice; |
| 358 | |
| 359 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 360 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 361 | } VariablePart_t; |
| 362 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 363 | /*** <<< CODE [VariablePart] >>> ***/ |
| 364 | |
| 365 | static int |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 366 | memb_vset_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 367 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 368 | size_t size; |
| 369 | |
| 370 | if(!sptr) { |
| 371 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 372 | "%s: value not given (%s:%d)", |
| 373 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 374 | return -1; |
| 375 | } |
| 376 | |
| 377 | { /* Determine the number of elements */ |
| 378 | const A_SET_OF(void) *list; |
Lev Walkin | 64d99e9 | 2005-01-30 18:34:07 +0000 | [diff] [blame] | 379 | (const void *)list = sptr; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 380 | size = list->count; |
| 381 | } |
| 382 | |
| 383 | if((size >= 1)) { |
| 384 | /* Constraint check succeeded */ |
Lev Walkin | 775885e | 2004-08-22 12:47:03 +0000 | [diff] [blame] | 385 | return 0; |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 386 | } else { |
| 387 | _ASN_ERRLOG(app_errlog, app_key, |
Lev Walkin | 16835b6 | 2004-08-22 13:47:59 +0000 | [diff] [blame] | 388 | "%s: constraint failed (%s:%d)", |
| 389 | td->name, __FILE__, __LINE__); |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 390 | return -1; |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 395 | /*** <<< STAT-DEFS [VariablePart] >>> ***/ |
| 396 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 397 | static asn_TYPE_member_t asn_MBR_vset[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 398 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 399 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 400 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 401 | .type = (void *)&asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 402 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 403 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 404 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 405 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 406 | static ber_tlv_tag_t asn_DEF_vset_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 407 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 408 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 409 | static asn_SET_OF_specifics_t asn_DEF_vset_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 410 | sizeof(struct vset), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 411 | offsetof(struct vset, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 412 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 413 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 414 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 415 | asn_TYPE_descriptor_t asn_DEF_vset = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 416 | "vset", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 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 | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 423 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 424 | SET_OF_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 425 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 426 | asn_DEF_vset_tags, |
| 427 | sizeof(asn_DEF_vset_tags) |
| 428 | /sizeof(asn_DEF_vset_tags[0]), /* 1 */ |
| 429 | asn_DEF_vset_tags, /* Same as above */ |
| 430 | sizeof(asn_DEF_vset_tags) |
| 431 | /sizeof(asn_DEF_vset_tags[0]), /* 1 */ |
| 432 | asn_MBR_vset, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 433 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 434 | &asn_DEF_vset_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 435 | }; |
| 436 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 437 | static asn_TYPE_member_t asn_MBR_vrange[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 438 | { ATF_NOFLAGS, 0, offsetof(struct vrange, from), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 439 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 440 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 441 | .type = (void *)&asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 442 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 443 | .name = "from" |
| 444 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 445 | { ATF_NOFLAGS, 0, offsetof(struct vrange, to), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 446 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 447 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 448 | .type = (void *)&asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 449 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 450 | .name = "to" |
| 451 | }, |
| 452 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 453 | static ber_tlv_tag_t asn_DEF_vrange_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 454 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 455 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 456 | static asn_TYPE_tag2member_t asn_DEF_vrange_tag2el[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 457 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 458 | { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 459 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 460 | static asn_SEQUENCE_specifics_t asn_DEF_vrange_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 461 | sizeof(struct vrange), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 462 | offsetof(struct vrange, _asn_ctx), |
| 463 | asn_DEF_vrange_tag2el, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 464 | 2, /* Count of tags in the map */ |
| 465 | 1, /* Start extensions */ |
| 466 | 3 /* Stop extensions */ |
| 467 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 468 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 469 | asn_TYPE_descriptor_t asn_DEF_vrange = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 470 | "vrange", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 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 | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 477 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 478 | SEQUENCE_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 479 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 480 | asn_DEF_vrange_tags, |
| 481 | sizeof(asn_DEF_vrange_tags) |
| 482 | /sizeof(asn_DEF_vrange_tags[0]), /* 1 */ |
| 483 | asn_DEF_vrange_tags, /* Same as above */ |
| 484 | sizeof(asn_DEF_vrange_tags) |
| 485 | /sizeof(asn_DEF_vrange_tags[0]), /* 1 */ |
| 486 | asn_MBR_vrange, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 487 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 488 | &asn_DEF_vrange_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 489 | }; |
| 490 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 491 | static asn_TYPE_member_t asn_MBR_VariablePart[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 492 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 493 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 494 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 495 | .type = (void *)&asn_DEF_vset, |
Lev Walkin | a09e5da | 2004-08-22 03:19:00 +0000 | [diff] [blame] | 496 | .memb_constraints = memb_vset_3_constraint, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 497 | .name = "vset" |
| 498 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 499 | { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 500 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 501 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 502 | .type = (void *)&asn_DEF_vrange, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 503 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 504 | .name = "vrange" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 505 | }, |
| 506 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 507 | static asn_TYPE_tag2member_t asn_DEF_VariablePart_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 508 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 509 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 510 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 511 | static asn_CHOICE_specifics_t asn_DEF_VariablePart_specs = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 512 | sizeof(struct VariablePart), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 513 | offsetof(struct VariablePart, _asn_ctx), |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 514 | offsetof(struct VariablePart, present), |
| 515 | sizeof(((struct VariablePart *)0)->present), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 516 | asn_DEF_VariablePart_tag2el, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 517 | 2, /* Count of tags in the map */ |
Lev Walkin | d64497c | 2004-07-01 00:49:55 +0000 | [diff] [blame] | 518 | 1 /* Whether extensible */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 519 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 520 | asn_TYPE_descriptor_t asn_DEF_VariablePart = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 521 | "VariablePart", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 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 | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 528 | CHOICE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 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 | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 535 | asn_MBR_VariablePart, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 536 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 537 | &asn_DEF_VariablePart_specs /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 538 | }; |
| 539 | |
| 540 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 541 | /*** <<< INCLUDES [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 542 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 543 | #include <ENUMERATED.h> |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 544 | #include <BOOLEAN.h> |
| 545 | #include <VisibleString.h> |
| 546 | #include <asn_SET_OF.h> |
| 547 | #include <constr_SET_OF.h> |
| 548 | #include <constr_SEQUENCE.h> |
| 549 | |
| 550 | /*** <<< DEPS [ActionItem] >>> ***/ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 551 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 552 | typedef enum accept_as { |
| 553 | accept_as_unknown = 0, |
| 554 | accept_as_safe = 1, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 555 | accept_as_unsafe = 2 |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 556 | /* |
| 557 | * Enumeration is extensible |
| 558 | */ |
| 559 | } accept_as_e; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 560 | extern asn_TYPE_descriptor_t asn_DEF_ActionItem; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 561 | |
| 562 | /*** <<< TYPE-DECLS [ActionItem] >>> ***/ |
| 563 | |
| 564 | |
| 565 | typedef struct ActionItem { |
| 566 | ENUMERATED_t accept_as; |
| 567 | struct notify { |
| 568 | BOOLEAN_t critical; |
| 569 | struct email { |
| 570 | A_SET_OF(VisibleString_t) list; |
| 571 | |
| 572 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 573 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 574 | } email; |
| 575 | /* |
| 576 | * This type is extensible, |
| 577 | * possible extensions are below. |
| 578 | */ |
| 579 | |
| 580 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 581 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 582 | } *notify; |
| 583 | /* |
| 584 | * This type is extensible, |
| 585 | * possible extensions are below. |
| 586 | */ |
| 587 | |
| 588 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 589 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 590 | } ActionItem_t; |
| 591 | |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 592 | /*** <<< FUNC-DECLS [ActionItem] >>> ***/ |
| 593 | |
| 594 | /* extern asn_TYPE_descriptor_t asn_DEF_accept_as; // (Use -fall-defs-global to expose) */ |
| 595 | |
| 596 | /*** <<< CODE [ActionItem] >>> ***/ |
| 597 | |
| 598 | static int |
| 599 | accept_as_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 600 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 601 | /* Replace with underlying type checker */ |
| 602 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 603 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 604 | } |
| 605 | |
| 606 | /* |
| 607 | * This type is implemented using ENUMERATED, |
| 608 | * so here we adjust the DEF accordingly. |
| 609 | */ |
| 610 | static void |
| 611 | accept_as_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 612 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 613 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 614 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 615 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 616 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 617 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 618 | td->elements = asn_DEF_ENUMERATED.elements; |
| 619 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 620 | td->specifics = asn_DEF_ENUMERATED.specifics; |
| 621 | } |
| 622 | |
| 623 | static void |
| 624 | accept_as_free(asn_TYPE_descriptor_t *td, |
| 625 | void *struct_ptr, int contents_only) { |
| 626 | accept_as_inherit_TYPE_descriptor(td); |
| 627 | td->free_struct(td, struct_ptr, contents_only); |
| 628 | } |
| 629 | |
| 630 | static int |
| 631 | accept_as_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 632 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 633 | accept_as_inherit_TYPE_descriptor(td); |
| 634 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 635 | } |
| 636 | |
| 637 | static asn_dec_rval_t |
| 638 | accept_as_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 639 | void **structure, void *bufptr, size_t size, int tag_mode) { |
| 640 | accept_as_inherit_TYPE_descriptor(td); |
| 641 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 642 | } |
| 643 | |
| 644 | static asn_enc_rval_t |
| 645 | accept_as_encode_der(asn_TYPE_descriptor_t *td, |
| 646 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 647 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 648 | accept_as_inherit_TYPE_descriptor(td); |
| 649 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 650 | } |
| 651 | |
| 652 | static asn_dec_rval_t |
| 653 | accept_as_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 654 | void **structure, const char *opt_mname, void *bufptr, size_t size) { |
| 655 | accept_as_inherit_TYPE_descriptor(td); |
| 656 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 657 | } |
| 658 | |
| 659 | static asn_enc_rval_t |
| 660 | accept_as_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 661 | int ilevel, enum xer_encoder_flags_e flags, |
| 662 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 663 | accept_as_inherit_TYPE_descriptor(td); |
| 664 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 665 | } |
| 666 | |
| 667 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 668 | /*** <<< STAT-DEFS [ActionItem] >>> ***/ |
| 669 | |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 670 | static asn_INTEGER_enum_map_t asn_MAP_accept_as_enum2value[] = { |
| 671 | { "safe", 1 }, |
| 672 | { "unknown", 0 }, |
| 673 | { "unsafe", 2 } |
| 674 | /* This list is extensible */ |
| 675 | }; |
| 676 | static asn_INTEGER_enum_map_t asn_MAP_accept_as_value2enum[] = { |
| 677 | { "unknown", 0 }, |
| 678 | { "safe", 1 }, |
| 679 | { "unsafe", 2 } |
| 680 | /* This list is extensible */ |
| 681 | }; |
| 682 | static asn_INTEGER_specifics_t asn_DEF_accept_as_specs = { |
| 683 | /* Two name<->value maps sorted differently; |
| 684 | * this may seem like a waste of space, |
| 685 | * but the strings actually share it. |
| 686 | */ |
| 687 | asn_MAP_accept_as_enum2value, /* "tag" => N; sorted by tag */ |
| 688 | asn_MAP_accept_as_value2enum, /* N => "tag"; sorted by N */ |
| 689 | 3, /* Number of elements in the maps */ |
| 690 | 1 /* Enumeration is extensible */ |
| 691 | }; |
| 692 | static ber_tlv_tag_t asn_DEF_accept_as_tags[] = { |
| 693 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 694 | }; |
| 695 | static /* Use -fall-defs-global to expose */ |
| 696 | asn_TYPE_descriptor_t asn_DEF_accept_as = { |
| 697 | "accept-as", |
| 698 | "accept-as", |
| 699 | accept_as_free, |
| 700 | accept_as_print, |
| 701 | accept_as_constraint, |
| 702 | accept_as_decode_ber, |
| 703 | accept_as_encode_der, |
| 704 | accept_as_decode_xer, |
| 705 | accept_as_encode_xer, |
| 706 | 0, /* Use generic outmost tag fetcher */ |
| 707 | asn_DEF_accept_as_tags, |
| 708 | sizeof(asn_DEF_accept_as_tags) |
| 709 | /sizeof(asn_DEF_accept_as_tags[0]), /* 1 */ |
| 710 | asn_DEF_accept_as_tags, /* Same as above */ |
| 711 | sizeof(asn_DEF_accept_as_tags) |
| 712 | /sizeof(asn_DEF_accept_as_tags[0]), /* 1 */ |
| 713 | 0, 0, /* Defined elsewhere */ |
| 714 | &asn_DEF_accept_as_specs /* Additional specs */ |
| 715 | }; |
| 716 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 717 | static asn_TYPE_member_t asn_MBR_email[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 718 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 719 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), |
| 720 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 721 | .type = (void *)&asn_DEF_VisibleString, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 722 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 723 | .name = "" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 724 | }, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 725 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 726 | static ber_tlv_tag_t asn_DEF_email_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 727 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 728 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 729 | static asn_SET_OF_specifics_t asn_DEF_email_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 730 | sizeof(struct email), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 731 | offsetof(struct email, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 732 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 733 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 734 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 735 | asn_TYPE_descriptor_t asn_DEF_email = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 736 | "email", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 737 | "email", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 738 | SET_OF_free, |
| 739 | SET_OF_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 740 | SET_OF_constraint, |
| 741 | SET_OF_decode_ber, |
| 742 | SET_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 743 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 744 | SET_OF_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 745 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 746 | asn_DEF_email_tags, |
| 747 | sizeof(asn_DEF_email_tags) |
| 748 | /sizeof(asn_DEF_email_tags[0]), /* 1 */ |
| 749 | asn_DEF_email_tags, /* Same as above */ |
| 750 | sizeof(asn_DEF_email_tags) |
| 751 | /sizeof(asn_DEF_email_tags[0]), /* 1 */ |
| 752 | asn_MBR_email, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 753 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 754 | &asn_DEF_email_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 755 | }; |
| 756 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 757 | static asn_TYPE_member_t asn_MBR_notify[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 758 | { ATF_NOFLAGS, 0, offsetof(struct notify, critical), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 759 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 760 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 761 | .type = (void *)&asn_DEF_BOOLEAN, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 762 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 763 | .name = "critical" |
| 764 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 765 | { ATF_NOFLAGS, 0, offsetof(struct notify, email), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 766 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 767 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 768 | .type = (void *)&asn_DEF_email, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 769 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 770 | .name = "email" |
| 771 | }, |
| 772 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 773 | static ber_tlv_tag_t asn_DEF_notify_tags[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 774 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 775 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 776 | static asn_TYPE_tag2member_t asn_DEF_notify_tag2el[] = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 777 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 778 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 779 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 780 | static asn_SEQUENCE_specifics_t asn_DEF_notify_specs = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 781 | sizeof(struct notify), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 782 | offsetof(struct notify, _asn_ctx), |
| 783 | asn_DEF_notify_tag2el, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 784 | 2, /* Count of tags in the map */ |
| 785 | 1, /* Start extensions */ |
| 786 | 3 /* Stop extensions */ |
| 787 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 788 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 789 | asn_TYPE_descriptor_t asn_DEF_notify = { |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 790 | "notify", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 791 | "notify", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 792 | SEQUENCE_free, |
| 793 | SEQUENCE_print, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 794 | SEQUENCE_constraint, |
| 795 | SEQUENCE_decode_ber, |
| 796 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 797 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 798 | SEQUENCE_encode_xer, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 799 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 800 | asn_DEF_notify_tags, |
| 801 | sizeof(asn_DEF_notify_tags) |
| 802 | /sizeof(asn_DEF_notify_tags[0]), /* 1 */ |
| 803 | asn_DEF_notify_tags, /* Same as above */ |
| 804 | sizeof(asn_DEF_notify_tags) |
| 805 | /sizeof(asn_DEF_notify_tags[0]), /* 1 */ |
| 806 | asn_MBR_notify, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 807 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 808 | &asn_DEF_notify_specs /* Additional specs */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 809 | }; |
| 810 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 811 | static asn_TYPE_member_t asn_MBR_ActionItem[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 812 | { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 813 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 814 | .tag_mode = 0, |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 815 | .type = (void *)&asn_DEF_accept_as, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 816 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 817 | .name = "accept-as" |
| 818 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 819 | { ATF_POINTER, 1, offsetof(struct ActionItem, notify), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 820 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 821 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 822 | .type = (void *)&asn_DEF_notify, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 823 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 824 | .name = "notify" |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 825 | }, |
| 826 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 827 | static ber_tlv_tag_t asn_DEF_ActionItem_tags[] = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 828 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 829 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 830 | static asn_TYPE_tag2member_t asn_DEF_ActionItem_tag2el[] = { |
Lev Walkin | 38abe79 | 2004-06-14 13:09:45 +0000 | [diff] [blame] | 831 | { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */ |
Lev Walkin | bbe3866 | 2005-02-25 08:17:56 +0000 | [diff] [blame] | 832 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */ |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 833 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 834 | static asn_SEQUENCE_specifics_t asn_DEF_ActionItem_specs = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 835 | sizeof(struct ActionItem), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 836 | offsetof(struct ActionItem, _asn_ctx), |
| 837 | asn_DEF_ActionItem_tag2el, |
Lev Walkin | cda6b8a | 2004-06-06 07:20:52 +0000 | [diff] [blame] | 838 | 2, /* Count of tags in the map */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 839 | 1, /* Start extensions */ |
| 840 | 3 /* Stop extensions */ |
| 841 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 842 | asn_TYPE_descriptor_t asn_DEF_ActionItem = { |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 843 | "ActionItem", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 844 | "ActionItem", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 845 | SEQUENCE_free, |
| 846 | SEQUENCE_print, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 847 | SEQUENCE_constraint, |
| 848 | SEQUENCE_decode_ber, |
| 849 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 850 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 851 | SEQUENCE_encode_xer, |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 852 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 853 | asn_DEF_ActionItem_tags, |
| 854 | sizeof(asn_DEF_ActionItem_tags) |
| 855 | /sizeof(asn_DEF_ActionItem_tags[0]), /* 1 */ |
| 856 | asn_DEF_ActionItem_tags, /* Same as above */ |
| 857 | sizeof(asn_DEF_ActionItem_tags) |
| 858 | /sizeof(asn_DEF_ActionItem_tags[0]), /* 1 */ |
| 859 | asn_MBR_ActionItem, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 860 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 861 | &asn_DEF_ActionItem_specs /* Additional specs */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 862 | }; |
| 863 | |