blob: 26f25e4b80cc1351eb5ff8d1a27e7d513892464a [file] [log] [blame]
Harald Welte3b712472010-11-29 15:56:49 +01001Index: wireshark/epan/dissectors/packet-gsm_ipa.c
2===================================================================
3--- wireshark.orig/epan/dissectors/packet-gsm_ipa.c
4+++ wireshark/epan/dissectors/packet-gsm_ipa.c
Harald Weltedb2c28a2010-12-01 00:02:58 +01005@@ -40,6 +40,8 @@
6 static dissector_handle_t ipa_handle;
7 static range_t *global_ipa_tcp_ports = NULL;
8 static range_t *global_ipa_udp_ports = NULL;
9+static gboolean global_ipa_in_root;
10+static gboolean global_ipa_in_info;
11
12 /* Initialize the protocol and registered fields */
13 static int proto_ipa = -1;
14@@ -47,6 +49,7 @@
Harald Welte3b712472010-11-29 15:56:49 +010015
16 static int hf_ipa_data_len = -1;
17 static int hf_ipa_protocol = -1;
18+static int hf_ipa_hsl_debug = -1;
19
20 static int hf_ipaccess_msgtype = -1;
21 static int hf_ipaccess_attr_tag = -1;
Harald Weltedb2c28a2010-12-01 00:02:58 +010022@@ -73,6 +76,7 @@
Harald Welte3b712472010-11-29 15:56:49 +010023 #define AIP_SCCP 0xfd
24 #define ABISIP_IPACCESS 0xfe
25 #define ABISIP_OML 0xff
26+#define HSL_DEBUG 0xdd
27
28 static const value_string ipa_protocol_vals[] = {
29 { 0x00, "RSL" },
Harald Weltedb2c28a2010-12-01 00:02:58 +010030@@ -80,6 +84,7 @@
Harald Welte3b712472010-11-29 15:56:49 +010031 { 0xfd, "SCCP" },
32 { 0xfe, "IPA" },
33 { 0xff, "OML" },
34+ { 0xdd, "HSL Debug" },
35 { 0, NULL }
36 };
37
Harald Weltedb2c28a2010-12-01 00:02:58 +010038@@ -187,7 +192,7 @@
Harald Welte3b712472010-11-29 15:56:49 +010039
40 while ((remaining = tvb_reported_length_remaining(tvb, offset)) > 0) {
41 proto_item *ti;
42- proto_tree *ipa_tree;
43+ proto_tree *ipa_tree = NULL;
44 guint16 len, msg_type;
45 tvbuff_t *next_tvb;
46
Harald Weltedb2c28a2010-12-01 00:02:58 +010047@@ -241,6 +246,18 @@
Harald Welte3b712472010-11-29 15:56:49 +010048 /* hand this off to the standard MGCP dissector */
49 call_dissector(sub_handles[SUB_MGCP], next_tvb, pinfo, tree);
50 break;
51+ case HSL_DEBUG:
52+ if (tree) {
Harald Weltedb2c28a2010-12-01 00:02:58 +010053+ proto_tree_add_item(ipa_tree, hf_ipa_hsl_debug,
54+ next_tvb, 0, len, FALSE);
55+ if (global_ipa_in_root == TRUE)
56+ proto_tree_add_item(tree, hf_ipa_hsl_debug,
57+ next_tvb, 0, len, FALSE);
Harald Welte3b712472010-11-29 15:56:49 +010058+ }
Harald Weltedb2c28a2010-12-01 00:02:58 +010059+ if (global_ipa_in_info == TRUE)
60+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
61+ tvb_get_stringz(next_tvb, 0, NULL));
Harald Welte3b712472010-11-29 15:56:49 +010062+ break;
63 default:
64 if (msg_type < ABISIP_RSL_MAX) {
65 /* hand this off to the standard A-bis RSL dissector */
Harald Weltedb2c28a2010-12-01 00:02:58 +010066@@ -269,6 +286,11 @@
Harald Welte3b712472010-11-29 15:56:49 +010067 FT_UINT8, BASE_HEX, VALS(ipa_protocol_vals), 0x0,
68 "The IPA Sub-Protocol", HFILL}
69 },
70+ {&hf_ipa_hsl_debug,
71+ {"Debug Message", "ipa.hsl_debug",
72+ FT_STRING, BASE_NONE, NULL, 0,
73+ NULL, HFILL}
74+ },
75 };
76 static hf_register_info hf_ipa[] = {
77 {&hf_ipaccess_msgtype,
Harald Weltedb2c28a2010-12-01 00:02:58 +010078@@ -321,6 +343,13 @@
79 "Set the port(s) for ip.access IPA"
80 " (default: " IPA_UDP_PORTS ")",
81 &global_ipa_udp_ports, MAX_UDP_PORT);
82+
83+ prefs_register_bool_preference(ipa_module, "hsl_debug_in_root_tree",
84+ "HSL Debug messages in root protocol tree",
85+ NULL, &global_ipa_in_root);
86+ prefs_register_bool_preference(ipa_module, "hsl_debug_in_info",
87+ "HSL Debug messages in INFO column",
88+ NULL, &global_ipa_in_info);
89 }
90
91 static void ipa_tcp_delete_callback(guint32 port)