Update SS

master
Tyson Key 2011-01-16 00:08:05 +01:00 committed by Sebastian Reichel
parent baad7c6b3a
commit 091d81c62c
1 changed files with 133 additions and 58 deletions

View File

@ -2,7 +2,7 @@
* Dissector for ISI's Subscriber Services resource * Dissector for ISI's Subscriber Services resource
* Copyright 2010, Sebastian Reichel <sre@ring0.de> * Copyright 2010, Sebastian Reichel <sre@ring0.de>
* Copyright 2010, Tyson Key <tyson.key@gmail.com> * Copyright 2010, Tyson Key <tyson.key@gmail.com>
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies. * copyright notice and this permission notice appear in all copies.
@ -27,16 +27,23 @@
#include "packet-isi.h" #include "packet-isi.h"
#include "isi-ss.h" #include "isi-ss.h"
#include <epan/dissectors/packet-gsm_sms.h>
static const value_string isi_ss_message_id[] = { static const value_string isi_ss_message_id[] = {
{0x00, "SS_SERVICE_REQ"}, {0x00, "SS_SERVICE_REQ"},
{0x01, "SS_SERVICE_COMPLETED_RESP"}, {0x01, "SS_SERVICE_COMPLETED_RESP"},
{0x02, "SS_SERVICE_FAILED_RESP"}, {0x02, "SS_SERVICE_FAILED_RESP"},
{0x03, "SS_SERVICE_NOT_SUPPORTED_RESP"},
{0x04, "SS_GSM_USSD_SEND_REQ"}, {0x04, "SS_GSM_USSD_SEND_REQ"},
{0x05, "SS_GSM_USSD_SEND_RESP"}, {0x05, "SS_GSM_USSD_SEND_RESP"},
{0x06, "SS_GSM_USSD_RECEIVE_IND"}, {0x06, "SS_GSM_USSD_RECEIVE_IND"},
{0x09, "SS_STATUS_IND"}, {0x09, "SS_STATUS_IND"},
{0x10, "SS_SERVICE_COMPLETED_IND"}, {0x10, "SS_SERVICE_COMPLETED_IND"},
{0xF0, "SS_COMMON_MESSAGE"}, {0x11, "SS_CANCEL_REQ"},
{0x12, "SS_CANCEL_RESP"},
{0x15, "SS_RELEASE_REQ"},
{0x16, "SS_RELEASE_RESP"},
{0xF0, "COMMON_MESSAGE"},
}; };
static const value_string isi_ss_ussd_type[] = { static const value_string isi_ss_ussd_type[] = {
@ -48,18 +55,18 @@ static const value_string isi_ss_ussd_type[] = {
}; };
static const value_string isi_ss_subblock[] = { static const value_string isi_ss_subblock[] = {
{0x00, "SS_FORWARDING"}, {0x00, "SS_FORWARDING"},
{0x01, "SS_STATUS_RESULT"}, {0x01, "SS_STATUS_RESULT"},
{0x03, "SS_GSM_PASSWORD"}, {0x03, "SS_GSM_PASSWORD"},
{0x04, "SS_GSM_FORWARDING_INFO"}, {0x04, "SS_GSM_FORWARDING_INFO"},
{0x05, "SS_GSM_FORWARDING_FEATURE"}, {0x05, "SS_GSM_FORWARDING_FEATURE"},
{0x08, "SS_GSM_DATA"}, {0x08, "SS_GSM_DATA"},
{0x09, "SS_GSM_BSC_INFO"}, {0x09, "SS_GSM_BSC_INFO"},
{0x0B, "SS_GSM_PASSWORD_INFO"}, {0x0B, "SS_GSM_PASSWORD_INFO"},
{0x0D, "SS_GSM_INDICATE_PASSWORD_ERROR"}, {0x0D, "SS_GSM_INDICATE_PASSWORD_ERROR"},
{0x0E, "SS_GSM_INDICATE_ERROR"}, {0x0E, "SS_GSM_INDICATE_ERROR"},
{0x2F, "SS_GSM_ADDITIONAL_INFO"}, {0x2F, "SS_GSM_ADDITIONAL_INFO"},
{0x32, "SS_GSM_USSD_STRING"}, {0x32, "SS_GSM_USSD_STRING"},
}; };
static const value_string isi_ss_operation[] = { static const value_string isi_ss_operation[] = {
@ -71,6 +78,31 @@ static const value_string isi_ss_operation[] = {
{0x06, "SS_GSM_PASSWORD_REGISTRATION"}, {0x06, "SS_GSM_PASSWORD_REGISTRATION"},
}; };
static const value_string isi_ss_service_code[] = {
{0x00, "SS_ALL_TELE_AND_BEARER"},
{0x0A, "SS_GSM_ALL_TELE"},
{0x0B, "SS_GSM_TELEPHONY"},
{0x0C, "SS_GSM_ALL_DATA_TELE"},
{0x0D, "SS_GSM_FACSIMILE"},
{0x10, "SS_GSM_SMS"},
{0x00, NULL}
};
static const value_string isi_ss_status_indication[] = {
{0x00, "SS_STATUS_REQUEST_SERVICE_START"},
{0x01, "SS_STATUS_REQUEST_SERVICE_STOP"},
{0x02, "SS_GSM_STATUS_REQUEST_USSD_START"},
{0x03, "SS_GSM_STATUS_REQUEST_USSD_STOP"},
{0x00, NULL}
};
static const value_string isi_ss_common_message_id[] = {
{0x01, "COMM_SERVICE_NOT_IDENTIFIED_RESP"},
{0x12, "COMM_ISI_VERSION_GET_REQ"},
{0x13, "COMM_ISI_VERSION_GET_RESP"},
{0x14, "COMM_ISA_ENTITY_NOT_REACHABLE_RESP"},
};
static dissector_handle_t isi_ss_handle; static dissector_handle_t isi_ss_handle;
static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *tree); static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *tree);
@ -79,6 +111,12 @@ static guint32 hf_isi_ss_ussd_type = -1;
static guint32 hf_isi_ss_subblock_count = -1; static guint32 hf_isi_ss_subblock_count = -1;
static guint32 hf_isi_ss_subblock = -1; static guint32 hf_isi_ss_subblock = -1;
static guint32 hf_isi_ss_operation = -1; static guint32 hf_isi_ss_operation = -1;
static guint32 hf_isi_ss_service_code = -1;
static guint32 hf_isi_ss_status_indication = -1;
static guint32 hf_isi_ss_ussd_length = -1;
static guint8 hf_isi_ss_ussd_content = -1;
static guint32 hf_isi_ss_common_message_id = -1;
void proto_reg_handoff_isi_ss(void) { void proto_reg_handoff_isi_ss(void) {
static gboolean initialized=FALSE; static gboolean initialized=FALSE;
@ -94,13 +132,21 @@ void proto_register_isi_ss(void) {
{ &hf_isi_ss_message_id, { &hf_isi_ss_message_id,
{ "Message ID", "isi.ss.msg_id", FT_UINT8, BASE_HEX, isi_ss_message_id, 0x0, "Message ID", HFILL }}, { "Message ID", "isi.ss.msg_id", FT_UINT8, BASE_HEX, isi_ss_message_id, 0x0, "Message ID", HFILL }},
{ &hf_isi_ss_ussd_type, { &hf_isi_ss_ussd_type,
{ "USSD Type", "isi.ss.ussd_type", FT_UINT8, BASE_HEX, isi_ss_ussd_type, 0x0, "USSD Type", HFILL }}, { "USSD Type", "isi.ss.ussd.type", FT_UINT8, BASE_HEX, isi_ss_ussd_type, 0x0, "USSD Type", HFILL }},
{ &hf_isi_ss_subblock_count, { &hf_isi_ss_subblock_count,
{ "Subblock Count", "isi.ss.subblock_count", FT_UINT8, BASE_DEC, NULL, 0x0, "Subblock Count", HFILL }}, { "Subblock Count", "isi.ss.subblock_count", FT_UINT8, BASE_DEC, NULL, 0x0, "Subblock Count", HFILL }},
{ &hf_isi_ss_subblock, { &hf_isi_ss_subblock,
{ "Subblock", "isi.ss.subblock", FT_UINT8, BASE_HEX, isi_ss_subblock, 0x0, "Subblock", HFILL }}, { "Subblock", "isi.ss.subblock", FT_UINT8, BASE_HEX, isi_ss_subblock, 0x0, "Subblock", HFILL }},
{ &hf_isi_ss_operation, { &hf_isi_ss_operation,
{ "Operation", "isi.ss.operation", FT_UINT8, BASE_HEX, isi_ss_operation, 0x0, "Operation", HFILL }}, { "Operation", "isi.ss.operation", FT_UINT8, BASE_HEX, isi_ss_operation, 0x0, "Operation", HFILL }},
{ &hf_isi_ss_service_code,
{ "Service Code", "isi.ss.service_code", FT_UINT8, BASE_HEX, isi_ss_service_code, 0x0, "Service Code", HFILL }},
{ &hf_isi_ss_status_indication,
{ "Status Indication", "isi.ss.status_indication", FT_UINT8, BASE_HEX, isi_ss_status_indication, 0x0, "Status Indication", HFILL }},
{ &hf_isi_ss_ussd_length,
{ "Length", "isi.ss.ussd.length", FT_UINT8, BASE_DEC, NULL, 0x0, "Length", HFILL }},
{ &hf_isi_ss_common_message_id,
{ "Common Message ID", "isi.ss.common.msg_id", FT_UINT8, BASE_HEX, isi_ss_common_message_id, 0x0, "Common Message ID", HFILL }},
}; };
proto_register_field_array(proto_isi, hf, array_length(hf)); proto_register_field_array(proto_isi, hf, array_length(hf));
@ -122,10 +168,11 @@ static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *isitre
switch(cmd) { switch(cmd) {
case 0x00: /* SS_SERVICE_REQ */ case 0x00: /* SS_SERVICE_REQ */
proto_tree_add_item(tree, hf_isi_ss_operation, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_operation, tvb, 1, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_service_code, tvb, 2, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
case 0x05: case 0x05:
col_set_str(pinfo->cinfo, COL_INFO, "Service Request: Call Barring Interrogation"); col_set_str(pinfo->cinfo, COL_INFO, "Service Request: Interrogation");
break; break;
case 0x06: case 0x06:
col_set_str(pinfo->cinfo, COL_INFO, "Service Request: GSM Password Registration"); col_set_str(pinfo->cinfo, COL_INFO, "Service Request: GSM Password Registration");
@ -134,21 +181,22 @@ static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *isitre
col_set_str(pinfo->cinfo, COL_INFO, "Service Request"); col_set_str(pinfo->cinfo, COL_INFO, "Service Request");
break; break;
} }
break; break;
case 0x01: /* SS_SERVICE_COMPLETED_RESP */ case 0x01: /* SS_SERVICE_COMPLETED_RESP */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_operation, tvb, 1, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_service_code, tvb, 2, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x05:
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN"); col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Response: Interrogation");
// break; break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Response"); col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Response");
break; break;
} }
break; break;
case 0x02: /* SS_SERVICE_FAILED_RESP */ case 0x02: /* SS_SERVICE_FAILED_RESP */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); //proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
@ -160,24 +208,24 @@ static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *isitre
col_set_str(pinfo->cinfo, COL_INFO, "Service Failed Response"); col_set_str(pinfo->cinfo, COL_INFO, "Service Failed Response");
break; break;
} }
break; break;
case 0x04: /* SS_GSM_USSD_SEND_REQ */ case 0x04: /* SS_GSM_USSD_SEND_REQ */
proto_tree_add_item(tree, hf_isi_ss_ussd_type, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_ussd_type, tvb, 1, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_subblock_count, tvb, 2, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_subblock_count, tvb, 2, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_subblock, tvb, 3, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x02: //SS_GSM_USSD_COMMAND
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN"); proto_tree_add_item(tree, hf_isi_ss_subblock, tvb, 3, 1, FALSE);
// break; col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Send Command Request");
break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Send Request"); col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Send Request");
break; break;
} }
break; break;
case 0x05: /* SS_GSM_USSD_SEND_RESP */ case 0x05: /* SS_GSM_USSD_SEND_RESP */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); //proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
@ -189,61 +237,88 @@ static void dissect_isi_ss(tvbuff_t *tvb, packet_info *pinfo, proto_item *isitre
col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Send Response"); col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Send Response");
break; break;
} }
break; break;
case 0x06: /* SS_GSM_USSD_RECEIVE_IND */ case 0x06: /* SS_GSM_USSD_RECEIVE_IND */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); //An unknown Encoding Information byte precedes - see 3GPP TS 23.038 chapter 5
proto_tree_add_item(tree, hf_isi_ss_ussd_type, tvb, 2, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_ussd_length, tvb, 3, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x04:
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN");
// break;
col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Received Notification");
break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Received Indication"); col_set_str(pinfo->cinfo, COL_INFO, "GSM USSD Message Received Indication");
break; break;
} }
break; break;
case 0x09: /* SS_STATUS_IND */ case 0x09: /* SS_STATUS_IND */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_status_indication, tvb, 1, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_subblock_count, tvb, 2, 1, FALSE);
//proto_tree_add_item(tree, hf_isi_ss_subblock, tvb, 3, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x00:
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN"); col_set_str(pinfo->cinfo, COL_INFO, "Status Indication: Request Service Start");
// break; break;
case 0x01:
col_set_str(pinfo->cinfo, COL_INFO, "Status Indication: Request Service Stop");
break;
case 0x02:
col_set_str(pinfo->cinfo, COL_INFO, "Status Indication: Request USSD Start");
break;
case 0x03:
col_set_str(pinfo->cinfo, COL_INFO, "Status Indication: Request USSD Stop");
break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "Status Indication"); col_set_str(pinfo->cinfo, COL_INFO, "Status Indication");
break; break;
} }
break; break;
case 0x10: /* SS_SERVICE_COMPLETED_IND */ case 0x10: /* SS_SERVICE_COMPLETED_IND */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_operation, tvb, 1, 1, FALSE);
proto_tree_add_item(tree, hf_isi_ss_service_code, tvb, 2, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x05:
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN"); col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Indication: Interrogation");
// break; break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Indication"); col_set_str(pinfo->cinfo, COL_INFO, "Service Completed Indication");
break; break;
} }
break; break;
case 0xF0: /* SS_COMMON_MESSAGE */ case 0xF0: /* SS_COMMON_MESSAGE */
//proto_tree_add_item(tree, hf_isi_ss_service_type, tvb, 1, 1, FALSE); proto_tree_add_item(tree, hf_isi_ss_common_message_id, tvb, 1, 1, FALSE);
code = tvb_get_guint8(tvb, 1); code = tvb_get_guint8(tvb, 1);
switch(code) { switch(code) {
//case 0x2F: case 0x01: /* COMM_SERVICE_NOT_IDENTIFIED_RESP */
// col_set_str(pinfo->cinfo, COL_INFO, "Network Information Request: Read Home PLMN"); col_set_str(pinfo->cinfo, COL_INFO, "Common Message: Service Not Identified Response");
// break; break;
case 0x12: /* COMM_ISI_VERSION_GET_REQ */
col_set_str(pinfo->cinfo, COL_INFO, "Common Message: ISI Version Get Request");
break;
case 0x13: /* COMM_ISI_VERSION_GET_RESP */
col_set_str(pinfo->cinfo, COL_INFO, "Common Message: ISI Version Get Response");
break;
case 0x14: /* COMM_ISA_ENTITY_NOT_REACHABLE_RESP */
col_set_str(pinfo->cinfo, COL_INFO, "Common Message: ISA Entity Not Reachable");
break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "Common Message"); col_set_str(pinfo->cinfo, COL_INFO, "Common Message");
break; break;
} }
break; break;
default: default:
col_set_str(pinfo->cinfo, COL_INFO, "Unknown type"); col_set_str(pinfo->cinfo, COL_INFO, "Unknown type");
break; break;