2 * Dissector for Nokia's Intelligent Service Interface protocol
3 * Copyright 2010, Sebastian Reichel <sre@ring0.de>
4 * Copyright 2010, Tyson Key <tyson.key@gmail.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/prefs.h>
16 #include <epan/expert.h>
17 #include <epan/packet.h>
19 #include "packet-sll.h"
20 #include "packet-e212.h"
22 void proto_register_isi(void);
23 void proto_reg_handoff_isi(void);
25 /* Dissector table for the isi resource */
26 static dissector_table_t isi_resource_dissector_table
;
28 static const value_string hf_isi_device
[] = {
35 static const value_string hf_isi_resource
[] = {
38 {0x06, "Subscriber Services"},
39 {0x08, "SIM Authentication"},
44 {0x1B, "Phone Information"},
46 {0x32, "General Stack Server"}, /* Mysterious type 50 - I don't know what this is*/
49 {0xB4, "Radio Settings"}, /* Mysterious type 180? */
53 static const value_string isi_sim_auth_id
[] = {
54 {0x01, "SIM_AUTH_PROTECTED_REQ"},
55 {0x02, "SIM_AUTH_PROTECTED_RESP"},
56 {0x04, "SIM_AUTH_UPDATE_REQ"},
57 {0x05, "SIM_AUTH_UPDATE_SUCCESS_RESP"},
58 {0x06, "SIM_AUTH_UPDATE_FAIL_RESP"},
59 {0x07, "SIM_AUTH_REQ"},
60 {0x08, "SIM_AUTH_SUCCESS_RESP"},
61 {0x09, "SIM_AUTH_FAIL_RESP"},
62 {0x10, "SIM_AUTH_STATUS_IND"},
63 {0x11, "SIM_AUTH_STATUS_REQ"},
64 {0x12, "SIM_AUTH_STATUS_RESP"},
68 static const value_string isi_sim_auth_pw_type
[] = {
69 {0x02, "SIM_AUTH_PIN"},
70 {0x03, "SIM_AUTH_PUK"},
71 {0x63, "SIM_AUTH_NONE"},
75 static const value_string isi_sim_auth_protection_req
[] = {
76 {0x00, "SIM_AUTH_PROTECTION_DISABLE"},
77 {0x01, "SIM_AUTH_PROTECTION_ENABLE"},
78 {0x04, "SIM_AUTH_PROTECTION_STATUS"},
82 static const value_string isi_sim_auth_resp
[] = {
83 {0x02, "SIM_AUTH_STATUS_RESP_NEED_PIN"},
84 {0x03, "SIM_AUTH_STATUS_RESP_NEED_PUK"},
85 {0x05, "SIM_AUTH_STATUS_RESP_RUNNING"},
86 {0x07, "SIM_AUTH_STATUS_RESP_INIT"},
90 static const value_string isi_sim_auth_indication
[] = {
91 {0x01, "SIM_AUTH_NEED_AUTH"},
92 {0x02, "SIM_AUTH_NEED_NO_AUTH"},
93 {0x03, "SIM_AUTH_VALID"},
94 {0x04, "SIM_AUTH_INVALID"},
95 {0x05, "SIM_AUTH_AUTHORIZED"},
96 {0x06, "SIM_AUTH_IND_CONFIG"},
100 static const value_string isi_sim_auth_indication_cfg
[] = {
101 {0x0B, "SIM_AUTH_PIN_PROTECTED_DISABLE"},
102 {0x0C, "SIM_AUTH_PIN_PROTECTED_ENABLE"},
106 static const value_string isi_sim_message_id
[] = {
107 {0x19, "SIM_NETWORK_INFO_REQ"},
108 {0x1A, "SIM_NETWORK_INFO_RESP"},
109 {0x1D, "SIM_IMSI_REQ_READ_IMSI"},
110 {0x1E, "SIM_IMSI_RESP_READ_IMSI"},
111 {0x21, "SIM_SERV_PROV_NAME_REQ"},
112 {0x22, "SIM_SERV_PROV_NAME_RESP"},
113 {0xBA, "SIM_READ_FIELD_REQ"},
114 {0xBB, "SIM_READ_FIELD_RESP"},
115 {0xBC, "SIM_SMS_REQ"},
116 {0xBD, "SIM_SMS_RESP"},
117 {0xDC, "SIM_PB_REQ_SIM_PB_READ"},
118 {0xDD, "SIM_PB_RESP_SIM_PB_READ"},
120 {0xF0, "SIM_COMMON_MESSAGE"},
124 static const value_string isi_sim_service_type
[] = {
125 {0x01, "SIM_ST_PIN"},
126 {0x05, "SIM_ST_ALL_SERVICES"},
127 {0x0D, "SIM_ST_INFO"},
128 {0x2C, "SIM_ST_READ_SERV_PROV_NAME"},
129 {0x0F, "SIM_PB_READ"},
131 {0x2F, "READ_HPLMN"},
132 {0x52, "READ_PARAMETER"},
133 {0x53, "UPDATE_PARAMETER"},
138 static const value_string isi_sim_cause
[] = {
139 {0x00, "SIM_SERV_NOT_AVAIL"},
140 {0x01, "SIM_SERV_OK"},
141 {0x02, "SIM_SERV_PIN_VERIFY_REQUIRED"},
142 {0x03, "SIM_SERV_PIN_REQUIRED"},
143 {0x04, "SIM_SERV_SIM_BLOCKED"},
144 {0x05, "SIM_SERV_SIM_PERMANENTLY_BLOCKED"},
145 {0x06, "SIM_SERV_SIM_DISCONNECTED"},
146 {0x07, "SIM_SERV_SIM_REJECTED"},
147 {0x08, "SIM_SERV_LOCK_ACTIVE"},
148 {0x09, "SIM_SERV_AUTOLOCK_CLOSED"},
149 {0x0A, "SIM_SERV_AUTOLOCK_ERROR"},
150 {0x0B, "SIM_SERV_INIT_OK"},
151 {0x0C, "SIM_SERV_INIT_NOT_OK"},
152 {0x0D, "SIM_SERV_WRONG_OLD_PIN"},
153 {0x0E, "SIM_SERV_PIN_DISABLED"},
154 {0x0F, "SIM_SERV_COMMUNICATION_ERROR"},
155 {0x10, "SIM_SERV_UPDATE_IMPOSSIBLE"},
156 {0x11, "SIM_SERV_NO_SECRET_CODE_IN_SIM"},
157 {0x12, "SIM_SERV_PIN_ENABLE_OK"},
158 {0x13, "SIM_SERV_PIN_DISABLE_OK"},
159 {0x15, "SIM_SERV_WRONG_UNBLOCKING_KEY"},
160 {0x19, "SIM_FDN_ENABLED"},
161 {0x1A, "SIM_FDN_DISABLED"},
162 {0x1C, "SIM_SERV_NOT_OK"},
163 {0x1E, "SIM_SERV_PN_LIST_ENABLE_OK"},
164 {0x1F, "SIM_SERV_PN_LIST_DISABLE_OK"},
165 {0x20, "SIM_SERV_NO_PIN"},
166 {0x21, "SIM_SERV_PIN_VERIFY_OK"},
167 {0x22, "SIM_SERV_PIN_BLOCKED"},
168 {0x23, "SIM_SERV_PIN_PERM_BLOCKED"},
169 {0x24, "SIM_SERV_DATA_NOT_AVAIL"},
170 {0x25, "SIM_SERV_IN_HOME_ZONE"},
171 {0x27, "SIM_SERV_STATE_CHANGED"},
172 {0x28, "SIM_SERV_INF_NBR_READ_OK"},
173 {0x29, "SIM_SERV_INF_NBR_READ_NOT_OK"},
174 {0x2A, "SIM_SERV_IMSI_EQUAL"},
175 {0x2B, "SIM_SERV_IMSI_NOT_EQUAL"},
176 {0x2C, "SIM_SERV_INVALID_LOCATION"},
177 {0x2E, "SIM_SERV_ILLEGAL_NUMBER"},
178 {0x30, "SIM_SERV_CIPHERING_INDICATOR_DISPLAY_REQUIRED"},
179 {0x31, "SIM_SERV_CIPHERING_INDICATOR_DISPLAY_NOT_REQUIRED"},
180 {0x35, "SIM_SERV_STA_SIM_REMOVED"},
181 {0x36, "SIM_SERV_SECOND_SIM_REMOVED_CS"},
182 {0x37, "SIM_SERV_CONNECTED_INDICATION_CS"},
183 {0x38, "SIM_SERV_SECOND_SIM_CONNECTED_CS"},
184 {0x39, "SIM_SERV_PIN_RIGHTS_LOST_IND_CS"},
185 {0x3A, "SIM_SERV_PIN_RIGHTS_GRANTED_IND_CS"},
186 {0x3B, "SIM_SERV_INIT_OK_CS"},
187 {0x3C, "SIM_SERV_INIT_NOT_OK_CS"},
188 {0x45, "SIM_SERV_INVALID_FILE"},
189 {0x49, "SIM_SERV_ICC_EQUAL"},
190 {0x4A, "SIM_SERV_ICC_NOT_EQUAL"},
191 {0x4B, "SIM_SERV_SIM_NOT_INITIALISED"},
192 {0x4D, "SIM_SERV_FILE_NOT_AVAILABLE"},
193 {0x4F, "SIM_SERV_DATA_AVAIL"},
194 {0x50, "SIM_SERV_SERVICE_NOT_AVAIL"},
195 {0x57, "SIM_SERV_FDN_STATUS_ERROR"},
196 {0x58, "SIM_SERV_FDN_CHECK_PASSED"},
197 {0x59, "SIM_SERV_FDN_CHECK_FAILED"},
198 {0x5A, "SIM_SERV_FDN_CHECK_DISABLED"},
199 {0x5B, "SIM_SERV_FDN_CHECK_NO_FDN_SIM"},
200 {0x5C, "SIM_STA_ISIM_AVAILABLE_PIN_REQUIRED"},
201 {0x5D, "SIM_STA_ISIM_AVAILABLE"},
202 {0x5E, "SIM_STA_USIM_AVAILABLE"},
203 {0x5F, "SIM_STA_SIM_AVAILABLE"},
204 {0x60, "SIM_STA_ISIM_NOT_INITIALISED"},
205 {0x61, "SIM_STA_IMS_READY"},
206 {0x96, "SIM_STA_APP_DATA_READ_OK"},
207 {0x97, "SIM_STA_APP_ACTIVATE_OK"},
208 {0x98, "SIM_STA_APP_ACTIVATE_NOT_OK"},
209 {0xF9, "SIM_SERV_NOT_DEFINED"},
210 {0xFA, "SIM_SERV_NOSERVICE"},
211 {0xFB, "SIM_SERV_NOTREADY"},
212 {0xFC, "SIM_SERV_ERROR"},
216 static value_string_ext isi_sim_cause_ext
= VALUE_STRING_EXT_INIT(isi_sim_cause
);
218 static const value_string isi_sim_pb_subblock
[] = {
219 {0xE4, "SIM_PB_INFO_REQUEST"},
220 {0xFB, "SIM_PB_STATUS"},
221 {0xFE, "SIM_PB_LOCATION"},
222 {0xFF, "SIM_PB_LOCATION_SEARCH"},
226 static const value_string isi_sim_pb_type
[] = {
227 {0xC8, "SIM_PB_ADN"},
231 static const value_string isi_sim_pb_tag
[] = {
232 {0xCA, "SIM_PB_ANR"},
233 {0xDD, "SIM_PB_EMAIL"},
234 {0xF7, "SIM_PB_SNE"},
238 static const value_string isi_gss_message_id
[] = {
239 {0x00, "GSS_CS_SERVICE_REQ"},
240 {0x01, "GSS_CS_SERVICE_RESP"},
241 {0x02, "GSS_CS_SERVICE_FAIL_RESP"},
242 {0xF0, "COMMON_MESSAGE"},
247 static const value_string isi_gss_subblock
[] = {
248 {0x0B, "GSS_RAT_INFO"},
253 static const value_string isi_gss_operation
[] = {
254 {0x0E, "GSS_SELECTED_RAT_WRITE"},
255 {0x9C, "GSS_SELECTED_RAT_READ"},
259 static const value_string isi_gss_cause
[] = {
260 {0x01, "GSS_SERVICE_FAIL"},
261 {0x02, "GSS_SERVICE_NOT_ALLOWED"},
262 {0x03, "GSS_SERVICE_FAIL_CS_INACTIVE"},
266 static const value_string isi_gss_common_message_id
[] = {
267 {0x01, "COMM_SERVICE_NOT_IDENTIFIED_RESP"},
268 {0x12, "COMM_ISI_VERSION_GET_REQ"},
269 {0x13, "COMM_ISI_VERSION_GET_RESP"},
270 {0x14, "COMM_ISA_ENTITY_NOT_REACHABLE_RESP"},
274 static const value_string isi_gps_id
[] = {
275 {0x7d, "GPS_STATUS_IND"},
276 {0x90, "GPS_POWER_STATUS_REQ"},
277 {0x91, "GPS_POWER_STATUS_RSP"},
278 {0x92, "GPS_DATA_IND"},
282 static const value_string isi_gps_sub_id
[] = {
283 {0x02, "GPS_POSITION"},
284 {0x03, "GPS_TIME_DATE"},
285 {0x04, "GPS_MOVEMENT"},
286 {0x05, "GPS_SAT_INFO"},
287 {0x07, "GPS_CELL_INFO_GSM"},
288 {0x08, "GPS_CELL_INFO_WCDMA"},
292 static const value_string isi_gps_status
[] = {
293 {0x00, "GPS_DISABLED"},
294 {0x01, "GPS_NO_LOCK"},
299 static const value_string isi_ss_message_id
[] = {
300 {0x00, "SS_SERVICE_REQ"},
301 {0x01, "SS_SERVICE_COMPLETED_RESP"},
302 {0x02, "SS_SERVICE_FAILED_RESP"},
303 {0x03, "SS_SERVICE_NOT_SUPPORTED_RESP"},
304 {0x04, "SS_GSM_USSD_SEND_REQ"},
305 {0x05, "SS_GSM_USSD_SEND_RESP"},
306 {0x06, "SS_GSM_USSD_RECEIVE_IND"},
307 {0x09, "SS_STATUS_IND"},
308 {0x10, "SS_SERVICE_COMPLETED_IND"},
309 {0x11, "SS_CANCEL_REQ"},
310 {0x12, "SS_CANCEL_RESP"},
311 {0x15, "SS_RELEASE_REQ"},
312 {0x16, "SS_RELEASE_RESP"},
313 {0xF0, "COMMON_MESSAGE"},
317 static const value_string isi_ss_ussd_type
[] = {
318 {0x01, "SS_GSM_USSD_MT_REPLY"},
319 {0x02, "SS_GSM_USSD_COMMAND"},
320 {0x03, "SS_GSM_USSD_REQUEST"},
321 {0x04, "SS_GSM_USSD_NOTIFY"},
322 {0x05, "SS_GSM_USSD_END"},
326 static const value_string isi_ss_subblock
[] = {
327 {0x00, "SS_FORWARDING"},
328 {0x01, "SS_STATUS_RESULT"},
329 {0x03, "SS_GSM_PASSWORD"},
330 {0x04, "SS_GSM_FORWARDING_INFO"},
331 {0x05, "SS_GSM_FORWARDING_FEATURE"},
332 {0x08, "SS_GSM_DATA"},
333 {0x09, "SS_GSM_BSC_INFO"},
334 {0x0B, "SS_GSM_PASSWORD_INFO"},
335 {0x0D, "SS_GSM_INDICATE_PASSWORD_ERROR"},
336 {0x0E, "SS_GSM_INDICATE_ERROR"},
337 {0x2F, "SS_GSM_ADDITIONAL_INFO"},
338 {0x32, "SS_GSM_USSD_STRING"},
342 static const value_string isi_ss_operation
[] = {
343 {0x01, "SS_ACTIVATION"},
344 {0x02, "SS_DEACTIVATION"},
345 {0x03, "SS_REGISTRATION"},
346 {0x04, "SS_ERASURE"},
347 {0x05, "SS_INTERROGATION"},
348 {0x06, "SS_GSM_PASSWORD_REGISTRATION"},
352 static const value_string isi_ss_service_code
[] = {
353 {0x00, "SS_ALL_TELE_AND_BEARER"},
354 {0x0A, "SS_GSM_ALL_TELE"},
355 {0x0B, "SS_GSM_TELEPHONY"},
356 {0x0C, "SS_GSM_ALL_DATA_TELE"},
357 {0x0D, "SS_GSM_FACSIMILE"},
358 {0x10, "SS_GSM_SMS"},
362 static const value_string isi_ss_status_indication
[] = {
363 {0x00, "SS_STATUS_REQUEST_SERVICE_START"},
364 {0x01, "SS_STATUS_REQUEST_SERVICE_STOP"},
365 {0x02, "SS_GSM_STATUS_REQUEST_USSD_START"},
366 {0x03, "SS_GSM_STATUS_REQUEST_USSD_STOP"},
370 static const value_string isi_ss_common_message_id
[] = {
371 {0x01, "COMM_SERVICE_NOT_IDENTIFIED_RESP"},
372 {0x12, "COMM_ISI_VERSION_GET_REQ"},
373 {0x13, "COMM_ISI_VERSION_GET_RESP"},
374 {0x14, "COMM_ISA_ENTITY_NOT_REACHABLE_RESP"},
378 static const value_string isi_network_id
[] = {
379 {0x07, "NET_SET_REQ"},
380 {0x08, "NET_SET_RESP"},
381 {0x0B, "NET_RSSI_GET_REQ"},
382 {0x0C, "NET_RSSI_GET_RESP"},
383 {0x1E, "NET_RSSI_IND"},
384 {0x20, "NET_CIPHERING_IND"},
385 {0x35, "NET_RAT_IND"},
386 {0x36, "NET_RAT_REQ"},
387 {0x37, "NET_RAT_RESP"},
388 {0x42, "NET_CELL_INFO_IND"},
389 {0xE0, "NET_REG_STATUS_GET_REQ"},
390 {0xE1, "NET_REG_STATUS_GET_RESP"},
391 {0xE2, "NET_REG_STATUS_IND"},
392 {0xE3, "NET_AVAILABLE_GET_REQ"},
393 {0xE4, "NET_AVAILABLE_GET_RESP"},
394 {0xE5, "NET_OPER_NAME_READ_REQ"},
395 {0xE6, "NET_OPER_NAME_READ_RESP"},
396 {0xF0, "NET_COMMON_MESSAGE"},
400 static const value_string isi_network_status_sub_id
[] = {
401 {0x00, "NET_REG_INFO_COMMON"},
402 {0x02, "NET_OPERATOR_INFO_COMMON"},
403 {0x04, "NET_RSSI_CURRENT"},
404 {0x09, "NET_GSM_REG_INFO"},
405 {0x0B, "NET_DETAILED_NETWORK_INFO"},
406 {0x0C, "NET_GSM_OPERATOR_INFO"},
407 {0x11, "NET_GSM_BAND_INFO"},
408 {0x2C, "NET_RAT_INFO"},
409 {0xE1, "NET_AVAIL_NETWORK_INFO_COMMON"},
410 {0xE7, "NET_OPER_NAME_INFO"},
414 static const value_string isi_network_cell_info_sub_id
[] = {
415 {0x46, "NET_GSM_CELL_INFO"},
416 {0x47, "NET_WCDMA_CELL_INFO"},
417 {0x50, "NET_EPS_CELL_INFO"},
421 /* centimeter per second to kilometer per hour */
422 #define CMS_TO_KMH 0.036
423 #define SAT_PKG_LEN 12
425 static const value_string isi_sms_message_id
[] = {
426 {0x00, "SMS_MESSAGE_CAPABILITY_REQ"},
427 {0x01, "SMS_MESSAGE_CAPABILITY_RESP"},
428 {0x02, "SMS_MESSAGE_SEND_REQ"},
429 {0x03, "SMS_MESSAGE_SEND_RESP"},
430 {0x04, "SMS_RECEIVED_MT_PP_IND"},
431 {0x05, "SMS_RECEIVED_MWI_PP_IND"},
432 {0x06, "SMS_PP_ROUTING_REQ"},
433 {0x07, "SMS_PP_ROUTING_RESP"},
434 {0x08, "SMS_PP_ROUTING_NTF"},
435 {0x09, "SMS_GSM_RECEIVED_PP_REPORT_REQ"},
436 {0x0A, "SMS_GSM_RECEIVED_PP_REPORT_RESP"},
437 {0x0B, "SMS_GSM_CB_ROUTING_REQ"},
438 {0x0C, "SMS_GSM_CB_ROUTING_RESP"},
439 {0x0D, "SMS_GSM_CB_ROUTING_NTF"},
440 {0x0E, "SMS_GSM_TEMP_CB_ROUTING_REQ"},
441 {0x0F, "SMS_GSM_TEMP_CB_ROUTING_RESP"},
442 {0x10, "SMS_GSM_TEMP_CB_ROUTING_NTF"},
443 {0x11, "SMS_GSM_CBCH_PRESENT_IND"},
444 {0x12, "SMS_PARAMETERS_UPDATE_REQ"},
445 {0x13, "SMS_PARAMETERS_UPDATE_RESP"},
446 {0x14, "SMS_PARAMETERS_READ_REQ"},
447 {0x15, "SMS_PARAMETERS_READ_RESP"},
448 {0x16, "SMS_PARAMETERS_CAPACITY_REQ"},
449 {0x17, "SMS_PARAMETERS_CAPACITY_RESP"},
450 {0x18, "SMS_GSM_SETTINGS_UPDATE_REQ"},
451 {0x19, "SMS_GSM_SETTINGS_UPDATE_RESP"},
452 {0x1A, "SMS_GSM_SETTINGS_READ_REQ"},
453 {0x1B, "SMS_GSM_SETTINGS_READ_RESP"},
454 {0x1C, "SMS_GSM_MCN_SETTING_CHANGED_IND"},
455 {0x1D, "SMS_MEMORY_CAPACITY_EXC_IND"},
456 {0x1E, "SMS_STORAGE_STATUS_UPDATE_REQ"},
457 {0x1F, "SMS_STORAGE_STATUS_UPDATE_RESP"},
458 {0x22, "SMS_MESSAGE_SEND_STATUS_IND"},
459 {0x23, "SMS_GSM_RESEND_CANCEL_REQ"},
460 {0x24, "SMS_GSM_RESEND_CANCEL_RESP"},
461 {0x25, "SMS_SM_CONTROL_ACTIVATE_REQ"},
462 {0x26, "SMS_SM_CONTROL_ACTIVATE_RESP"},
463 /* 0x29 is undocumented, but appears in traces */
464 {0xF0, "COMMON_MESSAGE"},
468 static const value_string isi_sms_routing_command
[] = {
469 {0x00, "SMS_ROUTING_RELEASE"},
470 {0x01, "SMS_ROUTING_SET"},
471 {0x02, "SMS_ROUTING_SUSPEND"},
472 {0x03, "SMS_ROUTING_RESUME"},
473 {0x04, "SMS_ROUTING_UPDATE"},
474 {0x05, "SMS_ROUTING_QUERY"},
475 {0x06, "SMS_ROUTING_QUERY_ALL"},
479 static const value_string isi_sms_routing_mode
[] = {
480 {0x00, "SMS_GSM_ROUTING_MODE_CLASS_DISP"},
481 {0x01, "SMS_GSM_ROUTING_MODE_CLASS_TE"},
482 {0x02, "SMS_GSM_ROUTING_MODE_CLASS_ME"},
483 {0x03, "SMS_GSM_ROUTING_MODE_CLASS_SIM"},
484 {0x04, "SMS_GSM_ROUTING_MODE_CLASS_UD1"},
485 {0x05, "SMS_GSM_ROUTING_MODE_CLASS_UD2"},
486 {0x06, "SMS_GSM_ROUTING_MODE_DATACODE_WAP"},
487 {0x07, "SMS_GSM_ROUTING_MODE_DATACODE_8BIT"},
488 {0x08, "SMS_GSM_ROUTING_MODE_DATACODE_TXT"},
489 {0x09, "SMS_GSM_ROUTING_MODE_MWI_DISCARD"},
490 {0x0A, "SMS_GSM_ROUTING_MODE_MWI_STORE"},
491 {0x0B, "SMS_GSM_ROUTING_MODE_ALL"},
492 {0x0C, "SMS_GSM_ROUTING_MODE_CB_DDL"},
496 static const value_string isi_sms_route
[] = {
497 {0x00, "SMS_ROUTE_GPRS_PREF"},
498 {0x01, "SMS_ROUTE_CS"},
499 {0x02, "SMS_ROUTE_GPRS"},
500 {0x03, "SMS_ROUTE_CS_PREF"},
501 {0x04, "SMS_ROUTE_DEFAULT"},
506 static const value_string isi_sms_subblock[] = {
507 {0x00, "SS_FORWARDING"},
508 {0x01, "SS_STATUS_RESULT"},
509 {0x03, "SS_GSM_PASSWORD"},
510 {0x04, "SS_GSM_FORWARDING_INFO"},
511 {0x05, "SS_GSM_FORWARDING_FEATURE"},
512 {0x08, "SS_GSM_DATA"},
513 {0x09, "SS_GSM_BSC_INFO"},
514 {0x0B, "SS_GSM_PASSWORD_INFO"},
515 {0x0D, "SS_GSM_INDICATE_PASSWORD_ERROR"},
516 {0x0E, "SS_GSM_INDICATE_ERROR"},
517 {0x2F, "SS_GSM_ADDITIONAL_INFO"},
518 {0x32, "SS_GSM_USSD_STRING"},
523 static const value_string isi_sms_send_status
[] = {
524 {0x00, "SMS_MSG_REROUTED"},
525 {0x01, "SMS_MSG_REPEATED"},
526 {0x02, "SMS_MSG_WAITING_NETWORK"},
527 {0x03, "SMS_MSG_IDLE"},
531 static const value_string isi_sms_common_message_id
[] = {
532 {0x01, "COMM_SERVICE_NOT_IDENTIFIED_RESP"},
533 {0x12, "COMM_ISI_VERSION_GET_REQ"},
534 {0x13, "COMM_ISI_VERSION_GET_RESP"},
535 {0x14, "COMM_ISA_ENTITY_NOT_REACHABLE_RESP"},
540 static int proto_isi
;
542 static int hf_isi_rdev
;
543 static int hf_isi_sdev
;
544 static int hf_isi_res
;
545 static int hf_isi_len
;
546 static int hf_isi_robj
;
547 static int hf_isi_sobj
;
548 static int hf_isi_id
;
550 static int hf_isi_sim_auth_payload
;
551 static int hf_isi_sim_auth_cmd
;
552 static int hf_isi_sim_auth_status_rsp
;
553 static int hf_isi_sim_auth_protection_req
;
554 static int hf_isi_sim_auth_protection_rsp
;
555 static int hf_isi_sim_auth_pin
;
556 static int hf_isi_sim_auth_puk
;
557 static int hf_isi_sim_auth_new_pin
;
558 static int hf_isi_sim_auth_pw_type
;
559 static int hf_isi_sim_auth_indication
;
560 static int hf_isi_sim_auth_indication_cfg
;
562 static int hf_isi_sim_payload
;
563 static int hf_isi_sim_message_id
;
564 static int hf_isi_sim_service_type
;
565 static int hf_isi_sim_cause
;
566 static int hf_isi_sim_secondary_cause
;
567 static int hf_isi_sim_subblock_count
;
568 static int hf_isi_sim_subblock_size
;
569 static int hf_isi_sim_pb_subblock
;
570 static int hf_isi_sim_pb_type
;
571 static int hf_isi_sim_pb_location
;
572 static int hf_isi_sim_pb_tag_count
;
573 static int hf_isi_sim_pb_tag
;
574 static int hf_isi_sim_imsi_length
;
576 static int hf_isi_gss_payload
;
577 static int hf_isi_gss_message_id
;
579 static int hf_isi_gss_subblock
;
581 static int hf_isi_gss_operation
;
582 static int hf_isi_gss_subblock_count
;
583 static int hf_isi_gss_cause
;
584 static int hf_isi_gss_common_message_id
;
586 static int hf_isi_gps_payload
;
587 static int hf_isi_gps_cmd
;
588 static int hf_isi_gps_sub_pkgs
;
589 static int hf_isi_gps_sub_type
;
590 static int hf_isi_gps_sub_len
;
591 static int hf_isi_gps_status
;
592 static int hf_isi_gps_year
;
593 static int hf_isi_gps_month
;
594 static int hf_isi_gps_day
;
595 static int hf_isi_gps_hour
;
596 static int hf_isi_gps_minute
;
597 static int hf_isi_gps_second
;
598 static int hf_isi_gps_latitude
;
599 static int hf_isi_gps_longitude
;
600 static int hf_isi_gps_eph
;
601 static int hf_isi_gps_altitude
;
602 static int hf_isi_gps_epv
;
603 static int hf_isi_gps_course
;
604 static int hf_isi_gps_epd
;
605 static int hf_isi_gps_speed
;
606 static int hf_isi_gps_eps
;
607 static int hf_isi_gps_climb
;
608 static int hf_isi_gps_epc
;
609 static int hf_isi_gps_mcc
;
610 static int hf_isi_gps_mnc
;
611 static int hf_isi_gps_lac
;
612 static int hf_isi_gps_cid
;
613 static int hf_isi_gps_ucid
;
614 static int hf_isi_gps_satellites
;
615 static int hf_isi_gps_prn
;
616 static int hf_isi_gps_sat_used
;
617 static int hf_isi_gps_sat_strength
;
618 static int hf_isi_gps_sat_elevation
;
619 static int hf_isi_gps_sat_azimuth
;
621 static int hf_isi_ss_payload
;
622 static int hf_isi_ss_message_id
;
623 static int hf_isi_ss_ussd_type
;
624 static int hf_isi_ss_subblock_count
;
625 static int hf_isi_ss_subblock
;
626 static int hf_isi_ss_operation
;
627 static int hf_isi_ss_service_code
;
628 static int hf_isi_ss_status_indication
;
629 static int hf_isi_ss_ussd_length
;
630 static int hf_isi_ss_common_message_id
;
632 static int hf_isi_network_payload
;
633 static int hf_isi_network_cmd
;
634 static int hf_isi_network_data_sub_pkgs
;
635 static int hf_isi_network_status_sub_type
;
636 static int hf_isi_network_status_sub_len
;
637 static int hf_isi_network_status_sub_lac
;
638 static int hf_isi_network_status_sub_cid
;
639 static int hf_isi_network_status_sub_msg
;
640 static int hf_isi_network_status_sub_msg_len
;
641 static int hf_isi_network_cell_info_sub_type
;
642 static int hf_isi_network_cell_info_sub_len
;
643 static int hf_isi_network_cell_info_sub_operator
;
644 static int hf_isi_network_gsm_band_900
;
645 static int hf_isi_network_gsm_band_1800
;
646 static int hf_isi_network_gsm_band_1900
;
647 static int hf_isi_network_gsm_band_850
;
649 static int hf_isi_sms_payload
;
650 static int hf_isi_sms_message_id
;
651 static int hf_isi_sms_routing_command
;
652 static int hf_isi_sms_routing_mode
;
653 static int hf_isi_sms_route
;
654 static int hf_isi_sms_subblock_count
;
655 static int hf_isi_sms_send_status
;
656 static int hf_isi_sms_common_message_id
;
659 static int ett_isi_msg
;
660 static int ett_isi_network_gsm_band_info
;
662 static expert_field ei_isi_len
;
663 static expert_field ei_isi_unsupported_packet
;
665 static int dissect_isi_sim_auth(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
) {
670 item
= proto_tree_add_item(isitree
, hf_isi_sim_auth_payload
, tvb
, 0, -1, ENC_NA
);
671 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
673 proto_tree_add_item(tree
, hf_isi_sim_auth_cmd
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
674 cmd
= tvb_get_uint8(tvb
, 0);
677 case 0x01: /* SIM_AUTH_PROTECTED_REQ */
678 proto_tree_add_item(tree
, hf_isi_sim_auth_protection_req
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
679 cmd
= tvb_get_uint8(tvb
, 2);
681 case 0x00: /* DISABLE */
682 proto_tree_add_item(tree
, hf_isi_sim_auth_pin
, tvb
, 3, -1, ENC_ASCII
);
683 col_set_str(pinfo
->cinfo
, COL_INFO
, "disable SIM startup protection");
685 case 0x01: /* ENABLE */
686 proto_tree_add_item(tree
, hf_isi_sim_auth_pin
, tvb
, 3, -1, ENC_ASCII
);
687 col_set_str(pinfo
->cinfo
, COL_INFO
, "enable SIM startup protection");
689 case 0x04: /* STATUS */
690 col_set_str(pinfo
->cinfo
, COL_INFO
, "get SIM startup protection status");
693 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM startup protection packet");
697 case 0x02: /* SIM_AUTH_PROTECTED_RESP */
698 proto_tree_add_item(tree
, hf_isi_sim_auth_protection_rsp
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
699 if(tvb_get_uint8(tvb
, 1))
700 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM startup protection enabled");
702 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM startup protection disabled");
704 case 0x04: /* SIM_AUTH_UPDATE_REQ */
705 proto_tree_add_item(tree
, hf_isi_sim_auth_pw_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
706 code
= tvb_get_uint8(tvb
, 1);
709 col_set_str(pinfo
->cinfo
, COL_INFO
, "update SIM PIN");
710 proto_tree_add_item(tree
, hf_isi_sim_auth_pin
, tvb
, 2, 11, ENC_ASCII
);
711 proto_tree_add_item(tree
, hf_isi_sim_auth_new_pin
, tvb
, 13, 11, ENC_ASCII
);
714 col_set_str(pinfo
->cinfo
, COL_INFO
, "update SIM PUK");
717 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM Authentication update request");
721 case 0x05: /* SIM_AUTH_UPDATE_SUCCESS_RESP */
722 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication update successful");
724 case 0x06: /* SIM_AUTH_UPDATE_FAIL_RESP */
725 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication update failed");
727 case 0x07: /* SIM_AUTH_REQ */
728 proto_tree_add_item(tree
, hf_isi_sim_auth_pw_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
729 code
= tvb_get_uint8(tvb
, 1);
732 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication with PIN");
733 proto_tree_add_item(tree
, hf_isi_sim_auth_pin
, tvb
, 2, 11, ENC_ASCII
);
736 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication with PUK");
737 proto_tree_add_item(tree
, hf_isi_sim_auth_puk
, tvb
, 2, 11, ENC_ASCII
);
738 proto_tree_add_item(tree
, hf_isi_sim_auth_new_pin
, tvb
, 13, 11, ENC_ASCII
);
741 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM Authentication request");
745 case 0x08: /* SIM_AUTH_SUCCESS_RESP */
746 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication successful");
748 case 0x09: /* SIM_AUTH_FAIL_RESP */
749 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication failed");
751 case 0x10: /* SIM_AUTH_STATUS_IND */
752 proto_tree_add_item(tree
, hf_isi_sim_auth_indication
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
753 code
= tvb_get_uint8(tvb
, 1);
754 proto_tree_add_item(tree
, hf_isi_sim_auth_pw_type
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
757 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: Authentication needed");
760 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: No Authentication needed");
763 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: Authentication valid");
766 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: Authentication invalid");
769 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: Authorized");
772 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication indication: Config");
773 proto_tree_add_item(tree
, hf_isi_sim_auth_indication_cfg
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
776 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM Authentication indication");
780 case 0x11: /* SIM_AUTH_STATUS_REQ */
781 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication status request");
783 case 0x12: /* SIM_AUTH_STATUS_RESP */
784 proto_tree_add_item(tree
, hf_isi_sim_auth_status_rsp
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
785 code
= tvb_get_uint8(tvb
, 1);
788 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication status: need PIN");
791 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication status: need PUK");
794 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication status: running");
797 col_set_str(pinfo
->cinfo
, COL_INFO
, "SIM Authentication status: initializing");
800 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM Authentication status response packet");
805 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown SIM Authentication packet");
808 return tvb_captured_length(tvb
);
811 static int dissect_isi_sim(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
) {
816 item
= proto_tree_add_item(isitree
, hf_isi_sim_payload
, tvb
, 0, -1, ENC_NA
);
817 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
819 proto_tree_add_item(tree
, hf_isi_sim_message_id
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
820 cmd
= tvb_get_uint8(tvb
, 0);
824 case 0x19: /* SIM_NETWORK_INFO_REQ */
825 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
826 code
= tvb_get_uint8(tvb
, 1);
829 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Information Request: Read Home PLMN");
832 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Information Request");
837 case 0x1A: /* SIM_NETWORK_INFO_RESP */
838 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
839 proto_tree_add_item(tree
, hf_isi_sim_cause
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
841 code
= tvb_get_uint8(tvb
, 1);
844 dissect_e212_mcc_mnc(tvb
, pinfo
, tree
, 3, E212_LAI
, false);
845 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Information Response: Home PLMN");
848 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Information Response");
853 case 0x1D: /* SIM_IMSI_REQ_READ_IMSI */
854 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
855 code
= tvb_get_uint8(tvb
, 1);
858 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read IMSI Request");
863 case 0x1E: /* SIM_IMSI_RESP_READ_IMSI */
865 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
867 /* If properly decoded, an IMSI should look like 234 100 733569423 in split Base10
869 0000 1e 2d 01 08 | 29 43 01 | 70 33 65 49 32
870 92 34 10 | 07 33 56 94 23
872 Switch 0x29 to produce 0x92
874 AND 0x92 with 0xF0 to strip the leading 9
876 Switch 0x43 to produce 0x34
878 Concatenate 0x02 and 0x34 to produce 0x02 34 - which is our MCC for the UK
880 Switch 0x01 to produce 0x10 - first byte of the MNC
882 Switch 0x70 to produce 0x07 - second bit of the MNC, and first bit of the MSIN
884 Remainder of MSIN follows:
886 Switch 0x33 to produce 0x33
888 Switch 0x65 to produce 0x56
890 Switch 0x49 to produce 0x94
892 Switch 0x32 to produce 0x23
894 When regrouped, we should have something that looks like 0x02|0x34|0x10|0x07|0x33|0x56|0x94|0x23
896 Can we use the E212 dissector?
897 No, it appears that the current version of the dissector is hard-coded in a way that ignores all of our set-up work. :(
901 code
= tvb_get_uint8(tvb
, 1);
904 proto_tree_add_item(tree
, hf_isi_sim_imsi_length
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
907 next_tvb = tvb_new_subset_remaining(tvb, 0);
908 proto_tree_add_item(tree, hf_isi_sim_imsi_byte_1, next_tvb, 4, 1, ENC_LITTLE_ENDIAN);
909 dissect_e212_mcc_mnc(next_tvb, pinfo, tree, 4, false );
910 proto_tree_add_item(tree, hf_E212_msin, tvb, 2, 7, ENC_BIG_ENDIAN);
914 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read IMSI Response");
919 case 0x21: /* SIM_SERV_PROV_NAME_REQ */
920 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
921 code
= tvb_get_uint8(tvb
, 1);
924 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Provider Name Request");
929 case 0x22: /* SIM_SERV_PROV_NAME_RESP */
930 code
= tvb_get_uint8(tvb
, 1);
933 proto_tree_add_item(tree
, hf_isi_sim_cause
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
934 proto_tree_add_item(tree
, hf_isi_sim_secondary_cause
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
935 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Provider Name Response: Invalid Location");
938 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Provider Name Response");
943 case 0xBA: /* SIM_READ_FIELD_REQ */
944 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
945 code
= tvb_get_uint8(tvb
, 1);
948 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read Field Request: Integrated Circuit Card Identification (ICCID)");
951 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read Field Request");
956 case 0xBB: /* SIM_READ_FIELD_RESP */
957 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
958 code
= tvb_get_uint8(tvb
, 1);
961 proto_tree_add_item(tree
, hf_isi_sim_cause
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
962 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read Field Response: Integrated Circuit Card Identification (ICCID)");
965 col_set_str(pinfo
->cinfo
, COL_INFO
, "Read Field Response");
970 case 0xBC: /* SIM_SMS_REQ */
971 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
972 code
= tvb_get_uint8(tvb
, 1);
975 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Request");
980 case 0xBD: /* SIM_SMS_RESP */
981 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
982 code
= tvb_get_uint8(tvb
, 1);
985 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Response");
990 case 0xDC: /* SIM_PB_REQ_SIM_PB_READ */
992 /* A phonebook record in a typical O2 UK SIM card issued in 2009 can hold:
994 * A name encoded in UTF-16/UCS-2 - up to 18 (or 15 double-byte/accented) characters can be entered on an S60 device
995 * Up to 2 telephone numbers - up to 2 * 20 (or 40-1 field) characters can be entered on an S60 device
996 * An e-mail address encoded in UTF-16/UCS-2 - up to 40 characters can be entered on an S60 device
998 Up to 250 of these records can be stored, and 9 of them are pre-populated on a brand new card.
1001 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1002 proto_tree_add_item(tree
, hf_isi_sim_subblock_count
, tvb
, 2, 2, ENC_LITTLE_ENDIAN
);
1003 proto_tree_add_item(tree
, hf_isi_sim_pb_subblock
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
1005 /* Should probably be 8, and not 2048... Officially starts/ends at 5/3, I think. */
1006 proto_tree_add_item(tree
, hf_isi_sim_subblock_size
, tvb
, 6, 2, ENC_LITTLE_ENDIAN
);
1008 proto_tree_add_item(tree
, hf_isi_sim_pb_type
, tvb
, 8, 1, ENC_BIG_ENDIAN
);
1009 proto_tree_add_item(tree
, hf_isi_sim_pb_location
, tvb
, 9, 2, ENC_BIG_ENDIAN
);
1011 proto_tree_add_item(tree
, hf_isi_sim_pb_subblock
, tvb
, 12, 1, ENC_BIG_ENDIAN
);
1012 proto_tree_add_item(tree
, hf_isi_sim_subblock_count
, tvb
, 13, 2, ENC_BIG_ENDIAN
);
1014 proto_tree_add_item(tree
, hf_isi_sim_pb_tag_count
, tvb
, 15, 1, ENC_BIG_ENDIAN
);
1015 proto_tree_add_item(tree
, hf_isi_sim_pb_type
, tvb
, 18, 1, ENC_BIG_ENDIAN
);
1016 proto_tree_add_item(tree
, hf_isi_sim_pb_tag
, tvb
, 20, 1, ENC_BIG_ENDIAN
);
1017 proto_tree_add_item(tree
, hf_isi_sim_pb_tag
, tvb
, 22, 1, ENC_BIG_ENDIAN
);
1018 proto_tree_add_item(tree
, hf_isi_sim_pb_tag
, tvb
, 24, 1, ENC_BIG_ENDIAN
);
1020 code
= tvb_get_uint8(tvb
, 1);
1023 col_set_str(pinfo
->cinfo
, COL_INFO
, "Phonebook Read Request");
1028 case 0xDD: /* SIM_PB_RESP_SIM_PB_READ */
1029 proto_tree_add_item(tree
, hf_isi_sim_service_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1030 code
= tvb_get_uint8(tvb
, 1);
1033 col_set_str(pinfo
->cinfo
, COL_INFO
, "Phonebook Read Response");
1038 case 0xEF: /* SIM_IND */
1039 code
= tvb_get_uint8(tvb
, 1);
1042 col_set_str(pinfo
->cinfo
, COL_INFO
, "Indicator");
1047 case 0xF0: /* SIM_COMMON_MESSAGE */
1048 proto_tree_add_item(tree
, hf_isi_sim_cause
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1049 proto_tree_add_item(tree
, hf_isi_sim_secondary_cause
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1050 code
= tvb_get_uint8(tvb
, 1);
1053 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: SIM Server Not Available");
1056 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: PIN Enable OK");
1059 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message");
1065 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unknown type");
1068 return tvb_captured_length(tvb
);
1071 static int dissect_isi_gss(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
) {
1076 item
= proto_tree_add_item(isitree
, hf_isi_gss_payload
, tvb
, 0, -1, ENC_NA
);
1077 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
1079 proto_tree_add_item(tree
, hf_isi_gss_message_id
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1080 cmd
= tvb_get_uint8(tvb
, 0);
1083 case 0x00: /* GSS_CS_SERVICE_REQ */
1084 proto_tree_add_item(tree
, hf_isi_gss_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1085 code
= tvb_get_uint8(tvb
, 1);
1088 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: Radio Access Type Write");
1092 proto_tree_add_item(tree
, hf_isi_gss_subblock_count
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1093 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: Radio Access Type Read");
1097 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request");
1102 case 0x01: /* GSS_CS_SERVICE_RESP */
1103 /* proto_tree_add_item(tree, hf_isi_gss_service_type, tvb, 1, 1, ENC_NA); */
1104 code
= tvb_get_uint8(tvb
, 1);
1107 col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN");
1110 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Response");
1115 case 0x02: /* GSS_CS_SERVICE_FAIL_RESP */
1116 proto_tree_add_item(tree
, hf_isi_gss_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1117 proto_tree_add_item(tree
, hf_isi_gss_cause
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1118 code
= tvb_get_uint8(tvb
, 1);
1121 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Failed Response: Radio Access Type Read");
1124 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Failed Response");
1129 case 0xF0: /* Common Message */
1130 proto_tree_add_item(tree
, hf_isi_gss_common_message_id
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1131 /* proto_tree_add_item(tree, hf_isi_gss_cause, tvb, 2, 1, ENC_BIG_ENDIAN); */
1132 code
= tvb_get_uint8(tvb
, 1);
1134 case 0x01: /* COMM_SERVICE_NOT_IDENTIFIED_RESP */
1135 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: Service Not Identified Response");
1137 case 0x12: /* COMM_ISI_VERSION_GET_REQ */
1138 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Request");
1140 case 0x13: /* COMM_ISI_VERSION_GET_RESP */
1141 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Response");
1143 case 0x14: /* COMM_ISA_ENTITY_NOT_REACHABLE_RESP */
1144 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISA Entity Not Reachable");
1147 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message");
1154 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unknown type");
1157 return tvb_captured_length(tvb
);
1160 static void dissect_isi_gps_data(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_item
*item _U_
, proto_tree
*tree
)
1166 int offset
= 0x0b; /* subpackets start here */
1168 uint8_t pkgcount
= tvb_get_uint8(tvb
, 0x07);
1169 proto_tree_add_item(tree
, hf_isi_gps_sub_pkgs
, tvb
, 0x07, 1, ENC_BIG_ENDIAN
);
1171 for(i
=0; i
<pkgcount
; i
++) {
1172 uint8_t sptype
= tvb_get_uint8(tvb
, offset
+1);
1173 uint8_t splen
= tvb_get_uint8(tvb
, offset
+3);
1174 proto_tree
*subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, splen
, ett_isi_msg
, NULL
, "Subpacket (%s)", val_to_str(sptype
, isi_gps_sub_id
, "unknown: 0x%x"));
1176 proto_tree_add_item(subtree
, hf_isi_gps_sub_type
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1177 proto_tree_add_item(subtree
, hf_isi_gps_sub_len
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
1181 case 0x02: /* Position */
1182 tmp_double
= tvb_get_ntohl(tvb
, offset
+0);
1183 tmp_double
= (tmp_double
*360)/4294967296.0;
1184 if(tmp_double
> 180.0) tmp_double
-= 360.0;
1185 proto_tree_add_double(subtree
, hf_isi_gps_latitude
, tvb
, offset
+0, 4, tmp_double
);
1187 tmp_double
= tvb_get_ntohl(tvb
, offset
+4);
1188 tmp_double
= (tmp_double
*360)/4294967296.0;
1189 if(tmp_double
> 180.0) tmp_double
-= 360.0;
1190 proto_tree_add_double(subtree
, hf_isi_gps_longitude
, tvb
, offset
+4, 4, tmp_double
);
1192 tmp_float
= (float)(tvb_get_ntohl(tvb
, offset
+12) / 100.0);
1193 proto_tree_add_float(subtree
, hf_isi_gps_eph
, tvb
, offset
+12, 4, tmp_float
);
1195 tmp_int32
= (tvb_get_ntohs(tvb
, offset
+18) - tvb_get_ntohs(tvb
, offset
+22))/2;
1196 proto_tree_add_int(subtree
, hf_isi_gps_altitude
, tvb
, offset
+18, 6, tmp_int32
);
1198 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+20) / 2.0);
1199 proto_tree_add_float(subtree
, hf_isi_gps_epv
, tvb
, offset
+20, 2, tmp_float
);
1202 case 0x03: /* Date and Time */
1203 proto_tree_add_item(subtree
, hf_isi_gps_year
, tvb
, offset
+0, 2, ENC_BIG_ENDIAN
);
1204 proto_tree_add_item(subtree
, hf_isi_gps_month
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
1205 proto_tree_add_item(subtree
, hf_isi_gps_day
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
1206 proto_tree_add_item(subtree
, hf_isi_gps_hour
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1207 proto_tree_add_item(subtree
, hf_isi_gps_minute
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
1209 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+8) / 1000.0);
1210 proto_tree_add_float(subtree
, hf_isi_gps_second
, tvb
, offset
+8, 2, tmp_float
);
1212 case 0x04: /* Movement */
1213 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+0) / 100.0);
1214 proto_tree_add_float(subtree
, hf_isi_gps_course
, tvb
, offset
+0, 2, tmp_float
);
1216 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+2) / 100.0);
1217 proto_tree_add_float(subtree
, hf_isi_gps_epd
, tvb
, offset
+2, 2, tmp_float
);
1219 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+6) * CMS_TO_KMH
);
1220 proto_tree_add_float(subtree
, hf_isi_gps_speed
, tvb
, offset
+6, 2, tmp_float
);
1222 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+8) * CMS_TO_KMH
);
1223 proto_tree_add_float(subtree
, hf_isi_gps_eps
, tvb
, offset
+8, 2, tmp_float
);
1225 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+10) * CMS_TO_KMH
);
1226 proto_tree_add_float(subtree
, hf_isi_gps_climb
, tvb
, offset
+10, 2, tmp_float
);
1228 tmp_float
= (float)(tvb_get_ntohs(tvb
, offset
+12) * CMS_TO_KMH
);
1229 proto_tree_add_float(subtree
, hf_isi_gps_epc
, tvb
, offset
+12, 2, tmp_float
);
1231 case 0x05: /* Satellite Info */
1233 uint8_t satellites
= tvb_get_uint8(tvb
, offset
+0);
1235 proto_tree_add_item(subtree
, hf_isi_gps_satellites
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1237 for(sat
= 0; sat
< satellites
; sat
++) {
1238 int pos
= offset
+4+(sat
*SAT_PKG_LEN
);
1239 proto_tree
*sattree
= proto_tree_add_subtree_format(subtree
, tvb
, pos
, SAT_PKG_LEN
, ett_isi_msg
, NULL
, "Satellite %d", sat
);
1241 float signal_strength
= (float)(tvb_get_ntohs(tvb
, pos
+3) / 100.0);
1242 float elevation
= (float)(tvb_get_ntohs(tvb
, pos
+6) / 100.0);
1243 float azimuth
= (float)(tvb_get_ntohs(tvb
, pos
+8) / 100.0);
1245 proto_tree_add_item(sattree
, hf_isi_gps_prn
, tvb
, pos
+1, 1, ENC_BIG_ENDIAN
);
1246 proto_tree_add_item(sattree
, hf_isi_gps_sat_used
, tvb
, pos
+2, 1, ENC_BIG_ENDIAN
);
1247 proto_tree_add_float(sattree
, hf_isi_gps_sat_strength
, tvb
, pos
+3, 2, signal_strength
);
1248 proto_tree_add_float(sattree
, hf_isi_gps_sat_elevation
, tvb
, pos
+6, 2, elevation
);
1249 proto_tree_add_float(sattree
, hf_isi_gps_sat_azimuth
, tvb
, pos
+8, 2, azimuth
);
1253 case 0x07: /* CellInfo GSM */
1254 proto_tree_add_item(subtree
, hf_isi_gps_mcc
, tvb
, offset
+0, 2, ENC_BIG_ENDIAN
);
1255 proto_tree_add_item(subtree
, hf_isi_gps_mnc
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1256 proto_tree_add_item(subtree
, hf_isi_gps_lac
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1257 proto_tree_add_item(subtree
, hf_isi_gps_cid
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1259 case 0x08: /* CellInfo WCDMA */
1260 proto_tree_add_item(subtree
, hf_isi_gps_mcc
, tvb
, offset
+0, 2, ENC_BIG_ENDIAN
);
1261 proto_tree_add_item(subtree
, hf_isi_gps_mnc
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1262 proto_tree_add_item(subtree
, hf_isi_gps_ucid
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1268 offset
+= splen
- 4;
1273 static int dissect_isi_gps(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
)
1279 item
= proto_tree_add_item(isitree
, hf_isi_gps_payload
, tvb
, 0, -1, ENC_NA
);
1280 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
1282 proto_tree_add_item(tree
, hf_isi_gps_cmd
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1283 cmd
= tvb_get_uint8(tvb
, 0);
1286 case 0x7d: /* GPS Status */
1287 proto_tree_add_item(tree
, hf_isi_gps_status
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1288 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "GPS Status Indication: %s", val_to_str(tvb_get_uint8(tvb
, 2), isi_gps_status
, "unknown (0x%x)"));
1298 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "unknown A-GPS packet (0x%02x)", cmd
);
1300 case 0x90: /* GPS Power Request */
1301 col_set_str(pinfo
->cinfo
, COL_INFO
, "GPS Power Request");
1303 case 0x91: /* GPS Power Request */
1304 col_set_str(pinfo
->cinfo
, COL_INFO
, "GPS Power Response");
1306 case 0x92: /* GPS Data */
1307 col_set_str(pinfo
->cinfo
, COL_INFO
, "GPS Data");
1308 dissect_isi_gps_data(tvb
, pinfo
, item
, tree
);
1311 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "unknown GPS packet (0x%02x)", cmd
);
1314 return tvb_captured_length(tvb
);
1317 static int dissect_isi_ss(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
)
1323 item
= proto_tree_add_item(isitree
, hf_isi_ss_payload
, tvb
, 0, -1, ENC_NA
);
1324 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
1326 proto_tree_add_item(tree
, hf_isi_ss_message_id
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1327 cmd
= tvb_get_uint8(tvb
, 0);
1330 case 0x00: /* SS_SERVICE_REQ */
1331 proto_tree_add_item(tree
, hf_isi_ss_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1332 proto_tree_add_item(tree
, hf_isi_ss_service_code
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1333 code
= tvb_get_uint8(tvb
, 1);
1336 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: Interrogation");
1339 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: GSM Password Registration");
1342 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request");
1347 case 0x01: /* SS_SERVICE_COMPLETED_RESP */
1348 proto_tree_add_item(tree
, hf_isi_ss_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1349 proto_tree_add_item(tree
, hf_isi_ss_service_code
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1350 code
= tvb_get_uint8(tvb
, 1);
1353 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Completed Response: Interrogation");
1356 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Completed Response");
1361 case 0x02: /* SS_SERVICE_FAILED_RESP */
1362 /* proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, ENC_NA); */
1363 code
= tvb_get_uint8(tvb
, 1);
1366 col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN");
1370 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Failed Response");
1375 case 0x04: /* SS_GSM_USSD_SEND_REQ */
1376 proto_tree_add_item(tree
, hf_isi_ss_ussd_type
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1377 proto_tree_add_item(tree
, hf_isi_ss_subblock_count
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1379 code
= tvb_get_uint8(tvb
, 1);
1381 case 0x02: /* SS_GSM_USSD_COMMAND */
1382 proto_tree_add_item(tree
, hf_isi_ss_subblock
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
1383 col_set_str(pinfo
->cinfo
, COL_INFO
, "GSM USSD Send Command Request");
1386 col_set_str(pinfo
->cinfo
, COL_INFO
, "GSM USSD Message Send Request");
1391 case 0x05: /* SS_GSM_USSD_SEND_RESP */
1392 /* proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, ENC_NA); */
1393 code
= tvb_get_uint8(tvb
, 1);
1396 col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN");
1399 col_set_str(pinfo
->cinfo
, COL_INFO
, "GSM USSD Message Send Response");
1404 case 0x06: /* SS_GSM_USSD_RECEIVE_IND */
1405 /* An unknown Encoding Information byte precedes - see 3GPP TS 23.038 chapter 5 */
1406 proto_tree_add_item(tree
, hf_isi_ss_ussd_type
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1407 proto_tree_add_item(tree
, hf_isi_ss_ussd_length
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
1409 code
= tvb_get_uint8(tvb
, 1);
1415 col_set_str(pinfo
->cinfo
, COL_INFO
, "GSM USSD Message Received Notification");
1418 col_set_str(pinfo
->cinfo
, COL_INFO
, "GSM USSD Message Received Indication");
1423 case 0x09: /* SS_STATUS_IND */
1424 proto_tree_add_item(tree
, hf_isi_ss_status_indication
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1425 proto_tree_add_item(tree
, hf_isi_ss_subblock_count
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1426 /* proto_tree_add_item(tree, hf_isi_ss_subblock, tvb, 3, 1, ENC_BIG_ENDIAN); */
1427 code
= tvb_get_uint8(tvb
, 1);
1430 col_set_str(pinfo
->cinfo
, COL_INFO
, "Status Indication: Request Service Start");
1433 col_set_str(pinfo
->cinfo
, COL_INFO
, "Status Indication: Request Service Stop");
1436 col_set_str(pinfo
->cinfo
, COL_INFO
, "Status Indication: Request USSD Start");
1439 col_set_str(pinfo
->cinfo
, COL_INFO
, "Status Indication: Request USSD Stop");
1442 col_set_str(pinfo
->cinfo
, COL_INFO
, "Status Indication");
1447 case 0x10: /* SS_SERVICE_COMPLETED_IND */
1448 proto_tree_add_item(tree
, hf_isi_ss_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1449 proto_tree_add_item(tree
, hf_isi_ss_service_code
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1450 code
= tvb_get_uint8(tvb
, 1);
1453 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Completed Indication: Interrogation");
1456 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Completed Indication");
1461 case 0xF0: /* SS_COMMON_MESSAGE */
1462 proto_tree_add_item(tree
, hf_isi_ss_common_message_id
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1463 code
= tvb_get_uint8(tvb
, 1);
1465 case 0x01: /* COMM_SERVICE_NOT_IDENTIFIED_RESP */
1466 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: Service Not Identified Response");
1468 case 0x12: /* COMM_ISI_VERSION_GET_REQ */
1469 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Request");
1471 case 0x13: /* COMM_ISI_VERSION_GET_RESP */
1472 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Response");
1474 case 0x14: /* COMM_ISA_ENTITY_NOT_REACHABLE_RESP */
1475 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISA Entity Not Reachable");
1478 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message");
1485 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unknown type");
1488 return tvb_captured_length(tvb
);
1491 static void dissect_isi_network_status(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_item
*item _U_
, proto_tree
*tree
)
1494 int offset
= 0x03; /* subpackets start here */
1497 uint8_t pkgcount
= tvb_get_uint8(tvb
, 0x02);
1498 proto_tree_add_item(tree
, hf_isi_network_data_sub_pkgs
, tvb
, 0x02, 1, ENC_BIG_ENDIAN
);
1500 for(i
=0; i
<pkgcount
; i
++) {
1501 uint8_t sptype
= tvb_get_uint8(tvb
, offset
+0);
1502 uint8_t splen
= tvb_get_uint8(tvb
, offset
+1);
1504 proto_tree
*subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, splen
, ett_isi_msg
, NULL
, "Subpacket (%s)", val_to_str(sptype
, isi_network_status_sub_id
, "unknown: 0x%x"));
1506 proto_tree_add_item(subtree
, hf_isi_network_status_sub_type
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1507 proto_tree_add_item(subtree
, hf_isi_network_status_sub_len
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1512 case 0x00: /* NET_REG_INFO_COMMON */
1515 case 0x09: /* NET_GSM_REG_INFO */
1516 proto_tree_add_item(subtree
, hf_isi_network_status_sub_lac
, tvb
, offset
+0, 2, ENC_BIG_ENDIAN
);
1517 proto_tree_add_item(subtree
, hf_isi_network_status_sub_cid
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1520 case 0xe3: /* UNKNOWN */
1521 /* FIXME: TODO: byte 0: message type (provider name / network name) ? */
1523 len
= tvb_get_ntohs(tvb
, offset
+2);
1524 proto_tree_add_item(subtree
, hf_isi_network_status_sub_msg_len
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1526 proto_tree_add_item(subtree
, hf_isi_network_status_sub_msg
, tvb
, offset
+4, len
*2, ENC_UTF_16
|ENC_BIG_ENDIAN
);
1532 offset
+= splen
- 2;
1536 static void dissect_isi_network_cell_info_ind(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*item
, proto_tree
*tree
) {
1539 uint8_t pkgcount
= tvb_get_uint8(tvb
, 0x02);
1541 static int * const gsm_band_fields
[] = {
1542 &hf_isi_network_gsm_band_900
,
1543 &hf_isi_network_gsm_band_1800
,
1544 &hf_isi_network_gsm_band_1900
,
1545 &hf_isi_network_gsm_band_850
,
1549 proto_tree_add_item(tree
, hf_isi_network_data_sub_pkgs
, tvb
, 0x02, 1, ENC_BIG_ENDIAN
);
1551 for(i
=0; i
<pkgcount
; i
++) {
1552 uint8_t sptype
= tvb_get_uint8(tvb
, offset
+0);
1553 uint8_t splen
= tvb_get_uint8(tvb
, offset
+1);
1555 proto_tree
*subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, splen
, ett_isi_msg
, NULL
, "Subpacket (%s)", val_to_str(sptype
, isi_network_cell_info_sub_id
, "unknown: 0x%x"));
1557 proto_tree_add_item(subtree
, hf_isi_network_cell_info_sub_type
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1558 proto_tree_add_item(subtree
, hf_isi_network_cell_info_sub_len
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1563 case 0x50: /* NET_EPS_CELL_INFO */
1564 /* TODO: not yet implemented */
1565 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1567 case 0x46: /* NET_GSM_CELL_INFO */
1568 proto_tree_add_item(subtree
, hf_isi_network_status_sub_lac
, tvb
, offset
+0, 2, ENC_BIG_ENDIAN
);
1569 proto_tree_add_item(subtree
, hf_isi_network_status_sub_cid
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
1570 proto_tree_add_bitmask_text(subtree
, tvb
, offset
+6, 4, "GSM Bands: ", "all bands, since none is selected", ett_isi_network_gsm_band_info
, gsm_band_fields
, false, BMT_NO_FALSE
| BMT_NO_TFS
);
1571 proto_tree_add_item(subtree
, hf_isi_network_cell_info_sub_operator
, tvb
, offset
+10, 3, ENC_BIG_ENDIAN
);
1572 /* TODO: analysis of the following 5 bytes (which were 0x00 in my dumps) */
1574 case 0x47: /* NET_WCDMA_CELL_INFO */
1575 /* TODO: not yet implemented */
1576 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1579 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1583 offset
+= splen
- 2;
1587 static int dissect_isi_network(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
) {
1592 item
= proto_tree_add_item(isitree
, hf_isi_network_payload
, tvb
, 0, -1, ENC_NA
);
1593 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
1595 proto_tree_add_item(tree
, hf_isi_network_cmd
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1596 cmd
= tvb_get_uint8(tvb
, 0);
1600 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Selection Request");
1601 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1604 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Ciphering Indication");
1605 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1608 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Status Indication");
1609 dissect_isi_network_status(tvb
, pinfo
, item
, tree
);
1612 col_set_str(pinfo
->cinfo
, COL_INFO
, "Network Cell Info Indication");
1613 dissect_isi_network_cell_info_ind(tvb
, pinfo
, item
, tree
);
1616 col_set_str(pinfo
->cinfo
, COL_INFO
, "unknown Network packet");
1617 expert_add_info(pinfo
, item
, &ei_isi_unsupported_packet
);
1620 return tvb_captured_length(tvb
);
1623 static int dissect_isi_sms(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_item
*isitree
, void* data _U_
) {
1624 proto_item
*item
= NULL
;
1625 proto_tree
*tree
= NULL
;
1628 item
= proto_tree_add_item(isitree
, hf_isi_sms_payload
, tvb
, 0, -1, ENC_NA
);
1629 tree
= proto_item_add_subtree(item
, ett_isi_msg
);
1631 proto_tree_add_item(tree
, hf_isi_sms_message_id
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1632 cmd
= tvb_get_uint8(tvb
, 0);
1635 case 0x03: /* SMS_MESSAGE_SEND_RESP */
1636 proto_tree_add_item(tree
, hf_isi_sms_subblock_count
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1637 code
= tvb_get_uint8(tvb
, 1);
1641 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: Interrogation");
1644 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: GSM Password Registration");
1648 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Message Send Response");
1653 case 0x06: /* SMS_PP_ROUTING_REQ */
1654 proto_tree_add_item(tree
, hf_isi_sms_routing_command
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1655 proto_tree_add_item(tree
, hf_isi_sms_subblock_count
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1656 code
= tvb_get_uint8(tvb
, 1);
1660 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: Interrogation");
1663 col_set_str(pinfo
->cinfo
, COL_INFO
, "Service Request: GSM Password Registration");
1667 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Point-to-Point Routing Request");
1672 case 0x07: /* SMS_PP_ROUTING_RESP */
1673 /* proto_tree_add_item(tree, hf_isi_sms_service_type, tvb, 1, 1, ENC_NA); */
1674 code
= tvb_get_uint8(tvb
, 1);
1677 col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN");
1680 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Point-to-Point Routing Response");
1685 case 0x0B: /* SMS_GSM_CB_ROUTING_REQ */
1686 proto_tree_add_item(tree
, hf_isi_sms_routing_command
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1687 proto_tree_add_item(tree
, hf_isi_sms_routing_mode
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1689 proto_tree_add_item(tree
, hf_isi_sms_cb_subject_list_type
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
1690 proto_tree_add_item(tree
, hf_isi_sms_cb_subject_count
, tvb
, 4, 1, ENC_BIG_ENDIAN
);
1691 proto_tree_add_item(tree
, hf_isi_sms_cb_language_count
, tvb
, 5, 1, ENC_BIG_ENDIAN
);
1692 proto_tree_add_item(tree
, hf_isi_sms_cb_range
, tvb
, 6, 1, ENC_BIG_ENDIAN
);
1694 code
= tvb_get_uint8(tvb
, 1);
1697 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS GSM Cell Broadcast Routing Release");
1700 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS GSM Cell Broadcast Routing Set");
1703 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS GSM Cell Broadcast Routing Request");
1708 case 0x0C: /* SMS_GSM_CB_ROUTING_RESP */
1710 proto_tree_add_item(tree
, hf_isi_sms_operation
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1711 proto_tree_add_item(tree
, hf_isi_sms_service_code
, tvb
, 2, 1, ENC_BIG_ENDIAN
);
1713 code
= tvb_get_uint8(tvb
, 1);
1716 col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Response: Interrogation");
1719 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS GSM Cell Broadcast Routing Response");
1724 case 0x22: /* SMS_MESSAGE_SEND_STATUS_IND */
1725 proto_tree_add_item(tree
, hf_isi_sms_send_status
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1726 /* The second byte is a "segment" identifier/"Message Reference" */
1727 proto_tree_add_item(tree
, hf_isi_sms_route
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
1728 code
= tvb_get_uint8(tvb
, 1);
1731 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Message Sending Status: Waiting for Network");
1734 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Message Sending Status: Idle");
1737 col_set_str(pinfo
->cinfo
, COL_INFO
, "SMS Message Sending Status Indication");
1742 case 0xF0: /* SS_COMMON_MESSAGE */
1743 proto_tree_add_item(tree
, hf_isi_sms_common_message_id
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1744 code
= tvb_get_uint8(tvb
, 1);
1746 case 0x01: /* COMM_SERVICE_NOT_IDENTIFIED_RESP */
1747 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: Service Not Identified Response");
1749 case 0x12: /* COMM_ISI_VERSION_GET_REQ */
1750 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Request");
1752 case 0x13: /* COMM_ISI_VERSION_GET_RESP */
1753 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISI Version Get Response");
1755 case 0x14: /* COMM_ISA_ENTITY_NOT_REACHABLE_RESP */
1756 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message: ISA Entity Not Reachable");
1759 col_set_str(pinfo
->cinfo
, COL_INFO
, "Common Message");
1765 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unknown type");
1768 return tvb_captured_length(tvb
);
1771 static int dissect_isi(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
1772 proto_tree
*isi_tree
;
1773 proto_item
*item
, *item_len
;
1774 tvbuff_t
*content_tvb
;
1781 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ISI");
1782 col_clear(pinfo
->cinfo
, COL_INFO
);
1784 /* Start with a top-level item to add everything else to */
1785 item
= proto_tree_add_item(tree
, proto_isi
, tvb
, 0, -1, ENC_NA
);
1786 isi_tree
= proto_item_add_subtree(item
, ett_isi
);
1788 /* Common Phonet/ISI Header */
1789 proto_tree_add_item(isi_tree
, hf_isi_rdev
, tvb
, 0, 1, ENC_NA
);
1790 proto_tree_add_item(isi_tree
, hf_isi_sdev
, tvb
, 1, 1, ENC_NA
);
1791 proto_tree_add_item(isi_tree
, hf_isi_res
, tvb
, 2, 1, ENC_NA
);
1792 item_len
= proto_tree_add_item(isi_tree
, hf_isi_len
, tvb
, 3, 2, ENC_BIG_ENDIAN
);
1793 proto_tree_add_item(isi_tree
, hf_isi_robj
, tvb
, 5, 1, ENC_NA
);
1794 proto_tree_add_item(isi_tree
, hf_isi_sobj
, tvb
, 6, 1, ENC_NA
);
1795 proto_tree_add_item(isi_tree
, hf_isi_id
, tvb
, 7, 1, ENC_NA
);
1797 length
= tvb_get_ntohs(tvb
, 3) - 3;
1798 resource
= tvb_get_uint8(tvb
, 2);
1799 dst
= tvb_get_uint8(tvb
, 0);
1800 src
= tvb_get_uint8(tvb
, 1);
1802 if (tvb_reported_length(tvb
) - 8 < length
) {
1803 expert_add_info_format(pinfo
, item_len
, &ei_isi_len
, "Broken Length (%d > %d)", length
, tvb_reported_length(tvb
)-8);
1804 length
= tvb_reported_length(tvb
) - 8;
1807 col_set_str(pinfo
->cinfo
, COL_DEF_SRC
, val_to_str_const(src
, hf_isi_device
, "Unknown"));
1808 col_set_str(pinfo
->cinfo
, COL_DEF_DST
, val_to_str_const(dst
, hf_isi_device
, "Unknown"));
1810 content_tvb
= tvb_new_subset_length(tvb
, 8, length
);
1812 /* Call subdissector depending on the resource ID */
1813 if (!dissector_try_uint(isi_resource_dissector_table
, resource
, content_tvb
, pinfo
, isi_tree
))
1814 call_data_dissector(content_tvb
, pinfo
, isi_tree
);
1816 return tvb_captured_length(tvb
);
1819 /* Experimental approach based upon the one used for PPP*/
1820 static bool dissect_usb_isi(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1824 if(tvb_get_uint8(tvb
, 0) != 0x1B)
1827 next_tvb
= tvb_new_subset_remaining(tvb
, 1);
1828 dissect_isi(next_tvb
, pinfo
, tree
, data
);
1834 proto_register_isi(void)
1836 static hf_register_info hf
[] = {
1838 { "Receiver Device", "isi.rdev", FT_UINT8
, BASE_HEX
,
1839 VALS(hf_isi_device
), 0x0, NULL
, HFILL
}},
1841 { "Sender Device", "isi.sdev", FT_UINT8
, BASE_HEX
,
1842 VALS(hf_isi_device
), 0x0, NULL
, HFILL
}},
1844 { "Resource", "isi.res", FT_UINT8
, BASE_HEX
,
1845 VALS(hf_isi_resource
), 0x0, NULL
, HFILL
}},
1847 { "Length", "isi.len", FT_UINT16
, BASE_DEC
,
1848 NULL
, 0x0, NULL
, HFILL
}},
1850 { "Receiver Object", "isi.robj", FT_UINT8
, BASE_HEX
,
1851 NULL
, 0x0, NULL
, HFILL
}},
1853 { "Sender Object", "isi.sobj", FT_UINT8
, BASE_HEX
,
1854 NULL
, 0x0, NULL
, HFILL
}},
1856 { "Packet ID", "isi.id", FT_UINT8
, BASE_DEC
,
1857 NULL
, 0x0, NULL
, HFILL
}}
1860 static hf_register_info simauth_hf
[] = {
1861 { &hf_isi_sim_auth_payload
,
1862 { "Payload", "isi.sim.auth.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1863 { &hf_isi_sim_auth_cmd
,
1864 { "Command", "isi.sim.auth.cmd", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_id
), 0x0, NULL
, HFILL
}},
1865 { &hf_isi_sim_auth_pw_type
,
1866 { "Password Type", "isi.sim.auth.type", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_pw_type
), 0x0, NULL
, HFILL
}},
1867 { &hf_isi_sim_auth_pin
,
1868 { "PIN", "isi.sim.auth.pin", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1869 { &hf_isi_sim_auth_puk
,
1870 { "PUK", "isi.sim.auth.puk", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1871 { &hf_isi_sim_auth_new_pin
,
1872 { "New PIN", "isi.sim.auth.new_pin", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1873 { &hf_isi_sim_auth_protection_req
,
1874 { "Protection Request", "isi.sim.auth.request.protection", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_protection_req
), 0x0, NULL
, HFILL
}},
1875 { &hf_isi_sim_auth_protection_rsp
,
1876 { "Protection Response", "isi.sim.auth.response.protection", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1877 { &hf_isi_sim_auth_status_rsp
,
1878 { "Status Response", "isi.sim.auth.response.status", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_resp
), 0x0, NULL
, HFILL
}},
1879 { &hf_isi_sim_auth_indication
,
1880 { "Indication", "isi.sim.auth.indication", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_indication
), 0x0, NULL
, HFILL
}},
1881 { &hf_isi_sim_auth_indication_cfg
,
1882 { "Configuration", "isi.sim.auth.cfg", FT_UINT8
, BASE_HEX
, VALS(isi_sim_auth_indication_cfg
), 0x0, NULL
, HFILL
}}
1885 static hf_register_info sim_hf
[] = {
1886 { &hf_isi_sim_payload
,
1887 { "Payload", "isi.sim.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1888 { &hf_isi_sim_message_id
,
1889 { "Message ID", "isi.sim.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_sim_message_id
), 0x0, NULL
, HFILL
}},
1890 { &hf_isi_sim_service_type
,
1891 { "Service Type", "isi.sim.service_type", FT_UINT8
, BASE_HEX
, VALS(isi_sim_service_type
), 0x0, NULL
, HFILL
}},
1892 { &hf_isi_sim_cause
,
1893 { "Cause", "isi.sim.cause", FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &isi_sim_cause_ext
, 0x0, NULL
, HFILL
}},
1894 { &hf_isi_sim_secondary_cause
,
1895 { "Secondary Cause", "isi.sim.secondary_cause", FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &isi_sim_cause_ext
, 0x0, NULL
, HFILL
}},
1896 {&hf_isi_sim_subblock_count
,
1897 { "Subblock Count", "isi.sim.subblock_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1898 {&hf_isi_sim_subblock_size
,
1899 { "Subblock Size", "isi.sim.subblock_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1900 { &hf_isi_sim_pb_subblock
,
1901 { "Subblock", "isi.sim.pb.subblock", FT_UINT8
, BASE_HEX
, VALS(isi_sim_pb_subblock
), 0x0, NULL
, HFILL
}},
1902 { &hf_isi_sim_pb_type
,
1903 { "Phonebook Type", "isi.sim.pb.type", FT_UINT8
, BASE_HEX
, VALS(isi_sim_pb_type
), 0x0, NULL
, HFILL
}},
1904 {&hf_isi_sim_pb_location
,
1905 { "Phonebook Location", "isi.sim.pb.location", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1906 {&hf_isi_sim_pb_tag_count
,
1907 { "Tag Count", "isi.sim.pb.tag.count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1908 { &hf_isi_sim_pb_tag
,
1909 { "Phonebook Item Type", "isi.sim.pb.tag", FT_UINT8
, BASE_HEX
, VALS(isi_sim_pb_tag
), 0x0, NULL
, HFILL
}},
1910 /* {&hf_isi_sim_imsi_byte_1,
1911 { "IMSI Byte 1", "isi.sim.imsi.byte1", FT_UINT16, BASE_HEX, NULL, 0xF0, NULL, HFILL }},*/
1912 {&hf_isi_sim_imsi_length
,
1913 { "IMSI Length", "isi.sim.imsi.length", FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
1916 static hf_register_info gps_hf
[] = {
1917 { &hf_isi_gps_payload
,
1918 { "Payload", "isi.gps.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1920 { "Command", "isi.gps.cmd", FT_UINT8
, BASE_HEX
, VALS(isi_gps_id
), 0x0, NULL
, HFILL
}},
1921 { &hf_isi_gps_sub_pkgs
,
1922 { "Number of Subpackets", "isi.gps.pkgs", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1923 { &hf_isi_gps_sub_type
,
1924 { "Subpacket Type", "isi.gps.sub.type", FT_UINT8
, BASE_HEX
, VALS(isi_gps_sub_id
), 0x0, NULL
, HFILL
}},
1925 { &hf_isi_gps_sub_len
,
1926 { "Subpacket Length", "isi.gps.sub.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1927 { &hf_isi_gps_status
,
1928 { "Status", "isi.gps.status", FT_UINT8
, BASE_HEX
, VALS(isi_gps_status
), 0x0, NULL
, HFILL
}},
1930 { "Year", "isi.gps.date.year", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1931 { &hf_isi_gps_month
,
1932 { "Month", "isi.gps.date.month", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1934 { "Day", "isi.gps.date.day", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1936 { "Hour", "isi.gps.time.hour", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1937 { &hf_isi_gps_minute
,
1938 { "Minute", "isi.gps.time.minute", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1939 { &hf_isi_gps_second
,
1940 { "Second", "isi.gps.time.second", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1941 { &hf_isi_gps_latitude
,
1942 { "Latitude", "isi.gps.lat", FT_DOUBLE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1943 { &hf_isi_gps_longitude
,
1944 { "Longitude", "isi.gps.lon", FT_DOUBLE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1946 { "Position Accuracy", "isi.gps.eph", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "EPH (position accuracy) in meter", HFILL
}},
1947 { &hf_isi_gps_altitude
,
1948 { "Altitude", "isi.gps.alt", FT_INT16
, BASE_DEC
, NULL
, 0x0, "Altitude in meter", HFILL
}},
1950 { "Altitude Accuracy", "isi.gps.epv", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "EPV (altitude accuracy) in meter", HFILL
}},
1951 { &hf_isi_gps_course
,
1952 { "Course", "isi.gps.course", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "Course in degree", HFILL
}},
1954 { "Course Accuracy", "isi.gps.epd", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "EPD (course accuracy) in degree", HFILL
}},
1955 { &hf_isi_gps_speed
,
1956 { "Speed", "isi.gps.speed", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "Speed in km/h", HFILL
}},
1958 { "Speed Accuracy", "isi.gps.eps", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "EPS (speed accuracy) in km/h", HFILL
}},
1959 { &hf_isi_gps_climb
,
1960 { "Climb", "isi.gps.climb", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "Climb in km/h", HFILL
}},
1961 { &hf_isi_gps_satellites
,
1962 { "Visible Satellites", "isi.gps.satellites", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1964 { "Pseudorandom Noise (PRN)", "isi.gps.sat.prn", FT_UINT8
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1965 { &hf_isi_gps_sat_used
,
1966 { "in use", "isi.gps.sat.used", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1967 { &hf_isi_gps_sat_strength
,
1968 { "Signal Strength", "isi.gps.sat.strength", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1969 { &hf_isi_gps_sat_elevation
,
1970 { "Elevation", "isi.gps.sat.elevation", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1971 { &hf_isi_gps_sat_azimuth
,
1972 { "Azimuth", "isi.gps.sat.azimuth", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1974 { "Climb Accuracy", "isi.gps.epc", FT_FLOAT
, BASE_NONE
, NULL
, 0x0, "EPC (climb accuracy) in km/h", HFILL
}},
1976 { "Mobile Country Code (MCC)", "isi.gps.gsm.mcc", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1978 { "Mobile Network Code (MNC)", "isi.gps.gsm.mnc", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1980 { "Location Area Code (LAC)", "isi.gps.gsm.lac", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1982 { "Cell ID (CID)", "isi.gps.gsm.cid", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1984 { "Cell ID (UCID)", "isi.gps.gsm.ucid", FT_UINT32
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}}
1987 static hf_register_info gss_hf
[] = {
1988 { &hf_isi_gss_payload
,
1989 { "Payload", "isi.gss.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1990 { &hf_isi_gss_message_id
,
1991 { "Message ID", "isi.gss.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_gss_message_id
), 0x0, NULL
, HFILL
}},
1993 { &hf_isi_gss_subblock
,
1994 { "Subblock", "isi.gss.subblock", FT_UINT8
, BASE_HEX
, VALS(isi_gss_subblock
), 0x0, NULL
, HFILL
}},
1996 { &hf_isi_gss_operation
,
1997 { "Operation", "isi.gss.operation", FT_UINT8
, BASE_HEX
, VALS(isi_gss_operation
), 0x0, NULL
, HFILL
}},
1998 { &hf_isi_gss_subblock_count
,
1999 { "Subblock Count", "isi.gss.subblock_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2000 { &hf_isi_gss_cause
,
2001 { "Cause", "isi.gss.cause", FT_UINT8
, BASE_HEX
, VALS(isi_gss_cause
), 0x0, NULL
, HFILL
}},
2002 { &hf_isi_gss_common_message_id
,
2003 { "Common Message ID", "isi.gss.common.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_gss_common_message_id
), 0x0, NULL
, HFILL
}},
2006 static hf_register_info ss_hf
[] = {
2007 { &hf_isi_ss_payload
,
2008 { "Payload", "isi.ss.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2009 { &hf_isi_ss_message_id
,
2010 { "Message ID", "isi.ss.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_ss_message_id
), 0x0, NULL
, HFILL
}},
2011 { &hf_isi_ss_ussd_type
,
2012 { "USSD Type", "isi.ss.ussd.type", FT_UINT8
, BASE_HEX
, VALS(isi_ss_ussd_type
), 0x0, NULL
, HFILL
}},
2013 { &hf_isi_ss_subblock_count
,
2014 { "Subblock Count", "isi.ss.subblock_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2015 { &hf_isi_ss_subblock
,
2016 { "Subblock", "isi.ss.subblock", FT_UINT8
, BASE_HEX
, VALS(isi_ss_subblock
), 0x0, NULL
, HFILL
}},
2017 { &hf_isi_ss_operation
,
2018 { "Operation", "isi.ss.operation", FT_UINT8
, BASE_HEX
, VALS(isi_ss_operation
), 0x0, NULL
, HFILL
}},
2019 { &hf_isi_ss_service_code
,
2020 { "Service Code", "isi.ss.service_code", FT_UINT8
, BASE_HEX
, VALS(isi_ss_service_code
), 0x0, NULL
, HFILL
}},
2021 { &hf_isi_ss_status_indication
,
2022 { "Status Indication", "isi.ss.status_indication", FT_UINT8
, BASE_HEX
, VALS(isi_ss_status_indication
), 0x0, NULL
, HFILL
}},
2023 { &hf_isi_ss_ussd_length
,
2024 { "Length", "isi.ss.ussd.length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2025 { &hf_isi_ss_common_message_id
,
2026 { "Common Message ID", "isi.ss.common.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_ss_common_message_id
), 0x0, NULL
, HFILL
}},
2029 static hf_register_info network_hf
[] = {
2030 { &hf_isi_network_payload
,
2031 { "Payload", "isi.network.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2032 { &hf_isi_network_cmd
,
2033 { "Command", "isi.network.cmd", FT_UINT8
, BASE_HEX
, VALS(isi_network_id
), 0x0, NULL
, HFILL
}},
2034 { &hf_isi_network_data_sub_pkgs
,
2035 { "Number of Subpackets", "isi.network.pkgs", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2036 { &hf_isi_network_status_sub_type
,
2037 { "Subpacket Type", "isi.network.sub.type", FT_UINT8
, BASE_HEX
, VALS(isi_network_status_sub_id
), 0x0, NULL
, HFILL
}},
2038 { &hf_isi_network_status_sub_len
,
2039 { "Subpacket Length", "isi.network.sub.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2040 { &hf_isi_network_status_sub_lac
,
2041 { "Location Area Code (LAC)", "isi.network.sub.lac", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2042 { &hf_isi_network_status_sub_cid
,
2043 { "Cell ID (CID)", "isi.network.sub.cid", FT_UINT32
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2044 { &hf_isi_network_status_sub_msg_len
,
2045 { "Message Length", "isi.network.sub.msg_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2046 { &hf_isi_network_status_sub_msg
,
2047 { "Message", "isi.network.sub.msg", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2048 { &hf_isi_network_cell_info_sub_type
,
2049 { "Subpacket Type", "isi.network.sub.type", FT_UINT8
, BASE_HEX
, VALS(isi_network_cell_info_sub_id
), 0x0, NULL
, HFILL
}},
2050 { &hf_isi_network_cell_info_sub_len
,
2051 { "Subpacket Length", "isi.network.sub.len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2052 { &hf_isi_network_cell_info_sub_operator
,
2053 { "Operator Code", "isi.network.sub.operator", FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2054 { &hf_isi_network_gsm_band_900
,
2055 { "900 Mhz Band", "isi.network.sub.gsm_band_900", FT_BOOLEAN
, 32, NULL
, 0x00000001, NULL
, HFILL
}},
2056 { &hf_isi_network_gsm_band_1800
,
2057 { "1800 Mhz Band", "isi.network.sub.gsm_band_1800", FT_BOOLEAN
, 32, NULL
, 0x00000002, NULL
, HFILL
}},
2058 { &hf_isi_network_gsm_band_1900
,
2059 { "1900 Mhz Band", "isi.network.sub.gsm_band_1900", FT_BOOLEAN
, 32, NULL
, 0x00000004, NULL
, HFILL
}},
2060 { &hf_isi_network_gsm_band_850
,
2061 { "850 Mhz Band", "isi.network.sub.gsm_band_850", FT_BOOLEAN
, 32, NULL
, 0x00000008, NULL
, HFILL
}}
2064 static hf_register_info sms_hf
[] = {
2065 { &hf_isi_sms_payload
,
2066 { "Payload", "isi.sms.payload", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2067 { &hf_isi_sms_message_id
,
2068 { "Message ID", "isi.sms.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_sms_message_id
), 0x0, NULL
, HFILL
}},
2069 { &hf_isi_sms_routing_command
,
2070 { "SMS Routing Command", "isi.sms.routing.command", FT_UINT8
, BASE_HEX
, VALS(isi_sms_routing_command
), 0x0, NULL
, HFILL
}},
2071 { &hf_isi_sms_routing_mode
,
2072 { "Routing Mode", "isi.sms.routing.mode", FT_UINT8
, BASE_HEX
, VALS(isi_sms_routing_mode
), 0x0, NULL
, HFILL
}},
2073 { &hf_isi_sms_route
,
2074 { "Message Route", "isi.sms.route", FT_UINT8
, BASE_HEX
, VALS(isi_sms_route
), 0x0, NULL
, HFILL
}},
2075 { &hf_isi_sms_subblock_count
,
2076 { "Subblock Count", "isi.sms.subblock_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2077 { &hf_isi_sms_send_status
,
2078 { "Sending Status", "isi.sms.sending_status", FT_UINT8
, BASE_HEX
, VALS(isi_sms_send_status
), 0x0, NULL
, HFILL
}},
2080 { &hf_isi_sms_subblock
,
2081 { "Subblock", "isi.sms.subblock", FT_UINT8
, BASE_HEX
, VALS(isi_sms_subblock
), 0x0, NULL
, HFILL
}},
2083 { &hf_isi_sms_common_message_id
,
2084 { "Common Message ID", "isi.sms.common.msg_id", FT_UINT8
, BASE_HEX
, VALS(isi_sms_common_message_id
), 0x0, NULL
, HFILL
}},
2087 static int *ett
[] = {
2090 &ett_isi_network_gsm_band_info
2093 static ei_register_info ei
[] = {
2094 { &ei_isi_len
, { "isi.len.invalid", PI_PROTOCOL
, PI_WARN
, "Broken Length", EXPFILL
}},
2095 { &ei_isi_unsupported_packet
, { "isi.unsupported_packet", PI_UNDECODED
, PI_WARN
, "Unsupported packet", EXPFILL
}},
2098 expert_module_t
* expert_isi
;
2100 proto_isi
= proto_register_protocol("Intelligent Service Interface", "ISI", "isi");
2102 proto_register_field_array(proto_isi
, hf
, array_length(hf
));
2103 proto_register_field_array(proto_isi
, simauth_hf
, array_length(simauth_hf
));
2104 proto_register_field_array(proto_isi
, sim_hf
, array_length(sim_hf
));
2105 proto_register_field_array(proto_isi
, gss_hf
, array_length(gss_hf
));
2106 proto_register_field_array(proto_isi
, gps_hf
, array_length(gps_hf
));
2107 proto_register_field_array(proto_isi
, ss_hf
, array_length(ss_hf
));
2108 proto_register_field_array(proto_isi
, network_hf
, array_length(network_hf
));
2109 proto_register_field_array(proto_isi
, sms_hf
, array_length(sms_hf
));
2111 proto_register_subtree_array(ett
, array_length(ett
));
2112 expert_isi
= expert_register_protocol(proto_isi
);
2113 expert_register_field_array(expert_isi
, ei
, array_length(ei
));
2115 /* create new dissector table for isi resource */
2116 isi_resource_dissector_table
= register_dissector_table("isi.resource", "ISI resource", proto_isi
, FT_UINT8
, BASE_HEX
);
2119 /* Handler registration */
2121 proto_reg_handoff_isi(void)
2123 static bool initialized
=false;
2126 dissector_add_uint("sll.ltype", LINUX_SLL_P_ISI
, create_dissector_handle(dissect_isi
, proto_isi
));
2128 heur_dissector_add("usb.bulk", dissect_usb_isi
, "ISI bulk endpoint", "usb_bulk_isi", proto_isi
, HEURISTIC_DISABLE
);
2130 dissector_add_uint("isi.resource", 0x02, create_dissector_handle(dissect_isi_sms
, proto_isi
));
2131 dissector_add_uint("isi.resource", 0x06, create_dissector_handle(dissect_isi_ss
, proto_isi
));
2132 dissector_add_uint("isi.resource", 0x08, create_dissector_handle(dissect_isi_sim_auth
, proto_isi
));
2133 dissector_add_uint("isi.resource", 0x09, create_dissector_handle(dissect_isi_sim
, proto_isi
));
2134 dissector_add_uint("isi.resource", 0x0a, create_dissector_handle(dissect_isi_network
, proto_isi
));
2135 dissector_add_uint("isi.resource", 0x32, create_dissector_handle(dissect_isi_gss
, proto_isi
));
2136 dissector_add_uint("isi.resource", 0x54, create_dissector_handle(dissect_isi_gps
, proto_isi
));
2141 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2146 * indent-tabs-mode: t
2149 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2150 * :indentSize=8:tabSize=8:noTabs=false: