2 * Routines for packet dissection of GSM SIM APDUs (GSM TS 11.11)
4 * GSM TS 11.11 / 3GPP TS 51.011
6 * Copyright 2010-2011 by Harald Welte <laforge@gnumonks.org>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include <epan/packet.h>
20 #include "packet-gsmtap.h"
22 void proto_register_gsm_sim(void);
23 void proto_reg_handoff_gsm_sim(void);
25 static int proto_gsm_sim
;
28 static int hf_apdu_cla_coding
;
29 static int hf_apdu_cla_coding_ext
;
30 static int hf_apdu_cla_secure_messaging_ind
;
31 static int hf_apdu_cla_secure_messaging_ind_ext
;
32 static int hf_apdu_cla_log_chan
;
33 static int hf_apdu_cla_log_chan_ext
;
34 static int hf_apdu_ins
;
35 static int hf_apdu_p1
;
36 static int hf_apdu_p2
;
37 static int hf_apdu_p3
;
38 static int hf_apdu_data
;
39 static int hf_apdu_sw
;
41 static int hf_file_id
;
43 static int hf_bin_offset
;
45 static int hf_record_nr
;
46 static int hf_auth_rand
;
47 static int hf_auth_sres
;
48 static int hf_auth_kc
;
49 static int hf_chan_op
;
50 static int hf_chan_nr
;
53 /* Chapter 5.2 TS 11.14 and TS 31.111 */
54 static int hf_tprof_b1
;
55 static int hf_tprof_b2
;
56 static int hf_tprof_b3
;
57 static int hf_tprof_b4
;
58 static int hf_tprof_b5
;
59 static int hf_tprof_b6
;
60 static int hf_tprof_b7
;
61 static int hf_tprof_b8
;
62 static int hf_tprof_b9
;
63 static int hf_tprof_b10
;
64 static int hf_tprof_b11
;
65 static int hf_tprof_b12
;
66 static int hf_tprof_b13
;
67 static int hf_tprof_b14
;
68 static int hf_tprof_b15
;
69 static int hf_tprof_b16
;
70 static int hf_tprof_b17
;
71 static int hf_tprof_b18
;
72 static int hf_tprof_b19
;
73 static int hf_tprof_b20
;
74 static int hf_tprof_b21
;
75 static int hf_tprof_b22
;
76 static int hf_tprof_b23
;
77 static int hf_tprof_b24
;
78 static int hf_tprof_b25
;
79 static int hf_tprof_b26
;
80 static int hf_tprof_b27
;
81 static int hf_tprof_b28
;
82 static int hf_tprof_b29
;
83 static int hf_tprof_b30
;
84 static int hf_tprof_b31
;
85 static int hf_tprof_b32
;
86 static int hf_tprof_b33
;
87 static int hf_tprof_unknown_byte
;
89 static int hf_tp_prof_dld
;
90 static int hf_tp_sms_data_dld
;
91 static int hf_tp_cb_data_dld
;
92 static int hf_tp_menu_sel
;
93 static int hf_tp_sms_data_dld_support
;
94 static int hf_tp_timer_exp
;
95 static int hf_tp_cc_sim_support
;
96 static int hf_tp_cc_sim_support2
;
97 /* Second byte (Other) */
98 static int hf_tp_cmd_res
;
99 static int hf_tp_cc_sim
;
100 static int hf_tp_cc_sim_support3
;
101 static int hf_tp_mo_sms_sim
;
102 static int hf_tp_cc_sim_support4
;
103 static int hf_tp_ucs2_entry
;
104 static int hf_tp_ucs2_display
;
105 static int hf_tp_display_ext
;
106 /* 3rd byte (Proactive SIM) */
107 static int hf_tp_pa_display_text
;
108 static int hf_tp_pa_get_inkey
;
109 static int hf_tp_pa_get_input
;
110 static int hf_tp_pa_more_time
;
111 static int hf_tp_pa_play_tone
;
112 static int hf_tp_pa_poll_intv
;
113 static int hf_tp_pa_polling_off
;
114 static int hf_tp_pa_refresh
;
115 /* 4th byte (Proactive SIM) */
116 static int hf_tp_pa_select_item
;
117 static int hf_tp_pa_send_sms
;
118 static int hf_tp_pa_send_ss
;
119 static int hf_tp_pa_send_ussd
;
120 static int hf_tp_pa_set_up_call
;
121 static int hf_tp_pa_set_up_menu
;
122 static int hf_tp_pa_prov_loci
;
123 static int hf_tp_pa_prov_loci_nmr
;
124 /* 5th byte (Event drive information) */
125 static int hf_tp_pa_evt_list
;
126 static int hf_tp_ev_mt_call
;
127 static int hf_tp_ev_call_connected
;
128 static int hf_tp_ev_call_disconnected
;
129 static int hf_tp_ev_location_status
;
130 static int hf_tp_ev_user_activity
;
131 static int hf_tp_ev_idle_screen
;
132 static int hf_tp_ev_cardreader_status
;
133 /* 6th byte (Event drive information extension) */
134 static int hf_tp_ev_lang_sel
;
135 static int hf_tp_ev_brows_term
;
136 static int hf_tp_ev_data_avail
;
137 static int hf_tp_ev_chan_status
;
138 static int hf_tp_ev_access_techno_change
;
139 static int hf_tp_ev_disp_params_changed
;
140 static int hf_tp_ev_local_conn
;
141 static int hf_tp_ev_nwk_search_mode_change
;
142 /* 7th byte (Multiple card proactive commands) */
143 static int hf_tp_pa_power_on
;
144 static int hf_tp_pa_power_off
;
145 static int hf_tp_pa_perform_card_apdu
;
146 static int hf_tp_pa_get_reader_status
;
147 static int hf_tp_pa_get_reader_status_id
;
148 static int hf_tp_rfu
;
149 /* 8th byte (Proactive SIM) */
150 static int hf_tp_pa_timer_start_stop
;
151 static int hf_tp_pa_timer_get_current
;
152 static int hf_tp_pa_prov_loci_date_tz
;
153 static int hf_tp_pa_get_inkey_binary
;
154 static int hf_tp_pa_set_up_idle_mode_text
;
155 static int hf_tp_pa_run_at_command
;
156 static int hf_tp_pa_2nd_alpha_setup_call
;
157 static int hf_tp_pa_2nd_cc_sim_support
;
159 static int hf_tp_display_text
;
160 static int hf_tp_send_dtmf_cmd
;
161 static int hf_tp_pa_prov_loci_nmr2
;
162 static int hf_tp_pa_prov_loci_lang
;
163 static int hf_tp_pa_prov_loci_ta
;
164 static int hf_tp_pa_lang_notif
;
165 static int hf_tp_pa_launch_browser
;
166 static int hf_tp_pa_prov_loci_access_techno
;
168 static int hf_tp_soft_key_support_select_item
;
169 static int hf_tp_soft_key_support_set_up_menu
;
170 static int hf_tp_rfu2
;
172 static int hf_tp_soft_key_info_max_nb
;
173 /* 12th byte (Proactive SIM) */
174 static int hf_tp_pa_open_chan
;
175 static int hf_tp_pa_close_chan
;
176 static int hf_tp_pa_recv_data
;
177 static int hf_tp_pa_send_data
;
178 static int hf_tp_pa_get_chan_status
;
179 static int hf_tp_pa_serv_search
;
180 static int hf_tp_pa_get_serv_info
;
181 static int hf_tp_pa_decl_serv
;
182 /* 13th byte (Proactive SIM) */
183 static int hf_tp_bip_csd
;
184 static int hf_tp_bip_gprs
;
185 static int hf_tp_bip_bluetooth
;
186 static int hf_tp_bip_irda
;
187 static int hf_tp_bip_rs232
;
188 static int hf_tp_num_chans
;
189 /* 14th byte (Screen height) */
190 static int hf_tp_char_height
;
193 static int hf_tp_sizing_supp
;
194 /* 15th byte (Screen width) */
195 static int hf_tp_char_width
;
196 static int hf_tp_var_fonts
;
197 /* 16th byte (Screen effects) */
198 static int hf_tp_display_resize
;
199 static int hf_tp_text_wrapping
;
200 static int hf_tp_text_scrolling
;
201 static int hf_tp_text_attributes
;
202 static int hf_tp_rfu3
;
203 static int hf_tp_width_red_menu
;
204 /* 17th byte (Proactive SIM) */
205 static int hf_tp_bip_tcp_remote
;
206 static int hf_tp_bip_udp_remote
;
207 static int hf_tp_bip_tcp_server
;
208 static int hf_tp_bip_tcp_local
;
209 static int hf_tp_bip_udp_local
;
210 static int hf_tp_bip_direct_com
;
211 static int hf_tp_bip_eutran
;
212 static int hf_tp_bip_hsdpa
;
214 static int hf_tp_pa_display_text_var_time_out
;
215 static int hf_tp_pa_get_inkey_help
;
216 static int hf_tp_bip_usb
;
217 static int hf_tp_pa_get_inkey_var_time_out
;
218 static int hf_tp_pa_prov_loci_esn
;
219 static int hf_tp_cc_gprs
;
220 static int hf_tp_pa_prov_loci_imeisv
;
221 static int hf_tp_pa_prov_loci_search_mode_change
;
222 /* 19th byte (TIA/EIA-136) */
223 static int hf_tp_tia_eia_version
;
224 static int hf_tp_rfu4
;
225 /* 20th byte (TIA/EIA/IS-820-A) */
226 static int hf_tp_tia_iea_is820a_reserved
;
227 /* 21th byte (Extended Launch Browser Capability) */
228 static int hf_tp_ext_launch_browser_wml
;
229 static int hf_tp_ext_launch_browser_xhtml
;
230 static int hf_tp_ext_launch_browser_html
;
231 static int hf_tp_ext_launch_browser_chtml
;
232 static int hf_tp_rfu5
;
234 static int hf_tp_utran_ps_ext_params
;
235 static int hf_tp_pa_prov_loci_batt_state
;
236 static int hf_tp_pa_play_tone_melody
;
237 static int hf_tp_mm_call_set_up_call
;
238 static int hf_tp_toolkit_initiated_gba
;
239 static int hf_tp_pa_retrieve_mm_msg
;
240 static int hf_tp_pa_submit_mm_msg
;
241 static int hf_tp_pa_display_mm_msg
;
243 static int hf_tp_pa_set_frames
;
244 static int hf_tp_pa_get_frames_status
;
245 static int hf_tp_mms_notif_download
;
246 static int hf_tp_alpha_id_refresh_cmd
;
247 static int hf_tp_geo_loc_report
;
248 static int hf_tp_pa_prov_loci_meid
;
249 static int hf_tp_pa_prov_loci_nmr_utran_eutran
;
250 static int hf_tp_ussd_data_download
;
251 /* 24th byte (Class "i") */
252 static int hf_tp_class_i_max_nb_frames
;
253 static int hf_tp_rfu6
;
254 /* 25th byte (Event driven information extensions) */
255 static int hf_tp_evt_browsing_status
;
256 static int hf_tp_evt_mms_transfer_status
;
257 static int hf_tp_evt_frame_info_changed
;
258 static int hf_tp_evt_iwlan_access_status
;
259 static int hf_tp_evt_nw_reject_geran_utran
;
260 static int hf_tp_evt_hci_connectivity
;
261 static int hf_tp_evt_nw_reject_eutran
;
262 static int hf_tp_evt_mult_access_techno_change
;
263 /* 26th byte (Event driven information extensions) */
264 static int hf_tp_evt_csg_cell_select
;
265 static int hf_tp_evt_contactless_state_req
;
266 static int hf_tp_rfu7
;
267 /* 27th byte (Event driven information extensions) */
268 static int hf_tp_rfu8
;
269 /* 28th byte (Text attributes) */
270 static int hf_tp_text_align_left
;
271 static int hf_tp_text_align_centre
;
272 static int hf_tp_text_align_right
;
273 static int hf_tp_text_font_size_normal
;
274 static int hf_tp_text_font_size_large
;
275 static int hf_tp_text_font_size_small
;
276 static int hf_tp_rfu9
;
277 /* 29th byte (Text attributes) */
278 static int hf_tp_text_style_normal
;
279 static int hf_tp_text_style_bold
;
280 static int hf_tp_text_style_italic
;
281 static int hf_tp_text_style_underlined
;
282 static int hf_tp_text_style_strikethrough
;
283 static int hf_tp_text_style_text_fg_colour
;
284 static int hf_tp_text_style_text_bg_colour
;
285 static int hf_tp_rfu10
;
287 static int hf_tp_bip_iwlan
;
288 static int hf_tp_pa_prov_loci_wsid
;
289 static int hf_tp_term_app
;
290 static int hf_tp_steering_roaming_refresh
;
291 static int hf_tp_pa_activate
;
292 static int hf_tp_pa_geo_loc_req
;
293 static int hf_tp_pa_prov_loci_broadcast_nw_info
;
294 static int hf_tp_steering_roaming_iwlan_refresh
;
296 static int hf_tp_pa_contactless_state_changed
;
297 static int hf_tp_csg_cell_discovery
;
298 static int hf_tp_cnf_params_support_open_chan_server_mode
;
299 static int hf_tp_com_ctrl_ims
;
300 static int hf_tp_cat_over_modem_itf
;
301 static int hf_tp_evt_incoming_data_ims
;
302 static int hf_tp_evt_ims_registration
;
303 static int hf_tp_pa_prof_env_cont
;
305 static int hf_tp_bip_ims
;
306 static int hf_tp_pa_prov_loci_henb_ip_addr
;
307 static int hf_tp_pa_prov_loci_henb_surround_macro
;
308 static int hf_tp_launch_params_support_open_chan_server_mode
;
309 static int hf_tp_direct_com_support_open_chan_server_mode
;
310 static int hf_tp_pa_sec_prof_env_cont
;
311 static int hf_tp_cat_serv_list_ecat_client
;
312 static int hf_tp_support_refresh_enforcement_policy
;
314 static int hf_tp_support_dns_addr_req
;
315 static int hf_tp_support_nw_access_name_reuse
;
316 static int hf_tp_ev_poll_intv_nego
;
317 static int hf_tp_rfu11
;
319 static int hf_cat_ber_tag
;
321 static int hf_seek_mode
;
322 static int hf_seek_type
;
323 static int hf_seek_rec_nr
;
326 static int ett_tprof_b1
;
327 static int ett_tprof_b2
;
328 static int ett_tprof_b3
;
329 static int ett_tprof_b4
;
330 static int ett_tprof_b5
;
331 static int ett_tprof_b6
;
332 static int ett_tprof_b7
;
333 static int ett_tprof_b8
;
334 static int ett_tprof_b9
;
335 static int ett_tprof_b10
;
336 static int ett_tprof_b11
;
337 static int ett_tprof_b12
;
338 static int ett_tprof_b13
;
339 static int ett_tprof_b14
;
340 static int ett_tprof_b15
;
341 static int ett_tprof_b16
;
342 static int ett_tprof_b17
;
343 static int ett_tprof_b18
;
344 static int ett_tprof_b19
;
345 static int ett_tprof_b20
;
346 static int ett_tprof_b21
;
347 static int ett_tprof_b22
;
348 static int ett_tprof_b23
;
349 static int ett_tprof_b24
;
350 static int ett_tprof_b25
;
351 static int ett_tprof_b26
;
352 static int ett_tprof_b27
;
353 static int ett_tprof_b28
;
354 static int ett_tprof_b29
;
355 static int ett_tprof_b30
;
356 static int ett_tprof_b31
;
357 static int ett_tprof_b32
;
358 static int ett_tprof_b33
;
360 static dissector_handle_t sub_handle_cap
;
361 static dissector_handle_t sim_handle
, sim_part_handle
;
364 static int * const tprof_b1_fields
[] = {
369 &hf_tp_sms_data_dld_support
,
371 &hf_tp_cc_sim_support
,
372 &hf_tp_cc_sim_support2
,
376 static int * const tprof_b2_fields
[] = {
379 &hf_tp_cc_sim_support3
,
381 &hf_tp_cc_sim_support4
,
388 static int * const tprof_b3_fields
[] = {
389 &hf_tp_pa_display_text
,
395 &hf_tp_pa_polling_off
,
400 static int * const tprof_b4_fields
[] = {
401 &hf_tp_pa_select_item
,
405 &hf_tp_pa_set_up_call
,
406 &hf_tp_pa_set_up_menu
,
408 &hf_tp_pa_prov_loci_nmr
,
412 static int * const tprof_b5_fields
[] = {
415 &hf_tp_ev_call_connected
,
416 &hf_tp_ev_call_disconnected
,
417 &hf_tp_ev_location_status
,
418 &hf_tp_ev_user_activity
,
419 &hf_tp_ev_idle_screen
,
420 &hf_tp_ev_cardreader_status
,
424 static int * const tprof_b6_fields
[] = {
426 &hf_tp_ev_brows_term
,
427 &hf_tp_ev_data_avail
,
428 &hf_tp_ev_chan_status
,
429 &hf_tp_ev_access_techno_change
,
430 &hf_tp_ev_disp_params_changed
,
431 &hf_tp_ev_local_conn
,
432 &hf_tp_ev_nwk_search_mode_change
,
436 static int * const tprof_b7_fields
[] = {
439 &hf_tp_pa_perform_card_apdu
,
440 &hf_tp_pa_get_reader_status
,
441 &hf_tp_pa_get_reader_status_id
,
446 static int * const tprof_b8_fields
[] = {
447 &hf_tp_pa_timer_start_stop
,
448 &hf_tp_pa_timer_get_current
,
449 &hf_tp_pa_prov_loci_date_tz
,
450 &hf_tp_pa_get_inkey_binary
,
451 &hf_tp_pa_set_up_idle_mode_text
,
452 &hf_tp_pa_run_at_command
,
453 &hf_tp_pa_2nd_alpha_setup_call
,
454 &hf_tp_pa_2nd_cc_sim_support
,
458 static int * const tprof_b9_fields
[] = {
460 &hf_tp_send_dtmf_cmd
,
461 &hf_tp_pa_prov_loci_nmr2
,
462 &hf_tp_pa_prov_loci_lang
,
463 &hf_tp_pa_prov_loci_ta
,
464 &hf_tp_pa_lang_notif
,
465 &hf_tp_pa_launch_browser
,
466 &hf_tp_pa_prov_loci_access_techno
,
470 static int * const tprof_b10_fields
[] = {
471 &hf_tp_soft_key_support_select_item
,
472 &hf_tp_soft_key_support_set_up_menu
,
477 static int * const tprof_b11_fields
[] = {
478 &hf_tp_soft_key_info_max_nb
,
482 static int * const tprof_b12_fields
[] = {
484 &hf_tp_pa_close_chan
,
487 &hf_tp_pa_get_chan_status
,
488 &hf_tp_pa_serv_search
,
489 &hf_tp_pa_get_serv_info
,
494 static int * const tprof_b13_fields
[] = {
497 &hf_tp_bip_bluetooth
,
504 static int * const tprof_b14_fields
[] = {
512 static int * const tprof_b15_fields
[] = {
518 static int * const tprof_b16_fields
[] = {
519 &hf_tp_display_resize
,
520 &hf_tp_text_wrapping
,
521 &hf_tp_text_scrolling
,
522 &hf_tp_text_attributes
,
524 &hf_tp_width_red_menu
,
527 static int * const tprof_b17_fields
[] = {
528 &hf_tp_bip_tcp_remote
,
529 &hf_tp_bip_udp_remote
,
530 &hf_tp_bip_tcp_server
,
531 &hf_tp_bip_tcp_local
,
532 &hf_tp_bip_udp_local
,
533 &hf_tp_bip_direct_com
,
538 static int * const tprof_b18_fields
[] = {
539 &hf_tp_pa_display_text_var_time_out
,
540 &hf_tp_pa_get_inkey_help
,
542 &hf_tp_pa_get_inkey_var_time_out
,
543 &hf_tp_pa_prov_loci_esn
,
545 &hf_tp_pa_prov_loci_imeisv
,
546 &hf_tp_pa_prov_loci_search_mode_change
,
549 static int * const tprof_b19_fields
[] = {
550 &hf_tp_tia_eia_version
,
555 static int * const tprof_b20_fields
[] = {
556 &hf_tp_tia_iea_is820a_reserved
,
560 static int * const tprof_b21_fields
[] = {
561 &hf_tp_ext_launch_browser_wml
,
562 &hf_tp_ext_launch_browser_xhtml
,
563 &hf_tp_ext_launch_browser_html
,
564 &hf_tp_ext_launch_browser_chtml
,
569 static int * const tprof_b22_fields
[] = {
570 &hf_tp_utran_ps_ext_params
,
571 &hf_tp_pa_prov_loci_batt_state
,
572 &hf_tp_pa_play_tone_melody
,
573 &hf_tp_mm_call_set_up_call
,
574 &hf_tp_toolkit_initiated_gba
,
575 &hf_tp_pa_retrieve_mm_msg
,
576 &hf_tp_pa_submit_mm_msg
,
577 &hf_tp_pa_display_mm_msg
,
581 static int * const tprof_b23_fields
[] = {
582 &hf_tp_pa_set_frames
,
583 &hf_tp_pa_get_frames_status
,
584 &hf_tp_mms_notif_download
,
585 &hf_tp_alpha_id_refresh_cmd
,
586 &hf_tp_geo_loc_report
,
587 &hf_tp_pa_prov_loci_meid
,
588 &hf_tp_pa_prov_loci_nmr_utran_eutran
,
589 &hf_tp_ussd_data_download
,
593 static int * const tprof_b24_fields
[] = {
594 &hf_tp_class_i_max_nb_frames
,
599 static int * const tprof_b25_fields
[] = {
600 &hf_tp_evt_browsing_status
,
601 &hf_tp_evt_mms_transfer_status
,
602 &hf_tp_evt_frame_info_changed
,
603 &hf_tp_evt_iwlan_access_status
,
604 &hf_tp_evt_nw_reject_geran_utran
,
605 &hf_tp_evt_hci_connectivity
,
606 &hf_tp_evt_nw_reject_eutran
,
607 &hf_tp_evt_mult_access_techno_change
,
611 static int * const tprof_b26_fields
[] = {
612 &hf_tp_evt_csg_cell_select
,
613 &hf_tp_evt_contactless_state_req
,
618 static int * const tprof_b27_fields
[] = {
623 static int * const tprof_b28_fields
[] = {
624 &hf_tp_text_align_left
,
625 &hf_tp_text_align_centre
,
626 &hf_tp_text_align_right
,
627 &hf_tp_text_font_size_normal
,
628 &hf_tp_text_font_size_large
,
629 &hf_tp_text_font_size_small
,
634 static int * const tprof_b29_fields
[] = {
635 &hf_tp_text_style_normal
,
636 &hf_tp_text_style_bold
,
637 &hf_tp_text_style_italic
,
638 &hf_tp_text_style_underlined
,
639 &hf_tp_text_style_strikethrough
,
640 &hf_tp_text_style_text_fg_colour
,
641 &hf_tp_text_style_text_bg_colour
,
646 static int * const tprof_b30_fields
[] = {
648 &hf_tp_pa_prov_loci_wsid
,
650 &hf_tp_steering_roaming_refresh
,
652 &hf_tp_pa_geo_loc_req
,
653 &hf_tp_pa_prov_loci_broadcast_nw_info
,
654 &hf_tp_steering_roaming_iwlan_refresh
,
658 static int * const tprof_b31_fields
[] = {
659 &hf_tp_pa_contactless_state_changed
,
660 &hf_tp_csg_cell_discovery
,
661 &hf_tp_cnf_params_support_open_chan_server_mode
,
663 &hf_tp_cat_over_modem_itf
,
664 &hf_tp_evt_incoming_data_ims
,
665 &hf_tp_evt_ims_registration
,
666 &hf_tp_pa_prof_env_cont
,
670 static int * const tprof_b32_fields
[] = {
672 &hf_tp_pa_prov_loci_henb_ip_addr
,
673 &hf_tp_pa_prov_loci_henb_surround_macro
,
674 &hf_tp_launch_params_support_open_chan_server_mode
,
675 &hf_tp_direct_com_support_open_chan_server_mode
,
676 &hf_tp_pa_sec_prof_env_cont
,
677 &hf_tp_cat_serv_list_ecat_client
,
678 &hf_tp_support_refresh_enforcement_policy
,
682 static int * const tprof_b33_fields
[] = {
683 &hf_tp_support_dns_addr_req
,
684 &hf_tp_support_nw_access_name_reuse
,
685 &hf_tp_ev_poll_intv_nego
,
690 /* According to Section 7.2 of ETSI TS 101 220 / Chapter 7.2 */
691 /* BER-TLV tag CAT templates */
692 static const value_string ber_tlv_cat_tag_vals
[] = {
693 { 0xcf, "Reserved for proprietary use (terminal->UICC)" },
694 { 0xd0, "Proactive Command" },
695 { 0xd1, "GSM/3GPP/3GPP2 - SMS-PP Download" },
696 { 0xd2, "GSM/3GPP/3GPP2 - Cell Broadcast Download" },
697 { 0xd3, "Menu selection" },
698 { 0xd4, "Call Control" },
699 { 0xd5, "GSM/3G - MO Short Message control" },
700 { 0xd6, "Event Download" },
701 { 0xd7, "Timer Expiration" },
702 { 0xd8, "Reserved for intra-UICC communication" },
703 { 0xd9, "3G - USSD Download" },
704 { 0xda, "MMS Transfer status" },
705 { 0xdb, "MMS notification download" },
706 { 0xdc, "Terminal application" },
707 { 0xdd, "3G - Geographical Location Reporting" },
711 static const value_string chan_op_vals
[] = {
712 { 0x00, "Open Channel" },
713 { 0x80, "Close Channel" },
717 static const value_string apdu_le_vals
[] = {
718 { 0x00, "Any number in the range 1 to 256" },
722 static const value_string apdu_cla_coding_vals
[] = {
723 { 0x00, "ISO/IEC 7816-4" },
724 { 0x08, "ETSI TS 102.221" },
725 { 0x0a, "ISO/IEC 7816-4 unless stated otherwise" },
729 static const value_string apdu_cla_coding_ext_vals
[] = {
730 { 0x01, "ISO/IEC 7816-4" },
731 { 0x03, "ETSI TS 102.221" },
735 static const value_string apdu_cla_secure_messaging_ind_vals
[] = {
736 { 0x00, "No SM used between terminal and card" },
737 { 0x01, "Proprietary SM format" },
738 { 0x02, "Command header not authenticated" },
739 { 0x03, "Command header authenticated" },
743 static const true_false_string apdu_cla_secure_messaging_ind_ext_val
= {
744 "Command header not authenticated",
745 "No SM used between terminal and card"
748 /* Table 9 of GSM TS 11.11 */
749 static const value_string apdu_ins_vals
[] = {
752 { 0xB0, "READ BINARY" },
753 { 0xD6, "UPDATE BINARY" },
754 { 0xB2, "READ RECORD" },
755 { 0xDC, "UPDATE RECORD" },
756 { 0xA2, "SEARCH RECORD" },
757 { 0x32, "INCREASE" },
758 { 0x20, "VERIFY CHV" },
759 { 0x24, "CHANGE CHV" },
760 { 0x26, "DISABLE CHV" },
761 { 0x28, "ENABLE CHV" },
762 { 0x2C, "UNBLOCK CHV" },
763 { 0x04, "INVALIDATE / REHABILITATE" },
764 { 0x44, "REHABILITATE / ACTIVATE" },
765 { 0x88, "RUN GSM ALGORITHM / AUTHENTICATE" },
767 { 0xC0, "GET RESPONSE" },
768 { 0x10, "TERMINAL PROFILE" },
769 { 0xC2, "ENVELOPE" },
771 { 0x14, "TERMINAL RESPONSE" },
772 /* Only in TS 102 221 v9.2.0 */
773 { 0xCB, "RETRIEVE DATA" },
774 { 0xDB, "SET DATA" },
775 { 0x89, "RUN GSM ALGORITHM / AUTHENTICATE" },
776 { 0x84, "GET CHALLENGE" },
777 { 0xAA, "TERMINAL CAPABILITY" },
778 { 0x70, "MANAGE CHANNEL" },
779 { 0x73, "MANAGE SECURE CHANNEL" },
780 { 0x75, "TRANSACT DATA" },
781 /* TS 102 221 v15.11.0 */
782 { 0x78, "GET IDENTITY" },
783 /* GSMA SGP.02 v4.2 */
784 { 0xCA, "GET DATA" },
786 { 0xE0, "CREATE FILE" },
787 { 0xE4, "DELETE FILE" },
788 { 0xE6, "TERMINATE DF" },
789 { 0xE8, "TERMINATE EF" },
790 { 0xFE, "TERMINATE CARD USAGE" },
795 static const value_string seek_type_vals
[] = {
796 { 1, "update record pointer, no output" },
797 { 2, "update record pointer, return record number" },
801 static const value_string seek_mode_vals
[] = {
802 { 0x01, "from the beginning forward" },
803 { 0x02, "from the end backward" },
804 { 0x03, "from the next location forward" },
805 { 0x04, "from the previous location backward" },
812 /* The FID space is not a global namespace, but a per-directory one. As such,
813 * we should have code that tracks the currently selected (sub-)directory, and
814 * decode the FID based on that knowledge. As we don't do that yet, the
815 * current work-around is to simply merge all of them into one value_string
818 /* N.B. this combined value_string has lots of duplicate values... */
820 /* Files at the MF level */
821 static const value_string mf_dfs
[] = {
823 { 0x7f10, "DF.TELECOM" },
824 { 0x7f20, "DF.GSM" },
825 { 0x7f22, "DF.IS-41" },
826 { 0x7f23, "DF.FP-CTS" },
827 { 0x7f25, "DF.CDMA" },
828 { 0x7f31, "DF.iDEN" },
829 { 0x7f80, "DF.PDC" },
830 { 0x7f90, "DF.TETRA" },
835 static const value_string mf_efs
[] = {
837 { 0x2f00, "EF.DIR" },
838 // { 0x2f05, "EF.ELP" },
840 { 0x2f06, "EF.ARR" },
841 { 0x2f08, "EF.UMPC" },
842 { 0x2fe2, "EF.ICCID" },
847 /* Elementary files at the DF.TELECOM level */
848 static const value_string df_telecom_efs
[] = {
850 { 0x6f06, "EF.ARR" },
851 { 0x6f3a, "EF.ADN" },
852 { 0x6f3b, "EF.FDN" },
853 { 0x6f3c, "EF.SMS" },
854 { 0x6f3d, "EF.CCP" },
855 { 0x6f40, "EF.MSISDN" },
856 { 0x6f42, "EF.SMSP" },
857 { 0x6f43, "EF.SMSS" },
858 { 0x6f44, "EF.LND" },
859 { 0x6f47, "EF.SMSR" },
860 { 0x6f49, "EF.SDN" },
861 { 0x6f4a, "EF.EXT1" },
862 { 0x6f4b, "EF.EXT2" },
863 { 0x6f4c, "EF.EXT3" },
864 { 0x6f4d, "EF.BDN" },
865 { 0x6f4e, "EF.EXT4" },
866 { 0x6f4f, "EF.ECCP" },
867 { 0x6f54, "EF.SUME" },
872 /* Elementary Files at the DF.GSM level */
873 static const value_string df_gsm_efs
[] = {
876 { 0x6f07, "EF.IMSI" },
878 { 0x6f30, "EF.PLMNsel" },
879 { 0x6f31, "EF.HPPLMN" },
880 { 0x6f37, "EF.ACMax" },
881 { 0x6f38, "EF.SST" },
882 { 0x6f39, "EF.ACM" },
883 { 0x6f3e, "EF.GID1" },
884 { 0x6f3f, "EF.GID2" },
885 { 0x6f41, "EF.PUCT" },
886 { 0x6f45, "EF.CBMI" },
887 { 0x6f46, "EF.SPN" },
888 { 0x6f74, "EF.BCCH" },
889 { 0x6f78, "EF.ACC" },
890 { 0x6f7b, "EF.FPLMN" },
891 { 0x6f7e, "EF.LOCI" },
893 { 0x6fae, "EF.PHASE" },
894 { 0x6fb1, "EF.VGCS" },
895 { 0x6fb2, "EF.VGCSS" },
896 { 0x6fb3, "EF.VBS" },
897 { 0x6fb4, "EF.VBSS" },
898 { 0x6fb5, "EF.eMLPP" },
899 { 0x6fb6, "EF.AAeM" },
900 { 0x6fb7, "EF.ECC" },
901 { 0x6f50, "EF.CBMIR" },
902 { 0x6f51, "EF.NIA" },
903 { 0x6f52, "EF.KcGPRS" },
904 { 0x6f53, "EF.LOCIGPRS" },
905 { 0x6f54, "EF.SUME" },
906 { 0x6f60, "EF.PLMNwAcT" },
907 { 0x6f61, "EF.OPLMNwAcT" },
908 { 0x6f62, "EF.HPLMNAcT" },
909 { 0x6f63, "EF.CPBCCH" },
910 { 0x6f64, "EF.INVSCAN" },
915 static const value_string df_gsm_dfs
[] = {
917 { 0x5f30, "DF.IRIDIUM" },
918 { 0x5f31, "DF.GLOBST" },
919 { 0x5f32, "DF.ICO" },
920 { 0x5f33, "DF.ACeS" },
921 { 0x5f3c, "DF.MExE" },
922 { 0x5f40, "DF.EIA/TIA-533/DF.WLAN" },
923 { 0x5f60, "DF.CTS" },
924 { 0x5f70, "DF.SoLSA" },
929 static const value_string adf_usim_dfs
[] = {
931 { 0x5f3a, "DF.PHONEBOOK" },
932 { 0x5f3b, "DF.GSM-ACCESS" },
933 // { 0x5f3c, "DF.MexE" },
934 // { 0x5f70, "DF.SoLSA" },
935 // { 0x5f40, "DF.WLAN" },
936 { 0x5f50, "DF.HNB" },
937 { 0x5f90, "DF.ProSe" },
938 { 0x5fa0, "DF.ACDC" },
940 { 0x5fc0, "DF.5GS" },
945 static const value_string adf_usim_efs
[] = {
947 { 0x6f00, "EF.5GAuthKeys" },
948 { 0x6f01, "EF.5GS3GPPAccessNASSecCtxt" },
949 { 0x6f02, "EF.5GSnon3GPPAccessNASSecCtxt" },
950 { 0x6f03, "EF.SCICI" },
951 { 0x6f04, "EF.UACAcessIdConfig" },
952 { 0x6f06, "EF.ARR" },
953 { 0x6f07, "EF.IMSI" },
954 { 0x6f08, "EF.Keys" },
955 { 0x6f09, "EF.KeysPS" },
956 { 0x6f2c, "EF.DCK" },
957 { 0x6f31, "EF.HPPLMN" },
958 { 0x6f32, "EF.CNL" },
959 { 0x6f37, "EF.ACMax" },
960 { 0x6f39, "EF.ACM" },
961 { 0x6f3b, "EF.FDN" },
962 { 0x6f3c, "EF.SMS" },
963 { 0x6f3e, "EF.GID1" },
964 { 0x6f3f, "EF.GID2" },
965 { 0x6f40, "EF.MSISDN" },
966 { 0x6f42, "EF.SMSP" },
967 { 0x6f43, "EF.SMSS" },
968 { 0x6f45, "EF.CBMI" },
969 { 0x6f46, "EF.SPN" },
970 { 0x6f47, "EF.SMSR" },
971 { 0x6f48, "EF.CBMID" },
972 { 0x6f4b, "EF.EXT2" },
973 { 0x6f4c, "EF.EXT3" },
974 { 0x6f4d, "EF.BDN" },
975 { 0x6f50, "EF.CBMIR" },
976 { 0x6f55, "EF.EXT4" },
977 { 0x6f56, "EF.EST" },
978 { 0x6f57, "EF.ACL" },
979 { 0x6f58, "EF.CMI" },
980 { 0x6f5b, "EF.START-HFN" },
981 { 0x6f5c, "EF.THRESHOLD" },
982 { 0x6f60, "EF.PLMNwAcT" },
983 { 0x6f61, "EF.OPLMNwAcT" },
984 { 0x6f62, "EF.HPLMNAcT" },
985 { 0x6f73, "EF.PSLOCI" },
986 { 0x6f78, "EF.ACC" },
987 { 0x6f7b, "EF.FPLMN" },
988 { 0x6f7e, "EF.LOCI" },
989 { 0x6f80, "EF.ICI" },
990 { 0x6f81, "EF.OCI" },
991 { 0x6f82, "EF.ICT" },
992 { 0x6f83, "EF.OCT" },
994 { 0x6fb1, "EF.VGCS" },
995 { 0x6fb2, "EF.VGCSS" },
996 { 0x6fb3, "EF.VBS" },
997 { 0x6fb4, "EF.VBSS" },
998 { 0x6fb5, "EF.eMLPP" },
999 { 0x6fb6, "EF.AAeM" },
1000 { 0x6fb7, "EF.ECC" },
1001 { 0x6fc3, "EF.Hiddenkey" },
1002 { 0x6fc4, "EF.NETPAR" },
1003 { 0x6fc5, "EF.PNN" },
1004 { 0x6fc6, "EF.OPL" },
1005 { 0x6fc7, "EF.MBDN" },
1006 { 0x6fc8, "EF.EXT6" },
1007 { 0x6fc9, "EF.MBI" },
1008 { 0x6fca, "EF.MWIS" },
1009 { 0x6fcb, "EF.CFIS" },
1010 { 0x6fcc, "EF.EXT7" },
1011 { 0x6fcd, "EF.SPDI" },
1012 { 0x6fce, "EF.MMSN" },
1013 { 0x6fcf, "EF.EXT8" },
1014 { 0x6fd0, "EF.MMSICP" },
1015 { 0x6fd1, "EF.MMSUP" },
1016 { 0x6fd2, "EF.MMSUCP" },
1017 { 0x6fd3, "EF.NIA" },
1018 { 0x6fd4, "EF.VGCSCA" },
1019 { 0x6fd5, "EF.VBSCA" },
1020 { 0x6fd6, "EF.GBAP" },
1021 { 0x6fd7, "EF.MSK" },
1022 { 0x6fd8, "EF.MUK" },
1023 { 0x6fd9, "EF.EHPLMN" },
1024 { 0x6fda, "EF.GBANL" },
1025 { 0x6fdb, "EF.EHPLMNPI" },
1026 { 0x6fdc, "EF.LRPLMNSI" },
1027 { 0x6fdd, "EF.NAFKCA" },
1028 { 0x6fde, "EF.SPNI" },
1029 { 0x6fdf, "EF.PNNI" },
1030 { 0x6fe2, "EF.NCP-IP" },
1031 { 0x6fe3, "EF.EPSLOCI" },
1032 { 0x6fe4, "EF.EPSNSC" },
1033 { 0x6fe6, "EF.UFC" },
1034 { 0x6fe7, "EF.UICCIARI" },
1035 { 0x6fec, "EF.PWS" },
1036 { 0x6fed, "EF.FDNURI" },
1037 { 0x6fee, "EF.BDNURI" },
1038 { 0x6fef, "EF.SDNURI" },
1039 { 0x6ff0, "EF.IWL" },
1040 { 0x6ff1, "EF.IPS" },
1041 { 0x6ff2, "EF.IPD" },
1042 { 0x6ff3, "EF.ePDGId" },
1043 { 0x6ff4, "EF.ePDGSelection" },
1044 { 0x6ff5, "EF.ePDGIdEm" },
1045 { 0x6ff6, "EF.ePDGSelection" },
1046 { 0x6ff7, "EF.FromPreferred" },
1047 { 0x6ff9, "EF.3GPPPSDATAOFF" },
1048 { 0x6ffa, "EF.3GPPPSDATAOFFservicelist" },
1049 { 0x6ffb, "EF.TVCONFIG" },
1050 { 0x6ffc, "EF.XCAPConfigData" },
1051 { 0x6ffd, "EF.EARFCNList" },
1052 { 0x6ffe, "EF.5GS3GPPLocationInformation" },
1053 { 0x6fff, "EF.5GSnon3GPPLocationInformation" },
1058 static const value_string adf_5gs_efs
[] = {
1060 { 0x4f01, "EF.5GS3GPPLOCI" },
1061 { 0x4f02, "EF.5GSN3GPPLOCI" },
1062 { 0x4f03, "EF.5GS3GPPNSC" },
1063 { 0x4f04, "EF.5GSN3GPPNSC" },
1064 { 0x4f05, "EF.5GAUTHKEYS" },
1065 { 0x4f06, "EF.UAC_AIC" },
1066 { 0x4f07, "EF.SUCI_Calc_Info" },
1067 { 0x4f08, "EF.OPL5G" },
1068 { 0x4f09, "EF.EFSUPI_NAI/EF.PBC" },
1069 { 0x4f0a, "EF.Routing_Indicator/EF.PBC1" },
1070 { 0x4f0b, "EF.URSP" },
1071 { 0x4f0c, "EF.TN3GPPSNN" },
1076 static const value_string df_phonebook_efs
[] = {
1078 // { 0x4f09, "EF.PBC" },
1079 // { 0x4f0a, "EF.PBC1" },
1080 { 0x4f11, "EF.ANRA" },
1081 { 0x4f12, "EF.ANRA1" },
1082 { 0x4f13, "EF.ANRB" },
1083 { 0x4f14, "EF.ANRB1" },
1084 { 0x4f15, "EF.ANRC" },
1085 { 0x4f16, "EF.ANRC1" },
1086 { 0x4f19, "EF.SNE" },
1087 { 0x4f1a, "EF.SNE1" },
1088 { 0x4f20, "EF.UID1" },
1089 { 0x4f21, "EF.UID" },
1090 { 0x4f22, "EF.FSC" },
1091 { 0x4f23, "EF.CC" },
1092 { 0x4f24, "EF.PUID" },
1093 { 0x4f25, "EF.GRP1" },
1094 { 0x4f26, "EF.GRP" },
1095 { 0x4f30, "EF.PBR" },
1096 { 0x4f3a, "EF.ADN" },
1097 { 0x4f3b, "EF.ADN1" },
1098 { 0x4f4a, "EF.EXT1" },
1099 { 0x4f4b, "EF.AAS" },
1100 { 0x4f4c, "EF.GAS" },
1101 { 0x4f50, "EF.EMAIL" },
1102 { 0x4f51, "EF.EMAIL1" },
1106 /* Section 9.4 of TS 11.11 */
1107 static const value_string sw_vals
[] = {
1108 /* we only list the non-wildcard commands here */
1109 { 0x9000, "Normal ending of the command" },
1110 { 0x9300, "SIM Application Toolkit is busy" },
1111 { 0x9240, "Memory problem" },
1112 { 0x9400, "No EF selected" },
1113 { 0x9402, "Out of range (invalid address)" },
1114 { 0x9404, "File ID not found" },
1115 { 0x9408, "File is inconsistent with the command" },
1116 { 0x9802, "No CHV initialized" },
1117 { 0x9804, "Access condition not fulfilled / authentication failed" },
1118 { 0x9808, "In contradiction with CHV status" },
1119 { 0x9810, "In contradiction with invalidation status" },
1120 { 0x9840, "Unsuccessful CHV verification, no attempt left / CHV blocked" },
1121 { 0x9850, "Increase cannot be performed, max value reached" },
1122 { 0x6b00, "Incorrect parameter P1 or P2" },
1123 /* Section 10.2.1.3 of TS 102 221 */
1124 { 0x6200, "Warning: No information given, state of volatile memory unchanged" },
1125 { 0x6281, "Warning: Part of returned data may be corrupted" },
1126 { 0x6282, "Warning: End of file/record reached before reading Le bytes" },
1127 { 0x6283, "Warning: Selected file invalidated" },
1128 { 0x6285, "Warning: Selected file in termination state" },
1129 { 0x62f1, "Warning: More data available" },
1130 { 0x62f2, "Warning: More data available and proactive command pending" },
1131 { 0x62f3, "Warning: Response data available" },
1132 { 0x63f1, "Warning: More data expected" },
1133 { 0x63f2, "Warning: More data expected and proactive command pending" },
1134 /* Section 10.2.1.4 of TS 102 221 */
1135 { 0x6400, "Execution error: No information given, memory unchanged" },
1136 { 0x6500, "Execution error: No information given, memory changed" },
1137 { 0x6581, "Execution error: Memory problem" },
1138 /* Section 10.2.1.5 of TS 102 221 */
1139 { 0x6700, "Wrong length" },
1140 { 0x6d00, "Instruction code not supported or invalid" },
1141 { 0x6e00, "Class not supported" },
1142 { 0x6f00, "Technical problem, no precise diagnosis" },
1143 /* Section 10.2.1.5.1 of TS 102 221 */
1144 { 0x6800, "Function in CLA not supported" },
1145 { 0x6881, "Function in CLA not supported: Logical channel not supported" },
1146 { 0x6882, "Function in CLA not supported: Secure messaging not supported" },
1147 /* Section 10.2.1.5.2 of TS 102 221 */
1148 { 0x6900, "Command not allowed" },
1149 { 0x6981, "Command not allowed: Command incompatible with file structure" },
1150 { 0x6982, "Command not allowed: Security status not satisfied" },
1151 { 0x6983, "Command not allowed: Authentication/PIN method blocked" },
1152 { 0x6984, "Command not allowed: Referenced data invalid" },
1153 { 0x6985, "Command not allowed: Conditions of use not satisfied" },
1154 { 0x6986, "Command not allowed: No EF selected" },
1155 { 0x6989, "Command not allowed: Secure channel - security not satisfied" },
1156 /* Section 10.2.1.5.3 of TS 102 221 */
1157 { 0x6a80, "Wrong parameters: Incorrect parameters in the data field" },
1158 { 0x6a81, "Wrong parameters: Function not supported" },
1159 { 0x6a82, "Wrong parameters: File not found" },
1160 { 0x6a83, "Wrong parameters: Record not found" },
1161 { 0x6a84, "Wrong parameters: Not enough memory space" },
1162 { 0x6a86, "Wrong parameters: Incorrect P1 to P2" },
1163 { 0x6a87, "Wrong parameters: Lc inconsistent with P1 to P2" },
1164 { 0x6a88, "Wrong parameters: Referenced data not found" },
1165 /* Section 10.2.1.6 of TS 102 221 */
1166 { 0x9862, "Authentication error, application specific" },
1167 { 0x9863, "Security session or association expired" },
1171 static const char *get_sw_string(wmem_allocator_t
*scope
, uint16_t sw
)
1173 uint8_t sw1
= sw
>> 8;
1174 uint8_t sw2
= sw
& 0xFF;
1178 return "Normal ending of command with info from proactive SIM";
1180 return "Length of the response data given / SIM data download error";
1182 return wmem_strdup_printf(scope
, "Length of the response data, Length is %u", sw2
);
1184 if ((sw
& 0xf0) == 0x00)
1185 return "Command successful but after internal retry routine";
1188 return wmem_strdup_printf(scope
, "Response ready, Response length is %u", sw2
);
1191 return "Wrong length"; /* TS 102.221 / Section 10.2.1.5 */
1193 return "Incorrect parameter P3"; /* TS 51.011 / Section 9.4.6 */
1195 return wmem_strdup_printf(scope
, "Terminal should repeat command, Length for repeated command is %u", sw2
);
1197 return "Unknown instruction code";
1199 return "Wrong instruction class";
1201 return "Technical problem with no diagnostic";
1203 return val_to_str(sw
, sw_vals
, "Unknown status word: %04x");
1207 dissect_bertlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1209 unsigned int pos
= 0;
1211 while (pos
< tvb_reported_length(tvb
)) {
1216 proto_tree_add_item(tree
, hf_cat_ber_tag
, tvb
, pos
, 1, ENC_BIG_ENDIAN
);
1218 /* FIXME: properly follow BER coding rules */
1219 tag
= tvb_get_uint8(tvb
, pos
++);
1220 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ",
1221 val_to_str(tag
, ber_tlv_cat_tag_vals
, "%02x "));
1222 len
= tvb_get_uint8(tvb
, pos
++);
1225 len
= tvb_get_uint8(tvb
, pos
++);
1228 len
= tvb_get_ntohs(tvb
, pos
);
1232 len
= tvb_get_ntoh24(tvb
, pos
);
1239 subtvb
= tvb_new_subset_length(tvb
, pos
, len
);
1241 case 0xD0: /* proactive command */
1242 case 0xD1: /* sms-pp download */
1243 case 0xD6: /* event download */
1244 case 0xD7: /* timer expiration */
1245 call_dissector_with_data(sub_handle_cap
, subtvb
, pinfo
, tree
, GUINT_TO_POINTER((unsigned)tag
));
1251 return tvb_captured_length(tvb
);
1255 #define ADD_TP_BYTE(byte) \
1256 if ((offset - start_offset) >= p3) break; \
1257 proto_tree_add_bitmask(tree, tvb, offset++, hf_tprof_b##byte, ett_tprof_b##byte, tprof_b##byte##_fields, ENC_BIG_ENDIAN);
1264 static const value_string sfi_vals
[] = {
1265 { 0x01, "Emergency call codes" },
1266 { 0x02, "Language indication" },
1267 { 0x03, "Administrative data" },
1268 { 0x04, "USIM service table" },
1269 { 0x05, "Enabled services table" },
1270 { 0x06, "Access control class" },
1272 { 0x08, "Ciphering and integrity keys" },
1273 { 0x09, "Ciphering and integrity keys for packet switched domain" },
1274 { 0x0A, "User PLMN selector" },
1275 { 0x0B, "Location information" },
1276 { 0x0C, "Packet switched location information" },
1277 { 0x0D, "Forbidden PLMNs" },
1279 { 0x0F, "Hyperframe number" },
1280 { 0x10, "Maximum value of hyperframe number" },
1281 { 0x11, "Operator PLMN selector" },
1282 { 0x12, "Higher Priority PLMN search period" },
1283 { 0x13, "Preferred HPLMN access technology" },
1284 { 0x14, "Incoming call information" },
1285 { 0x15, "Outgoing call information" },
1286 { 0x16, "Capability configuration parameters 2" },
1287 { 0x17, "Access Rule Reference" },
1288 { 0x18, "EPS NAS Security Context" },
1289 { 0x19, "PLMN Network Name" },
1290 { 0x1A, "Operator Network List" },
1291 { 0x1B, "Service Provider Display Information" },
1292 { 0x1C, "Accumulated Call Meter" },
1293 { 0x1D, "Equivalent HPLMN" },
1294 { 0x1E, "EPS location information" },
1299 dissect_gsm_apdu(uint8_t ins
, uint8_t p1
, uint8_t p2
, uint8_t p3
, tvbuff_t
*tvb
,
1300 int offset
, packet_info
*pinfo
, proto_tree
*tree
, bool isSIMtrace
)
1304 int i
, start_offset
;
1306 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ",
1307 val_to_str(ins
, apdu_ins_vals
, "%02x"));
1310 * If isSIMtrace is true, we expect the response data to follow in
1311 * many of these commands. However, if there's no data (the status
1312 * word having already been removed) it might be that the command
1313 * failed, in which case we don't want to try to add the data and
1314 * throw an exception; displaying the status word is more useful.
1316 * XXX - What if there's a partial response? Perhaps we should always
1317 * just add what data we have and not throw an exception.
1320 case 0xA4: /* SELECT */
1324 case 0x03: /* parent DF */
1325 col_append_str(pinfo
->cinfo
, COL_INFO
, "Parent DF ");
1327 case 0x04: /* select by AID */
1328 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Application %s ",
1329 tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
+DATA_OFFS
, p3
));
1330 proto_tree_add_item(tree
, hf_aid
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1333 case 0x09: /* select by relative path */
1334 col_append_str(pinfo
->cinfo
, COL_INFO
, ".");
1336 case 0x08: /* select by absolute path */
1337 for (i
= 0; i
< p3
; i
+= 2) {
1338 g16
= tvb_get_ntohs(tvb
, offset
+DATA_OFFS
+i
);
1339 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "/%s",
1340 val_to_str(g16
, mf_dfs
, "%04x"));
1341 proto_tree_add_item(tree
, hf_file_id
, tvb
, offset
+DATA_OFFS
+i
, 2, ENC_BIG_ENDIAN
);
1343 col_append_str(pinfo
->cinfo
, COL_INFO
, " ");
1346 g16
= tvb_get_ntohs(tvb
, offset
+DATA_OFFS
);
1347 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "File %s ",
1348 val_to_str(g16
, mf_dfs
, "%04x"));
1349 proto_tree_add_item(tree
, hf_file_id
, tvb
, offset
+DATA_OFFS
, p3
, ENC_BIG_ENDIAN
);
1353 /* FIXME: parse response */
1355 case 0xF2: /* STATUS */
1356 /* FIXME: parse response */
1358 case 0xB0: /* READ BINARY */
1360 proto_tree_add_item(tree
, hf_sfi
, tvb
, offset
+P1_OFFS
, 1, ENC_BIG_ENDIAN
);
1361 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Offset=%u ", p2
);
1362 proto_tree_add_item(tree
, hf_bin_offset
, tvb
, offset
+P2_OFFS
, 1, ENC_BIG_ENDIAN
);
1364 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Offset=%u ", p1
<< 8 | p2
);
1365 proto_tree_add_item(tree
, hf_bin_offset
, tvb
, offset
+P1_OFFS
, 2, ENC_BIG_ENDIAN
);
1367 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1368 if (isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
+DATA_OFFS
)) {
1369 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1372 case 0xD6: /* UPDATE BINARY */
1374 proto_tree_add_item(tree
, hf_sfi
, tvb
, offset
+P1_OFFS
, 1, ENC_BIG_ENDIAN
);
1375 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Offset=%u ", p2
);
1376 proto_tree_add_item(tree
, hf_bin_offset
, tvb
, offset
+P2_OFFS
, 1, ENC_BIG_ENDIAN
);
1378 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Offset=%u ", p1
<< 8 | p2
);
1379 proto_tree_add_item(tree
, hf_bin_offset
, tvb
, offset
+P1_OFFS
, 2, ENC_BIG_ENDIAN
);
1381 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1383 case 0xB2: /* READ RECORD */
1384 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "RecordNr=%u ", p1
);
1385 proto_tree_add_item(tree
, hf_record_nr
, tvb
, offset
+P1_OFFS
, 1, ENC_BIG_ENDIAN
);
1386 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1387 if (isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
+DATA_OFFS
)) {
1388 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1391 case 0xDC: /* UPDATE RECORD */
1392 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "RecordNr=%u ", p1
);
1393 proto_tree_add_item(tree
, hf_record_nr
, tvb
, offset
+P1_OFFS
, 1, ENC_BIG_ENDIAN
);
1394 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1396 case 0xA2: /* SEARCH RECORD */
1397 proto_tree_add_item(tree
, hf_seek_mode
, tvb
, offset
+P2_OFFS
, 1, ENC_BIG_ENDIAN
);
1398 proto_tree_add_item(tree
, hf_seek_type
, tvb
, offset
+P2_OFFS
, 1, ENC_BIG_ENDIAN
);
1399 offset
+= DATA_OFFS
;
1400 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
, p3
, ENC_NA
);
1402 if ((p2
& 0xF0) == 0x20)
1403 proto_tree_add_item(tree
, hf_seek_rec_nr
, tvb
, offset
++, 1, ENC_BIG_ENDIAN
);
1405 case 0x32: /* INCREASE */
1407 case 0x20: /* VERIFY CHV */
1408 case 0x24: /* CHANGE CHV */
1409 case 0x26: /* DISABLE CHV */
1410 case 0x28: /* ENABLE CHV */
1411 case 0x2C: /* UNBLOCK CHV */
1412 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "CHV=%u ", p2
);
1413 offset
+= DATA_OFFS
;
1414 /* FIXME: actual PIN/PUK code */
1416 case 0x88: /* RUN GSM ALGO */
1417 /* XXX - See ETSI TS 131 102 7.1 AUTHENTICATE and
1418 * ETSI TS 102 221 11.1.16 AUTHENTICATE, this needs to
1419 * be updated for non GSM (#17299)
1421 offset
+= DATA_OFFS
;
1422 proto_tree_add_item(tree
, hf_auth_rand
, tvb
, offset
, 16, ENC_NA
);
1424 if (isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
)) {
1425 proto_tree_add_item(tree
, hf_auth_sres
, tvb
, offset
, 4, ENC_NA
);
1427 proto_tree_add_item(tree
, hf_auth_kc
, tvb
, offset
, 8, ENC_NA
);
1431 case 0x10: /* TERMINAL PROFILE */
1432 offset
+= DATA_OFFS
;
1433 start_offset
= offset
;
1467 while ((offset
- start_offset
) < p3
) {
1468 proto_tree_add_item(tree
, hf_tprof_unknown_byte
, tvb
, offset
++, 1, ENC_BIG_ENDIAN
);
1471 case 0x12: /* FETCH */
1472 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1473 if (isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
+DATA_OFFS
)) {
1474 subtvb
= tvb_new_subset_length(tvb
, offset
+DATA_OFFS
, (p3
== 0) ? 256 : p3
);
1475 dissect_bertlv(subtvb
, pinfo
, tree
, NULL
);
1478 case 0x14: /* TERMINAL RESPONSE */
1479 subtvb
= tvb_new_subset_length(tvb
, offset
+DATA_OFFS
, p3
);
1480 call_dissector_with_data(sub_handle_cap
, subtvb
, pinfo
, tree
, GUINT_TO_POINTER(0x14));
1482 case 0x70: /* MANAGE CHANNEL */
1483 proto_tree_add_item(tree
, hf_chan_op
, tvb
, offset
+P1_OFFS
, 1, ENC_BIG_ENDIAN
);
1484 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Operation=%s ",
1485 val_to_str(p1
, chan_op_vals
, "%02x"));
1486 proto_tree_add_item(tree
, hf_chan_nr
, tvb
, offset
+P2_OFFS
, 1, ENC_BIG_ENDIAN
);
1487 if (p1
== 0) { /* OPEN */
1488 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1490 if (p1
== 0 && p2
== 0) {
1491 /* Logical channels are assigned by the card when P2 is 0. */
1492 col_append_str(pinfo
->cinfo
, COL_INFO
, "(assign channel) ");
1494 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "(channel: %d) ", p2
);
1497 case 0x78: /* GET IDENTITY */
1498 case 0xC0: /* GET RESPONSE */
1499 case 0xCA: /* GET DATA */
1500 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1501 if (isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
+DATA_OFFS
)) {
1502 proto_tree_add_item(tree
, hf_apdu_data
, tvb
, offset
+DATA_OFFS
, p3
, ENC_NA
);
1505 case 0xC2: /* ENVELOPE */
1506 proto_tree_add_item(tree
, hf_le
, tvb
, offset
+P3_OFFS
, 1, ENC_BIG_ENDIAN
);
1507 subtvb
= tvb_new_subset_length(tvb
, offset
+DATA_OFFS
, p3
);
1508 dissect_bertlv(subtvb
, pinfo
, tree
, NULL
);
1510 /* FIXME: Missing SLEEP */
1511 case 0x04: /* INVALIDATE */
1512 case 0x44: /* REHABILITATE */
1521 dissect_rsp_apdu_tvb(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, proto_tree
*sim_tree
)
1524 proto_item
*ti
= NULL
;
1525 unsigned tvb_len
= tvb_reported_length(tvb
);
1527 if (tree
&& !sim_tree
) {
1528 ti
= proto_tree_add_item(tree
, proto_gsm_sim
, tvb
, 0, -1, ENC_NA
);
1529 sim_tree
= proto_item_add_subtree(ti
, ett_sim
);
1532 if ((tvb_len
-offset
) > 2) {
1533 proto_tree_add_item(sim_tree
, hf_apdu_data
, tvb
, offset
, tvb_len
- 2, ENC_NA
);
1535 offset
= tvb_len
- 2;
1537 /* obtain status word */
1538 sw
= tvb_get_ntohs(tvb
, offset
);
1539 proto_tree_add_uint_format(sim_tree
, hf_apdu_sw
, tvb
, offset
, 2, sw
,
1540 "Status Word: %04x %s", sw
, get_sw_string(pinfo
->pool
, sw
));
1541 /* XXX - Add a PI_RESPONSE_CODE expert info for a non normal sw */
1546 /* Always show status in info column when response only */
1547 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Response, %s ", get_sw_string(pinfo
->pool
, sw
));
1557 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s ", get_sw_string(pinfo
->pool
, sw
));
1566 dissect_cmd_apdu_tvb(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, bool isSIMtrace
)
1568 uint8_t cla
, ins
, p1
, p2
, p3
;
1570 proto_tree
*sim_tree
= NULL
;
1572 unsigned tvb_len
= tvb_reported_length(tvb
);
1574 cla
= tvb_get_uint8(tvb
, offset
);
1575 ins
= tvb_get_uint8(tvb
, offset
+1);
1576 p1
= tvb_get_uint8(tvb
, offset
+2);
1577 p2
= tvb_get_uint8(tvb
, offset
+3);
1579 if (tvb_reported_length_remaining(tvb
, offset
+3) > 1) {
1580 p3
= tvb_get_uint8(tvb
, offset
+4);
1582 /* Parameter 3 not present. */
1587 ti
= proto_tree_add_item(tree
, proto_gsm_sim
, tvb
, 0, -1, ENC_NA
);
1588 sim_tree
= proto_item_add_subtree(ti
, ett_sim
);
1590 if ((cla
& 0x50) == 0x40) {
1591 proto_tree_add_item(sim_tree
, hf_apdu_cla_coding_ext
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1592 proto_tree_add_item(sim_tree
, hf_apdu_cla_secure_messaging_ind_ext
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1593 proto_tree_add_item(sim_tree
, hf_apdu_cla_log_chan_ext
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1595 proto_tree_add_item(sim_tree
, hf_apdu_cla_coding
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1596 proto_tree_add_item(sim_tree
, hf_apdu_cla_secure_messaging_ind
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1597 proto_tree_add_item(sim_tree
, hf_apdu_cla_log_chan
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1599 proto_tree_add_item(sim_tree
, hf_apdu_ins
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1603 if ((cla
& 0x50) == 0x40) {
1604 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ",
1605 val_to_str(cla
>>6, apdu_cla_coding_ext_vals
, "%01x"));
1607 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ",
1608 val_to_str(cla
>>4, apdu_cla_coding_vals
, "%01x"));
1611 /* If isSIMtrace is true, then the tvb contains the command followed by
1612 * the response. The response consists of response data followed by the
1613 * 2 octet status word. The interpretation of the response data depends
1614 * on the command, so for ease we dissect it in dissect_gsm_apdu.
1615 * Slice off the status word first, though.
1617 tvbuff_t
*next_tvb
= tvb
;
1619 /* We already retrieved ins, p1, p2, so tvb_len > 2 */
1620 next_tvb
= tvb_new_subset_length(tvb
, 0, tvb_len
- 2);
1622 rc
= dissect_gsm_apdu(ins
, p1
, p2
, p3
, next_tvb
, offset
, pinfo
, sim_tree
, isSIMtrace
);
1624 if (rc
== -1 && sim_tree
) {
1625 /* default dissector */
1626 proto_tree_add_item(sim_tree
, hf_apdu_p1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1628 proto_tree_add_item(sim_tree
, hf_apdu_p2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1630 proto_tree_add_item(sim_tree
, hf_apdu_p3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1632 if (p3
&& (p3
<= tvb_reported_length_remaining(tvb
, offset
))) {
1633 proto_tree_add_item(sim_tree
, hf_apdu_data
, tvb
, offset
, p3
, ENC_NA
);
1635 if (!isSIMtrace
&& tvb_reported_length_remaining(tvb
, offset
)) {
1636 proto_tree_add_item(sim_tree
, hf_le
, tvb
, offset
, 1, ENC_NA
);
1645 return dissect_rsp_apdu_tvb(tvb
, tvb_len
-2, pinfo
, tree
, sim_tree
);
1652 dissect_gsm_sim(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1654 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "GSM SIM");
1655 dissect_cmd_apdu_tvb(tvb
, 0, pinfo
, tree
, true);
1656 return tvb_captured_length(tvb
);
1660 dissect_gsm_sim_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1662 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "GSM SIM");
1663 dissect_cmd_apdu_tvb(tvb
, 0, pinfo
, tree
, false);
1664 return tvb_captured_length(tvb
);
1668 dissect_gsm_sim_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1670 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "GSM SIM");
1671 dissect_rsp_apdu_tvb(tvb
, 0, pinfo
, tree
, NULL
);
1672 return tvb_captured_length(tvb
);
1676 dissect_gsm_sim_part(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1678 if (pinfo
->p2p_dir
== P2P_DIR_SENT
)
1679 return dissect_gsm_sim_command(tvb
, pinfo
, tree
, data
);
1680 else if (pinfo
->p2p_dir
== P2P_DIR_RECV
)
1681 return dissect_gsm_sim_response(tvb
, pinfo
, tree
, data
);
1687 proto_register_gsm_sim(void)
1689 static hf_register_info hf
[] = {
1690 { &hf_apdu_cla_coding
,
1691 { "Class Coding", "gsm_sim.apdu.cla.coding",
1692 FT_UINT8
, BASE_HEX
, VALS(apdu_cla_coding_vals
), 0xf0,
1693 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1695 { &hf_apdu_cla_coding_ext
,
1696 { "Class Coding", "gsm_sim.apdu.cla.coding",
1697 FT_UINT8
, BASE_HEX
, VALS(apdu_cla_coding_ext_vals
), 0xc0,
1698 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1700 { &hf_apdu_cla_secure_messaging_ind
,
1701 { "Secure Messaging Indication", "gsm_sim.apdu.cla.secure_messaging_ind",
1702 FT_UINT8
, BASE_HEX
, VALS(apdu_cla_secure_messaging_ind_vals
), 0x0c,
1703 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1705 { &hf_apdu_cla_secure_messaging_ind_ext
,
1706 { "Secure Messaging Indication", "gsm_sim.apdu.cla.secure_messaging_ind.ext",
1707 FT_BOOLEAN
, 8, TFS(&apdu_cla_secure_messaging_ind_ext_val
), 0x20,
1708 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1710 { &hf_apdu_cla_log_chan
,
1711 { "Logical Channel number", "gsm_sim.apdu.cla.log_chan",
1712 FT_UINT8
, BASE_DEC
, NULL
, 0x03,
1713 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1715 { &hf_apdu_cla_log_chan_ext
,
1716 { "Logical Channel number", "gsm_sim.apdu.cla.log_chan",
1717 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
1718 "ISO 7816-4 APDU CLA (Class) Byte", HFILL
}
1721 { "Instruction", "gsm_sim.apdu.ins",
1722 FT_UINT8
, BASE_HEX
, VALS(apdu_ins_vals
), 0,
1723 "ISO 7816-4 APDU INS (Instruction) Byte", HFILL
}
1726 { "Parameter 1", "gsm_sim.apdu.p1",
1727 FT_UINT8
, BASE_HEX
, NULL
, 0,
1728 "ISO 7816-4 APDU P1 (Parameter 1) Byte", HFILL
}
1731 { "Parameter 2", "gsm_sim.apdu.p2",
1732 FT_UINT8
, BASE_HEX
, NULL
, 0,
1733 "ISO 7816-4 APDU P2 (Parameter 2) Byte", HFILL
}
1736 { "Length (Parameter 3)", "gsm_sim.apdu.p3",
1737 FT_UINT8
, BASE_HEX
, NULL
, 0,
1738 "ISO 7816-4 APDU P3 (Parameter 3) Byte", HFILL
}
1741 { "APDU Payload", "gsm_sim.apdu.data",
1742 FT_BYTES
, BASE_NONE
, NULL
, 0,
1743 "ISO 7816-4 APDU Data Payload", HFILL
}
1746 { "Status Word (SW1:SW2)", "gsm_sim.apdu.sw",
1747 FT_UINT16
, BASE_HEX
, VALS(sw_vals
), 0,
1748 "ISO 7816-4 APDU Status Word", HFILL
}
1751 { "File ID", "gsm_sim.file_id",
1752 FT_UINT16
, BASE_HEX
, VALS(mf_dfs
), 0,
1753 "ISO 7816-4 File ID", HFILL
}
1756 { "Application ID", "gsm_sim.aid",
1757 FT_BYTES
, BASE_NONE
, NULL
, 0,
1758 "ISO 7816-4 Application ID", HFILL
}
1761 { "Offset", "gsm_sim.bin_offset",
1762 FT_UINT16
, BASE_DEC
, NULL
, 0,
1763 "Offset into binary file", HFILL
}
1766 { "SFI", "gsm_sim.sfi",
1767 FT_UINT8
, BASE_HEX
, VALS(sfi_vals
), 0x1f,
1771 { "Record number", "gsm_sim.record_nr",
1772 FT_UINT8
, BASE_DEC
, NULL
, 0,
1773 "Offset into binary file", HFILL
}
1776 { "Random Challenge", "gsm_sim.auth_rand",
1777 FT_BYTES
, BASE_NONE
, NULL
, 0,
1778 "GSM Authentication Random Challenge", HFILL
}
1781 { "SRES", "gsm_sim.auth_sres",
1782 FT_BYTES
, BASE_NONE
, NULL
, 0,
1783 "GSM Authentication SRES Response", HFILL
}
1786 { "Kc", "gsm_sim.auth_kc",
1787 FT_BYTES
, BASE_NONE
, NULL
, 0,
1788 "GSM Authentication Kc result", HFILL
}
1791 { "Channel Number", "gsm_sim.chan_nr",
1792 FT_UINT8
, BASE_DEC
, NULL
, 0,
1793 "ISO 7816-4 Logical Channel Number", HFILL
}
1796 // XXX - Should the abbrev be gsm_sim.apdu.le ?
1797 { "Length of Expected Response Data", "gsm_sim.le",
1798 FT_UINT8
, BASE_DEC
|BASE_SPECIAL_VALS
, VALS(apdu_le_vals
), 0,
1802 { "Channel Operation", "gsm_sim.chan_op",
1803 FT_UINT8
, BASE_HEX
, VALS(chan_op_vals
), 0,
1804 "ISO 7816-4 Logical Channel Operation", HFILL
}
1808 /* Terminal Profile Byte 1 */
1810 { "Terminal Profile Byte 1 (Download)", "gsm_sim.tp.b1",
1811 FT_UINT8
, BASE_HEX
, NULL
, 0,
1815 { "Profile Download", "gsm_sim.tp.prof_dld",
1816 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
1817 "TP Profile Download", HFILL
}
1819 { &hf_tp_sms_data_dld
,
1820 { "SMS-PP Data Download", "gsm_sim.tp.sms_data_dld",
1821 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
1822 "TP SMS-PP Data Download", HFILL
}
1824 { &hf_tp_cb_data_dld
,
1825 { "CB Data Download", "gsm_sim.tp.cb_data_dld",
1826 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
1827 "TP Cell Broadcast Data Download", HFILL
}
1830 { "Menu Selection", "gsm_sim.tp.menu_sel",
1831 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
1832 "TP Menu Selection", HFILL
}
1834 { &hf_tp_sms_data_dld_support
,
1835 { "SMS-PP data download is supported", "gsm_sim.tp.sms_data_dld_support",
1836 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
1837 "TP SMS-PP data download is supported", HFILL
}
1840 { "Timer expiration", "gsm_sim.tp.timer_exp",
1841 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
1842 "TP Timer expiration", HFILL
}
1844 { &hf_tp_cc_sim_support
,
1845 { "Call Control by USIM is supported", "gsm_sim.tp.cc_sim_support",
1846 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x40,
1847 "TP Call Control by USIM is supported", HFILL
}
1849 { &hf_tp_cc_sim_support2
,
1850 { "Call Control by USIM is supported", "gsm_sim.tp.cc_sim_support",
1851 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x80,
1852 "TP Call Control by USIM is supported", HFILL
}
1855 /* Terminal Profile Byte 2 */
1857 { "Terminal Profile Byte 2 (Other)", "gsm_sim.tp.b2",
1858 FT_UINT8
, BASE_HEX
, NULL
, 0,
1862 { "Command result", "gsm_sim.tp.cmd_res",
1863 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
1864 "TP Command result", HFILL
}
1867 { "Call Control by USIM", "gsm_sim.tp.cc_sim",
1868 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
1869 "TP Call Control by SIM", HFILL
}
1871 { &hf_tp_cc_sim_support3
,
1872 { "Call Control by USIM is supported", "gsm_sim.tp.cc_sim_support",
1873 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x04,
1874 "TP Call Control by USIM is supported", HFILL
}
1876 { &hf_tp_mo_sms_sim
,
1877 { "MO SMS control by SIM", "gsm_sim.tp.mo_sms_sim",
1878 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
1879 "TP MO short message control by SIM", HFILL
}
1881 { &hf_tp_cc_sim_support4
,
1882 { "Call Control by USIM is supported", "gsm_sim.tp.cc_sim_support",
1883 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x10,
1884 "TP Call Control by USIM is supported", HFILL
}
1886 { &hf_tp_ucs2_entry
,
1887 { "UCS2 Entry", "gsm_sim.tp.ucs2_entry",
1888 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
1889 "TP UCS2 Entry", HFILL
}
1891 { &hf_tp_ucs2_display
,
1892 { "UCS2 Display", "gsm_sim.tp.ucs2_display",
1893 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
1894 "TP UCS2 Display", HFILL
}
1896 { &hf_tp_display_ext
,
1897 { "Display of Extension Text", "gsm_sim.tp.display_ext",
1898 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
1899 "TP Display of the Extension Text", HFILL
}
1902 /* Terminal Profile Byte 3 */
1904 { "Terminal Profile Byte 3 (Proactive SIM)", "gsm_sim.tp.b3",
1905 FT_UINT8
, BASE_HEX
, NULL
, 0,
1908 { &hf_tp_pa_display_text
,
1909 { "Proactive SIM: DISPLAY TEXT", "gsm_sim.tp.pa.display_text",
1910 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
1913 { &hf_tp_pa_get_inkey
,
1914 { "Proactive SIM: GET INKEY", "gsm_sim.tp.pa.get_inkey",
1915 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
1918 { &hf_tp_pa_get_input
,
1919 { "Proactive SIM: GET INPUT", "gsm_sim.tp.pa.get_input",
1920 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
1923 { &hf_tp_pa_more_time
,
1924 { "Proactive SIM: MORE TIME", "gsm_sim.tp.pa.more_time",
1925 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
1928 { &hf_tp_pa_play_tone
,
1929 { "Proactive SIM: PLAY TONE", "gsm_sim.tp.pa.play_tone",
1930 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
1933 { &hf_tp_pa_poll_intv
,
1934 { "Proactive SIM: POLL INTERVAL", "gsm_sim.tp.pa.poll_intv",
1935 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
1938 { &hf_tp_pa_polling_off
,
1939 { "Proactive SIM: POLLING OFF", "gsm_sim.tp.pa.polling_off",
1940 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
1943 { &hf_tp_pa_refresh
,
1944 { "Proactive SIM: REFRESH", "gsm_sim.tp.pa.refresh",
1945 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
1949 /* Terminal Profile Byte 4 */
1951 { "Terminal Profile Byte 4 (Proactive SIM)", "gsm_sim.tp.b4",
1952 FT_UINT8
, BASE_HEX
, NULL
, 0,
1955 { &hf_tp_pa_select_item
,
1956 { "Proactive SIM: SELECT ITEM", "gsm_sim.tp.pa.select_item",
1957 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
1960 { &hf_tp_pa_send_sms
,
1961 { "Proactive SIM: SEND SHORT MESSAGE", "gsm_sim.tp.pa.send_sms",
1962 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
1965 { &hf_tp_pa_send_ss
,
1966 { "Proactive SIM: SEND SS", "gsm_sim.tp.pa.send_ss",
1967 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
1970 { &hf_tp_pa_send_ussd
,
1971 { "Proactive SIM: SEND USSD", "gsm_sim.tp.pa.send_ussd",
1972 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
1975 { &hf_tp_pa_set_up_call
,
1976 { "Proactive SIM: SET UP CALL", "gsm_sim.tp.pa.set_up_call",
1977 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
1980 { &hf_tp_pa_set_up_menu
,
1981 { "Proactive SIM: SET UP MENU", "gsm_sim.tp.pa.set_up_menu",
1982 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
1985 { &hf_tp_pa_prov_loci
,
1986 { "Proactive SIM: PROVIDE LOCAL INFORMATION", "gsm_sim.tp.pa.prov_loci",
1987 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
1990 { &hf_tp_pa_prov_loci_nmr
,
1991 { "Proactive SIM: PROVIDE LOCAL INFORMATION (NMR)", "gsm_sim.tp.pa.prov_loci_nmr",
1992 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
1996 /* Terminal Profile Byte 5 */
1998 { "Terminal Profile Byte 5 (Event driven information)", "gsm_sim.tp.b5",
1999 FT_UINT8
, BASE_HEX
, NULL
, 0,
2002 { &hf_tp_pa_evt_list
,
2003 { "Proactive SIM: SET UP EVENT LIST", "gsm_sim.tp.pa.set_up_evt_list",
2004 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2007 { &hf_tp_ev_mt_call
,
2008 { "Event: MT call", "gsm_sim.tp.evt.mt_call",
2009 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2012 { &hf_tp_ev_call_connected
,
2013 { "Event: Call connected", "gsm_sim.tp.evt.call_conn",
2014 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2017 { &hf_tp_ev_call_disconnected
,
2018 { "Event: Call disconnected", "gsm_sim.tp.evt.call_disc",
2019 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2022 { &hf_tp_ev_location_status
,
2023 { "Event: Location status", "gsm_sim.tp.evt.loc_status",
2024 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2027 { &hf_tp_ev_user_activity
,
2028 { "Event: User activity", "gsm_sim.tp.evt.user_activity",
2029 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2032 { &hf_tp_ev_idle_screen
,
2033 { "Event: Idle screen available", "gsm_sim.tp.evt.idle_screen",
2034 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2037 { &hf_tp_ev_cardreader_status
,
2038 { "Event: Card reader status", "gsm_sim.tp.evt.card_status",
2039 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2043 /* Terminal Profile Byte 6 */
2045 { "Terminal Profile Byte 6 (Event driven information extension)", "gsm_sim.tp.b6",
2046 FT_UINT8
, BASE_HEX
, NULL
, 0,
2049 { &hf_tp_ev_lang_sel
,
2050 { "Event: Language Selection", "gsm_sim.tp.evt.lang_sel",
2051 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2054 { &hf_tp_ev_brows_term
,
2055 { "Event: Browser Termination", "gsm_sim.tp.evt.brows_term",
2056 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2059 { &hf_tp_ev_data_avail
,
2060 { "Event: Data Available", "gsm_sim.tp.evt.data_avail",
2061 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2064 { &hf_tp_ev_chan_status
,
2065 { "Event: Channel Status", "gsm_sim.tp.evt.chan_status",
2066 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2069 { &hf_tp_ev_access_techno_change
,
2070 { "Event: Access Technology Change", "gsm_sim.tp.evt.access_techno_change",
2071 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2074 { &hf_tp_ev_disp_params_changed
,
2075 { "Event: Display parameters changed", "gsm_sim.tp.evt.disp_params_changed",
2076 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2079 { &hf_tp_ev_local_conn
,
2080 { "Event: Local Connection", "gsm_sim.tp.evt.local_conn",
2081 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2084 { &hf_tp_ev_nwk_search_mode_change
,
2085 { "Event: Network Search Mode Change", "gsm_sim.tp.evt.nwk_search_mode_change",
2086 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2090 /* Terminal Profile Byte 7 */
2092 { "Terminal Profile Byte 7 (Multiple card proactive commands)", "gsm_sim.tp.b7",
2093 FT_UINT8
, BASE_HEX
, NULL
, 0,
2096 { &hf_tp_pa_power_on
,
2097 { "Proactive SIM: POWER ON CARD", "gsm_sim.tp.pa.power_on_card",
2098 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2101 { &hf_tp_pa_power_off
,
2102 { "Proactive SIM: POWER OFF CARD", "gsm_sim.tp.pa.power_off_card",
2103 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2106 { &hf_tp_pa_perform_card_apdu
,
2107 { "Proactive SIM: PERFORM CARD APDU", "gsm_sim.tp.pa.perf_card_apdu",
2108 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2111 { &hf_tp_pa_get_reader_status
,
2112 { "Proactive SIM: GET READER STATUS (status)", "gsm_sim.tp.pa.get_rdr_status",
2113 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2116 { &hf_tp_pa_get_reader_status_id
,
2117 { "Proactive SIM: GET READER STATUS (identifier)", "gsm_sim.tp.pa.get_rdr_status_id",
2118 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2122 { "RFU", "gsm_sim.tp.rfu",
2123 FT_UINT8
, BASE_HEX
, NULL
, 0xe0,
2127 /* Terminal Profile Byte 8 */
2129 { "Terminal Profile Byte 8 (Proactive SIM)", "gsm_sim.tp.b8",
2130 FT_UINT8
, BASE_HEX
, NULL
, 0,
2133 { &hf_tp_pa_timer_start_stop
,
2134 { "Proactive SIM: TIMER MANAGEMENT (start, stop)", "gsm_sim.tp.pa.timer_start_stop",
2135 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2138 { &hf_tp_pa_timer_get_current
,
2139 { "Proactive SIM: TIMER MANAGEMENT (get current value)", "gsm_sim.tp.pa.timer_get_current",
2140 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2143 { &hf_tp_pa_prov_loci_date_tz
,
2144 { "Proactive SIM: PROVIDE LOCAL INFORMATION (date, time, tz)", "gsm_sim.tp.pa.prov_loci_date",
2145 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2148 { &hf_tp_pa_get_inkey_binary
,
2149 { "Proactive SIM: GET INKEY", "gsm_sim.tp.pa.get_inkey_bin",
2150 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2153 { &hf_tp_pa_set_up_idle_mode_text
,
2154 { "Proactive SIM: SET UP IDLE MODE TEXT", "gsm_sim.tp.pa.set_up_idle_text",
2155 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2158 { &hf_tp_pa_run_at_command
,
2159 { "Proactive SIM: RUN AT COMMAND", "gsm_sim.tp.pa.run_at_command",
2160 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2163 { &hf_tp_pa_2nd_alpha_setup_call
,
2164 { "Proactive SIM: SETUP CALL", "gsm_sim.tp.pa.2nd_alpha_id",
2165 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2168 { &hf_tp_pa_2nd_cc_sim_support
,
2169 { "Proactive SIM: Call Control by USIM is supported", "gsm_sim.tp.pa.cc_sim_support",
2170 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x80,
2174 /* Terminal Profile Byte 9 */
2176 { "Terminal Profile Byte 9", "gsm_sim.tp.b9",
2177 FT_UINT8
, BASE_HEX
, NULL
, 0,
2180 { &hf_tp_display_text
,
2181 { "DISPLAY TEXT", "gsm_sim.tp.display_text",
2182 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2185 { &hf_tp_send_dtmf_cmd
,
2186 { "SEND DTMF command", "gsm_sim.tp.send_dtmf_cmd",
2187 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2190 { &hf_tp_pa_prov_loci_nmr2
,
2191 { "Proactive SIM: PROVIDE LOCAL INFORMATION (NMR)", "gsm_sim.tp.pa.prov_loci_nmr",
2192 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2195 { &hf_tp_pa_prov_loci_lang
,
2196 { "Proactive SIM: PROVIDE LOCAL INFORMATION (language)", "gsm_sim.tp.pa.prov_loci_lang",
2197 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2200 { &hf_tp_pa_prov_loci_ta
,
2201 { "Proactive SIM: PROVIDE LOCAL INFORMATION (Timing Advance)", "gsm_sim.tp.pa.prov_loci_ta",
2202 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2205 { &hf_tp_pa_lang_notif
,
2206 { "Proactive SIM: LANGUAGE NOTIFICATION", "gsm_sim.tp.pa.lang_notif",
2207 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2210 { &hf_tp_pa_launch_browser
,
2211 { "Proactive SIM: LAUNCH BROWSER", "gsm_sim.tp.pa.launch_browser",
2212 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2215 { &hf_tp_pa_prov_loci_access_techno
,
2216 { "Proactive SIM: PROVIDE LOCAL INFORMATION (Access Technology)", "gsm_sim.tp.pa.prov_loci_access_techno",
2217 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2221 /* Terminal Profile Byte 10 */
2223 { "Terminal Profile Byte 10 (Soft keys support)", "gsm_sim.tp.b10",
2224 FT_UINT8
, BASE_HEX
, NULL
, 0,
2227 { &hf_tp_soft_key_support_select_item
,
2228 { "Soft keys support for SELECT ITEM", "gsm_sim.tp.soft_key_support.select_item",
2229 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2232 { &hf_tp_soft_key_support_set_up_menu
,
2233 { "Soft Keys support for SET UP MENU", "gsm_sim.tp.soft_key_support.set_up_menu",
2234 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2238 { "RFU", "gsm_sim.tp.rfu",
2239 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
2243 /* Terminal Profile Byte 11 */
2245 { "Terminal Profile Byte 11 (Soft keys information)", "gsm_sim.tp.b11",
2246 FT_UINT8
, BASE_HEX
, NULL
, 0,
2249 { &hf_tp_soft_key_info_max_nb
,
2250 { "Maximum number of soft keys available", "gsm_sim.tp.soft_key_info.max_nb",
2251 FT_UINT8
, BASE_DEC
, NULL
, 0xff,
2255 /* Terminal Profile Byte 12 */
2257 { "Terminal Profile Byte 12 (Bearer Independent protocol proactive commands, class \"e\")", "gsm_sim.tp.b12",
2258 FT_UINT8
, BASE_HEX
, NULL
, 0,
2261 { &hf_tp_pa_open_chan
,
2262 { "Proactive SIM: OPEN CHANNEL", "gsm_sim.tp.pa.open_chan",
2263 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2266 { &hf_tp_pa_close_chan
,
2267 { "Proactive SIM: CLOSE CHANNEL", "gsm_sim.tp.pa.close_chan",
2268 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2271 { &hf_tp_pa_recv_data
,
2272 { "Proactive SIM: RECEIVE DATA", "gsm_sim.tp.pa.recv_data",
2273 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2276 { &hf_tp_pa_send_data
,
2277 { "Proactive SIM: SEND DATA", "gsm_sim.tp.pa.send_data",
2278 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2281 { &hf_tp_pa_get_chan_status
,
2282 { "Proactive SIM: GET CHANNEL STATUS", "gsm_sim.tp.pa.get_chan_status",
2283 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2286 { &hf_tp_pa_serv_search
,
2287 { "Proactive SIM: SERVICE SEARCH", "gsm_sim.tp.pa.serv_search",
2288 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2291 { &hf_tp_pa_get_serv_info
,
2292 { "Proactive SIM: GET SERVICE INFORMATION", "gsm_sim.tp.pa.get_serv_info",
2293 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2296 { &hf_tp_pa_decl_serv
,
2297 { "Proactive SIM: DECLARE SERVICE", "gsm_sim.tp.pa.decl_serv",
2298 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2302 /* Terminal Profile Byte 13 */
2304 { "Terminal Profile Byte 13 (Bearer Independent protocol supported bearers, class \"e\")", "gsm_sim.tp.b13",
2305 FT_UINT8
, BASE_HEX
, NULL
, 0,
2309 { "CSD bearer", "gsm_sim.tp.bip.csd",
2310 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2314 { "GPRS bearer", "gsm_sim.tp.bip.gprs",
2315 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2318 { &hf_tp_bip_bluetooth
,
2319 { "Bluetooth bearer", "gsm_sim.tp.bip.bluetooth",
2320 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2324 { "IrDA bearer", "gsm_sim.tp.bip.irda",
2325 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2329 { "RS232 bearer", "gsm_sim.tp.bip.rs232",
2330 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2334 { "Number of Channels", "gsm_sim.tp.num_chans",
2335 FT_UINT8
, BASE_DEC
, NULL
, 0xe0,
2340 /* Terminal Profile Byte 14 */
2342 { "Terminal Profile Byte 14 (Screen height)", "gsm_sim.tp.b14",
2343 FT_UINT8
, BASE_HEX
, NULL
, 0,
2346 { &hf_tp_char_height
,
2347 { "Display height (chars)", "gsm_sim.tp.display.height",
2348 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
2352 { "No display capability", "gsm_sim.tp.nd",
2353 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2357 { "No keypad available", "gsm_sim.tp.nk",
2358 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2361 { &hf_tp_sizing_supp
,
2362 { "Screen sizing parameters", "gsm_sim.tp.disp_sizing",
2363 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2367 /* Terminal Profile Byte 15 */
2369 { "Terminal Profile Byte 15 (Screen width)", "gsm_sim.tp.b15",
2370 FT_UINT8
, BASE_HEX
, NULL
, 0,
2373 { &hf_tp_char_width
,
2374 { "Display width (chars)", "gsm_sim.tp.display.width",
2375 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
2379 { "Variable size fonts", "gsm_sim.tp.var_fonts",
2380 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2384 /* Terminal Profile Byte 16 */
2386 { "Terminal Profile Byte 16 (Screen effects)", "gsm_sim.tp.b16",
2387 FT_UINT8
, BASE_HEX
, NULL
, 0,
2390 { &hf_tp_display_resize
,
2391 { "Display resize", "gsm_sim.tp.display.resize",
2392 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2395 { &hf_tp_text_wrapping
,
2396 { "Text Wrapping", "gsm_sim.tp.display.wrapping",
2397 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2400 { &hf_tp_text_scrolling
,
2401 { "Text Scrolling", "gsm_sim.tp.display.scrolling",
2402 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2405 { &hf_tp_text_attributes
,
2406 { "Text Attributes", "gsm_sim.tp.display.attributes",
2407 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2411 { "RFU", "gsm_sim.tp.rfu",
2412 FT_UINT8
, BASE_HEX
, NULL
, 0x10,
2415 { &hf_tp_width_red_menu
,
2416 { "Width reduction when in menu", "gsm_sim.tp.display.width_red_menu",
2417 FT_UINT8
, BASE_DEC
, NULL
, 0xe0,
2421 /* Terminal Profile Byte 17 */
2423 { "Terminal Profile Byte 17 (Bearer independent protocol supported transport interface/bearers, class \"e\")", "gsm_sim.tp.b17",
2424 FT_UINT8
, BASE_HEX
, NULL
, 0,
2427 { &hf_tp_bip_tcp_remote
,
2428 { "TCP client mode remote connection", "gsm_sim.tp.bip.tcp_remote",
2429 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2432 { &hf_tp_bip_udp_remote
,
2433 { "UDP client mode remote connection", "gsm_sim.tp.bip.udp_remote",
2434 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2437 { &hf_tp_bip_tcp_server
,
2438 { "TCP server mode", "gsm_sim.tp.bip.tcp_server",
2439 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2442 { &hf_tp_bip_tcp_local
,
2443 { "TCP client mode local connection", "gsm_sim.tp.bip.tcp_local",
2444 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2447 { &hf_tp_bip_udp_local
,
2448 { "UDP client mode local connection", "gsm_sim.tp.bip.udp_local",
2449 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2452 { &hf_tp_bip_direct_com
,
2453 { "Direct communication channel", "gsm_sim.tp.bip.direct_com",
2454 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2457 { &hf_tp_bip_eutran
,
2458 { "E-UTRAN bearer", "gsm_sim.tp.bip.eutran",
2459 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2463 { "HSDPA bearer", "gsm_sim.tp.bip.hsdpa",
2464 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2468 /* Terminal Profile Byte 18 */
2470 { "Terminal Profile Byte 18 (Bearer independent protocol)", "gsm_sim.tp.b18",
2471 FT_UINT8
, BASE_HEX
, NULL
, 0,
2474 { &hf_tp_pa_display_text_var_time_out
,
2475 { "Proactive SIM: DISPLAY TEXT (Variable Time out)", "gsm_sim.tp.pa.display_text_var_time_out",
2476 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2479 { &hf_tp_pa_get_inkey_help
,
2480 { "Proactive SIM: GET INKEY (help is supported)", "gsm_sim.tp.pa.get_inkey_help",
2481 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2485 { "USB bearer", "gsm_sim.tp.bip.usb",
2486 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2489 { &hf_tp_pa_get_inkey_var_time_out
,
2490 { "Proactive SIM: GET INKEY (Variable Timeout)", "gsm_sim.tp.pa.get_inkey_var_time_out",
2491 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2494 { &hf_tp_pa_prov_loci_esn
,
2495 { "Proactive SIM: PROVIDE LOCAL INFORMATION (ESN)", "gsm_sim.tp.pa.prov_loci_esn",
2496 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2500 { "CALL CONTROL on GPRS", "gsm_sim.tp.cc_gprs",
2501 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2504 { &hf_tp_pa_prov_loci_imeisv
,
2505 { "Proactive SIM: PROVIDE LOCAL INFORMATION (IMEISV)", "gsm_sim.tp.pa.prov_loci_imeisv",
2506 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2509 { &hf_tp_pa_prov_loci_search_mode_change
,
2510 { "Proactive SIM: PROVIDE LOCAL INFORMATION (Search Mode change)", "gsm_sim.tp.pa.prov_loci_search_mode_change",
2511 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2515 /* Terminal Profile Byte 19 */
2517 { "Terminal Profile Byte 19 (TIA/EIA-136-C facilities)", "gsm_sim.tp.b19",
2518 FT_UINT8
, BASE_HEX
, NULL
, 0,
2521 { &hf_tp_tia_eia_version
,
2522 { "TIA/EIA Version", "gsm_sim.tp.tia_eia_version",
2523 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
2527 { "RFU", "gsm_sim.tp.rfu",
2528 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
2532 /* Terminal Profile Byte 20 */
2534 { "Terminal Profile Byte 20 (TIA/EIA/IS-820-A facilities)", "gsm_sim.tp.b20",
2535 FT_UINT8
, BASE_HEX
, NULL
, 0,
2538 { &hf_tp_tia_iea_is820a_reserved
,
2539 { "Reserved", "gsm_sim.tp.tia_iea_is820a_reserved",
2540 FT_UINT8
, BASE_HEX
, NULL
, 0xff,
2544 /* Terminal Profile Byte 21 */
2546 { "Terminal Profile Byte 21 (Extended Launch Browser Capability)", "gsm_sim.tp.b21",
2547 FT_UINT8
, BASE_HEX
, NULL
, 0,
2550 { &hf_tp_ext_launch_browser_wml
,
2551 { "WML", "gsm_sim.tp.ext_launch_browser.wml",
2552 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2555 { &hf_tp_ext_launch_browser_xhtml
,
2556 { "XHTML", "gsm_sim.tp.ext_launch_browser.xhtml",
2557 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2560 { &hf_tp_ext_launch_browser_html
,
2561 { "HTML", "gsm_sim.tp.ext_launch_browser.html",
2562 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2565 { &hf_tp_ext_launch_browser_chtml
,
2566 { "CHTML", "gsm_sim.tp.ext_launch_browser.chtml",
2567 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2571 { "RFU", "gsm_sim.tp.rfu",
2572 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
2576 /* Terminal Profile Byte 22 */
2578 { "Terminal Profile Byte 22", "gsm_sim.tp.b22",
2579 FT_UINT8
, BASE_HEX
, NULL
, 0,
2582 { &hf_tp_utran_ps_ext_params
,
2583 { "UTRAN PS with extended parameters", "gsm_sim.tp.utran_ps_ext_params",
2584 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2587 { &hf_tp_pa_prov_loci_batt_state
,
2588 { "Proactive SIM: PROVIDE LOCAL INFORMATION (battery state)", "gsm_sim.tp.pa.prov_loci_batt_state",
2589 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2592 { &hf_tp_pa_play_tone_melody
,
2593 { "Proactive SIM: PLAY TONE (Melody tones and Themed tones supported)", "gsm_sim.tp.pa.play_tone_melody",
2594 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2597 { &hf_tp_mm_call_set_up_call
,
2598 { "Multi-media Calls in SET UP CALL", "gsm_sim.tp.mm_call_set_up_call",
2599 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2602 { &hf_tp_toolkit_initiated_gba
,
2603 { "Toolkit-initiated GBA", "gsm_sim.tp.toolkit_initiated_gba",
2604 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2607 { &hf_tp_pa_retrieve_mm_msg
,
2608 { "Proactive SIM: RETRIEVE MULTIMEDIA MESSAGE", "gsm_sim.tp.pa.retrieve_mm_msg",
2609 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2612 { &hf_tp_pa_submit_mm_msg
,
2613 { "Proactive SIM: SUBMIT MULTIMEDIA MESSAGE", "gsm_sim.tp.pa.submit_mm_msg",
2614 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2617 { &hf_tp_pa_display_mm_msg
,
2618 { "Proactive SIM: DISPLAY MULTIMEDIA MESSAGE", "gsm_sim.tp.pa.display_mm_msg",
2619 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2623 /* Terminal Profile Byte 23 */
2625 { "Terminal Profile Byte 23", "gsm_sim.tp.b23",
2626 FT_UINT8
, BASE_HEX
, NULL
, 0,
2629 { &hf_tp_pa_set_frames
,
2630 { "Proactive SIM: SET FRAMES", "gsm_sim.tp.pa.set_frames",
2631 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2634 { &hf_tp_pa_get_frames_status
,
2635 { "Proactive SIM: GET FRAMES STATUS", "gsm_sim.tp.pa.get_frames_status",
2636 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2639 { &hf_tp_mms_notif_download
,
2640 { "MMS notification download", "gsm_sim.tp.mms_notif_download",
2641 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2644 { &hf_tp_alpha_id_refresh_cmd
,
2645 { "Alpha Identifier in REFRESH command", "gsm_sim.tp.alpha_id_refresh_cmd",
2646 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2649 { &hf_tp_geo_loc_report
,
2650 { "Geographical Location Reporting", "gsm_sim.tp.geo_loc_report",
2651 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2654 { &hf_tp_pa_prov_loci_meid
,
2655 { "Proactive SIM: PROVIDE LOCAL INFORMATION (MEID)", "gsm_sim.tp.pa.prov_loci_meid",
2656 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2659 { &hf_tp_pa_prov_loci_nmr_utran_eutran
,
2660 { "Proactive SIM: PROVIDE LOCAL INFORMATION (NMR(UTRAN/E-UTRAN))", "gsm_sim.tp.pa.prov_loci_nmr_utran_eutran",
2661 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2664 { &hf_tp_ussd_data_download
,
2665 { "USSD Data download and application mode", "gsm_sim.tp.ussd_data_download",
2666 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2670 /* Terminal Profile Byte 24 */
2672 { "Terminal Profile Byte 24 (Class \"i\")", "gsm_sim.tp.b24",
2673 FT_UINT8
, BASE_HEX
, NULL
, 0,
2676 { &hf_tp_class_i_max_nb_frames
,
2677 { "Maximum number of frames supported", "gsm_sim.tp.class_i_max_nb_frames",
2678 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
2682 { "RFU", "gsm_sim.tp.rfu",
2683 FT_UINT8
, BASE_HEX
, NULL
, 0xf0,
2687 /* Terminal Profile Byte 25 */
2689 { "Terminal Profile Byte 25 (Event driven information extensions)", "gsm_sim.tp.b25",
2690 FT_UINT8
, BASE_HEX
, NULL
, 0,
2693 { &hf_tp_evt_browsing_status
,
2694 { "Event: Browsing status", "gsm_sim.tp.evt.browsing_status",
2695 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2698 { &hf_tp_evt_mms_transfer_status
,
2699 { "Event: MMS Transfer status", "gsm_sim.tp.evt.mms_transfer_status",
2700 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2703 { &hf_tp_evt_frame_info_changed
,
2704 { "Event: Frame Information changed", "gsm_sim.tp.evt.frame_info_changed",
2705 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2708 { &hf_tp_evt_iwlan_access_status
,
2709 { "Event: I-WLAN Access status", "gsm_sim.tp.evt.iwlan_access_status",
2710 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2713 { &hf_tp_evt_nw_reject_geran_utran
,
2714 { "Event: Network Rejection for GERAN/UTRAN", "gsm_sim.tp.evt.nw_reject_geran_utran",
2715 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2718 { &hf_tp_evt_hci_connectivity
,
2719 { "Event: HCI connectivity", "gsm_sim.tp.evt.hci_connectivity",
2720 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2723 { &hf_tp_evt_nw_reject_eutran
,
2724 { "Event: Network Rejection for E-UTRAN", "gsm_sim.tp.evt.reject_eutran",
2725 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2728 { &hf_tp_evt_mult_access_techno_change
,
2729 { "Multiple access technologies supported in Event Access Technology Change and PROVIDE LOCAL INFORMATION",
2730 "gsm_sim.tp.evt.mult_access_techno_change",
2731 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2735 /* Terminal Profile Byte 26 */
2737 { "Terminal Profile Byte 26 (Event driven information extensions)", "gsm_sim.tp.b26",
2738 FT_UINT8
, BASE_HEX
, NULL
, 0,
2741 { &hf_tp_evt_csg_cell_select
,
2742 { "Event: CSG Cell Selection", "gsm_sim.tp.evt.csg_cell_select",
2743 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2746 { &hf_tp_evt_contactless_state_req
,
2747 { "Event: Contactless state request", "gsm_sim.tp.evt.contactless_state_req",
2748 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2752 { "RFU", "gsm_sim.tp.rfu",
2753 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
2757 /* Terminal Profile Byte 27 */
2759 { "Terminal Profile Byte 27 (Event driven information extensions)", "gsm_sim.tp.b27",
2760 FT_UINT8
, BASE_HEX
, NULL
, 0,
2764 { "RFU", "gsm_sim.tp.rfu",
2765 FT_UINT8
, BASE_HEX
, NULL
, 0xff,
2769 /* Terminal Profile Byte 28 */
2771 { "Terminal Profile Byte 28 (Text attributes)", "gsm_sim.tp.b28",
2772 FT_UINT8
, BASE_HEX
, NULL
, 0,
2775 { &hf_tp_text_align_left
,
2776 { "Alignment left", "gsm_sim.tp.text.align_left",
2777 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2780 { &hf_tp_text_align_centre
,
2781 { "Alignment centre", "gsm_sim.tp.text.align_centre",
2782 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2785 { &hf_tp_text_align_right
,
2786 { "Alignment right", "gsm_sim.tp.text.align_right",
2787 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2790 { &hf_tp_text_font_size_normal
,
2791 { "Font size normal", "gsm_sim.tp.text.font_size_normal",
2792 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2795 { &hf_tp_text_font_size_large
,
2796 { "Font size large", "gsm_sim.tp.text.font_size_large",
2797 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2800 { &hf_tp_text_font_size_small
,
2801 { "Font size small", "gsm_sim.tp.text.font_size_small",
2802 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2806 { "RFU", "gsm_sim.tp.rfu",
2807 FT_UINT8
, BASE_HEX
, NULL
, 0xc0,
2811 /* Terminal Profile Byte 29 */
2813 { "Terminal Profile Byte 29 (Text attributes)", "gsm_sim.tp.b29",
2814 FT_UINT8
, BASE_HEX
, NULL
, 0,
2817 { &hf_tp_text_style_normal
,
2818 { "Style normal", "gsm_sim.tp.text.style_normal",
2819 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2822 { &hf_tp_text_style_bold
,
2823 { "Style bold", "gsm_sim.tp.text.style_bold",
2824 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2827 { &hf_tp_text_style_italic
,
2828 { "Style italic", "gsm_sim.tp.text.style_italic",
2829 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2832 { &hf_tp_text_style_underlined
,
2833 { "Style underlined", "gsm_sim.tp.text.style_underlined",
2834 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2837 { &hf_tp_text_style_strikethrough
,
2838 { "Style strikethrough", "gsm_sim.tp.text.style_strikethrough",
2839 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2842 { &hf_tp_text_style_text_fg_colour
,
2843 { "Style text foreground colour", "gsm_sim.tp.text.style_text_fg_colour",
2844 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2847 { &hf_tp_text_style_text_bg_colour
,
2848 { "Style text background colour", "gsm_sim.tp.text.style_text_bg_colour",
2849 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2853 { "RFU", "gsm_sim.tp.rfu",
2854 FT_UINT8
, BASE_HEX
, NULL
, 0x80,
2858 /* Terminal Profile Byte 30 */
2860 { "Terminal Profile Byte 30", "gsm_sim.tp.b30",
2861 FT_UINT8
, BASE_HEX
, NULL
, 0,
2865 { "I-WLAN bearer", "gsm_sim.tp.bip.iwlan",
2866 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2869 { &hf_tp_pa_prov_loci_wsid
,
2870 { "Proactive SIM: PROVIDE LOCAL INFORMATION (WSID of the current I-WLAN connection)", "gsm_sim.tp.pa.prov_loci_wsid",
2871 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2875 { "TERMINAL APPLICATIONS", "gsm_sim.tp.term_app",
2876 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2879 { &hf_tp_steering_roaming_refresh
,
2880 { "\"Steering of Roaming\" REFRESH", "gsm_sim.tp.steering_roaming_refresh",
2881 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2884 { &hf_tp_pa_activate
,
2885 { "Proactive SIM: ACTIVATE", "gsm_sim.tp.pa.activate",
2886 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2889 { &hf_tp_pa_geo_loc_req
,
2890 { "Proactive SIM: Geographical Location Request", "gsm_sim.tp.pa.geo_loc_req",
2891 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2894 { &hf_tp_pa_prov_loci_broadcast_nw_info
,
2895 { "Proactive SIM: PROVIDE LOCAL INFORMATION (Broadcast Network Information)", "gsm_sim.tp.pa.prov_loci_broadcast_nw_info",
2896 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2899 { &hf_tp_steering_roaming_iwlan_refresh
,
2900 { "\"Steering of Roaming for I-WLAN\" REFRESH", "gsm_sim.tp.steering_roaming_iwlan_refresh",
2901 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2905 /* Terminal Profile Byte 31 */
2907 { "Terminal Profile Byte 31", "gsm_sim.tp.b31",
2908 FT_UINT8
, BASE_HEX
, NULL
, 0,
2911 { &hf_tp_pa_contactless_state_changed
,
2912 { "Proactive SIM: Contactless State Changed", "gsm_sim.tp.pa.contactless_state_changed",
2913 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2916 { &hf_tp_csg_cell_discovery
,
2917 { "CSG cell discovery", "gsm_sim.tp.csg_cell_discovery",
2918 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2921 { &hf_tp_cnf_params_support_open_chan_server_mode
,
2922 { "Confirmation parameters supported for OPEN CHANNEL in Terminal Server Mode", "gsm_sim.tp.cnf_params_support_open_chan_server_mode",
2923 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2926 { &hf_tp_com_ctrl_ims
,
2927 { "Communication Control for IMS", "gsm_sim.tp.com_ctrl_ims",
2928 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2931 { &hf_tp_cat_over_modem_itf
,
2932 { "CAT over the modem interface", "gsm_sim.tp.cat_over_modem_itf",
2933 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2936 { &hf_tp_evt_incoming_data_ims
,
2937 { "Event: Incoming IMS Data", "gsm_sim.tp.evt.incoming_data_ims",
2938 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2941 { &hf_tp_evt_ims_registration
,
2942 { "Event: IMS Registration", "gsm_sim.tp.evt.ims_registration",
2943 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2946 { &hf_tp_pa_prof_env_cont
,
2947 { "Proactive SIM: Profile Container, Envelope Container, COMMAND CONTAINER and ENCAPSULATED SESSION CONTROL", "gsm_sim.tp.pa.prof_env_cont",
2948 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2952 /* Terminal Profile Byte 32 */
2954 { "Terminal Profile Byte 32", "gsm_sim.tp.b32",
2955 FT_UINT8
, BASE_HEX
, NULL
, 0,
2959 { "IMS bearer", "gsm_sim.tp.bip.ims",
2960 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
2963 { &hf_tp_pa_prov_loci_henb_ip_addr
,
2964 { "Proactive SIM: PROVIDE LOCAL INFORMATION (H(e)NB IP address)", "gsm_sim.tp.pa.prov_loci_henb_ip_addr",
2965 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
2968 { &hf_tp_pa_prov_loci_henb_surround_macro
,
2969 { "Proactive SIM: PROVIDE LOCAL INFORMATION (H(e)NB surrounding macrocells)", "gsm_sim.tp.pa.prov_loci_henb_surround_macro",
2970 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
2973 { &hf_tp_launch_params_support_open_chan_server_mode
,
2974 { "Launch parameters supported for OPEN CHANNEL in Terminal Server Mode", "gsm_sim.tp.launch_params_support_open_chan_server_mode",
2975 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
2978 { &hf_tp_direct_com_support_open_chan_server_mode
,
2979 { "Direct communication channel supported for OPEN CHANNEL in Terminal Server Mode", "gsm_sim.tp.direct_com_support_open_chan_server_mode",
2980 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
2983 { &hf_tp_pa_sec_prof_env_cont
,
2984 { "Proactive SIM: Security for Profile Container, Envelope Container, COMMAND CONTAINER and ENCAPSULATED SESSION CONTROL", "gsm_sim.tp.sec_prof_env_cont",
2985 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
2988 { &hf_tp_cat_serv_list_ecat_client
,
2989 { "CAT service list for eCAT client", "gsm_sim.tp.serv_list_ecat_client",
2990 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
2993 { &hf_tp_support_refresh_enforcement_policy
,
2994 { "Support of refresh enforcement policy", "gsm_sim.tp.refresh_enforcement_policy",
2995 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
2999 /* Terminal Profile Byte 33 */
3001 { "Terminal Profile Byte 33", "gsm_sim.tp.b33",
3002 FT_UINT8
, BASE_HEX
, NULL
, 0,
3005 { &hf_tp_support_dns_addr_req
,
3006 { "Support of DNS server address request for OPEN CHANNEL related to packet data service bearer", "gsm_sim.tp.support_dns_addr_req",
3007 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
3010 { &hf_tp_support_nw_access_name_reuse
,
3011 { "Support of Network Access Name reuse indication for CLOSE CHANNEL related to packet data service bearer", "gsm_sim.tp.nw_access_name_reuse",
3012 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
3015 { &hf_tp_ev_poll_intv_nego
,
3016 { "Event: Poll Interval Negotiation", "gsm_sim.tp.evt.poll_intv_nego",
3017 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
3021 { "RFU", "gsm_sim.tp.rfu",
3022 FT_UINT8
, BASE_HEX
, NULL
, 0xf8,
3026 { &hf_tprof_unknown_byte
,
3027 { "Unknown Terminal Profile Byte", "gsm_sim.tp.unknown_byte",
3028 FT_UINT8
, BASE_HEX
, NULL
, 0,
3033 { "BER-TLV Tag", "gsm_sim.cat.ber_tlv_tag",
3034 FT_UINT8
, BASE_HEX
, VALS(ber_tlv_cat_tag_vals
), 0,
3035 "Card Application Toolkit BER-TLV tag", HFILL
},
3039 { "Seek Mode", "gsm_sim.seek_mode",
3040 FT_UINT8
, BASE_HEX
, VALS(seek_mode_vals
), 0x0F,
3044 { "Seek Type", "gsm_sim.seek_type",
3045 FT_UINT8
, BASE_DEC
, VALS(seek_type_vals
), 0x0F,
3049 { "Seek Record Number", "gsm_sim.seek_rec_nr",
3050 FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
},
3053 static int *ett
[] = {
3090 proto_gsm_sim
= proto_register_protocol("GSM SIM 11.11", "GSM SIM",
3093 proto_register_field_array(proto_gsm_sim
, hf
, array_length(hf
));
3095 proto_register_subtree_array(ett
, array_length(ett
));
3097 /* This dissector is for SIMtrace, which always combines the command
3098 * & response APDUs into one packet before sending it to GSMTAP. Cf.
3099 * https://github.com/yarrick/scsniff/issues/1#issuecomment-2295835330
3101 sim_handle
= register_dissector("gsm_sim", dissect_gsm_sim
, proto_gsm_sim
);
3102 register_dissector("gsm_sim.command", dissect_gsm_sim_command
, proto_gsm_sim
);
3103 register_dissector("gsm_sim.response", dissect_gsm_sim_response
, proto_gsm_sim
);
3104 register_dissector("gsm_sim.bertlv", dissect_bertlv
, proto_gsm_sim
);
3105 sim_part_handle
= register_dissector("gsm_sim.part", dissect_gsm_sim_part
, proto_gsm_sim
);
3109 proto_reg_handoff_gsm_sim(void)
3111 dissector_add_for_decode_as("usbccid.subdissector", sim_part_handle
);
3113 sub_handle_cap
= find_dissector_add_dependency("etsi_cat", proto_gsm_sim
);
3117 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3122 * indent-tabs-mode: t
3125 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
3126 * :indentSize=8:tabSize=8:noTabs=false: