Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 1 | module GSUP_Types { |
| 2 | |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 3 | /* GSUP_Types, defining abstract TTCN-3 data types for the GSUP protocol. |
| 4 | * |
| 5 | * GSUP is a non-standard protocol used between OsmoMSC/OsmoSGSN and OsmoHLR |
| 6 | * in order to replace the complex TCAP/MAP protocol. |
| 7 | * |
| 8 | * (C) 2017 by Harald Welte <laforge@gnumonks.org> |
| 9 | * All rights reserved. |
| 10 | * |
| 11 | * Released under the terms of GNU General Public License, Version 2 or |
| 12 | * (at your option) any later version. |
| 13 | */ |
| 14 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 15 | import from General_Types all; |
| 16 | import from Osmocom_Types all; |
| 17 | |
| 18 | type enumerated GSUP_IEI { |
| 19 | OSMO_GSUP_IMSI_IE ('01'O), |
| 20 | OSMO_GSUP_CAUSE_IE ('02'O), |
| 21 | OSMO_GSUP_AUTH_TUPLE_IE ('03'O), |
| 22 | OSMO_GSUP_PDP_INFO_COMPL_IE ('04'O), |
| 23 | OSMO_GSUP_PDP_INFO_IE ('05'O), |
| 24 | OSMO_GSUP_CANCEL_TYPE_IE ('06'O), |
| 25 | OSMO_GSUP_FREEZE_PTMSI_IE ('07'O), |
| 26 | OSMO_GSUP_MSISDN_IE ('08'O), |
| 27 | OSMO_GSUP_HLR_NUMBER_IE ('09'O), |
| 28 | OSMO_GSUP_PDP_CONTEXT_ID_IE ('10'O), |
| 29 | OSMO_GSUP_PDP_TYPE_IE ('11'O), |
| 30 | OSMO_GSUP_ACCESS_POINT_NAME_IE ('12'O), |
| 31 | OSMO_GSUP_PDP_QOS_IE ('13'O), |
| 32 | OSMO_GSUP_CHARG_CHAR_IE ('14'O), |
| 33 | |
| 34 | OSMO_GSUP_RAND_IE ('20'O), |
| 35 | OSMO_GSUP_SRES_IE ('21'O), |
| 36 | OSMO_GSUP_KC_IE ('22'O), |
| 37 | OSMO_GSUP_IK_IE ('23'O), |
| 38 | OSMO_GSUP_CK_IE ('24'O), |
| 39 | OSMO_GSUP_AUTN_IE ('25'O), |
| 40 | OSMO_GSUP_AUTS_IE ('26'O), |
| 41 | OSMO_GSUP_RES_IE ('27'O), |
| 42 | OSMO_GSUP_CN_DOMAIN_IE ('28'O) |
| 43 | } with { variant "FIELDLENGTH(8)" }; |
| 44 | |
| 45 | type enumerated GSUP_MessageType { |
| 46 | OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST ('00000100'B), |
| 47 | OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR ('00000101'B), |
| 48 | OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT ('00000110'B), |
| 49 | |
| 50 | OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST ('00001000'B), |
| 51 | OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR ('00001001'B), |
| 52 | OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT ('00001010'B), |
| 53 | |
| 54 | OSMO_GSUP_MSGT_AUTH_FAIL_REPORT ('00001011'B), |
| 55 | |
| 56 | OSMO_GSUP_MSGT_PURGE_MS_REQUEST ('00001100'B), |
| 57 | OSMO_GSUP_MSGT_PURGE_MS_ERROR ('00001101'B), |
| 58 | OSMO_GSUP_MSGT_PURGE_MS_RESULT ('00001110'B), |
| 59 | |
| 60 | OSMO_GSUP_MSGT_INSERT_DATA_REQUEST ('00010000'B), |
| 61 | OSMO_GSUP_MSGT_INSERT_DATA_ERROR ('00010001'B), |
| 62 | OSMO_GSUP_MSGT_INSERT_DATA_RESULT ('00010010'B), |
| 63 | |
| 64 | OSMO_GSUP_MSGT_DELETE_DATA_REQUEST ('00010100'B), |
| 65 | OSMO_GSUP_MSGT_DELETE_DATA_ERROR ('00010101'B), |
| 66 | OSMO_GSUP_MSGT_DELETE_DATA_RESULT ('00010110'B), |
| 67 | |
| 68 | OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST ('00011100'B), |
| 69 | OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR ('00011101'B), |
| 70 | OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B) |
| 71 | } with { variant "FIELDLENGTH(8)" }; |
| 72 | |
| 73 | type enumerated GSUP_CancelType { |
| 74 | OSMO_GSUP_CANCEL_TYPE_UPDATE (1), |
| 75 | OSMO_GSUP_CANCEL_TYPE_WITHDRAW (2) |
| 76 | } with { variant "FIELDLENGTH(8)" }; |
| 77 | |
| 78 | type enumerated GSUP_CnDomain { |
| 79 | OSMO_GSUP_CN_DOMAIN_PS (1), |
| 80 | OSMO_GSUP_CN_DOMAIN_CS (2) |
| 81 | } with { variant "FIELDLENGTH(8)" }; |
| 82 | |
Harald Welte | 3f95be8 | 2018-01-27 00:48:13 +0100 | [diff] [blame] | 83 | type record GSUP_MSISDN { |
| 84 | uint8_t len, |
| 85 | hexstring digits optional |
| 86 | } with { variant (len) "LENGTHTO(digits)" }; |
| 87 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 88 | type record GSUP_IE { |
| 89 | GSUP_IEI tag, |
| 90 | uint8_t len, |
| 91 | GSUP_IeValue val |
| 92 | } with { variant (len) "LENGTHTO(val)" |
| 93 | variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE; |
| 94 | cause, tag = OSMO_GSUP_CAUSE_IE; |
| 95 | cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE; |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 96 | auth_tuple, tag = OSMO_GSUP_AUTH_TUPLE_IE; |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 97 | auts, tag = OSMO_GSUP_AUTS_IE; |
| 98 | rand, tag = OSMO_GSUP_RAND_IE; |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 99 | sres, tag = OSMO_GSUP_SRES_IE; |
| 100 | kc, tag = OSMO_GSUP_KC_IE; |
| 101 | ik, tag = OSMO_GSUP_IK_IE; |
| 102 | ck, tag = OSMO_GSUP_CK_IE; |
| 103 | autn, tag = OSMO_GSUP_AUTN_IE; |
| 104 | res, tag = OSMO_GSUP_RES_IE; |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 105 | msisdn, tag = OSMO_GSUP_MSISDN_IE; |
| 106 | hlr_number, tag = OSMO_GSUP_HLR_NUMBER_IE; |
| 107 | cn_domain, tag = OSMO_GSUP_CN_DOMAIN_IE; |
| 108 | charg_char, tag = OSMO_GSUP_CHARG_CHAR_IE)" |
| 109 | }; |
| 110 | |
| 111 | type record of GSUP_IE GSUP_IEs; |
| 112 | |
| 113 | type union GSUP_IeValue { |
| 114 | hexstring imsi, |
| 115 | integer cause, |
| 116 | GSUP_CancelType cancel_type, |
| 117 | //boolean pdp_info_compl, |
| 118 | //boolean freeze_ptmsi, |
| 119 | GSUP_IEs pdp_info, |
| 120 | GSUP_IEs auth_tuple, |
| 121 | octetstring auts, |
| 122 | octetstring rand, |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 123 | octetstring sres, |
| 124 | octetstring kc, |
| 125 | octetstring ik, |
| 126 | octetstring ck, |
| 127 | octetstring autn, |
| 128 | octetstring res, |
Harald Welte | 3f95be8 | 2018-01-27 00:48:13 +0100 | [diff] [blame] | 129 | GSUP_MSISDN msisdn, |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 130 | octetstring hlr_number, |
| 131 | GSUP_CnDomain cn_domain, |
| 132 | octetstring charg_char |
| 133 | }; |
| 134 | |
| 135 | type record GSUP_PDU { |
| 136 | GSUP_MessageType msg_type, |
| 137 | GSUP_IEs ies |
| 138 | }; |
| 139 | |
| 140 | external function enc_GSUP_PDU(in GSUP_PDU msg) return octetstring |
| 141 | with { extension "prototype(convert) encode(RAW)" }; |
| 142 | |
| 143 | external function dec_GSUP_PDU(in octetstring msg) return GSUP_PDU |
| 144 | with { extension "prototype(convert) decode(RAW)" }; |
| 145 | |
Harald Welte | 2f562b1 | 2018-01-24 20:52:38 +0100 | [diff] [blame] | 146 | function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) { |
| 147 | if (gsup.ies[0].tag == OSMO_GSUP_IMSI_IE) { |
| 148 | /* if last digit is 'F', then there's an odd number of digits and we must strip the F */ |
| 149 | var integer num_digits := lengthof(gsup.ies[0].val.imsi); |
| 150 | if (gsup.ies[0].val.imsi[num_digits-1] == 'F'H) { |
| 151 | gsup.ies[0].val.imsi := substr(gsup.ies[0].val.imsi, 0, num_digits-1); |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | function f_gsup_preprocess_encoded(inout GSUP_PDU gsup) { |
| 157 | if (ischosen(gsup.ies[0].val.imsi)) { |
| 158 | /* if number of digits is odd, add a 'F' as padding at the end */ |
| 159 | var integer num_digits := lengthof(gsup.ies[0].val.imsi); |
| 160 | if (num_digits rem 2 == 1) { |
| 161 | gsup.ies[0].val.imsi := gsup.ies[0].val.imsi & 'F'H; |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
Harald Welte | 3f95be8 | 2018-01-27 00:48:13 +0100 | [diff] [blame] | 166 | template (value) GSUP_MSISDN ts_GSUP_MSISDN(hexstring digits, |
| 167 | BIT3 ton := '000'B, |
| 168 | BIT4 npi := '0000'B) := { |
| 169 | len := 0, /* overwritten */ |
| 170 | /* numberingPlanIdentification := npi, |
| 171 | typeOfNumber := ton, |
| 172 | ext1 := '0'B, */ |
| 173 | digits := digits |
| 174 | } |
| 175 | |
| 176 | template GSUP_MSISDN tr_GSUP_MSISDN(template hexstring digits, |
| 177 | template BIT3 ton := ?, |
| 178 | template BIT4 npi := ?) := { |
| 179 | len := ?, |
| 180 | /* numberingPlanIdentification := npi, |
| 181 | typeOfNumber := ton, |
| 182 | ext1 := '0'B, */ |
| 183 | digits := digits |
| 184 | } |
| 185 | |
| 186 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 187 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 188 | template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres, |
| 189 | octetstring kc) := { |
| 190 | tag := OSMO_GSUP_AUTH_TUPLE_IE, |
| 191 | len := 0, /* overwritten */ |
| 192 | val := { |
| 193 | auth_tuple := { |
| 194 | valueof(ts_GSUP_IE_RAND(rand)), |
| 195 | valueof(ts_GSUP_IE_SRES(sres)), |
| 196 | valueof(ts_GSUP_IE_Kc(kc)) |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | template GSUP_IE ts_GSUP_IE_AuthTuple2G3G(octetstring rand, octetstring sres, |
| 202 | octetstring kc, octetstring ik, |
| 203 | octetstring ck, octetstring autn, |
| 204 | octetstring res) := { |
| 205 | tag := OSMO_GSUP_AUTH_TUPLE_IE, |
| 206 | len := 0, /* overwritten */ |
| 207 | val := { |
| 208 | auth_tuple := { |
| 209 | valueof(ts_GSUP_IE_RAND(rand)), |
| 210 | valueof(ts_GSUP_IE_SRES(sres)), |
| 211 | valueof(ts_GSUP_IE_Kc(kc)), |
| 212 | valueof(ts_GSUP_IE_IK(ik)), |
| 213 | valueof(ts_GSUP_IE_CK(ck)), |
| 214 | valueof(ts_GSUP_IE_AUTN(autn)), |
| 215 | valueof(ts_GSUP_IE_RES(res)) |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 220 | template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template GSUP_IEs ies := *) := { |
| 221 | msg_type := msgt, |
| 222 | ies := ies |
| 223 | } |
| 224 | |
| 225 | template GSUP_PDU ts_GSUP(GSUP_MessageType msgt, GSUP_IEs ies := {}) := { |
| 226 | msg_type := msgt, |
| 227 | ies := ies |
| 228 | } |
| 229 | |
| 230 | template GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) := |
| 231 | ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) }); |
| 232 | |
Harald Welte | ef9fa87 | 2018-01-22 03:00:17 +0100 | [diff] [blame] | 233 | template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) := |
| 234 | tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { tr_GSUP_IE_IMSI(imsi), * }); |
| 235 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 236 | template (value) GSUP_PDU ts_GSUP_SAI_RES(hexstring imsi, GSUP_IE auth_tuple) := |
| 237 | ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, { |
| 238 | valueof(ts_GSUP_IE_IMSI(imsi)), auth_tuple }); |
| 239 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 240 | template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer cause) := |
Harald Welte | 071ed73 | 2018-01-23 19:53:52 +0100 | [diff] [blame] | 241 | tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, { |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 242 | tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); |
| 243 | |
Harald Welte | 071ed73 | 2018-01-23 19:53:52 +0100 | [diff] [blame] | 244 | template GSUP_PDU ts_GSUP_SAI_ERR(hexstring imsi, integer cause) := |
| 245 | tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, { |
| 246 | ts_GSUP_IE_IMSI(imsi), ts_GSUP_IE_Cause(cause) }); |
| 247 | |
| 248 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 249 | template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) := |
| 250 | tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { |
| 251 | tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * }); |
| 252 | |
Harald Welte | dfe94dd | 2018-01-21 13:55:22 +0100 | [diff] [blame] | 253 | template GSUP_PDU tr_GSUP_UL_REQ(template hexstring imsi) := |
| 254 | tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, { |
| 255 | tr_GSUP_IE_IMSI(imsi), * }); |
| 256 | |
| 257 | template GSUP_PDU ts_GSUP_UL_RES(hexstring imsi) := |
| 258 | ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)) }); |
| 259 | |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 260 | template GSUP_PDU ts_GSUP_UL_ERR(hexstring imsi, integer cause) := |
| 261 | ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, { |
| 262 | valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) }); |
| 263 | |
| 264 | template GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn) := |
| 265 | ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, { |
| 266 | valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)) }); |
| 267 | |
| 268 | template GSUP_PDU tr_GSUP_ISD_RES(template hexstring imsi) := |
| 269 | tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, { |
Harald Welte | dfe94dd | 2018-01-21 13:55:22 +0100 | [diff] [blame] | 270 | tr_GSUP_IE_IMSI(imsi), * }); |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 271 | |
Harald Welte | c638f4d | 2018-01-24 22:00:36 +0100 | [diff] [blame] | 272 | template GSUP_PDU tr_GSUP_AUTH_FAIL_IND(hexstring imsi) := |
| 273 | tr_GSUP(OSMO_GSUP_MSGT_AUTH_FAIL_REPORT, { |
| 274 | tr_GSUP_IE_IMSI(imsi), * }); |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 275 | |
| 276 | template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val := ?) := { |
| 277 | tag := iei, |
| 278 | len := ?, |
| 279 | val := val |
| 280 | } |
| 281 | |
| 282 | template (value) GSUP_IE ts_GSUP_IE_IMSI(hexstring imsi) := { |
| 283 | tag := OSMO_GSUP_IMSI_IE, |
| 284 | len := 0, /* overwritten */ |
| 285 | val := { |
| 286 | imsi := imsi |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | template GSUP_IE tr_GSUP_IE_IMSI(template hexstring imsi) := { |
| 291 | tag := OSMO_GSUP_IMSI_IE, |
| 292 | len := ?, |
| 293 | val := { |
| 294 | imsi := imsi |
| 295 | } |
| 296 | } |
| 297 | |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 298 | template (value) GSUP_IE ts_GSUP_IE_MSISDN(hexstring msisdn) := { |
| 299 | tag := OSMO_GSUP_MSISDN_IE, |
| 300 | len := 0, /* overwritten */ |
| 301 | val := { |
Harald Welte | 3f95be8 | 2018-01-27 00:48:13 +0100 | [diff] [blame] | 302 | msisdn := ts_GSUP_MSISDN(msisdn) |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 303 | } |
| 304 | } |
| 305 | |
| 306 | template GSUP_IE tr_GSUP_IE_MSISDN(template hexstring msisdn) := { |
| 307 | tag := OSMO_GSUP_MSISDN_IE, |
| 308 | len := ?, |
| 309 | val := { |
Harald Welte | 3f95be8 | 2018-01-27 00:48:13 +0100 | [diff] [blame] | 310 | msisdn := tr_GSUP_MSISDN(msisdn) |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 311 | } |
| 312 | } |
| 313 | |
| 314 | |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 315 | template (value) GSUP_IE ts_GSUP_IE_Cause(integer cause) := { |
| 316 | tag := OSMO_GSUP_CAUSE_IE, |
| 317 | len := 0, /* overwritten */ |
| 318 | val := { |
| 319 | cause := cause |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | template GSUP_IE tr_GSUP_IE_Cause(template integer cause) := { |
| 324 | tag := OSMO_GSUP_CAUSE_IE, |
| 325 | len := ?, |
| 326 | val := { |
| 327 | cause := cause |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | template (value) GSUP_IE ts_GSUP_IE_AUTS(octetstring auts) := { |
| 332 | tag := OSMO_GSUP_AUTS_IE, |
| 333 | len := 0, /* overwritten */ |
| 334 | val := { |
| 335 | auts := auts |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | template (value) GSUP_IE ts_GSUP_IE_RAND(octetstring rand) := { |
| 340 | tag := OSMO_GSUP_RAND_IE, |
| 341 | len := 0, /* overwritten */ |
| 342 | val := { |
| 343 | rand := rand |
| 344 | } |
| 345 | } |
| 346 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 347 | template (value) GSUP_IE ts_GSUP_IE_SRES(octetstring sres) := { |
| 348 | tag := OSMO_GSUP_SRES_IE, |
| 349 | len := 0, /* overwritten */ |
| 350 | val := { |
| 351 | sres := sres |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | template (value) GSUP_IE ts_GSUP_IE_Kc(octetstring kc) := { |
| 356 | tag := OSMO_GSUP_KC_IE, |
| 357 | len := 0, /* overwritten */ |
| 358 | val := { |
| 359 | kc := kc |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | template (value) GSUP_IE ts_GSUP_IE_IK(octetstring ik) := { |
| 364 | tag := OSMO_GSUP_IK_IE, |
| 365 | len := 0, /* overwritten */ |
| 366 | val := { |
| 367 | ik := ik |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | template (value) GSUP_IE ts_GSUP_IE_CK(octetstring ck) := { |
| 372 | tag := OSMO_GSUP_CK_IE, |
| 373 | len := 0, /* overwritten */ |
| 374 | val := { |
| 375 | ck := ck |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | template (value) GSUP_IE ts_GSUP_IE_AUTN(octetstring autn) := { |
| 380 | tag := OSMO_GSUP_AUTN_IE, |
| 381 | len := 0, /* overwritten */ |
| 382 | val := { |
| 383 | autn := autn |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | template (value) GSUP_IE ts_GSUP_IE_RES(octetstring res) := { |
| 388 | tag := OSMO_GSUP_RES_IE, |
| 389 | len := 0, /* overwritten */ |
| 390 | val := { |
| 391 | res := res |
| 392 | } |
| 393 | } |
Harald Welte | df32723 | 2017-12-28 22:51:51 +0100 | [diff] [blame] | 394 | |
| 395 | |
| 396 | |
| 397 | } with { encode "RAW"; variant "FIELDORDER(msb)" } |