2 * Routines for ANSI IS-683 (OTA (Mobile)) dissection
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
6 * Copyright 2008, Michael Lum <mglum [AT] shaw.ca>
7 * In association with Global Star Solutions, ULC.
10 * https://www.3gpp2.org/Public_html/Specs/C.S0016-C_v2.0_081031.pdf
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * SPDX-License-Identifier: GPL-2.0-or-later
22 #include <epan/packet.h>
23 #include <epan/expert.h>
26 void proto_register_ansi_683(void);
27 void proto_reg_handoff_ansi_683(void);
29 static dissector_handle_t ansi_683_handle
;
31 static const char *ansi_proto_name
= "ANSI IS-683 (OTA (Mobile))";
33 #define ANSI_683_FORWARD 0
34 #define ANSI_683_REVERSE 1
37 /* Initialize the subtree pointers */
38 static int ett_ansi_683
;
39 static int ett_for_nam_block
;
40 static int ett_for_sspr_block
;
41 static int ett_rev_sspr_block
;
42 static int ett_rev_nam_block
;
45 static int ett_rev_feat
;
46 static int ett_for_val_block
;
47 static int ett_band_cap
;
49 static int ett_for_puzl_block
;
50 static int ett_rev_puzl_block
;
51 static int ett_for_3gpd_block
;
52 static int ett_rev_3gpd_block
;
53 static int ett_for_mmd_block
;
54 static int ett_rev_mmd_block
;
55 static int ett_for_mms_block
;
56 static int ett_rev_mms_block
;
57 static int ett_rev_cap
;
58 static int ett_segment
;
60 /* Initialize the protocol and registered fields */
61 static int proto_ansi_683
;
62 static int hf_ansi_683_for_msg_type
;
63 static int hf_ansi_683_rev_msg_type
;
64 static int hf_ansi_683_length
;
65 static int hf_ansi_683_reserved8
;
66 static int hf_ansi_683_reserved16_f
;
67 static int hf_ansi_683_reserved24_f
;
68 static int hf_ansi_683_reserved_bytes
;
70 /* Generated from convert_proto_tree_add_text.pl */
71 static int hf_ansi_683_spasm_protection_for_the_active_nam_000010
;
72 static int hf_ansi_683_imsi_t_11_12
;
73 static int hf_ansi_683_otapa_spasm_validation_signature_indicator_800000
;
74 static int hf_ansi_683_accolc_3c
;
75 static int hf_ansi_683_otapa_spasm_validation_signature
;
76 static int hf_ansi_683_mcc_m_0ffc
;
77 static int hf_ansi_683_home_sid
;
78 static int hf_ansi_683_sid_nid_pairs_3fff
;
79 static int hf_ansi_683_identifiers_present8
;
80 static int hf_ansi_683_authentication_data_input_parameter
;
81 static int hf_ansi_683_feature_protocol_version
;
82 static int hf_ansi_683_parameter_p
;
83 static int hf_ansi_683_key_id_reserved
;
84 static int hf_ansi_683_local_control_status_0010
;
85 static int hf_ansi_683_mob_term_for_nid_0002
;
86 static int hf_ansi_683_mob_term_for_nid_40
;
87 static int hf_ansi_683_power_class
;
88 static int hf_ansi_683_mobile_station_fw_rev
;
89 static int hf_ansi_683_fresh_incl8
;
90 static int hf_ansi_683_random_number_smck_generation
;
91 static int hf_ansi_683_key_id_ims_root_key
;
92 static int hf_ansi_683_num_sid_nid_01fe
;
93 static int hf_ansi_683_n_digits
;
94 static int hf_ansi_683_stored_sid_nid_3fc0
;
95 static int hf_ansi_683_mob_term_for_sid_0004
;
96 static int hf_ansi_683_capability_data
;
97 static int hf_ansi_683_mobile_station_calculation_result
;
98 static int hf_ansi_683_maximum_segment_size
;
99 static int hf_ansi_683_otasp_mobile_protocol_revision
;
100 static int hf_ansi_683_otasp_protocol_revision
;
101 static int hf_ansi_683_start_secure_mode
;
102 static int hf_ansi_683_security
;
103 static int hf_ansi_683_imsi_t_10
;
104 static int hf_ansi_683_meid
;
105 static int hf_ansi_683_nam_lock_indicator
;
106 static int hf_ansi_683_start_otapa_session
;
107 static int hf_ansi_683_band_class_1_cdma
;
108 static int hf_ansi_683_segment_offset
;
109 static int hf_ansi_683_identifiers_present16
;
110 static int hf_ansi_683_user_zone_id
;
111 static int hf_ansi_683_mcc_m_01ff80
;
112 static int hf_ansi_683_max_sid_nid_3fc0
;
113 static int hf_ansi_683_segment_size
;
114 static int hf_ansi_683_imsi_m_class8000
;
115 static int hf_ansi_683_local_control_status_02
;
116 static int hf_ansi_683_transmission
;
117 static int hf_ansi_683_max_sid_nid_01fe
;
118 static int hf_ansi_683_spasm_random_challenge
;
119 static int hf_ansi_683_extended_scm_indicator
;
120 static int hf_ansi_683_a_key_protocol_revision
;
121 static int hf_ansi_683_cdma_analog_mode
;
122 static int hf_ansi_683_mob_term_home_08
;
123 static int hf_ansi_683_imsi_m_11_12_3f80
;
124 static int hf_ansi_683_user_zone_sid
;
125 static int hf_ansi_683_fresh_incl16
;
126 static int hf_ansi_683_sid_nid_pairs_01ff
;
127 static int hf_ansi_683_imsi_t_addr_num
;
128 static int hf_ansi_683_slotted_mode
;
129 static int hf_ansi_683_imsi_m_class10
;
130 static int hf_ansi_683_secure_mode_result_code
;
131 static int hf_ansi_683_ismi_m_addr_num_e
;
132 static int hf_ansi_683_mob_term_for_nid_4000
;
133 static int hf_ansi_683_station_class_mark
;
134 static int hf_ansi_683_otapa_spasm_validation_signature_indicator_80
;
135 static int hf_ansi_683_mob_term_for_sid_8000
;
136 static int hf_ansi_683_imsi_m_11_12_7f
;
137 static int hf_ansi_683_sspr_configuration_result_code
;
138 static int hf_ansi_683_mob_p_rev_1fe0
;
139 static int hf_ansi_683_puzl_configuration_result_code
;
140 static int hf_ansi_683_key_id_wlan_root_key
;
141 static int hf_ansi_683_firstchp
;
142 static int hf_ansi_683_key_id_bcmcs_root_key
;
143 static int hf_ansi_683_band_class_0_cdma
;
144 static int hf_ansi_683_fresh
;
145 static int hf_ansi_683_extended_address_indicator
;
146 static int hf_ansi_683_mob_term_home_01
;
147 static int hf_ansi_683_imsi_t_class
;
148 static int hf_ansi_683_system_tag_download_result_code
;
149 static int hf_ansi_683_band_class_0_analog
;
150 static int hf_ansi_683_service_key_generation_result_code
;
151 static int hf_ansi_683_sspr_download_result_code
;
152 static int hf_ansi_683_band_class_6_cdma
;
153 static int hf_ansi_683_data_commit_result_code
;
154 static int hf_ansi_683_mob_p_rev_ff
;
155 static int hf_ansi_683_number_of_capability_records
;
156 static int hf_ansi_683_system_tag_result_code
;
157 static int hf_ansi_683_mcc_t
;
158 static int hf_ansi_683_call_history_parameter
;
159 static int hf_ansi_683_randc
;
160 static int hf_ansi_683_mob_term_for_sid_80
;
161 static int hf_ansi_683_parameter_g
;
162 static int hf_ansi_683_num_features
;
163 static int hf_ansi_683_cdma_analog_slotted
;
164 static int hf_ansi_683_spasm_protection_for_the_active_nam_40
;
165 static int hf_ansi_683_25mhz_bandwidth
;
166 static int hf_ansi_683_base_station_calculation_result
;
167 static int hf_ansi_683_key_exchange_result_code
;
168 static int hf_ansi_683_mobile_station_manuf_model_number
;
169 static int hf_ansi_683_random_challenge_value
;
170 static int hf_ansi_683_imsi_m_10
;
171 static int hf_ansi_683_stored_sid_nid_01fe
;
172 static int hf_ansi_683_number_of_parameter_blocks
;
173 static int hf_ansi_683_imsi_m_addr_num_7000
;
174 static int hf_ansi_683_block_data
;
175 static int hf_ansi_683_feature_id
;
176 static int hf_ansi_683_num_sid_nid_3fc0
;
177 static int hf_ansi_683_more_additional_fields
;
178 static int hf_ansi_683_band_class_3_cdma
;
179 static int hf_ansi_683_authr
;
180 static int hf_ansi_683_accolc_01e0
;
181 static int hf_ansi_683_result_code
;
182 static int hf_ansi_683_cap_info_record_type
;
183 static int hf_ansi_683_param_block_val
;
184 static int hf_ansi_683_rev_param_block_sspr
;
185 static int hf_ansi_683_for_param_block_sspr
;
186 static int hf_ansi_683_rev_param_block_nam
;
187 static int hf_ansi_683_for_param_block_nam
;
188 static int hf_ansi_683_rev_param_block_puzl
;
189 static int hf_ansi_683_for_param_block_puzl
;
190 static int hf_ansi_683_rev_param_block_3gpd
;
191 static int hf_ansi_683_for_param_block_3gpd
;
192 static int hf_ansi_683_rev_param_block_mmd
;
193 static int hf_ansi_683_for_param_block_mmd
;
194 static int hf_ansi_683_rev_param_block_systag
;
195 static int hf_ansi_683_for_param_block_systag
;
196 static int hf_ansi_683_rev_param_block_mms
;
197 static int hf_ansi_683_for_param_block_mms
;
198 static int hf_ansi_683_mobile_directory_number
;
199 static int hf_ansi_683_service_programming_code
;
201 static expert_field ei_ansi_683_extraneous_data
;
202 static expert_field ei_ansi_683_short_data
;
203 static expert_field ei_ansi_683_data_length
;
205 static const char dtmf_digits
[16] = {'?','1','2','3','4','5','6','7','8','9','0','?','?','?','?','?'};
209 /* PARAM FUNCTIONS */
211 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
212 if ((edc_len) > (edc_max_len)) \
214 proto_tree_add_expert(tree, pinfo, &ei_ansi_683_extraneous_data, tvb, \
215 offset, (edc_len) - (edc_max_len)); \
218 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
219 if ((sdc_len) < (sdc_min_len)) \
221 proto_tree_add_expert(tree, pinfo, &ei_ansi_683_short_data, tvb, \
222 offset, (sdc_len)); \
226 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
227 if ((edc_len) != (edc_eq_len)) \
229 proto_tree_add_expert(tree, pinfo, &ei_ansi_683_data_length, tvb, \
230 offset, (edc_len)); \
235 fresh_handler(tvbuff_t
*tvb
, proto_tree
*tree
, unsigned len _U_
, uint32_t offset
)
239 oct
= tvb_get_uint8(tvb
, offset
);
243 proto_tree_add_item(tree
, hf_ansi_683_fresh_incl16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
244 proto_tree_add_item(tree
, hf_ansi_683_fresh
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
248 proto_tree_add_item(tree
, hf_ansi_683_fresh_incl8
, tvb
, offset
, 1, ENC_NA
);
249 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 7, ENC_NA
);
255 * Table 3.5.1.2-1 Result Codes
257 static const range_string result_codes_rvals
[] = {
258 { 0, 0, "Accepted - Operation successful" },
259 { 1, 1, "Rejected - Unknown reason" },
260 { 2, 2, "Rejected - Data size mismatch" },
261 { 3, 3, "Rejected - Protocol version mismatch" },
262 { 4, 4, "Rejected - Invalid parameter" },
263 { 5, 5, "Rejected - SID/NID length mismatch" },
264 { 6, 6, "Rejected - Message not expected in this mode" },
265 { 7, 7, "Rejected - BLOCK_ID value not supported" },
266 { 8, 8, "Rejected - Preferred roaming list length mismatch" },
267 { 9, 9, "Rejected - CRC error" },
268 { 10, 10, "Rejected - Mobile station locked" },
269 { 11, 11, "Rejected - Invalid SPC" },
270 { 12, 12, "Rejected - SPC change denied by the user" },
271 { 13, 13, "Rejected - Invalid SPASM" },
272 { 14, 14, "Rejected - BLOCK_ID not expected in this mode" },
273 { 15, 15, "Rejected - User Zone already in PUZL" },
274 { 16, 16, "Rejected - User Zone not in PUZL" },
275 { 17, 17, "Rejected - No entries in PUZL" },
276 { 18, 18, "Rejected - Operation Mode mismatch" },
277 { 19, 19, "Rejected - SimpleIP MAX_NUM_NAI mismatch" },
278 { 20, 20, "Rejected - SimpleIP MAX_NAI_LENGTH mismatch" },
279 { 21, 21, "Rejected - MobileIP MAX_NUM_NAI mismatch" },
280 { 22, 22, "Rejected - MobileIP MAX_NAI_LENGTH mismatch" },
281 { 23, 23, "Rejected - SimpleIP PAP MAX_SS_LENGTH mismatch" },
282 { 24, 24, "Rejected - SimpleIP CHAP MAX_SS_LENGTH mismatch" },
283 { 25, 25, "Rejected - MobileIP MAX_MNAAA_SS_LENGTH mismatch" },
284 { 26, 26, "Rejected - MobileIP MAX_MN-HA_SS_LENGTH mismatch" },
285 { 27, 27, "Rejected - MobileIP MN-AAA_AUTH_ALGORITHM mismatch" },
286 { 28, 28, "Rejected - MobileIP MN-HA_AUTH_ALGORITHM mismatch" },
287 { 29, 29, "Rejected - SimpleIP ACT_NAI_ENTRY_INDEX mismatch" },
288 { 30, 30, "Rejected - MobileIP ACT_NAI_ENTRY_INDEX mismatch" },
289 { 31, 31, "Rejected - SimpleIP PAP NAI_ENTRY_INDEX mismatch" },
290 { 32, 32, "Rejected - SimpleIP CHAP NAI_ENTRY_INDEX mismatch" },
291 { 33, 33, "Rejected - MobileIP NAI_ENTRY_INDEX mismatch" },
292 { 34, 34, "Rejected - Unexpected PRL_BLOCK_ID change" },
293 { 35, 35, "Rejected - PRL format mismatch" },
294 { 36, 36, "Rejected - HRPD Access Authentication MAX_NAI_LENGTH mismatch" },
295 { 37, 37, "Rejected - HRPD Access Authentication CHAP MAX_SS_LENGTH mismatch" },
296 { 38, 38, "Rejected - MMD MAX_NUM_IMPU mismatch" },
297 { 39, 39, "Rejected - MMD MAX_IMPU_LENGTH mismatch" },
298 { 40, 40, "Rejected - MMD MAX_NUM_P-CSCF mismatch" },
299 { 41, 41, "Rejected - MMD MAX_P-CSCF_LENGTH mismatch" },
300 { 42, 42, "Rejected - Unexpected System Tag BLOCK_ID Change" },
301 { 43, 43, "Rejected - System Tag Format mismatch" },
302 { 44, 44, "Rejected - NUM_MMS_URI mismatch" },
303 { 45, 45, "Rejected - MMS_URI _LENGTH mismatch" },
304 { 46, 46, "Rejected - Invalid MMS_URI" },
305 { 47, 127, "Reserved for future standardization" },
306 { 128, 254, "Available for manufacturer-specific Result Code definitions" },
307 { 255, 255, "Reserved" },
309 { 0x00, 0x00, NULL
},
313 * Table 3.5.1.7-1 Feature Identifier
315 static const range_string feat_id_type_rvals
[] = {
316 { 0, 0, "NAM Download (DATA_P_REV)" },
317 { 1, 1, "Key Exchange (A_KEY_P_REV)" },
318 { 2, 2, "System Selection for Preferred Roaming (SSPR_P_REV)" },
319 { 3, 3, "Service Programming Lock (SPL_P_REV)" },
320 { 4, 4, "Over-The-Air Parameter Administration (OTAPA_P_REV)" },
321 { 5, 5, "Preferred User Zone List (PUZL_P_REV)" },
322 { 6, 6, "3G Packet Data (3GPD)" },
323 { 7, 7, "Secure MODE (SECURE_MODE_P_REV)" },
324 { 8, 8, "Multimedia Domain (MMD)" },
325 { 9, 9, "System Tag Download (TAG_P_REV)" },
326 { 10, 10, "Multimedia Messaging Service (MMS)" },
327 { 11, 191, "Reserved for future standardization" },
328 { 192, 254, "Available for manufacturer-specific features" },
329 { 255, 255, "Reserved" },
331 { 0x00, 0x00, NULL
},
334 #define REV_TYPE_CAP_INFO_OP_MODE 0
335 #define REV_TYPE_CAP_INFO_CDMA_BAND 1
336 #define REV_TYPE_CAP_INFO_MEID 2
337 #define REV_TYPE_CAP_INFO_ICCID 3
338 #define REV_TYPE_CAP_INFO_EXT_UIM_ID 4
339 #define REV_TYPE_CAP_INFO_MEID_ME 5
342 * Table 3.5.1.17.1-1 Capability Information Record Types
344 static const range_string rev_cap_info_record_type_rvals
[] = {
345 { REV_TYPE_CAP_INFO_OP_MODE
, REV_TYPE_CAP_INFO_OP_MODE
, "Operating Mode Information" },
346 { REV_TYPE_CAP_INFO_CDMA_BAND
, REV_TYPE_CAP_INFO_CDMA_BAND
, "CDMA Band Class Information" },
347 { REV_TYPE_CAP_INFO_MEID
, REV_TYPE_CAP_INFO_MEID
, "MEID" },
348 { REV_TYPE_CAP_INFO_ICCID
, REV_TYPE_CAP_INFO_ICCID
, "ICCID" },
349 { REV_TYPE_CAP_INFO_EXT_UIM_ID
, REV_TYPE_CAP_INFO_EXT_UIM_ID
, "EXT_UIM_ID" },
350 { REV_TYPE_CAP_INFO_MEID_ME
, REV_TYPE_CAP_INFO_MEID_ME
, "MEID_ME" },
351 { 6, 255, "Reserved" },
353 { 0x00, 0x00, NULL
},
356 #define FOR_BLOCK_VAL_VERIFY_SPC 0
357 #define FOR_BLOCK_VAL_CHANGE_SPC 1
358 #define FOR_BLOCK_VAL_VALDATE_SPASM 2
361 * Table 4.5.4-1 Validation Parameter Block Types
363 static const range_string for_param_block_rvals
[] = {
364 { FOR_BLOCK_VAL_VERIFY_SPC
, FOR_BLOCK_VAL_VERIFY_SPC
, "Verify SPC" },
365 { FOR_BLOCK_VAL_CHANGE_SPC
, FOR_BLOCK_VAL_CHANGE_SPC
, "Change SPC" },
366 { FOR_BLOCK_VAL_VALDATE_SPASM
, FOR_BLOCK_VAL_VALDATE_SPASM
, "Validate SPASM" },
367 { 3, 127, "Reserved for future standardization" },
368 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
369 { 255, 255, "Reserved" },
371 { 0x00, 0x00, NULL
},
374 #define REV_BLOCK_SSPR_PRL_DIM 0
375 #define REV_BLOCK_SSPR_PRL 1
376 #define REV_BLOCK_SSPR_EXT_PRL_DIM 2
379 * Table 3.5.3-1 SSPR Parameter Block Types
381 static const range_string rev_param_block_sspr_rvals
[] = {
382 { REV_BLOCK_SSPR_PRL_DIM
, REV_BLOCK_SSPR_PRL_DIM
, "Preferred Roaming List Dimensions" },
383 { REV_BLOCK_SSPR_PRL
, REV_BLOCK_SSPR_PRL
, "Preferred Roaming List" },
384 { REV_BLOCK_SSPR_EXT_PRL_DIM
, REV_BLOCK_SSPR_EXT_PRL_DIM
, "Extended Preferred Roaming List Dimensions" },
385 { 3, 127, "Reserved for future standardization" },
386 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
387 { 255, 255, "Reserved" },
389 { 0x00, 0x00, NULL
},
392 #define FOR_BLOCK_SSPR_PRL 0
393 #define FOR_BLOCK_SSPR_EXT_PRL 1
396 * Table 4.5.3-1 SSPR Parameter Block Types
398 static const range_string for_param_block_sspr_rvals
[] = {
399 { FOR_BLOCK_SSPR_PRL
, FOR_BLOCK_SSPR_PRL
, "Preferred Roaming List" },
400 { FOR_BLOCK_SSPR_EXT_PRL
, FOR_BLOCK_SSPR_EXT_PRL
, "Extended Preferred Roaming List with SSPR_P_REV greater than 00000001" },
401 { 2, 127, "Reserved for future standardization" },
402 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
403 { 255, 255, "Reserved" },
405 { 0x00, 0x00, NULL
},
408 #define REV_BLOCK_NAM_CDMA_ANALOG 0
409 #define REV_BLOCK_NAM_MDN 1
410 #define REV_BLOCK_NAM_CDMA 2
411 #define REV_BLOCK_NAM_IMSI_T 3
414 * Table 3.5.2-1 NAM Parameter Block Types
416 static const range_string rev_param_block_nam_rvals
[] = {
417 { REV_BLOCK_NAM_CDMA_ANALOG
, REV_BLOCK_NAM_CDMA_ANALOG
, "CDMA/Analog NAM" },
418 { REV_BLOCK_NAM_MDN
, REV_BLOCK_NAM_MDN
, "Mobile Directory Number" },
419 { REV_BLOCK_NAM_CDMA
, REV_BLOCK_NAM_CDMA
, "CDMA NAM" },
420 { REV_BLOCK_NAM_IMSI_T
, REV_BLOCK_NAM_IMSI_T
, "IMSI_T" },
421 { 4, 127, "Reserved for future standardization" },
422 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
423 { 255, 255, "Reserved" },
425 { 0x00, 0x00, NULL
},
429 #define FOR_BLOCK_NAM_CDMA_ANALOG 0
430 #define FOR_BLOCK_NAM_MDN 1
431 #define FOR_BLOCK_NAM_CDMA 2
432 #define FOR_BLOCK_NAM_IMSI_T 3
435 * Table 4.5.2-1 NAM Parameter Block Types
437 static const range_string for_param_block_nam_rvals
[] = {
438 { FOR_BLOCK_NAM_CDMA_ANALOG
, FOR_BLOCK_NAM_CDMA_ANALOG
, "CDMA/Analog NAM Download" },
439 { FOR_BLOCK_NAM_MDN
, FOR_BLOCK_NAM_MDN
, "Mobile Directory Number" },
440 { FOR_BLOCK_NAM_CDMA
, FOR_BLOCK_NAM_CDMA
, "CDMA NAM Download" },
441 { FOR_BLOCK_NAM_IMSI_T
, FOR_BLOCK_NAM_IMSI_T
, "IMSI_T" },
442 { 4, 127, "Reserved for future standardization" },
443 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
444 { 255, 255, "Reserved" },
446 { 0x00, 0x00, NULL
},
450 * Table 3.5.6-1 PUZL Parameter Block Types
452 static const range_string rev_param_block_puzl_rvals
[] = {
453 { 0, 0, "PUZL Dimensions" },
454 { 1, 1, "PUZL Priorities" },
455 { 2, 2, "User Zone" },
456 { 3, 3, "Preferred User Zone List" },
457 { 4, 127, "Reserved for future standardization" },
458 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
459 { 255, 255, "Reserved" },
461 { 0x00, 0x00, NULL
},
464 #define FOR_BLOCK_PUZL_UZ_INS 0
465 #define FOR_BLOCK_PUZL_UZ_UPD 1
466 #define FOR_BLOCK_PUZL_UZ_DEL 2
467 #define FOR_BLOCK_PUZL_UZ_PRI_CHANGE 3
468 #define FOR_BLOCK_PUZL_FLAGS 4
471 * Table 4.5.6-1 PUZL Parameter Block Types
473 static const range_string for_param_block_puzl_rvals
[] = {
474 { FOR_BLOCK_PUZL_UZ_INS
, FOR_BLOCK_PUZL_UZ_INS
, "User Zone Insert" },
475 { FOR_BLOCK_PUZL_UZ_UPD
, FOR_BLOCK_PUZL_UZ_UPD
, "User Zone Update" },
476 { FOR_BLOCK_PUZL_UZ_DEL
, FOR_BLOCK_PUZL_UZ_DEL
, "User Zone Delete" },
477 { FOR_BLOCK_PUZL_UZ_PRI_CHANGE
, FOR_BLOCK_PUZL_UZ_PRI_CHANGE
, "User Zone Priority Change" },
478 { FOR_BLOCK_PUZL_FLAGS
, FOR_BLOCK_PUZL_FLAGS
, "PUZL Flags" },
479 { 5, 127, "Reserved for future standardization" },
480 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
481 { 255, 255, "Reserved" },
483 { 0x00, 0x00, NULL
},
486 #define REV_BLOCK_3GPD_OP_CAP 0
487 #define REV_BLOCK_3GPD_OP_MODE 1
488 #define REV_BLOCK_3GPD_SIP_CAP 2
489 #define REV_BLOCK_3GPD_MIP_CAP 3
490 #define REV_BLOCK_3GPD_SIP_USER_PRO 4
491 #define REV_BLOCK_3GPD_MIP_USER_PRO 5
492 #define REV_BLOCK_3GPD_SIP_STATUS 6
493 #define REV_BLOCK_3GPD_MIP_STATUS 7
494 #define REV_BLOCK_3GPD_SIP_PAP_SS 8
495 #define REV_BLOCK_3GPD_SIP_CHAP_SS 9
496 #define REV_BLOCK_3GPD_MIP_SS 10
497 #define REV_BLOCK_3GPD_HRPD_ACC_AUTH_CAP 11
498 #define REV_BLOCK_3GPD_HRPD_ACC_AUTH_USER 12
499 #define REV_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS 13
502 * Table 3.5.8-1 3GPD Parameter Block Types
504 static const value_string rev_param_block_3gpd_vals
[] = {
505 { REV_BLOCK_3GPD_OP_CAP
, "3GPD Operation Capability Parameters" },
506 { REV_BLOCK_3GPD_OP_MODE
, "3GPD Operation Mode Parameters" },
507 { REV_BLOCK_3GPD_SIP_CAP
, "SimpleIP Capability Parameters" },
508 { REV_BLOCK_3GPD_MIP_CAP
, "MobileIP Capability Parameters" },
509 { REV_BLOCK_3GPD_SIP_USER_PRO
, "SimpleIP User Profile Parameters" },
510 { REV_BLOCK_3GPD_MIP_USER_PRO
, "Mobile IP User Profile Parameters" },
511 { REV_BLOCK_3GPD_SIP_STATUS
, "SimpleIP Status Parameters" },
512 { REV_BLOCK_3GPD_MIP_STATUS
, "MobileIP Status Parameters" },
513 { REV_BLOCK_3GPD_SIP_PAP_SS
, "SimpleIP PAP SS Parameters" },
514 { REV_BLOCK_3GPD_SIP_CHAP_SS
, "SimpleIP CHAP SS Parameters" },
515 { REV_BLOCK_3GPD_MIP_SS
, "MobileIP SS Parameters" },
516 { REV_BLOCK_3GPD_HRPD_ACC_AUTH_CAP
, "HRPD Access Authentication Capability Parameters" },
517 { REV_BLOCK_3GPD_HRPD_ACC_AUTH_USER
, "HRPD Access Authentication User Profile Parameters" },
518 { REV_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS
, "HRPD Access Authentication CHAP SS Parameters" },
522 #define FOR_BLOCK_3GPD_OP_MODE 0
523 #define FOR_BLOCK_3GPD_SIP_USER_PRO 1
524 #define FOR_BLOCK_3GPD_MIP_USER_PRO 2
525 #define FOR_BLOCK_3GPD_SIP_STATUS 6
526 #define FOR_BLOCK_3GPD_MIP_STATUS 7
527 #define FOR_BLOCK_3GPD_SIP_PAP_SS 8
528 #define FOR_BLOCK_3GPD_SIP_CHAP_SS 9
529 #define FOR_BLOCK_3GPD_MIP_SS 10
530 #define FOR_BLOCK_3GPD_HRPD_ACC_AUTH_USER 11
531 #define FOR_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS 12
534 * Table 4.5.7-1 3GPD Parameter Block Types
536 static const value_string for_param_block_3gpd_vals
[] = {
537 { FOR_BLOCK_3GPD_OP_MODE
, "3GPD Operation Mode Parameters" },
538 { FOR_BLOCK_3GPD_SIP_USER_PRO
, "SimpleIP User Profile Parameters" },
539 { FOR_BLOCK_3GPD_MIP_USER_PRO
, "Mobile IP User Profile Parameters" },
540 { FOR_BLOCK_3GPD_SIP_STATUS
, "SimpleIP Status Parameters" },
541 { FOR_BLOCK_3GPD_MIP_STATUS
, "MobileIP Status Parameters" },
542 { FOR_BLOCK_3GPD_SIP_PAP_SS
, "SimpleIP PAP SS Parameters" },
543 { FOR_BLOCK_3GPD_SIP_CHAP_SS
, "SimpleIP CHAP SS Parameters" },
544 { FOR_BLOCK_3GPD_MIP_SS
, "MobileIP SS Parameters" },
545 { FOR_BLOCK_3GPD_HRPD_ACC_AUTH_USER
, "HRPD Access Authentication User Profile Parameters" },
546 { FOR_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS
, "HRPD Access Authentication CHAP SS Parameters" },
551 #define REV_BLOCK_MMD_APP 0
554 * Table 3.5.9-1 MMD Parameter Block Types
556 static const value_string param_block_mmd_vals
[] = {
557 { 0, "MMD Application Parameters" },
562 * Table 4.5.8-1 MMD Parameter Block Types
564 #define FOR_BLOCK_MMD_APP 0
567 #define REV_BLOCK_SYSTAG_HOME_SYSTAG 0
568 #define REV_BLOCK_SYSTAG_GROUP_TAG_LIST_DIM 1
569 #define REV_BLOCK_SYSTAG_GROUP_TAG_LIST 2
570 #define REV_BLOCK_SYSTAG_SPEC_TAG_LIST_DIM 3
571 #define REV_BLOCK_SYSTAG_SPEC_TAG_LIST 4
572 #define REV_BLOCK_SYSTAG_CALL_PROMPT_LIST_DIM 5
573 #define REV_BLOCK_SYSTAG_CALL_PROMPT_LIST 6
576 * Table 3.5.10-1 System Tag Parameter Block Types
578 static const value_string rev_param_block_systag_vals
[] = {
579 { REV_BLOCK_SYSTAG_HOME_SYSTAG
, "Home System Tag" },
580 { REV_BLOCK_SYSTAG_GROUP_TAG_LIST_DIM
, "Group Tag List Dimensions" },
581 { REV_BLOCK_SYSTAG_GROUP_TAG_LIST
, "Group Tag List" },
582 { REV_BLOCK_SYSTAG_SPEC_TAG_LIST_DIM
, "Specific Tag List Dimensions" },
583 { REV_BLOCK_SYSTAG_SPEC_TAG_LIST
, "Specific Tag List" },
584 { REV_BLOCK_SYSTAG_CALL_PROMPT_LIST_DIM
, "Call Prompt List Dimensions" },
585 { REV_BLOCK_SYSTAG_CALL_PROMPT_LIST
, "Call Prompt List" },
590 * Table 4.5.9-1 System Tag Parameter Block Types
592 static const range_string for_param_block_systag_rvals
[] = {
593 { 0, 0, "Home System Tag" },
594 { 1, 1, "Group Tag List" },
595 { 2, 2, "Specific Tag List" },
596 { 3, 3, "Call Prompt List" },
597 { 4, 127, "Reserved for future standardization" },
598 { 128, 254, "Available for manufacturer-specific parameter block definitions" },
599 { 255, 255, "Reserved" },
601 { 0x00, 0x00, NULL
},
604 #define REV_BLOCK_MMS_URI 0
605 #define REV_BLOCK_MMS_URI_CAP 1
608 * Table 3.5.12-1 MMS Parameter Block Types
610 static const range_string rev_param_block_mms_rvals
[] = {
611 { REV_BLOCK_MMS_URI
, REV_BLOCK_MMS_URI
, "MMS URI Parameters" },
612 { REV_BLOCK_MMS_URI_CAP
, REV_BLOCK_MMS_URI_CAP
, "MMS URI Capability Parameters" },
613 { 2, 255, "Reserved" },
615 { 0x00, 0x00, NULL
},
618 #define FOR_BLOCK_MMS_URI 0
621 * Table 4.5.10-1 MMS Parameter Block Types
623 static const range_string for_param_block_mms_rvals
[] = {
624 { FOR_BLOCK_MMS_URI
, FOR_BLOCK_MMS_URI
, "MMS URI Parameters" },
625 { 1, 255, "Reserved" },
627 { 0x00, 0x00, NULL
},
630 /* PARAMETER BLOCK DISSECTION */
635 static const value_string power_class_vals
[] = {
637 { 0x01, "Class II" },
638 { 0x02, "Class III" },
639 { 0x03, "Reserved" },
643 static const true_false_string tfs_extended_scm_indicator
= { "Band Classes 1,4", "Other bands" };
644 static const true_false_string tfs_cdma_analog_mode
= { "Dual Mode", "CDMA Only" };
645 static const true_false_string tfs_configured_not_configured
= { "Configured", "Not configured" };
646 static const true_false_string tfs_discontinuous_continous
= { "Discontinuous", "Continuous" };
649 rev_param_block_nam_cdma_analog(tvbuff_t
*tvb
, packet_info
* pinfo _U_
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
651 uint32_t saved_offset
;
656 saved_offset
= offset
;
658 proto_tree_add_item(tree
, hf_ansi_683_firstchp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
662 proto_tree_add_item(tree
, hf_ansi_683_home_sid
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
663 proto_tree_add_item(tree
, hf_ansi_683_extended_address_indicator
, tvb
, offset
+ 2, 1, ENC_BIG_ENDIAN
);
667 value
= tvb_get_ntohs(tvb
, offset
);
669 item
= proto_tree_add_item(tree
, hf_ansi_683_station_class_mark
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
672 * following SCM decode is from:
673 * 3GPP2 C.S0005-0 section 2.3.3
674 * 3GPP2 C.S0072-0 section 2.1.2
676 subtree
= proto_item_add_subtree(item
, ett_scm
);
678 proto_tree_add_item(subtree
, hf_ansi_683_extended_scm_indicator
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
679 proto_tree_add_item(subtree
, hf_ansi_683_cdma_analog_mode
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
680 proto_tree_add_item(subtree
, hf_ansi_683_cdma_analog_slotted
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
683 proto_item_append_text(item
, "%s", " (MEID configured)");
685 proto_tree_add_item(subtree
, hf_ansi_683_meid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
686 proto_tree_add_item(subtree
, hf_ansi_683_25mhz_bandwidth
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
687 proto_tree_add_item(subtree
, hf_ansi_683_transmission
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
688 proto_tree_add_item(subtree
, hf_ansi_683_power_class
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
692 value
= tvb_get_ntohs(tvb
, offset
);
694 proto_tree_add_item(tree
, hf_ansi_683_mob_p_rev_1fe0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
695 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_class10
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
696 proto_tree_add_uint_format_value(tree
, hf_ansi_683_ismi_m_addr_num_e
, tvb
, offset
+ 1, 1, value
,
697 "%u, %u digits in NMSI", (value
& 0x0e) >> 1,
698 (value
& 0x10) ? ((value
& 0x0e) >> 1) + 4 : 0);
702 proto_tree_add_item(tree
, hf_ansi_683_mcc_m_01ff80
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
703 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_11_12_7f
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
707 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_10
, tvb
, offset
, 5, ENC_NA
);
711 proto_tree_add_item(tree
, hf_ansi_683_accolc_3c
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
712 proto_tree_add_item(tree
, hf_ansi_683_local_control_status_02
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
713 proto_tree_add_item(tree
, hf_ansi_683_mob_term_home_01
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
716 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_sid_80
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
717 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_nid_40
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
718 proto_tree_add_item(tree
, hf_ansi_683_max_sid_nid_3fc0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
722 proto_tree_add_item(tree
, hf_ansi_683_stored_sid_nid_3fc0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
723 proto_tree_add_item(tree
, hf_ansi_683_sid_nid_pairs_3fff
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
726 proto_tree_add_item(tree
, hf_ansi_683_reserved_bytes
,
727 tvb
, offset
, len
- (offset
- saved_offset
), ENC_NA
);
735 param_block_nam_mdn(tvbuff_t
*tvb
, packet_info
* pinfo _U_
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
737 uint32_t saved_offset
;
738 uint32_t value
, count
, i
;
741 saved_offset
= offset
;
743 value
= tvb_get_uint8(tvb
, offset
);
745 count
= (value
& 0xf0) >> 4;
747 proto_tree_add_item(tree
, hf_ansi_683_n_digits
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
749 for (i
=0; i
< count
; i
++)
751 str
[i
] = dtmf_digits
[(value
& 0x0f)];
756 value
= tvb_get_uint8(tvb
, offset
);
757 str
[i
+1] = dtmf_digits
[(value
& 0xf0) >> 4];
763 proto_tree_add_string(tree
, hf_ansi_683_mobile_directory_number
,
764 tvb
, saved_offset
, len
, str
);
768 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 4, ENC_NA
);
776 rev_param_block_nam_cdma(tvbuff_t
*tvb
, packet_info
* pinfo _U_
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
778 uint32_t saved_offset
;
781 saved_offset
= offset
;
783 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, (offset
<<3)+6, 2, ENC_NA
);
784 proto_tree_add_item(tree
, hf_ansi_683_slotted_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
786 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 5, ENC_NA
);
789 proto_tree_add_item(tree
, hf_ansi_683_mob_p_rev_ff
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
792 value
= tvb_get_ntohs(tvb
, offset
);
794 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_class8000
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
795 proto_tree_add_uint_format_value(tree
, hf_ansi_683_imsi_m_addr_num_7000
, tvb
, offset
, 2, value
,
796 "%u, %u digits in NMSI", (value
& 0x7000) >> 12,
797 (value
& 0x8000) ? ((value
& 0x7000) >> 12) + 4 : 0);
799 proto_tree_add_item(tree
, hf_ansi_683_mcc_m_0ffc
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
802 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_11_12_3f80
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
805 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_10
, tvb
, offset
, 5, ENC_NA
);
808 proto_tree_add_item(tree
, hf_ansi_683_accolc_01e0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
809 proto_tree_add_item(tree
, hf_ansi_683_local_control_status_0010
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
810 proto_tree_add_item(tree
, hf_ansi_683_mob_term_home_08
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
811 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_sid_0004
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
812 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_nid_0002
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
815 proto_tree_add_item(tree
, hf_ansi_683_max_sid_nid_01fe
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
818 proto_tree_add_item(tree
, hf_ansi_683_stored_sid_nid_01fe
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
819 proto_tree_add_item(tree
, hf_ansi_683_sid_nid_pairs_01ff
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
822 proto_tree_add_item(tree
, hf_ansi_683_reserved_bytes
,
823 tvb
, offset
, len
- (offset
- saved_offset
), ENC_NA
);
831 param_block_nam_imsi_t(tvbuff_t
*tvb
, proto_tree
*tree
, unsigned len _U_
, uint32_t offset
)
835 value
= tvb_get_uint8(tvb
, offset
);
837 proto_tree_add_item(tree
, hf_ansi_683_imsi_t_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
838 proto_tree_add_uint_format_value(tree
, hf_ansi_683_imsi_t_addr_num
, tvb
, offset
, 1, value
,
839 "%u, %u digits in NMSI", (value
& 0x70) >> 4,
840 (value
& 0x80) ? ((value
& 0x70) >> 4) + 4 : 0);
842 proto_tree_add_item(tree
, hf_ansi_683_mcc_t
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
845 proto_tree_add_item(tree
, hf_ansi_683_imsi_t_11_12
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
848 proto_tree_add_item(tree
, hf_ansi_683_imsi_t_10
, tvb
, offset
, 5, ENC_NA
);
851 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 1, ENC_NA
);
858 for_param_block_nam_cdma_analog(tvbuff_t
*tvb
, packet_info
* pinfo _U_
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
860 uint32_t saved_offset
;
863 saved_offset
= offset
;
865 proto_tree_add_item(tree
, hf_ansi_683_firstchp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
868 value
= tvb_get_ntoh24(tvb
, offset
);
870 proto_tree_add_item(tree
, hf_ansi_683_home_sid
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
871 proto_tree_add_item(tree
, hf_ansi_683_extended_address_indicator
, tvb
, offset
+ 2, 1, ENC_BIG_ENDIAN
);
872 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_class10
, tvb
, offset
+ 2, 1, ENC_BIG_ENDIAN
);
873 proto_tree_add_uint_format_value(tree
, hf_ansi_683_ismi_m_addr_num_e
, tvb
, offset
+ 2, 1, value
,
874 "%u, %u digits in NMSI", (value
& 0x0e) >> 1,
875 (value
& 0x10) ? ((value
& 0x0e) >> 1) + 4 : 0);
879 proto_tree_add_item(tree
, hf_ansi_683_mcc_m_01ff80
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
880 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_11_12_7f
, tvb
, offset
+ 2, 1, ENC_BIG_ENDIAN
);
883 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_10
, tvb
, offset
, 5, ENC_NA
);
886 proto_tree_add_item(tree
, hf_ansi_683_accolc_3c
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
887 proto_tree_add_item(tree
, hf_ansi_683_local_control_status_02
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
888 proto_tree_add_item(tree
, hf_ansi_683_mob_term_home_01
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
891 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_sid_8000
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
892 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_nid_4000
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
894 proto_tree_add_item(tree
, hf_ansi_683_num_sid_nid_3fc0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
895 proto_tree_add_item(tree
, hf_ansi_683_sid_nid_pairs_3fff
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
898 proto_tree_add_item(tree
, hf_ansi_683_reserved_bytes
,
899 tvb
, offset
, len
- (offset
- saved_offset
), ENC_NA
);
904 * see param_block_nam_mdn()
911 for_param_block_nam_cdma(tvbuff_t
*tvb
, packet_info
* pinfo _U_
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
913 uint32_t saved_offset
;
916 saved_offset
= offset
;
918 value
= tvb_get_ntohs(tvb
, offset
);
920 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_class8000
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
921 proto_tree_add_uint_format_value(tree
, hf_ansi_683_imsi_m_addr_num_7000
, tvb
, offset
, 2, value
,
922 "%u, %u digits in NMSI", (value
& 0x7000) >> 12,
923 (value
& 0x8000) ? ((value
& 0x7000) >> 12) + 4 : 0);
925 proto_tree_add_item(tree
, hf_ansi_683_mcc_m_0ffc
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
928 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_11_12_3f80
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
931 proto_tree_add_item(tree
, hf_ansi_683_imsi_m_10
, tvb
, offset
, 5, ENC_NA
);
934 proto_tree_add_item(tree
, hf_ansi_683_accolc_01e0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
935 proto_tree_add_item(tree
, hf_ansi_683_local_control_status_0010
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
936 proto_tree_add_item(tree
, hf_ansi_683_mob_term_home_08
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
937 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_sid_0004
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
938 proto_tree_add_item(tree
, hf_ansi_683_mob_term_for_nid_0002
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
941 proto_tree_add_item(tree
, hf_ansi_683_num_sid_nid_01fe
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
942 proto_tree_add_item(tree
, hf_ansi_683_sid_nid_pairs_01ff
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
945 proto_tree_add_item(tree
, hf_ansi_683_reserved_bytes
,
946 tvb
, offset
, len
- (offset
- saved_offset
), ENC_NA
);
951 * see param_block_nam_imsi_t()
959 for_param_block_val_spc(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
961 EXACT_DATA_CHECK(len
, 3);
963 proto_tree_add_item(tree
, hf_ansi_683_service_programming_code
,
964 tvb
, offset
, len
, ENC_BCD_DIGITS_0_9
|ENC_LITTLE_ENDIAN
);
971 for_param_block_val_spasm(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
975 proto_tree_add_item(tree
, hf_ansi_683_otapa_spasm_validation_signature_indicator_80
, tvb
, offset
, 1, ENC_NA
);
976 proto_tree_add_item(tree
, hf_ansi_683_spasm_protection_for_the_active_nam_40
, tvb
, offset
, 1, ENC_NA
);
977 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 6, ENC_NA
);
981 EXACT_DATA_CHECK(len
, 3);
983 proto_tree_add_item(tree
, hf_ansi_683_otapa_spasm_validation_signature_indicator_800000
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
984 proto_tree_add_item(tree
, hf_ansi_683_otapa_spasm_validation_signature
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
985 proto_tree_add_item(tree
, hf_ansi_683_spasm_protection_for_the_active_nam_000010
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
986 proto_tree_add_item(tree
, hf_ansi_683_reserved24_f
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
990 /* FORWARD MESSAGES */
996 msg_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
998 uint8_t oct
, num_blocks
;
999 uint32_t i
, saved_offset
;
1001 SHORT_DATA_CHECK(len
, 1);
1003 saved_offset
= offset
;
1005 num_blocks
= tvb_get_uint8(tvb
, offset
);
1007 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1011 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_blocks
);
1013 for (i
=0; i
< num_blocks
; i
++)
1015 oct
= tvb_get_uint8(tvb
, offset
);
1016 proto_tree_add_uint_format(tree
, hf_ansi_683_rev_param_block_nam
, tvb
, offset
, 1,
1017 oct
, "NAM Parameter Block Type #%u: %s (%u)", i
+1,
1018 rval_to_str_const(oct
, rev_param_block_nam_rvals
, "Reserved"), oct
);
1023 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1030 msg_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1032 uint8_t block_id
, num_blocks
, block_len
;
1033 proto_tree
*subtree
;
1035 uint32_t i
, saved_offset
;
1037 SHORT_DATA_CHECK(len
, 1);
1039 saved_offset
= offset
;
1041 num_blocks
= tvb_get_uint8(tvb
, offset
);
1043 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1047 for (i
=0; i
< num_blocks
; i
++)
1049 block_id
= tvb_get_uint8(tvb
, offset
);
1051 subtree
= proto_tree_add_subtree_format(tree
,
1052 tvb
, offset
, 1, ett_for_nam_block
, &item
,
1055 proto_tree_add_uint(subtree
, hf_ansi_683_for_param_block_nam
,
1056 tvb
, offset
, 1, block_id
);
1059 block_len
= tvb_get_uint8(tvb
, offset
);
1061 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1062 tvb
, offset
, 1, block_len
);
1065 if (block_len
> (len
- (offset
- saved_offset
)))
1067 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1070 proto_item_set_len(item
, block_len
+1);
1076 case FOR_BLOCK_NAM_CDMA_ANALOG
:
1077 for_param_block_nam_cdma_analog(tvb
, pinfo
, subtree
, block_len
, offset
);
1080 case FOR_BLOCK_NAM_MDN
:
1081 param_block_nam_mdn(tvb
, pinfo
, subtree
, block_len
, offset
);
1084 case FOR_BLOCK_NAM_CDMA
:
1085 for_param_block_nam_cdma(tvb
, pinfo
, subtree
, block_len
, offset
);
1088 case FOR_BLOCK_NAM_IMSI_T
:
1089 param_block_nam_imsi_t(tvb
, subtree
, block_len
, offset
);
1093 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1097 offset
+= block_len
;
1101 if (len
> (offset
- saved_offset
))
1104 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
1107 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1113 static const value_string akey_protocol_revision_vals
[] = {
1114 { 0x02, "2G A-key generation" },
1115 { 0x03, "2G A-key and 3G Root Key generation" },
1116 { 0x04, "3G Root Key generation" },
1117 { 0x05, "Enhanced 3G Root Key generation" },
1122 msg_ms_key_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1124 uint8_t akey_prev
, param_len
;
1125 proto_tree
*subtree
;
1126 uint32_t saved_offset
;
1128 SHORT_DATA_CHECK(len
, 1);
1130 saved_offset
= offset
;
1132 akey_prev
= tvb_get_uint8(tvb
, offset
);
1134 proto_tree_add_item(tree
, hf_ansi_683_a_key_protocol_revision
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1137 if (akey_prev
< 0x03)
1139 param_len
= tvb_get_uint8(tvb
, offset
);
1141 subtree
= proto_tree_add_subtree(tree
,
1142 tvb
, offset
, param_len
+ 1,
1143 ett_key_p
, NULL
, "Key exchange parameter P");
1145 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1146 tvb
, offset
, 1, param_len
);
1151 proto_tree_add_item(subtree
, hf_ansi_683_parameter_p
, tvb
, offset
, param_len
, ENC_NA
);
1152 offset
+= param_len
;
1155 param_len
= tvb_get_uint8(tvb
, offset
);
1157 subtree
= proto_tree_add_subtree(tree
,
1158 tvb
, offset
, param_len
+ 1,
1159 ett_key_g
, NULL
, "Key exchange parameter G");
1161 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1162 tvb
, offset
, 1, param_len
);
1167 proto_tree_add_item(subtree
, hf_ansi_683_parameter_g
, tvb
, offset
, param_len
, ENC_NA
);
1168 offset
+= param_len
;
1172 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1179 msg_key_gen_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1182 uint32_t saved_offset
;
1184 SHORT_DATA_CHECK(len
, 2);
1186 saved_offset
= offset
;
1188 param_len
= tvb_get_uint8(tvb
, offset
);
1190 proto_tree_add_uint(tree
, hf_ansi_683_length
,
1191 tvb
, offset
, 1, param_len
);
1194 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), param_len
);
1198 proto_tree_add_item(tree
, hf_ansi_683_base_station_calculation_result
, tvb
, offset
, param_len
, ENC_NA
);
1199 offset
+= param_len
;
1202 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1209 msg_reauth_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1212 EXACT_DATA_CHECK(len
, 4);
1214 proto_tree_add_item(tree
, hf_ansi_683_random_challenge_value
, tvb
, offset
, 4, ENC_NA
);
1219 * Commit Request (no data associated)
1226 msg_protocap_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1228 uint32_t i
, saved_offset
;
1229 uint8_t oct
, num_cap
;
1234 * if the base station did not request new cap info OR
1235 * this is an earlier release
1240 saved_offset
= offset
;
1242 proto_tree_add_item(tree
, hf_ansi_683_otasp_protocol_revision
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1246 num_cap
= tvb_get_uint8(tvb
, offset
);
1248 proto_tree_add_item(tree
, hf_ansi_683_number_of_capability_records
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1252 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_cap
);
1254 for (i
=0; i
< num_cap
; i
++)
1256 oct
= tvb_get_uint8(tvb
, offset
);
1257 proto_tree_add_uint_format(tree
, hf_ansi_683_cap_info_record_type
, tvb
, offset
, 1, oct
,
1258 "Record Type #%u: %s (%u)", i
+1, rval_to_str_const(oct
, rev_cap_info_record_type_rvals
, "Reserved"), oct
);
1262 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1269 msg_sspr_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1272 uint32_t saved_offset
;
1273 proto_tree
*subtree
;
1276 SHORT_DATA_CHECK(len
, 1);
1278 saved_offset
= offset
;
1280 oct
= tvb_get_uint8(tvb
, offset
);
1281 item
= proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_sspr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1284 if (oct
== REV_BLOCK_SSPR_PRL
)
1286 subtree
= proto_item_add_subtree(item
, ett_rev_sspr_block
);
1288 if ((len
- (offset
- saved_offset
)) < 3)
1290 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1294 proto_tree_add_item(subtree
, hf_ansi_683_segment_offset
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1297 proto_tree_add_item(subtree
, hf_ansi_683_maximum_segment_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1301 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1308 msg_sspr_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1311 uint32_t saved_offset
;
1312 proto_tree
*subtree
;
1315 SHORT_DATA_CHECK(len
, 2);
1317 saved_offset
= offset
;
1319 item
= proto_tree_add_item(tree
, hf_ansi_683_for_param_block_sspr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1320 subtree
= proto_item_add_subtree(item
, ett_for_sspr_block
);
1323 block_len
= tvb_get_uint8(tvb
, offset
);
1325 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1326 tvb
, offset
, 1, block_len
);
1329 if (block_len
> (len
- (offset
- saved_offset
)))
1331 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1337 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1338 offset
+= block_len
;
1341 if (len
> (offset
- saved_offset
))
1344 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
1347 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1354 msg_validate_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1356 uint8_t block_id
, num_blocks
, block_len
;
1357 proto_tree
*subtree
;
1359 uint32_t i
, saved_offset
;
1361 SHORT_DATA_CHECK(len
, 1);
1363 saved_offset
= offset
;
1365 num_blocks
= tvb_get_uint8(tvb
, offset
);
1367 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1371 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
1373 for (i
=0; i
< num_blocks
; i
++)
1375 block_id
= tvb_get_uint8(tvb
, offset
);
1377 subtree
= proto_tree_add_subtree_format(tree
,
1378 tvb
, offset
, 1, ett_for_val_block
, &item
,
1381 proto_tree_add_item(subtree
, hf_ansi_683_param_block_val
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1384 block_len
= tvb_get_uint8(tvb
, offset
);
1386 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1387 tvb
, offset
, 1, block_len
);
1391 if (block_len
> (len
- (offset
- saved_offset
)))
1393 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1396 proto_item_set_len(item
, block_len
+1);
1402 case FOR_BLOCK_VAL_VERIFY_SPC
:
1403 case FOR_BLOCK_VAL_CHANGE_SPC
:
1404 for_param_block_val_spc(tvb
, pinfo
, subtree
, block_len
, offset
);
1407 case FOR_BLOCK_VAL_VALDATE_SPASM
:
1408 for_param_block_val_spasm(tvb
, pinfo
, subtree
, block_len
, offset
);
1412 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1416 offset
+= block_len
;
1420 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1426 static const true_false_string tfs_start_stop
= { "Start", "Stop" };
1429 msg_otapa_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1431 EXACT_DATA_CHECK(len
, 1);
1433 proto_tree_add_item(tree
, hf_ansi_683_start_otapa_session
, tvb
, offset
, 1, ENC_NA
);
1434 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 7, ENC_NA
);
1441 msg_puzl_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1444 uint32_t saved_offset
;
1445 proto_tree
*subtree
;
1448 SHORT_DATA_CHECK(len
, 1);
1450 saved_offset
= offset
;
1452 item
= proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_puzl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1453 block_len
= len
- (offset
- saved_offset
);
1457 subtree
= proto_item_add_subtree(item
, ett_rev_puzl_block
);
1459 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1460 offset
+= block_len
;
1463 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1470 msg_puzl_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1472 uint8_t block_id
, num_blocks
, block_len
;
1474 proto_tree
*subtree
;
1475 uint32_t i
, saved_offset
;
1477 SHORT_DATA_CHECK(len
, 1);
1479 saved_offset
= offset
;
1481 num_blocks
= tvb_get_uint8(tvb
, offset
);
1483 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1487 for (i
=0; i
< num_blocks
; i
++)
1489 block_id
= tvb_get_uint8(tvb
, offset
);
1491 subtree
= proto_tree_add_subtree_format(tree
,
1492 tvb
, offset
, 1, ett_for_puzl_block
, &item
,
1495 proto_tree_add_uint(subtree
, hf_ansi_683_for_param_block_puzl
,
1496 tvb
, offset
, 1, block_id
);
1499 block_len
= tvb_get_uint8(tvb
, offset
);
1501 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1502 tvb
, offset
, 1, block_len
);
1505 if (block_len
> (len
- (offset
- saved_offset
)))
1507 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1510 proto_item_set_len(item
, block_len
+1);
1516 case FOR_BLOCK_PUZL_UZ_INS
:
1517 case FOR_BLOCK_PUZL_UZ_UPD
:
1518 case FOR_BLOCK_PUZL_UZ_DEL
:
1519 case FOR_BLOCK_PUZL_UZ_PRI_CHANGE
:
1520 case FOR_BLOCK_PUZL_FLAGS
:
1522 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1526 offset
+= block_len
;
1530 if (len
> (offset
- saved_offset
))
1533 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
1536 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1543 msg_3gpd_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1545 uint8_t oct
, num_blocks
;
1546 uint32_t i
, saved_offset
;
1548 SHORT_DATA_CHECK(len
, 1);
1550 saved_offset
= offset
;
1552 num_blocks
= tvb_get_uint8(tvb
, offset
);
1554 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1558 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_blocks
);
1560 for (i
=0; i
< num_blocks
; i
++)
1562 oct
= tvb_get_uint8(tvb
, offset
);
1564 proto_tree_add_uint_format(tree
, hf_ansi_683_rev_param_block_3gpd
,
1565 tvb
, offset
, 1, oct
,
1566 "3GPD Parameter Block %u: %s (%u)",
1567 i
+1, val_to_str_const(oct
, rev_param_block_3gpd_vals
, "Reserved"), oct
);
1572 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1579 msg_3gpd_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1581 uint8_t block_id
, num_blocks
, block_len
;
1583 proto_tree
*subtree
;
1584 uint32_t i
, saved_offset
;
1586 SHORT_DATA_CHECK(len
, 1);
1588 saved_offset
= offset
;
1590 num_blocks
= tvb_get_uint8(tvb
, offset
);
1592 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1596 for (i
=0; i
< num_blocks
; i
++)
1598 block_id
= tvb_get_uint8(tvb
, offset
);
1600 subtree
= proto_tree_add_subtree_format(tree
,
1601 tvb
, offset
, 1, ett_for_3gpd_block
, &item
,
1603 proto_tree_add_uint(subtree
, hf_ansi_683_for_param_block_3gpd
, tvb
, offset
, 1, block_id
);
1606 block_len
= tvb_get_uint8(tvb
, offset
);
1608 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1609 tvb
, offset
, 1, block_len
);
1612 if (block_len
> (len
- (offset
- saved_offset
)))
1614 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1617 proto_item_set_len(item
, block_len
+1);
1623 case FOR_BLOCK_3GPD_OP_MODE
:
1624 case FOR_BLOCK_3GPD_SIP_USER_PRO
:
1625 case FOR_BLOCK_3GPD_MIP_USER_PRO
:
1626 case FOR_BLOCK_3GPD_SIP_STATUS
:
1627 case FOR_BLOCK_3GPD_MIP_STATUS
:
1628 case FOR_BLOCK_3GPD_SIP_PAP_SS
:
1629 case FOR_BLOCK_3GPD_SIP_CHAP_SS
:
1630 case FOR_BLOCK_3GPD_MIP_SS
:
1631 case FOR_BLOCK_3GPD_HRPD_ACC_AUTH_USER
:
1632 case FOR_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS
:
1634 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1638 offset
+= block_len
;
1642 if (len
> (offset
- saved_offset
))
1645 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
1648 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1655 msg_secure_mode_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1658 const char *str
= NULL
;
1659 uint32_t saved_offset
;
1661 SHORT_DATA_CHECK(len
, 1);
1663 saved_offset
= offset
;
1665 oct
= tvb_get_uint8(tvb
, offset
);
1667 proto_tree_add_item(tree
, hf_ansi_683_start_secure_mode
, tvb
, offset
, 1, ENC_NA
);
1671 switch ((oct
& 0x78) >> 3)
1673 case 0x0: str
= "SMCK generation using SSD_A and SSD_B"; break;
1674 case 0x1: str
= "SMCK generation using 3G Root Key"; break;
1675 default: str
= "Key in use indicator"; break;
1680 str
= "Key in use indicator";
1683 proto_tree_add_uint_format_value(tree
, hf_ansi_683_security
,
1684 tvb
, offset
, 1, oct
, "%s", str
);
1686 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 3, ENC_NA
);
1691 SHORT_DATA_CHECK(len
, 8);
1693 proto_tree_add_item(tree
, hf_ansi_683_random_number_smck_generation
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
1698 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1710 msg_mmd_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1712 uint8_t oct
, num_blocks
;
1713 uint32_t i
, saved_offset
;
1715 SHORT_DATA_CHECK(len
, 1);
1717 saved_offset
= offset
;
1719 num_blocks
= tvb_get_uint8(tvb
, offset
);
1721 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1725 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_blocks
);
1727 for (i
=0; i
< num_blocks
; i
++)
1729 oct
= tvb_get_uint8(tvb
, offset
);
1731 proto_tree_add_uint_format(tree
, hf_ansi_683_rev_param_block_mmd
,
1732 tvb
, offset
, 1, oct
,
1733 "MMD Parameter Block #%u: %s (%u)",
1734 i
+1, val_to_str_const(oct
, param_block_mmd_vals
, "Reserved"), oct
);
1739 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1746 msg_mmd_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1748 uint8_t block_id
, num_blocks
, block_len
;
1750 proto_tree
*subtree
;
1751 uint32_t i
, saved_offset
;
1753 SHORT_DATA_CHECK(len
, 1);
1755 saved_offset
= offset
;
1757 num_blocks
= tvb_get_uint8(tvb
, offset
);
1759 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1763 for (i
=0; i
< num_blocks
; i
++)
1765 block_id
= tvb_get_uint8(tvb
, offset
);
1767 subtree
= proto_tree_add_subtree_format(tree
,
1768 tvb
, offset
, 1, ett_for_mmd_block
, &item
,
1771 proto_tree_add_uint(subtree
, hf_ansi_683_for_param_block_mmd
,
1772 tvb
, offset
, 1, block_id
);
1775 block_len
= tvb_get_uint8(tvb
, offset
);
1777 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1778 tvb
, offset
, 1, block_len
);
1781 if (block_len
> (len
- (offset
- saved_offset
)))
1783 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1787 proto_item_set_len(item
, block_len
+1);
1793 case FOR_BLOCK_MMD_APP
:
1795 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1799 offset
+= block_len
;
1803 if (len
> (offset
- saved_offset
))
1806 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
1809 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1816 msg_systag_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1818 uint32_t saved_offset
;
1819 proto_tree
*subtree
;
1822 SHORT_DATA_CHECK(len
, 1);
1824 saved_offset
= offset
;
1826 item
= proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_systag
,
1827 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1831 * possible values, but unclear in spec
1832 * REV_BLOCK_SYSTAG_HOME_SYSTAG
1833 * REV_BLOCK_SYSTAG_GROUP_TAG_LIST_DIM
1834 * REV_BLOCK_SYSTAG_GROUP_TAG_LIST
1835 * REV_BLOCK_SYSTAG_SPEC_TAG_LIST_DIM
1836 * REV_BLOCK_SYSTAG_SPEC_TAG_LIST
1837 * REV_BLOCK_SYSTAG_CALL_PROMPT_LIST_DIM
1838 * REV_BLOCK_SYSTAG_CALL_PROMPT_LIST
1840 if (len
> (offset
- saved_offset
))
1842 SHORT_DATA_CHECK(len
, 3);
1844 subtree
= proto_item_add_subtree(item
, ett_segment
);
1846 proto_tree_add_item(subtree
, hf_ansi_683_segment_offset
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1849 proto_tree_add_item(subtree
, hf_ansi_683_maximum_segment_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1853 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1860 msg_systag_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1863 uint32_t saved_offset
;
1865 SHORT_DATA_CHECK(len
, 2);
1867 saved_offset
= offset
;
1869 proto_tree_add_item(tree
, hf_ansi_683_for_param_block_systag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1872 block_len
= tvb_get_uint8(tvb
, offset
);
1874 proto_tree_add_uint(tree
, hf_ansi_683_length
,
1875 tvb
, offset
, 1, block_len
);
1878 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), block_len
);
1882 proto_tree_add_item(tree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
1883 offset
+= block_len
;
1886 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1894 msg_srvckey_gen_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1896 uint32_t saved_offset
;
1899 SHORT_DATA_CHECK(len
, 2);
1901 saved_offset
= offset
;
1903 value
= tvb_get_ntohs(tvb
, offset
);
1905 proto_tree_add_boolean_format_value(tree
, hf_ansi_683_key_id_ims_root_key
, tvb
, offset
, 2, value
, "IMS Root Key");
1906 proto_tree_add_boolean_format_value(tree
, hf_ansi_683_key_id_bcmcs_root_key
, tvb
, offset
, 2, value
, "BCMCS Root Key");
1907 proto_tree_add_boolean_format_value(tree
, hf_ansi_683_key_id_wlan_root_key
, tvb
, offset
, 2, value
, "WLAN Root Key");
1908 proto_tree_add_uint_format_value(tree
, hf_ansi_683_key_id_reserved
, tvb
, offset
, 2, value
, "Reserved");
1910 proto_tree_add_item(tree
, hf_ansi_683_reserved16_f
,
1911 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1915 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1922 msg_mms_config_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1924 uint8_t oct
, num_blocks
;
1925 uint32_t i
, saved_offset
;
1927 SHORT_DATA_CHECK(len
, 1);
1929 saved_offset
= offset
;
1931 num_blocks
= tvb_get_uint8(tvb
, offset
);
1933 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1937 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_blocks
);
1939 for (i
=0; i
< num_blocks
; i
++)
1941 oct
= tvb_get_uint8(tvb
, offset
);
1943 proto_tree_add_uint_format(tree
, hf_ansi_683_rev_param_block_mms
,
1944 tvb
, offset
, 1, oct
,
1945 "MMS Parameter Block #%u: %s (%u)",
1946 i
+1, rval_to_str_const(oct
, rev_param_block_mms_rvals
, "Reserved"), oct
);
1950 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1957 msg_mms_download_req(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1959 uint8_t block_id
, num_blocks
, block_len
;
1961 proto_tree
*subtree
;
1962 uint32_t i
, saved_offset
;
1964 SHORT_DATA_CHECK(len
, 1);
1966 saved_offset
= offset
;
1968 num_blocks
= tvb_get_uint8(tvb
, offset
);
1970 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1974 for (i
=0; i
< num_blocks
; i
++)
1976 block_id
= tvb_get_uint8(tvb
, offset
);
1978 subtree
= proto_tree_add_subtree_format(tree
,
1979 tvb
, offset
, 1, ett_for_mms_block
, &item
,
1982 proto_tree_add_uint(subtree
, hf_ansi_683_for_param_block_mms
, tvb
, offset
, 1, block_id
);
1985 block_len
= tvb_get_uint8(tvb
, offset
);
1987 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
1988 tvb
, offset
, 1, block_len
);
1991 if (block_len
> (len
- (offset
- saved_offset
)))
1993 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
1996 proto_item_set_len(item
, block_len
+1);
2002 case FOR_BLOCK_MMS_URI
:
2004 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2008 offset
+= block_len
;
2012 if (len
> (offset
- saved_offset
))
2015 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2018 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2021 /* REVERSE MESSAGES */
2027 msg_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2029 uint8_t oct
, block_id
, num_blocks
, block_len
;
2030 uint32_t i
, saved_offset
;
2032 proto_tree
*subtree
;
2034 SHORT_DATA_CHECK(len
, 1);
2036 saved_offset
= offset
;
2038 num_blocks
= tvb_get_uint8(tvb
, offset
);
2040 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2044 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
2046 for (i
=0; i
< num_blocks
; i
++)
2048 block_id
= tvb_get_uint8(tvb
, offset
);
2050 subtree
= proto_tree_add_subtree_format(tree
,
2051 tvb
, offset
, 1, ett_rev_nam_block
, &item
,
2053 proto_tree_add_uint(subtree
, hf_ansi_683_rev_param_block_nam
,
2054 tvb
, offset
, 1, block_id
);
2057 block_len
= tvb_get_uint8(tvb
, offset
);
2059 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
2060 tvb
, offset
, 1, block_len
);
2063 if (block_len
> (len
- (offset
- saved_offset
)))
2065 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
2068 proto_item_set_len(item
, block_len
+1);
2074 case REV_BLOCK_NAM_CDMA_ANALOG
:
2075 rev_param_block_nam_cdma_analog(tvb
, pinfo
, subtree
, block_len
, offset
);
2078 case REV_BLOCK_NAM_MDN
:
2079 param_block_nam_mdn(tvb
, pinfo
, subtree
, block_len
, offset
);
2082 case REV_BLOCK_NAM_CDMA
:
2083 rev_param_block_nam_cdma(tvb
, pinfo
, subtree
, block_len
, offset
);
2086 case REV_BLOCK_NAM_IMSI_T
:
2087 param_block_nam_imsi_t(tvb
, subtree
, block_len
, offset
);
2091 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2095 offset
+= block_len
;
2099 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), num_blocks
);
2101 for (i
=0; i
< num_blocks
; i
++)
2103 oct
= tvb_get_uint8(tvb
, offset
);
2105 proto_tree_add_uint_format(tree
, hf_ansi_683_result_code
,
2106 tvb
, offset
, 1, oct
, "Block #%u result code: %s (%u)",
2107 i
+1, rval_to_str_const(oct
, result_codes_rvals
, "Reserved"), oct
);
2112 if (len
> (offset
- saved_offset
))
2115 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2118 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2125 msg_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2128 uint32_t i
, saved_offset
;
2129 proto_tree
*subtree
;
2131 SHORT_DATA_CHECK(len
, 1);
2133 saved_offset
= offset
;
2135 num_blocks
= tvb_get_uint8(tvb
, offset
);
2137 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2141 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
2143 for (i
=0; i
< num_blocks
; i
++)
2145 subtree
= proto_tree_add_subtree_format(tree
,
2146 tvb
, offset
, 2, ett_for_nam_block
, NULL
,
2148 proto_tree_add_item(subtree
, hf_ansi_683_for_param_block_nam
,
2149 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2152 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2156 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2163 msg_ms_key_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2165 EXACT_DATA_CHECK(len
, 1);
2167 proto_tree_add_item(tree
, hf_ansi_683_key_exchange_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2174 msg_key_gen_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2177 uint32_t saved_offset
;
2179 SHORT_DATA_CHECK(len
, 2);
2181 saved_offset
= offset
;
2183 proto_tree_add_item(tree
, hf_ansi_683_key_exchange_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2186 result_len
= tvb_get_uint8(tvb
, offset
);
2188 proto_tree_add_uint(tree
, hf_ansi_683_length
,
2189 tvb
, offset
, 1, result_len
);
2192 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), result_len
);
2196 proto_tree_add_item(tree
, hf_ansi_683_mobile_station_calculation_result
, tvb
, offset
, result_len
, ENC_NA
);
2197 offset
+= result_len
;
2200 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2207 msg_reauth_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2209 EXACT_DATA_CHECK(len
, 7);
2211 proto_tree_add_item(tree
, hf_ansi_683_authr
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2214 proto_tree_add_item(tree
, hf_ansi_683_randc
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2215 proto_tree_add_item(tree
, hf_ansi_683_call_history_parameter
, tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
2218 proto_tree_add_item(tree
, hf_ansi_683_authentication_data_input_parameter
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2225 msg_commit_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2227 EXACT_DATA_CHECK(len
, 1);
2229 proto_tree_add_item(tree
, hf_ansi_683_data_commit_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2236 msg_protocap_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2238 uint8_t oct
, num_feat
, add_len
;
2239 uint32_t i
, saved_offset
;
2240 proto_tree
*subtree
;
2243 SHORT_DATA_CHECK(len
, 5);
2245 saved_offset
= offset
;
2247 proto_tree_add_item(tree
, hf_ansi_683_mobile_station_fw_rev
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2250 proto_tree_add_item(tree
, hf_ansi_683_mobile_station_manuf_model_number
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2253 num_feat
= tvb_get_uint8(tvb
, offset
);
2255 proto_tree_add_item(tree
, hf_ansi_683_num_features
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2258 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_feat
* 2));
2260 for (i
=0; i
< num_feat
; i
++)
2262 oct
= tvb_get_uint8(tvb
, offset
);
2264 item
= proto_tree_add_uint_format(tree
, hf_ansi_683_feature_id
,
2265 tvb
, offset
, 1, oct
,
2266 "Feature ID #%u: %s (%u)",
2267 i
+1, rval_to_str_const(oct
, feat_id_type_rvals
, "Reserved"), oct
);
2269 subtree
= proto_item_add_subtree(item
, ett_rev_feat
);
2272 proto_tree_add_item(subtree
, hf_ansi_683_feature_protocol_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2276 add_len
= tvb_get_uint8(tvb
, offset
);
2278 proto_tree_add_uint(tree
, hf_ansi_683_length
,
2279 tvb
, offset
, 1, add_len
);
2282 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), add_len
);
2286 subtree
= proto_tree_add_subtree(tree
,
2287 tvb
, offset
, 1, ett_band_cap
, NULL
,
2288 "Band/Mode Capability Information");
2290 proto_tree_add_item(subtree
, hf_ansi_683_band_class_0_analog
, tvb
, offset
, 1, ENC_NA
);
2291 proto_tree_add_item(subtree
, hf_ansi_683_band_class_0_cdma
, tvb
, offset
, 1, ENC_NA
);
2292 proto_tree_add_item(subtree
, hf_ansi_683_band_class_1_cdma
, tvb
, offset
, 1, ENC_NA
);
2293 proto_tree_add_item(subtree
, hf_ansi_683_band_class_3_cdma
, tvb
, offset
, 1, ENC_NA
);
2294 proto_tree_add_item(subtree
, hf_ansi_683_band_class_6_cdma
, tvb
, offset
, 1, ENC_NA
);
2295 proto_tree_add_bits_item(subtree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 3, ENC_NA
);
2300 proto_tree_add_item(tree
, hf_ansi_683_more_additional_fields
, tvb
, offset
, add_len
- 1, ENC_NA
);
2301 offset
+= (add_len
- 1);
2305 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2312 msg_sspr_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2315 uint32_t saved_offset
;
2317 SHORT_DATA_CHECK(len
, 3);
2319 saved_offset
= offset
;
2321 proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_sspr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2324 proto_tree_add_item(tree
, hf_ansi_683_sspr_configuration_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2327 block_len
= tvb_get_uint8(tvb
, offset
);
2329 proto_tree_add_uint(tree
, hf_ansi_683_length
,
2330 tvb
, offset
, 1, block_len
);
2333 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), block_len
);
2337 proto_tree_add_item(tree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2338 offset
+= block_len
;
2341 if (len
> (offset
- saved_offset
))
2344 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2347 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2354 msg_sspr_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2358 EXACT_DATA_CHECK(len
, 5);
2360 block_id
= tvb_get_uint8(tvb
, offset
);
2362 proto_tree_add_item(tree
, hf_ansi_683_for_param_block_sspr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2365 proto_tree_add_item(tree
, hf_ansi_683_sspr_download_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2370 case FOR_BLOCK_SSPR_PRL
:
2371 case FOR_BLOCK_SSPR_EXT_PRL
:
2372 proto_tree_add_item(tree
, hf_ansi_683_segment_offset
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2375 proto_tree_add_item(tree
, hf_ansi_683_maximum_segment_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2385 msg_validate_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2388 uint32_t i
, saved_offset
;
2389 proto_tree
*subtree
;
2391 SHORT_DATA_CHECK(len
, 1);
2393 saved_offset
= offset
;
2395 num_blocks
= tvb_get_uint8(tvb
, offset
);
2397 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2401 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
2403 for (i
=0; i
< num_blocks
; i
++)
2405 subtree
= proto_tree_add_subtree_format(tree
,
2406 tvb
, offset
, 2, ett_for_val_block
, NULL
,
2407 "Block ID #%u", i
+1);
2409 proto_tree_add_item(subtree
, hf_ansi_683_param_block_val
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2412 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2416 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2423 msg_otapa_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2426 uint32_t saved_offset
;
2428 SHORT_DATA_CHECK(len
, 2);
2430 saved_offset
= offset
;
2432 oct
= tvb_get_uint8(tvb
, offset
);
2434 proto_tree_add_uint_format(tree
, hf_ansi_683_result_code
,
2435 tvb
, offset
, 1, oct
, "OTAPA result code: %s (%u)",
2436 rval_to_str_const(oct
, result_codes_rvals
, "Reserved"), oct
);
2440 oct
= tvb_get_uint8(tvb
, offset
);
2442 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, (offset
<<3)+1, 7, ENC_NA
);
2444 proto_tree_add_item(tree
, hf_ansi_683_nam_lock_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2449 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), 4);
2451 proto_tree_add_item(tree
, hf_ansi_683_spasm_random_challenge
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2455 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2462 msg_puzl_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2465 uint32_t saved_offset
;
2467 SHORT_DATA_CHECK(len
, 3);
2469 saved_offset
= offset
;
2471 proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_puzl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2474 proto_tree_add_item(tree
, hf_ansi_683_puzl_configuration_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2477 block_len
= tvb_get_uint8(tvb
, offset
);
2479 proto_tree_add_uint(tree
, hf_ansi_683_length
,
2480 tvb
, offset
, 1, block_len
);
2483 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), block_len
);
2487 proto_tree_add_item(tree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2488 offset
+= block_len
;
2491 if (len
> (offset
- saved_offset
))
2494 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2497 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2504 msg_puzl_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2506 uint8_t oct
, num_blocks
;
2507 uint32_t i
, saved_offset
, block_offset
;
2509 proto_tree
*subtree
;
2511 SHORT_DATA_CHECK(len
, 1);
2513 saved_offset
= offset
;
2515 num_blocks
= tvb_get_uint8(tvb
, offset
);
2517 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2521 /* minimum required length */
2522 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 3));
2524 for (i
=0; i
< num_blocks
; i
++)
2526 block_offset
= offset
;
2528 subtree
= proto_tree_add_subtree_format(tree
,
2529 tvb
, offset
, 1, ett_for_puzl_block
, &item
,
2532 proto_tree_add_item(subtree
, hf_ansi_683_for_param_block_puzl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2535 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2538 oct
= tvb_get_uint8(tvb
, offset
);
2542 SHORT_DATA_CHECK(len
, 4);
2544 proto_tree_add_item(tree
, hf_ansi_683_identifiers_present16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2545 proto_tree_add_item(tree
, hf_ansi_683_user_zone_id
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2548 proto_tree_add_item(tree
, hf_ansi_683_user_zone_sid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2553 proto_tree_add_item(tree
, hf_ansi_683_identifiers_present8
, tvb
, offset
, 1, ENC_NA
);
2554 proto_tree_add_bits_item(tree
, hf_ansi_683_reserved8
, tvb
, offset
<<3, 7, ENC_NA
);
2558 proto_item_set_len(item
, offset
- block_offset
);
2561 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2568 msg_3gpd_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2570 uint8_t block_id
, num_blocks
, block_len
;
2571 uint32_t i
, saved_offset
;
2573 proto_tree
*subtree
;
2575 SHORT_DATA_CHECK(len
, 1);
2577 saved_offset
= offset
;
2579 num_blocks
= tvb_get_uint8(tvb
, offset
);
2581 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2585 /* minimum required length */
2586 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 3));
2588 for (i
=0; i
< num_blocks
; i
++)
2590 block_id
= tvb_get_uint8(tvb
, offset
);
2592 subtree
= proto_tree_add_subtree_format(tree
,
2593 tvb
, offset
, 1, ett_rev_3gpd_block
, &item
,
2596 proto_tree_add_uint(subtree
, hf_ansi_683_rev_param_block_3gpd
,
2597 tvb
, offset
, 1, block_id
);
2600 block_len
= tvb_get_uint8(tvb
, offset
);
2602 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
2603 tvb
, offset
, 1, block_len
);
2606 if (block_len
> (len
- (offset
- saved_offset
)))
2608 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
2611 proto_item_set_len(item
, block_len
+1);
2617 case REV_BLOCK_3GPD_OP_CAP
:
2618 case REV_BLOCK_3GPD_OP_MODE
:
2619 case REV_BLOCK_3GPD_SIP_CAP
:
2620 case REV_BLOCK_3GPD_MIP_CAP
:
2621 case REV_BLOCK_3GPD_SIP_USER_PRO
:
2622 case REV_BLOCK_3GPD_MIP_USER_PRO
:
2623 case REV_BLOCK_3GPD_SIP_STATUS
:
2624 case REV_BLOCK_3GPD_MIP_STATUS
:
2625 case REV_BLOCK_3GPD_SIP_PAP_SS
:
2626 case REV_BLOCK_3GPD_SIP_CHAP_SS
:
2627 case REV_BLOCK_3GPD_MIP_SS
:
2628 case REV_BLOCK_3GPD_HRPD_ACC_AUTH_CAP
:
2629 case REV_BLOCK_3GPD_HRPD_ACC_AUTH_USER
:
2630 case REV_BLOCK_3GPD_HRPD_ACC_AUTH_CHAP_SS
:
2632 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2636 offset
+= block_len
;
2639 SHORT_DATA_CHECK(len
, 1);
2641 proto_tree_add_item(tree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2645 if (len
> (offset
- saved_offset
))
2648 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2651 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2658 msg_3gpd_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2661 uint32_t i
, saved_offset
;
2662 proto_tree
*subtree
;
2664 SHORT_DATA_CHECK(len
, 1);
2666 saved_offset
= offset
;
2668 num_blocks
= tvb_get_uint8(tvb
, offset
);
2670 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2674 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
2676 for (i
=0; i
< num_blocks
; i
++)
2678 subtree
= proto_tree_add_subtree_format(tree
,
2679 tvb
, offset
, 2, ett_for_3gpd_block
, NULL
,
2681 proto_tree_add_item(subtree
, hf_ansi_683_for_param_block_3gpd
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2684 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2688 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2695 msg_secure_mode_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2697 EXACT_DATA_CHECK(len
, 1);
2699 proto_tree_add_item(tree
, hf_ansi_683_secure_mode_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2706 msg_ext_protocap_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2708 uint8_t oct
, block_id
, num_recs
, block_len
;
2709 uint32_t i
, saved_offset
;
2710 proto_tree
*subtree
;
2711 proto_item
*item
, *len_item
;
2713 SHORT_DATA_CHECK(len
, 6);
2715 saved_offset
= offset
;
2717 proto_tree_add_item(tree
, hf_ansi_683_otasp_mobile_protocol_revision
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2720 proto_tree_add_item(tree
, hf_ansi_683_mobile_station_fw_rev
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2723 proto_tree_add_item(tree
, hf_ansi_683_mobile_station_manuf_model_number
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2726 num_recs
= tvb_get_uint8(tvb
, offset
);
2727 proto_tree_add_item(tree
, hf_ansi_683_num_features
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2730 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_recs
* 2));
2732 for (i
=0; i
< num_recs
; i
++)
2734 oct
= tvb_get_uint8(tvb
, offset
);
2736 item
= proto_tree_add_uint_format(tree
, hf_ansi_683_feature_id
,
2737 tvb
, offset
, 1, oct
,
2738 "Feature ID #%u: %s (%u)",
2739 i
+1, rval_to_str_const(oct
, feat_id_type_rvals
, "Reserved"), oct
);
2741 subtree
= proto_item_add_subtree(item
, ett_rev_feat
);
2744 proto_tree_add_item(subtree
, hf_ansi_683_feature_protocol_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2748 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), 1);
2750 num_recs
= tvb_get_uint8(tvb
, offset
);
2752 proto_tree_add_item(tree
, hf_ansi_683_number_of_capability_records
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2755 /* minimum required length */
2756 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_recs
* 2));
2758 for (i
=0; i
< num_recs
; i
++)
2760 block_id
= tvb_get_uint8(tvb
, offset
);
2762 subtree
= proto_tree_add_subtree_format(tree
,
2763 tvb
, offset
, 1, ett_rev_cap
, &item
,
2764 "Block ID #%u", i
+1);
2765 proto_tree_add_item(subtree
, hf_ansi_683_cap_info_record_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2768 block_len
= tvb_get_uint8(tvb
, offset
);
2770 len_item
= proto_tree_add_uint(subtree
, hf_ansi_683_length
,
2771 tvb
, offset
, 1, block_len
);
2774 if (block_len
> (len
- (offset
- saved_offset
)))
2776 expert_add_info(pinfo
, len_item
, &ei_ansi_683_short_data
);
2779 proto_item_set_len(item
, block_len
+1);
2786 case REV_TYPE_CAP_INFO_OP_MODE
:
2787 case REV_TYPE_CAP_INFO_CDMA_BAND
:
2788 case REV_TYPE_CAP_INFO_MEID
:
2789 case REV_TYPE_CAP_INFO_ICCID
:
2790 case REV_TYPE_CAP_INFO_EXT_UIM_ID
:
2791 rev_param_block_mmd_app(tvb
, subtree
, block_len
, offset
);
2796 proto_tree_add_item(subtree
, hf_ansi_683_capability_data
, tvb
, offset
, block_len
, ENC_NA
);
2800 offset
+= block_len
;
2804 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2811 msg_mmd_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2813 uint8_t block_id
, num_blocks
, block_len
;
2814 uint32_t i
, saved_offset
;
2816 proto_tree
*subtree
;
2818 SHORT_DATA_CHECK(len
, 1);
2820 saved_offset
= offset
;
2822 num_blocks
= tvb_get_uint8(tvb
, offset
);
2824 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2828 /* minimum required length */
2829 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 3));
2831 for (i
=0; i
< num_blocks
; i
++)
2833 block_id
= tvb_get_uint8(tvb
, offset
);
2835 subtree
= proto_tree_add_subtree_format(tree
,
2836 tvb
, offset
, 1, ett_rev_mmd_block
, &item
,
2839 proto_tree_add_uint(subtree
, hf_ansi_683_rev_param_block_mmd
,
2840 tvb
, offset
, 1, block_id
);
2843 block_len
= tvb_get_uint8(tvb
, offset
);
2845 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
2846 tvb
, offset
, 1, block_len
);
2849 if (block_len
> (len
- (offset
- saved_offset
)))
2851 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
2855 proto_item_set_len(item
, block_len
+1);
2862 case REV_BLOCK_MMD_APP
:
2863 rev_param_block_mmd_app(tvb
, subtree
, block_len
, offset
);
2868 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2872 offset
+= block_len
;
2875 SHORT_DATA_CHECK(len
, 1);
2877 proto_tree_add_item(tree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2881 if (len
> (offset
- saved_offset
))
2884 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
2887 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2894 msg_mmd_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2897 uint32_t i
, saved_offset
;
2898 proto_tree
*subtree
;
2900 SHORT_DATA_CHECK(len
, 1);
2902 saved_offset
= offset
;
2904 num_blocks
= tvb_get_uint8(tvb
, offset
);
2906 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2909 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
2911 for (i
=0; i
< num_blocks
; i
++)
2913 subtree
= proto_tree_add_subtree_format(tree
,
2914 tvb
, offset
, 2, ett_for_mmd_block
, NULL
,
2917 proto_tree_add_item(subtree
, hf_ansi_683_for_param_block_mmd
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2920 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2924 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2931 msg_systag_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2934 uint32_t saved_offset
;
2936 SHORT_DATA_CHECK(len
, 3);
2938 saved_offset
= offset
;
2940 proto_tree_add_item(tree
, hf_ansi_683_rev_param_block_systag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2943 proto_tree_add_item(tree
, hf_ansi_683_system_tag_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2946 block_len
= tvb_get_uint8(tvb
, offset
);
2948 proto_tree_add_uint(tree
, hf_ansi_683_length
,
2949 tvb
, offset
, 1, block_len
);
2952 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), block_len
);
2956 proto_tree_add_item(tree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
2957 offset
+= block_len
;
2960 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
2967 msg_systag_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
2970 uint32_t saved_offset
;
2972 SHORT_DATA_CHECK(len
, 2);
2974 saved_offset
= offset
;
2976 block_id
= tvb_get_uint8(tvb
, offset
);
2977 proto_tree_add_item(tree
, hf_ansi_683_for_param_block_systag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2980 proto_tree_add_item(tree
, hf_ansi_683_system_tag_download_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2985 case 0x01: /* Group Tag List Parameter */
2986 case 0x02: /* Specific Tag List Parameter */
2987 case 0x03: /* Call Prompt List Parameter */
2988 SHORT_DATA_CHECK(len
, 3);
2990 proto_tree_add_item(tree
, hf_ansi_683_segment_offset
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2993 proto_tree_add_item(tree
, hf_ansi_683_segment_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3001 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
3008 msg_srvckey_gen_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
3010 EXACT_DATA_CHECK(len
, 1);
3012 proto_tree_add_item(tree
, hf_ansi_683_service_key_generation_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3019 msg_mms_config_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
3021 uint8_t block_id
, num_blocks
, block_len
;
3022 uint32_t i
, saved_offset
;
3024 proto_tree
*subtree
;
3026 SHORT_DATA_CHECK(len
, 1);
3028 saved_offset
= offset
;
3030 num_blocks
= tvb_get_uint8(tvb
, offset
);
3032 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3036 /* minimum required length */
3037 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 3));
3039 for (i
=0; i
< num_blocks
; i
++)
3041 block_id
= tvb_get_uint8(tvb
, offset
);
3043 subtree
= proto_tree_add_subtree_format(tree
,
3044 tvb
, offset
, 1, ett_rev_mms_block
, &item
,
3047 proto_tree_add_item(subtree
, hf_ansi_683_rev_param_block_mms
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3050 block_len
= tvb_get_uint8(tvb
, offset
);
3052 proto_tree_add_uint(subtree
, hf_ansi_683_length
,
3053 tvb
, offset
, 1, block_len
);
3056 if (block_len
> (len
- (offset
- saved_offset
)))
3058 proto_tree_add_expert(subtree
, pinfo
, &ei_ansi_683_short_data
, tvb
, offset
, len
- (offset
- saved_offset
));
3061 proto_item_set_len(item
, block_len
+1);
3068 case REV_BLOCK_MMS_URI
:
3069 rev_param_block_mms_uri(tvb
, subtree
, block_len
, offset
);
3072 case REV_BLOCK_MMS_URI_CAP
:
3073 rev_param_block_mms_uri_cap(tvb
, subtree
, block_len
, offset
);
3078 proto_tree_add_item(subtree
, hf_ansi_683_block_data
, tvb
, offset
, block_len
, ENC_NA
);
3082 offset
+= block_len
;
3085 SHORT_DATA_CHECK(len
, 1);
3087 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3091 if (len
> (offset
- saved_offset
))
3094 fresh_handler(tvb
, tree
, len
- (offset
- saved_offset
), offset
);
3097 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
3104 msg_mms_download_rsp(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
3107 uint32_t i
, saved_offset
;
3108 proto_tree
*subtree
;
3110 SHORT_DATA_CHECK(len
, 1);
3112 saved_offset
= offset
;
3114 num_blocks
= tvb_get_uint8(tvb
, offset
);
3116 proto_tree_add_item(tree
, hf_ansi_683_number_of_parameter_blocks
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3120 SHORT_DATA_CHECK((len
- (offset
- saved_offset
)), (uint32_t)(num_blocks
* 2));
3122 for (i
=0; i
< num_blocks
; i
++)
3124 subtree
= proto_tree_add_subtree_format(tree
,
3125 tvb
, offset
, 1, ett_for_mms_block
, NULL
,
3128 proto_tree_add_item(subtree
, hf_ansi_683_for_param_block_mms
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3131 proto_tree_add_item(subtree
, hf_ansi_683_result_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3135 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
3138 static const value_string for_msg_type_strings
[] = {
3139 { 0, "Configuration Request" },
3140 { 1, "Download Request" },
3141 { 2, "MS Key Request" },
3142 { 3, "Key Generation Request" },
3143 { 4, "Re-Authenticate Request" },
3144 { 5, "Commit Request" },
3145 { 6, "Protocol Capability Request" },
3146 { 7, "SSPR Configuration Request" },
3147 { 8, "SSPR Download Request" },
3148 { 9, "Validation Request" },
3149 { 10, "OTAPA Request" },
3150 { 11, "PUZL Configuration Request" },
3151 { 12, "PUZL Download Request" },
3152 { 13, "3GPD Configuration Request" },
3153 { 14, "3GPD Download Request" },
3154 { 15, "Secure Mode Request" },
3156 { 17, "MMD Configuration Request" },
3157 { 18, "MMD Download Request" },
3158 { 19, "System Tag Configuration Request" },
3159 { 20, "System Tag Download Request" },
3160 { 21, "Service Key Generation Request" },
3161 { 22, "MMS Configuration Request" },
3162 { 23, "MMS Download Request" },
3165 #define NUM_FOR_MSGS array_length(for_msg_type_strings)
3166 static void (*ansi_683_for_msg_fcn
[])(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
3167 msg_config_req
, /* Configuration Request */
3168 msg_download_req
, /* Download Request */
3169 msg_ms_key_req
, /* MS Key Request */
3170 msg_key_gen_req
, /* Key Generation Request */
3171 msg_reauth_req
, /* Re-Authenticate Request */
3172 NULL
/* No data */, /* Commit Request */
3173 msg_protocap_req
, /* Protocol Capability Request */
3174 msg_sspr_config_req
, /* SSPR Configuration Request */
3175 msg_sspr_download_req
, /* SSPR Download Request */
3176 msg_validate_req
, /* Validation Request */
3177 msg_otapa_req
, /* OTAPA Request */
3178 msg_puzl_config_req
, /* PUZL Configuration Request */
3179 msg_puzl_download_req
, /* PUZL Download Request */
3180 msg_3gpd_config_req
, /* 3GPD Configuration Request */
3181 msg_3gpd_download_req
, /* 3GPD Download Request */
3182 msg_secure_mode_req
, /* Secure Mode Request */
3183 NULL
, /* Reserved */
3184 msg_mmd_config_req
, /* MMD Configuration Request */
3185 msg_mmd_download_req
, /* MMD Download Request */
3186 msg_systag_config_req
, /* System Tag Configuration Request */
3187 msg_systag_download_req
, /* System Tag Download Request */
3188 msg_srvckey_gen_req
, /* Service Key Generation Request */
3189 msg_mms_config_req
, /* MMS Configuration Request */
3190 msg_mms_download_req
, /* MMS Download Request */
3194 static const value_string rev_msg_type_strings
[] = {
3195 { 0, "Configuration Response" },
3196 { 1, "Download Response" },
3197 { 2, "MS Key Response" },
3198 { 3, "Key Generation Response" },
3199 { 4, "Re-Authenticate Response" },
3200 { 5, "Commit Response" },
3201 { 6, "Protocol Capability Response" },
3202 { 7, "SSPR Configuration Response" },
3203 { 8, "SSPR Download Response" },
3204 { 9, "Validation Response" },
3205 { 10, "OTAPA Response" },
3206 { 11, "PUZL Configuration Response" },
3207 { 12, "PUZL Download Response" },
3208 { 13, "3GPD Configuration Response" },
3209 { 14, "3GPD Download Response" },
3210 { 15, "Secure Mode Response" },
3211 { 16, "Extended Protocol Capability Response" },
3212 { 17, "MMD Configuration Response" },
3213 { 18, "MMD Download Response" },
3214 { 19, "System Tag Configuration Response" },
3215 { 20, "System Tag Download Response" },
3216 { 21, "Service Key Generation Response" },
3217 { 22, "MMS Configuration Response" },
3218 { 23, "MMS Download Response" },
3221 #define NUM_REV_MSGS array_length(rev_msg_type_strings)
3222 static void (*ansi_683_rev_msg_fcn
[])(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
3223 msg_config_rsp
, /* Configuration Response */
3224 msg_download_rsp
, /* Download Response */
3225 msg_ms_key_rsp
, /* MS Key Response */
3226 msg_key_gen_rsp
, /* Key Generation Response */
3227 msg_reauth_rsp
, /* Re-Authenticate Response */
3228 msg_commit_rsp
, /* Commit Response */
3229 msg_protocap_rsp
, /* Protocol Capability Response */
3230 msg_sspr_config_rsp
, /* SSPR Configuration Response */
3231 msg_sspr_download_rsp
, /* SSPR Download Response */
3232 msg_validate_rsp
, /* Validation Response */
3233 msg_otapa_rsp
, /* OTAPA Response */
3234 msg_puzl_config_rsp
, /* PUZL Configuration Response */
3235 msg_puzl_download_rsp
, /* PUZL Download Response */
3236 msg_3gpd_config_rsp
, /* 3GPD Configuration Response */
3237 msg_3gpd_download_rsp
, /* 3GPD Download Response */
3238 msg_secure_mode_rsp
, /* Secure Mode Response */
3239 msg_ext_protocap_rsp
, /* Extended Protocol Capability Response */
3240 msg_mmd_config_rsp
, /* MMD Configuration Response */
3241 msg_mmd_download_rsp
, /* MMD Download Response */
3242 msg_systag_config_rsp
, /* System Tag Configuration Response */
3243 msg_systag_download_rsp
, /* System Tag Download Response */
3244 msg_srvckey_gen_rsp
, /* Service Key Generation Response */
3245 msg_mms_config_rsp
, /* MMS Configuration Response */
3246 msg_mms_download_rsp
, /* MMS Download Response */
3252 dissect_ansi_683_for_message(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*ansi_683_tree
)
3256 const char *str
= NULL
;
3259 msg_type
= tvb_get_uint8(tvb
, 0);
3261 str
= try_val_to_str_idx(msg_type
, for_msg_type_strings
, &idx
);
3269 * No Information column data
3272 proto_tree_add_uint(ansi_683_tree
, hf_ansi_683_for_msg_type
,
3273 tvb
, 0, 1, msg_type
);
3275 if (ansi_683_for_msg_fcn
[idx
] != NULL
)
3277 (*ansi_683_for_msg_fcn
[idx
])(tvb
, pinfo
, ansi_683_tree
, tvb_reported_length(tvb
) - 1, 1);
3282 dissect_ansi_683_rev_message(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ansi_683_tree
)
3286 const char *str
= NULL
;
3289 msg_type
= tvb_get_uint8(tvb
, 0);
3291 str
= try_val_to_str_idx(msg_type
, rev_msg_type_strings
, &idx
);
3299 * No Information column data
3302 proto_tree_add_uint(ansi_683_tree
, hf_ansi_683_rev_msg_type
,
3303 tvb
, 0, 1, msg_type
);
3305 (*ansi_683_rev_msg_fcn
[idx
])(tvb
, pinfo
, ansi_683_tree
, tvb_reported_length(tvb
) - 1, 1);
3309 dissect_ansi_683(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
3311 proto_item
*ansi_683_item
;
3312 proto_tree
*ansi_683_tree
;
3314 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "IS-683");
3317 * create the ansi_683 protocol tree
3320 proto_tree_add_protocol_format(tree
, proto_ansi_683
, tvb
, 0, -1,
3323 (pinfo
->match_uint
== ANSI_683_FORWARD
) ? "Forward" : "Reverse");
3326 proto_item_add_subtree(ansi_683_item
, ett_ansi_683
);
3328 if (pinfo
->match_uint
== ANSI_683_FORWARD
)
3330 dissect_ansi_683_for_message(tvb
, pinfo
, ansi_683_tree
);
3334 dissect_ansi_683_rev_message(tvb
, pinfo
, ansi_683_tree
);
3336 return tvb_captured_length(tvb
);
3340 /* Register the protocol with Wireshark */
3342 proto_register_ansi_683(void)
3345 /* Setup list of header fields */
3346 static hf_register_info hf
[] =
3348 { &hf_ansi_683_for_msg_type
,
3349 { "Forward Link Message Type",
3350 "ansi_683.for_msg_type",
3351 FT_UINT8
, BASE_DEC
, VALS(for_msg_type_strings
), 0,
3353 { &hf_ansi_683_rev_msg_type
,
3354 { "Reverse Link Message Type",
3355 "ansi_683.rev_msg_type",
3356 FT_UINT8
, BASE_DEC
, VALS(rev_msg_type_strings
), 0,
3358 { &hf_ansi_683_length
,
3359 { "Length", "ansi_683.len",
3360 FT_UINT8
, BASE_DEC
, NULL
, 0,
3363 { &hf_ansi_683_reserved8
,
3364 { "Reserved", "ansi_683.reserved8",
3365 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
3368 { &hf_ansi_683_reserved16_f
,
3369 { "Reserved", "ansi_683.reserved16_f",
3370 FT_UINT16
, BASE_HEX
, NULL
, 0x000f,
3373 { &hf_ansi_683_reserved24_f
,
3374 { "Reserved", "ansi_683.reserved24_f",
3375 FT_UINT24
, BASE_HEX
, NULL
, 0x00000f,
3378 { &hf_ansi_683_reserved_bytes
,
3379 { "Reserved", "ansi_683.reserved_bytes",
3380 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
3384 /* Generated from convert_proto_tree_add_text.pl */
3385 { &hf_ansi_683_fresh_incl16
, { "FRESH_INCL", "ansi_683.fresh_incl", FT_BOOLEAN
, 16, NULL
, 0x8000, NULL
, HFILL
}},
3386 { &hf_ansi_683_fresh
, { "FRESH", "ansi_683.fresh", FT_UINT16
, BASE_DEC
, NULL
, 0x7fff, NULL
, HFILL
}},
3387 { &hf_ansi_683_fresh_incl8
, { "FRESH_INCL", "ansi_683.fresh_incl", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
3388 { &hf_ansi_683_firstchp
, { "First paging channel (FIRSTCHP) used in the home system", "ansi_683.firstchp", FT_UINT16
, BASE_DEC
, NULL
, 0xffe0, NULL
, HFILL
}},
3389 { &hf_ansi_683_home_sid
, { "Home system identification (HOME_SID)", "ansi_683.home_sid", FT_UINT24
, BASE_DEC
, NULL
, 0x1fffc0, NULL
, HFILL
}},
3390 { &hf_ansi_683_extended_address_indicator
, { "Extended address indicator (EX)", "ansi_683.extended_address_indicator", FT_UINT8
, BASE_DEC
, NULL
, 0x20, NULL
, HFILL
}},
3391 { &hf_ansi_683_station_class_mark
, { "Station class mark (SCM)", "ansi_683.station_class_mark", FT_UINT16
, BASE_DEC
, NULL
, 0x1fe0, NULL
, HFILL
}},
3392 { &hf_ansi_683_extended_scm_indicator
, { "Extended SCM Indicator", "ansi_683.extended_scm_indicator", FT_BOOLEAN
, 16, TFS(&tfs_extended_scm_indicator
), 0x1000, NULL
, HFILL
}},
3393 { &hf_ansi_683_cdma_analog_mode
, { "Mode", "ansi_683.cdma_analog_mode", FT_BOOLEAN
, 16, TFS(&tfs_cdma_analog_mode
), 0x0800, NULL
, HFILL
}},
3394 { &hf_ansi_683_cdma_analog_slotted
, { "Slotted", "ansi_683.cdma_analog_slotted", FT_BOOLEAN
, 16, TFS(&tfs_yes_no
), 0x0400, NULL
, HFILL
}},
3395 { &hf_ansi_683_meid
, { "MEID", "ansi_683.meid", FT_BOOLEAN
, 16, TFS(&tfs_configured_not_configured
), 0x0200, NULL
, HFILL
}},
3396 { &hf_ansi_683_25mhz_bandwidth
, { "25 MHz Bandwidth", "ansi_683.25mhz_bandwidth", FT_BOOLEAN
, 16, NULL
, 0x0100, NULL
, HFILL
}},
3397 { &hf_ansi_683_transmission
, { "Transmission", "ansi_683.transmission", FT_BOOLEAN
, 16, TFS(&tfs_discontinuous_continous
), 0x0080, NULL
, HFILL
}},
3398 { &hf_ansi_683_power_class
, { "Power Class for Band Class 0 Analog Operation", "ansi_683.power_class", FT_UINT16
, BASE_DEC
, VALS(power_class_vals
), 0x0060, NULL
, HFILL
}},
3399 { &hf_ansi_683_mob_p_rev_1fe0
, { "Mobile station protocol revision number (MOB_P_REV)", "ansi_683.mob_p_rev", FT_UINT16
, BASE_DEC
, NULL
, 0x1fe0, NULL
, HFILL
}},
3400 { &hf_ansi_683_imsi_m_class10
, { "IMSI_M Class assignment of the mobile station (IMSI_M_CLASS)", "ansi_683.imsi_m_class", FT_UINT16
, BASE_DEC
, NULL
, 0x10, NULL
, HFILL
}},
3401 { &hf_ansi_683_ismi_m_addr_num_e
, { "Number of IMSI_M address digits (IMSI_M_ADDR_NUM)", "ansi_683.ismi_m_addr_num", FT_UINT16
, BASE_DEC
, NULL
, 0x0e, NULL
, HFILL
}},
3402 { &hf_ansi_683_mcc_m_01ff80
, { "Mobile country code (MCC_M)", "ansi_683.mcc_m", FT_UINT24
, BASE_DEC
, NULL
, 0x01ff80, NULL
, HFILL
}},
3403 { &hf_ansi_683_imsi_m_11_12_7f
, { "11th and 12th digits of the IMSI_M (IMSI__M_11_12)", "ansi_683.imsi_m_11_12", FT_UINT24
, BASE_HEX
, NULL
, 0x00007f, NULL
, HFILL
}},
3404 { &hf_ansi_683_imsi_m_10
, { "The least significant 10 digits of the IMSI_M (IMSI_M_S) (34 bits)", "ansi_683.imsi_m_10", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3405 { &hf_ansi_683_accolc_3c
, { "Access overload class (ACCOLC)", "ansi_683.accolc", FT_UINT8
, BASE_DEC
, NULL
, 0x3c, NULL
, HFILL
}},
3406 { &hf_ansi_683_local_control_status_02
, { "Local control status (LOCAL_CONTROL)", "ansi_683.local_control_status", FT_UINT8
, BASE_DEC
, NULL
, 0x02, NULL
, HFILL
}},
3407 { &hf_ansi_683_mob_term_home_01
, { "Termination indicator for the home system (MOB_TERM_HOME)", "ansi_683.mob_term_home", FT_UINT8
, BASE_DEC
, NULL
, 0x1, NULL
, HFILL
}},
3408 { &hf_ansi_683_mob_term_for_sid_80
, { "Termination indicator for SID roaming (MOB_TERM_FOR_SID)", "ansi_683.mob_term_for_sid", FT_UINT8
, BASE_DEC
, NULL
, 0x80, NULL
, HFILL
}},
3409 { &hf_ansi_683_mob_term_for_nid_40
, { "Termination indicator for NID roaming (MOB_TERM_FOR_NID)", "ansi_683.mob_term_for_nid", FT_UINT8
, BASE_DEC
, NULL
, 0x40, NULL
, HFILL
}},
3410 { &hf_ansi_683_max_sid_nid_3fc0
, { "Maximum stored SID/NID pairs (MAX_SID_NID)", "ansi_683.max_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x3fc0, NULL
, HFILL
}},
3411 { &hf_ansi_683_stored_sid_nid_3fc0
, { "Number of stored SID/NID pairs (STORED_SID_NID)", "ansi_683.stored_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x3fc0, NULL
, HFILL
}},
3412 { &hf_ansi_683_sid_nid_pairs_3fff
, { "SID/NID pairs", "ansi_683.sid_nid_pairs", FT_UINT16
, BASE_DEC
, NULL
, 0x3fff, NULL
, HFILL
}},
3413 { &hf_ansi_683_n_digits
, { "Number of digits (N_DIGITS)", "ansi_683.n_digits", FT_UINT8
, BASE_DEC
, NULL
, 0xf0, NULL
, HFILL
}},
3414 { &hf_ansi_683_slotted_mode
, { "Slotted Mode", "ansi_683.slotted_mode", FT_UINT8
, BASE_DEC
, NULL
, 0x20, NULL
, HFILL
}},
3415 { &hf_ansi_683_mob_p_rev_ff
, { "Mobile station protocol revision number (MOB_P_REV)", "ansi_683.mob_p_rev", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3416 { &hf_ansi_683_imsi_m_class8000
, { "IMSI_M Class assignment of the mobile station (IMSI_M_CLASS)", "ansi_683.imsi_m_class", FT_UINT16
, BASE_DEC
, NULL
, 0x8000, NULL
, HFILL
}},
3417 { &hf_ansi_683_imsi_m_addr_num_7000
, { "Number of IMSI_M address digits (IMSI_M_ADDR_NUM)", "ansi_683.imsi_m_addr_num", FT_UINT16
, BASE_DEC
, NULL
, 0x7000, NULL
, HFILL
}},
3418 { &hf_ansi_683_mcc_m_0ffc
, { "Mobile country code (MCC_M)", "ansi_683.mcc_m", FT_UINT16
, BASE_DEC
, NULL
, 0x0ffc, NULL
, HFILL
}},
3419 { &hf_ansi_683_imsi_m_11_12_3f80
, { "11th and 12th digits of the IMSI_M (IMSI__M_11_12)", "ansi_683.imsi_m_11_12", FT_UINT16
, BASE_DEC
, NULL
, 0x3f80, NULL
, HFILL
}},
3420 { &hf_ansi_683_accolc_01e0
, { "Access overload class (ACCOLC)", "ansi_683.accolc", FT_UINT16
, BASE_DEC
, NULL
, 0x01e0, NULL
, HFILL
}},
3421 { &hf_ansi_683_local_control_status_0010
, { "Local control status (LOCAL_CONTROL)", "ansi_683.local_control_status", FT_UINT16
, BASE_DEC
, NULL
, 0x0010, NULL
, HFILL
}},
3422 { &hf_ansi_683_mob_term_home_08
, { "Termination indicator for the home system (MOB_TERM_HOME)", "ansi_683.mob_term_home", FT_UINT16
, BASE_DEC
, NULL
, 0x0008, NULL
, HFILL
}},
3423 { &hf_ansi_683_mob_term_for_sid_0004
, { "Termination indicator for SID roaming (MOB_TERM_FOR_SID)", "ansi_683.mob_term_for_sid", FT_UINT16
, BASE_DEC
, NULL
, 0x0004, NULL
, HFILL
}},
3424 { &hf_ansi_683_mob_term_for_nid_0002
, { "Termination indicator for NID roaming (MOB_TERM_FOR_NID)", "ansi_683.mob_term_for_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x0002, NULL
, HFILL
}},
3425 { &hf_ansi_683_max_sid_nid_01fe
, { "Maximum stored SID/NID pairs (MAX_SID_NID)", "ansi_683.max_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x01fe, NULL
, HFILL
}},
3426 { &hf_ansi_683_stored_sid_nid_01fe
, { "Number of stored SID/NID pairs (STORED_SID_NID)", "ansi_683.stored_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x01fe, NULL
, HFILL
}},
3427 { &hf_ansi_683_sid_nid_pairs_01ff
, { "SID/NID pairs", "ansi_683.sid_nid_pairs", FT_UINT16
, BASE_DEC
, NULL
, 0x01ff, NULL
, HFILL
}},
3428 { &hf_ansi_683_imsi_t_class
, { "IMSI_T Class assignment of the mobile station (IMSI_T_CLASS)", "ansi_683.imsi_t_class", FT_UINT8
, BASE_DEC
, NULL
, 0x80, NULL
, HFILL
}},
3429 { &hf_ansi_683_imsi_t_addr_num
, { "Number of IMSI_T address digits (IMSI_T_ADDR_NUM )", "ansi_683.imsi_t_addr_num", FT_UINT8
, BASE_DEC
, NULL
, 0x70, NULL
, HFILL
}},
3430 { &hf_ansi_683_mcc_t
, { "Mobile country code (MCC_T)", "ansi_683.mcc_t", FT_UINT16
, BASE_DEC
, NULL
, 0x0ffc, NULL
, HFILL
}},
3431 { &hf_ansi_683_imsi_t_11_12
, { "11th and 12th digits of the IMSI_T (IMSI__T_11_12)", "ansi_683.imsi_t_11_12", FT_UINT16
, BASE_DEC
, NULL
, 0x03f8, NULL
, HFILL
}},
3432 { &hf_ansi_683_imsi_t_10
, { "The least significant 10 digits of the IMSI_T (IMSI_T_S) (34 bits)", "ansi_683.imsi_t_10", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3433 { &hf_ansi_683_mob_term_for_sid_8000
, { "Termination indicator for SID roaming (MOB_TERM_FOR_SID)", "ansi_683.mob_term_for_sid", FT_UINT16
, BASE_DEC
, NULL
, 0x8000, NULL
, HFILL
}},
3434 { &hf_ansi_683_mob_term_for_nid_4000
, { "Termination indicator for NID roaming (MOB_TERM_FOR_NID)", "ansi_683.mob_term_for_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x4000, NULL
, HFILL
}},
3435 { &hf_ansi_683_num_sid_nid_3fc0
, { "Number of SID/NID pairs (N_SID_NID)", "ansi_683.num_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x3fc0, NULL
, HFILL
}},
3436 { &hf_ansi_683_num_sid_nid_01fe
, { "Number of SID/NID pairs (N_SID_NID)", "ansi_683.num_sid_nid", FT_UINT16
, BASE_DEC
, NULL
, 0x01fe, NULL
, HFILL
}},
3437 { &hf_ansi_683_otapa_spasm_validation_signature_indicator_80
, { "OTAPA SPASM validation signature indicator", "ansi_683.otapa_spasm_validation_signature_indicator", FT_BOOLEAN
, 8, TFS(&tfs_included_not_included
), 0x80, NULL
, HFILL
}},
3438 { &hf_ansi_683_spasm_protection_for_the_active_nam_40
, { "SPASM protection for the active NAM", "ansi_683.spasm_protection_for_the_active_nam", FT_BOOLEAN
, 8, TFS(&tfs_activate_do_not_activate
), 0x40, NULL
, HFILL
}},
3439 { &hf_ansi_683_otapa_spasm_validation_signature_indicator_800000
, { "OTAPA SPASM validation signature indicator", "ansi_683.otapa_spasm_validation_signature_indicator", FT_BOOLEAN
, 24, TFS(&tfs_included_not_included
), 0x800000, NULL
, HFILL
}},
3440 { &hf_ansi_683_otapa_spasm_validation_signature
, { "OTAPA SPASM validation signature", "ansi_683.otapa_spasm_validation_signature", FT_UINT24
, BASE_HEX
, NULL
, 0x7fffe0, NULL
, HFILL
}},
3441 { &hf_ansi_683_spasm_protection_for_the_active_nam_000010
, { "SPASM protection for the active NAM", "ansi_683.spasm_protection_for_the_active_nam", FT_BOOLEAN
, 24, TFS(&tfs_activate_do_not_activate
), 0x000010, NULL
, HFILL
}},
3442 { &hf_ansi_683_number_of_parameter_blocks
, { "Number of parameter blocks", "ansi_683.number_of_parameter_blocks", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3443 { &hf_ansi_683_block_data
, { "Block Data", "ansi_683.block_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3444 { &hf_ansi_683_a_key_protocol_revision
, { "A-Key Protocol Revision", "ansi_683.a_key_protocol_revision", FT_UINT8
, BASE_DEC
, VALS(akey_protocol_revision_vals
), 0x0, NULL
, HFILL
}},
3445 { &hf_ansi_683_parameter_p
, { "Parameter P", "ansi_683.parameter_p", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3446 { &hf_ansi_683_parameter_g
, { "Parameter G", "ansi_683.parameter_g", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3447 { &hf_ansi_683_base_station_calculation_result
, { "Base Station Calculation Result", "ansi_683.base_station_calculation_result", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3448 { &hf_ansi_683_random_challenge_value
, { "Random Challenge value", "ansi_683.random_challenge_value", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3449 { &hf_ansi_683_otasp_protocol_revision
, { "OTASP protocol revision", "ansi_683.otasp_protocol_revision", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3450 { &hf_ansi_683_number_of_capability_records
, { "Number of Capability Records", "ansi_683.number_of_capability_records", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3451 { &hf_ansi_683_segment_offset
, { "Segment offset", "ansi_683.segment_offset", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3452 { &hf_ansi_683_maximum_segment_size
, { "Maximum segment size", "ansi_683.maximum_segment_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3453 { &hf_ansi_683_start_otapa_session
, { "OTAPA session", "ansi_683.otapa_session", FT_BOOLEAN
, 8, TFS(&tfs_start_stop
), 0x80, NULL
, HFILL
}},
3454 { &hf_ansi_683_start_secure_mode
, { "Secure Mode", "ansi_683.secure_mode", FT_BOOLEAN
, 8, TFS(&tfs_start_stop
), 0x80, NULL
, HFILL
}},
3455 { &hf_ansi_683_security
, { "Security", "ansi_683.security", FT_UINT8
, BASE_DEC
, NULL
, 0x78, NULL
, HFILL
}},
3456 { &hf_ansi_683_random_number_smck_generation
, { "Random Number used for SMCK generation", "ansi_683.random_number_smck_generation", FT_UINT64
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
3457 { &hf_ansi_683_key_id_ims_root_key
, { "Key ID", "ansi_683.key_id.ims_root_key", FT_BOOLEAN
, 16, NULL
, 0x8000, NULL
, HFILL
}},
3458 { &hf_ansi_683_key_id_bcmcs_root_key
, { "Key ID", "ansi_683.key_id.bcmcs_root_key", FT_BOOLEAN
, 16, NULL
, 0x4000, NULL
, HFILL
}},
3459 { &hf_ansi_683_key_id_wlan_root_key
, { "Key ID", "ansi_683.key_id.wlan_root_key", FT_BOOLEAN
, 16, NULL
, 0x2000, NULL
, HFILL
}},
3460 { &hf_ansi_683_key_id_reserved
, { "Key ID", "ansi_683.key_id.reserved", FT_UINT16
, BASE_HEX
, NULL
, 0x1ff0, NULL
, HFILL
}},
3461 { &hf_ansi_683_key_exchange_result_code
, { "Key exchange result code", "ansi_683.key_exchange_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3462 { &hf_ansi_683_mobile_station_calculation_result
, { "Mobile station calculation result", "ansi_683.mobile_station_calculation_result", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3463 { &hf_ansi_683_authr
, { "Authentication signature data (AUTHR)", "ansi_683.authr", FT_UINT24
, BASE_DEC
, NULL
, 0xffffc0, NULL
, HFILL
}},
3464 { &hf_ansi_683_randc
, { "Random challenge value (RANDC)", "ansi_683.randc", FT_UINT16
, BASE_DEC
, NULL
, 0x3fc0, NULL
, HFILL
}},
3465 { &hf_ansi_683_call_history_parameter
, { "Call history parameter (COUNT)", "ansi_683.call_history_parameter", FT_UINT8
, BASE_DEC
, NULL
, 0x3f, NULL
, HFILL
}},
3466 { &hf_ansi_683_authentication_data_input_parameter
, { "Authentication Data input parameter (AUTH_DATA)", "ansi_683.authentication_data_input_parameter", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3467 { &hf_ansi_683_data_commit_result_code
, { "Data commit result code", "ansi_683.data_commit_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3468 { &hf_ansi_683_mobile_station_fw_rev
, { "Mobile station firmware revision number", "ansi_683.mobile_station_fw_rev", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3469 { &hf_ansi_683_mobile_station_manuf_model_number
, { "Mobile station manufacturer's model number", "ansi_683.mobile_station_manuf_model_number", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3470 { &hf_ansi_683_num_features
, { "Number of features", "ansi_683.num_features", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3471 { &hf_ansi_683_feature_id
, { "Feature ID", "ansi_683.feature_id", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(feat_id_type_rvals
), 0x0, NULL
, HFILL
}},
3472 { &hf_ansi_683_feature_protocol_version
, { "Feature protocol version", "ansi_683.feature_protocol_version", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3473 { &hf_ansi_683_band_class_0_analog
, { "Band Class 0 Analog", "ansi_683.band_class_0_analog", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
3474 { &hf_ansi_683_band_class_0_cdma
, { "Band Class 0 CDMA", "ansi_683.band_class_0_cdma", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
3475 { &hf_ansi_683_band_class_1_cdma
, { "Band Class 1 CDMA", "ansi_683.band_class_1_cdma", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
3476 { &hf_ansi_683_band_class_3_cdma
, { "Band Class 3 CDMA", "ansi_683.band_class_3_cdma", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
3477 { &hf_ansi_683_band_class_6_cdma
, { "Band Class 6 CDMA", "ansi_683.band_class_6_cdma", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
3478 { &hf_ansi_683_more_additional_fields
, { "More Additional Fields", "ansi_683.more_additional_fields", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3479 { &hf_ansi_683_sspr_configuration_result_code
, { "SSPR Configuration result code", "ansi_683.sspr_configuration_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3480 { &hf_ansi_683_sspr_download_result_code
, { "SSPR Download result code", "ansi_683.sspr_download_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3481 { &hf_ansi_683_nam_lock_indicator
, { "NAM_LOCK indicator", "ansi_683.nam_lock_indicator", FT_UINT8
, BASE_DEC
, NULL
, 0x01, NULL
, HFILL
}},
3482 { &hf_ansi_683_spasm_random_challenge
, { "SPASM random challenge", "ansi_683.spasm_random_challenge", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
3483 { &hf_ansi_683_puzl_configuration_result_code
, { "PUZL Configuration result code", "ansi_683.puzl_configuration_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3484 { &hf_ansi_683_identifiers_present16
, { "Identifiers", "ansi_683.identifiers.present", FT_BOOLEAN
, 16, TFS(&tfs_present_not_present
), 0x8000, NULL
, HFILL
}},
3485 { &hf_ansi_683_user_zone_id
, { "User Zone ID", "ansi_683.user_zone_id", FT_UINT24
, BASE_DEC
, NULL
, 0x7fff80, NULL
, HFILL
}},
3486 { &hf_ansi_683_user_zone_sid
, { "User Zone SID", "ansi_683.user_zone_sid", FT_UINT16
, BASE_DEC
, NULL
, 0x7fff, NULL
, HFILL
}},
3487 { &hf_ansi_683_identifiers_present8
, { "Identifiers", "ansi_683.identifiers.present", FT_BOOLEAN
, 8, TFS(&tfs_present_not_present
), 0x80, NULL
, HFILL
}},
3488 { &hf_ansi_683_secure_mode_result_code
, { "Secure Mode result code", "ansi_683.secure_mode_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3489 { &hf_ansi_683_otasp_mobile_protocol_revision
, { "OTASP Mobile Protocol Revision", "ansi_683.otasp_mobile_protocol_revision", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3490 { &hf_ansi_683_capability_data
, { "Capability Data", "ansi_683.capability_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3491 { &hf_ansi_683_system_tag_result_code
, { "System Tag result code", "ansi_683.system_tag_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3492 { &hf_ansi_683_system_tag_download_result_code
, { "System Tag Download result code", "ansi_683.system_tag_download_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3493 { &hf_ansi_683_segment_size
, { "Segment size", "ansi_683.segment_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
3494 { &hf_ansi_683_service_key_generation_result_code
, { "Service Key Generation result code", "ansi_683.service_key_generation_result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3495 { &hf_ansi_683_result_code
, { "Result Code", "ansi_683.result_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(result_codes_rvals
), 0x0, NULL
, HFILL
}},
3496 { &hf_ansi_683_cap_info_record_type
, { "Capability Record Type", "ansi_683.cap_info_record_type", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(rev_cap_info_record_type_rvals
), 0x0, NULL
, HFILL
}},
3497 { &hf_ansi_683_param_block_val
, { "Parameter Block Value", "ansi_683.param_block_val", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_rvals
), 0x0, NULL
, HFILL
}},
3498 { &hf_ansi_683_rev_param_block_sspr
, { "Parameter Block SSPR", "ansi_683.param_block_sspr", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(rev_param_block_sspr_rvals
), 0x0, NULL
, HFILL
}},
3499 { &hf_ansi_683_for_param_block_sspr
, { "Parameter Block SSPR", "ansi_683.param_block_sspr", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_sspr_rvals
), 0x0, NULL
, HFILL
}},
3500 { &hf_ansi_683_rev_param_block_nam
, { "NAM Parameter Block Type", "ansi_683.param_block_nam", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(rev_param_block_nam_rvals
), 0x0, NULL
, HFILL
}},
3501 { &hf_ansi_683_for_param_block_nam
, { "NAM Parameter Block Type", "ansi_683.param_block_nam", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_nam_rvals
), 0x0, NULL
, HFILL
}},
3502 { &hf_ansi_683_rev_param_block_puzl
, { "PUZL Parameter Block Type", "ansi_683.param_block_puzl", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(rev_param_block_puzl_rvals
), 0x0, NULL
, HFILL
}},
3503 { &hf_ansi_683_for_param_block_puzl
, { "PUZL Parameter Block Type", "ansi_683.param_block_puzl", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_puzl_rvals
), 0x0, NULL
, HFILL
}},
3504 { &hf_ansi_683_rev_param_block_3gpd
, { "3GPD Parameter Block Type", "ansi_683.param_block_3gpd", FT_UINT8
, BASE_DEC
, VALS(rev_param_block_3gpd_vals
), 0x0, NULL
, HFILL
}},
3505 { &hf_ansi_683_for_param_block_3gpd
, { "3GPD Parameter Block Type", "ansi_683.param_block_3gpd", FT_UINT8
, BASE_DEC
, VALS(for_param_block_3gpd_vals
), 0x0, NULL
, HFILL
}},
3506 { &hf_ansi_683_rev_param_block_mmd
, { "MMD Parameter Block Type", "ansi_683.param_block_mmd", FT_UINT8
, BASE_DEC
, VALS(param_block_mmd_vals
), 0x0, NULL
, HFILL
}},
3507 { &hf_ansi_683_for_param_block_mmd
, { "MMD Parameter Block Type", "ansi_683.param_block_mmd", FT_UINT8
, BASE_DEC
, VALS(param_block_mmd_vals
), 0x0, NULL
, HFILL
}},
3508 { &hf_ansi_683_rev_param_block_systag
, { "System Tag Parameter Block Type", "ansi_683.param_block_systag", FT_UINT8
, BASE_DEC
, VALS(rev_param_block_systag_vals
), 0x0, NULL
, HFILL
}},
3509 { &hf_ansi_683_for_param_block_systag
, { "System Tag Parameter Block Type", "ansi_683.param_block_systag", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_systag_rvals
), 0x0, NULL
, HFILL
}},
3510 { &hf_ansi_683_rev_param_block_mms
, { "MMS Parameter Block Type", "ansi_683.param_block_mms", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(rev_param_block_mms_rvals
), 0x0, NULL
, HFILL
}},
3511 { &hf_ansi_683_for_param_block_mms
, { "MMS Parameter Block Type", "ansi_683.param_block_mms", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(for_param_block_mms_rvals
), 0x0, NULL
, HFILL
}},
3512 { &hf_ansi_683_mobile_directory_number
, { "Modbile directory number", "ansi_683.mobile_directory_number", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3513 { &hf_ansi_683_service_programming_code
, { "Service programming code", "ansi_683.service_programming_code", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
3516 static int *ett
[] = {
3524 &ett_for_sspr_block
,
3526 &ett_rev_sspr_block
,
3528 &ett_for_puzl_block
,
3529 &ett_rev_puzl_block
,
3530 &ett_for_3gpd_block
,
3531 &ett_rev_3gpd_block
,
3540 static ei_register_info ei
[] = {
3541 { &ei_ansi_683_extraneous_data
, { "ansi_683.extraneous_data", PI_PROTOCOL
, PI_WARN
, "Extraneous Data", EXPFILL
}},
3542 { &ei_ansi_683_short_data
, { "ansi_683.short_data", PI_MALFORMED
, PI_ERROR
, "Short Data (?)", EXPFILL
}},
3543 { &ei_ansi_683_data_length
, { "ansi_683.data_length.invalid", PI_PROTOCOL
, PI_WARN
, "Unexpected Data Length", EXPFILL
}},
3546 expert_module_t
* expert_ansi_683
;
3548 /* Register the protocol name and description */
3550 proto_register_protocol(ansi_proto_name
, "ANSI IS-683 (OTA (Mobile))", "ansi_683");
3552 /* Required function calls to register the header fields and subtrees used */
3553 proto_register_field_array(proto_ansi_683
, hf
, array_length(hf
));
3554 proto_register_subtree_array(ett
, array_length(ett
));
3555 expert_ansi_683
= expert_register_protocol(proto_ansi_683
);
3556 expert_register_field_array(expert_ansi_683
, ei
, array_length(ei
));
3558 /* Register the dissector */
3559 ansi_683_handle
= register_dissector("ansi_683", dissect_ansi_683
, proto_ansi_683
);
3564 proto_reg_handoff_ansi_683(void)
3566 dissector_add_uint("ansi_map.ota", ANSI_683_FORWARD
, ansi_683_handle
);
3567 dissector_add_uint("ansi_map.ota", ANSI_683_REVERSE
, ansi_683_handle
);
3568 dissector_add_uint("ansi_a.ota", ANSI_683_FORWARD
, ansi_683_handle
);
3569 dissector_add_uint("ansi_a.ota", ANSI_683_REVERSE
, ansi_683_handle
);
3573 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3578 * indent-tabs-mode: nil
3581 * vi: set shiftwidth=4 tabstop=8 expandtab:
3582 * :indentSize=4:tabSize=8:noTabs=true: