1# gprscdr.cnf 2# Anders Broman 2011 3 4#.IMPORT ../gsm_map/gsm_map-exp.cnf 5 6#.MODULE 7 8#.OMIT_ASSIGNMENT 9CalledNumber 10CauseForTerm 11ChargeIndicator 12DataVolumeOctets 13MscNo 14SystemType 15NodeAddress 16ServiceContextID 17ChangeLocationV651 18SubscriberEquipmentNumber 19SubscriberEquipmentType 20Session-Id 21PriorityType 22MessageClass 23# 6.4 If these are needed MBMS asn1 should be added. 24MSCAddress 25 26#.EXPORTS 27GPRSCallEventRecord 28GPRSCallEventRecord_PDU 29GPRSRecord 30GPRSRecord_PDU 31 32#.CLASS ATTRIBUTE 33&id ObjectIdentifierType 34&Value 35 36#.CLASS CONTEXT 37&id ObjectIdentifierType 38&Value 39 40#.FIELD_RENAME 41IPBinaryAddress/iPBinV6Address iPBinV6Address_choice 42#.FIELD_ATTR 43IPBinaryAddress/iPBinV6Address ABBREV=iPBinV6Address_choice 44 45#.PDU 46GPRSCallEventRecord 47GPRSRecord 48 49 50# Get the OID 51#.FN_PARS ManagementExtension/identifier FN_VARIANT = _str VAL_PTR = &obj_id 52 53#.FN_BODY ManagementExtension/information 54 55 proto_tree *ext_tree; 56 ext_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gprscdr_managementextension_information, NULL, "Information"); 57 if (obj_id){ 58 offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL); 59 }else{ 60 proto_tree_add_expert(ext_tree, actx->pinfo, &ei_gprscdr_not_dissected, tvb, offset, -1); 61 } 62 63#.FN_BODY TimeStamp VAL_PTR = ¶meter_tvb 64/* 65 * 66 * The contents of this field are a compact form of the UTCTime format 67 * containing local time plus an offset to universal time. Binary coded 68 * decimal encoding is employed for the digits to reduce the storage and 69 * transmission overhead 70 * e.g. YYMMDDhhmmssShhmm 71 * where 72 * YY = Year 00 to 99 BCD encoded 73 * MM = Month 01 to 12 BCD encoded 74 * DD = Day 01 to 31 BCD encoded 75 * hh = hour 00 to 23 BCD encoded 76 * mm = minute 00 to 59 BCD encoded 77 * ss = second 00 to 59 BCD encoded 78 * S = Sign 0 = "+", "-" ASCII encoded 79 * hh = hour 00 to 23 BCD encoded 80 * mm = minute 00 to 59 BCD encoded 81 */ 82 83 tvbuff_t *parameter_tvb; 84 85%(DEFAULT_BODY)s 86 87 if (!parameter_tvb) 88 return offset; 89 90 proto_item_append_text(actx->created_item, " (UTC %%x-%%x-%%x %%x:%%x:%%x %%s%%x:%%x)", 91 tvb_get_guint8(parameter_tvb,0), /* Year */ 92 tvb_get_guint8(parameter_tvb,1), /* Month */ 93 tvb_get_guint8(parameter_tvb,2), /* Day */ 94 tvb_get_guint8(parameter_tvb,3), /* Hour */ 95 tvb_get_guint8(parameter_tvb,4), /* Minute */ 96 tvb_get_guint8(parameter_tvb,5), /* Second */ 97 tvb_get_string_enc(actx->pinfo->pool, parameter_tvb,6,1,ENC_ASCII|ENC_NA), /* Sign */ 98 tvb_get_guint8(parameter_tvb,7), /* Hour */ 99 tvb_get_guint8(parameter_tvb,8) /* Minute */ 100 ); 101 102#.FN_BODY MSTimeZone VAL_PTR = ¶meter_tvb 103/* 104 * 105 * 1.Octet: Time Zone and 2. Octet: Daylight saving time, see TS 29.060 [75] 106 */ 107 tvbuff_t *parameter_tvb; 108 guint8 data, data2; 109 char sign; 110 111%(DEFAULT_BODY)s 112 113 if (!parameter_tvb) 114 return offset; 115 116 data = tvb_get_guint8(parameter_tvb, 0); 117 sign = (data & 0x08) ? '-' : '+'; 118 data = (data >> 4) + (data & 0x07) * 10; 119 120 data2 = tvb_get_guint8(tvb, 1) & 0x3; 121 122 proto_item_append_text(actx->created_item, " (GMT %%c %%d hours %%d minutes %%s)", 123 sign, 124 data / 4, 125 data %% 4 * 15, 126 val_to_str_const(data2, gprscdr_daylight_saving_time_vals, "Unknown") 127 ); 128 129#.FN_BODY PLMN-Id VAL_PTR = ¶meter_tvb 130 tvbuff_t *parameter_tvb; 131 proto_tree *subtree; 132 133%(DEFAULT_BODY)s 134 135 if (!parameter_tvb) 136 return offset; 137 138 subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id); 139 dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE); 140 141#.FN_BODY QoSInformation 142 143 /* This octet string is a 1:1 copy of the contents (i.e. starting with octet 4) of the 144 * Quality of Service (QoS) Profile information element specified in 29.060, ch7.7.34. 145 * 146 */ 147 148 header_field_info *hfi; 149 hfi = proto_registrar_get_nth(hf_index); 150 151 offset = decode_qos_umts(tvb, 0, actx->pinfo, tree, hfi->name, 0); 152 153#.FN_BODY EPCQoSInformation/aRP 154 proto_tree *ext_tree_arp; 155 guint length; 156 157 /* 158 * 8.86 Allocation/Retention Priority (ARP) 159 * 3GPP TS 29.274 160 */ 161 162 length = tvb_reported_length(tvb); 163 ext_tree_arp = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_eps_qos_arp, NULL, "aRP"); 164 165 dissect_gtpv2_arp(tvb, actx->pinfo, ext_tree_arp, NULL, length, 0, 0, NULL); 166 167 offset = length; 168 169 170#.FN_BODY GGSNPDPRecord/userLocationInformation 171 172 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 173 174#.FN_BODY GGSNPDPRecordV750/userLocationInformation 175 176 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 177 178#.FN_BODY EGSNPDPRecord/userLocationInformation 179 180 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 181 182#.FN_BODY EGSNPDPRecordV750/userLocationInformation 183 184 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 185 186#.FN_BODY ChangeOfCharConditionV651/userLocationInformation 187 188 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 189 190#.FN_BODY ChangeOfServiceConditionV750/userLocationInformation 191 192 offset = dissect_gprscdr_uli(tvb, actx, tree, 1); 193 194#.FN_BODY SGWRecord/userLocationInformation 195 196 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 197 198#.FN_BODY SGWRecord/lastUserLocationInformation 199 200 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 201 202#.FN_BODY PGWRecord/userLocationInformation 203 204 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 205 206#.FN_BODY PGWRecord/lastUserLocationInformation 207 208 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 209 210#.FN_BODY ChangeOfCharCondition/userLocationInformation 211 212 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 213 214#.FN_BODY ChangeOfServiceCondition/userLocationInformation 215 216 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 217 218#.FN_BODY RelatedChangeOfCharCondition/userLocationInformation 219 220 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 221 222#.FN_BODY RelatedChangeOfServiceCondition/userLocationInformation 223 224 offset = dissect_gprscdr_uli(tvb, actx, tree, 2); 225 226#.FN_BODY PDPType 227 proto_tree *ext_tree_pdp_pdn_type; 228 guint length; 229 230 length = tvb_reported_length(tvb); 231 232 if(length == 1) { 233 /* 234 * PDN/EPS Bearer 235 * TS 29.274 236 * 8.34 PDN Type 237 */ 238 ext_tree_pdp_pdn_type = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_pdp_pdn_type, NULL, "pDNType"); 239 dissect_gtpv2_pdn_type(tvb, actx->pinfo, ext_tree_pdp_pdn_type, NULL, length, 0, 0, NULL); 240 offset = length; 241 } 242 else { 243 /* PDP context 244 * TS 29.060 245 * 7.7.27 End User Address 246 * Octet 4-5 247 */ 248 ext_tree_pdp_pdn_type = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_pdp_pdn_type, NULL, "pDPType"); 249 offset = de_sm_pdp_addr(tvb, ext_tree_pdp_pdn_type, actx->pinfo, 0, length, NULL, 0); 250 } 251 252 253#.FN_BODY GPRSRecord VAL_PTR = &branch_taken 254proto_item *item; 255gint branch_taken, t_offset = offset; 256gint32 tag; 257 258 %(DEFAULT_BODY)s 259 260 if(branch_taken == -1){ 261 get_ber_identifier(tvb, t_offset, NULL, NULL, &tag); 262 item = proto_tree_add_uint(tree, hf_index, tvb, t_offset, 1, tag); 263 dissect_ber_identifier(actx->pinfo, tree, tvb, t_offset, NULL, NULL, &tag); 264 expert_add_info_format(actx->pinfo, item, &ei_gprscdr_choice_not_found, 265 "Record type(BER choice) not found: %%u", tag); 266 } 267#.TYPE_ATTR 268IPBinV4Address TYPE = FT_IPv4 DISPLAY = BASE_NONE 269IPBinV6Address TYPE = FT_IPv6 DISPLAY = BASE_NONE 270RATType TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(gprscdr_rat_type_vals) 271EPCQoSInformation/maxRequestedBandwithUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 272EPCQoSInformation/maxRequestedBandwithDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 273EPCQoSInformation/guaranteedBitrateUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 274EPCQoSInformation/guaranteedBitrateDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 275EPCQoSInformation/aPNAggregateMaxBitrateUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 276EPCQoSInformation/aPNAggregateMaxBitrateDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 277EPCQoSInformation/extendedMaxRequestedBWUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 278EPCQoSInformation/extendedMaxRequestedBWDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 279EPCQoSInformation/extendedGBRUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 280EPCQoSInformation/extendedGBRDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 281EPCQoSInformation/extendedAPNAMBRUL TYPE = FT_UINT32 DISPLAY = BASE_DEC 282EPCQoSInformation/extendedAPNAMBRDL TYPE = FT_UINT32 DISPLAY = BASE_DEC 283CSGId TYPE = FT_UINT32 DISPLAY = BASE_DEC 284RatingGroupId TYPE = FT_UINT32 DISPLAY = BASE_DEC 285#.END 286 287# 288# Editor modelines - https://www.wireshark.org/tools/modelines.html 289# 290# Local variables: 291# c-basic-offset: 2 292# tab-width: 8 293# indent-tabs-mode: nil 294# End: 295# 296# vi: set shiftwidth=2 tabstop=8 expandtab: 297# :indentSize=2:tabSize=8:noTabs=true: 298# 299