wireshark: Remove patches applied in upstream wireshark
These patches were applied to upstream wireshark as of svn revision r35475.
This commit is contained in:
parent
8e3f0e7185
commit
3b0fd2b0b9
|
@ -1,128 +0,0 @@
|
|||
Index: wireshark/epan/dissectors/packet-gsm_ipa.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-gsm_ipa.c
|
||||
+++ wireshark/epan/dissectors/packet-gsm_ipa.c
|
||||
@@ -32,6 +32,14 @@
|
||||
|
||||
#include <epan/packet.h>
|
||||
#include <epan/ipproto.h>
|
||||
+#include <epan/prefs.h>
|
||||
+
|
||||
+#define IPA_TCP_PORTS "3002,3003,3006,5000"
|
||||
+#define IPA_UDP_PORTS "3006"
|
||||
+
|
||||
+static dissector_handle_t ipa_handle;
|
||||
+static range_t *global_ipa_tcp_ports = NULL;
|
||||
+static range_t *global_ipa_udp_ports = NULL;
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_ipa = -1;
|
||||
@@ -60,11 +68,6 @@
|
||||
|
||||
static dissector_handle_t sub_handles[SUB_MAX];
|
||||
|
||||
-#define TCP_PORT_ABISIP_PRIM 3002
|
||||
-#define TCP_PORT_ABISIP_SEC 3003
|
||||
-#define TCP_PORT_ABISIP_INST 3006
|
||||
-#define TCP_PORT_AIP_PRIM 5000
|
||||
-
|
||||
#define ABISIP_RSL_MAX 0x20
|
||||
#define IPA_MGCP 0xfc
|
||||
#define AIP_SCCP 0xfd
|
||||
@@ -249,8 +252,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+void proto_reg_handoff_gsm_ipa(void);
|
||||
+
|
||||
void proto_register_ipa(void)
|
||||
{
|
||||
+ module_t *ipa_module;
|
||||
+
|
||||
static hf_register_info hf[] = {
|
||||
{&hf_ipa_data_len,
|
||||
{"DataLen", "ipa.data_len",
|
||||
@@ -298,21 +305,71 @@
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
register_dissector("gsm_ipa", dissect_ipa, proto_ipa);
|
||||
+
|
||||
+ range_convert_str(&global_ipa_tcp_ports, IPA_TCP_PORTS, MAX_TCP_PORT);
|
||||
+ range_convert_str(&global_ipa_udp_ports, IPA_UDP_PORTS, MAX_UDP_PORT);
|
||||
+ ipa_module = prefs_register_protocol(proto_ipa,
|
||||
+ proto_reg_handoff_gsm_ipa);
|
||||
+
|
||||
+ prefs_register_range_preference(ipa_module, "tcp_ports",
|
||||
+ "GSM IPA TCP Port(s)",
|
||||
+ "Set the port(s) for ip.access IPA"
|
||||
+ " (default: " IPA_TCP_PORTS ")",
|
||||
+ &global_ipa_tcp_ports, MAX_TCP_PORT);
|
||||
+ prefs_register_range_preference(ipa_module, "udp_ports",
|
||||
+ "GSM IPA UDP Port(s)",
|
||||
+ "Set the port(s) for ip.access IPA"
|
||||
+ " (default: " IPA_UDP_PORTS ")",
|
||||
+ &global_ipa_udp_ports, MAX_UDP_PORT);
|
||||
+}
|
||||
+
|
||||
+static void ipa_tcp_delete_callback(guint32 port)
|
||||
+{
|
||||
+ if (port)
|
||||
+ dissector_delete("tcp.port", port, ipa_handle);
|
||||
+}
|
||||
+
|
||||
+static void ipa_udp_delete_callback(guint32 port)
|
||||
+{
|
||||
+ if (port)
|
||||
+ dissector_delete("udp.port", port, ipa_handle);
|
||||
+}
|
||||
+
|
||||
+static void ipa_tcp_add_callback(guint32 port)
|
||||
+{
|
||||
+ if (port)
|
||||
+ dissector_add("tcp.port", port, ipa_handle);
|
||||
+}
|
||||
+
|
||||
+static void ipa_udp_add_callback(guint32 port)
|
||||
+{
|
||||
+ if (port)
|
||||
+ dissector_add("udp.port", port, ipa_handle);
|
||||
}
|
||||
|
||||
void proto_reg_handoff_gsm_ipa(void)
|
||||
{
|
||||
- dissector_handle_t ipa_handle;
|
||||
+ static gboolean ipa_initialized = FALSE;
|
||||
+ static range_t *ipa_tcp_ports, *ipa_udp_ports;
|
||||
+
|
||||
+ if (!ipa_initialized) {
|
||||
+ sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl");
|
||||
+ sub_handles[SUB_OML] = find_dissector("gsm_abis_oml");
|
||||
+ sub_handles[SUB_SCCP] = find_dissector("sccp");
|
||||
+ sub_handles[SUB_MGCP] = find_dissector("mgcp");
|
||||
+
|
||||
+ ipa_handle = create_dissector_handle(dissect_ipa, proto_ipa);
|
||||
+ ipa_initialized = TRUE;
|
||||
+ } else {
|
||||
+ range_foreach(ipa_tcp_ports, ipa_tcp_delete_callback);
|
||||
+ g_free(ipa_tcp_ports);
|
||||
+ range_foreach(ipa_udp_ports, ipa_udp_delete_callback);
|
||||
+ g_free(ipa_udp_ports);
|
||||
+ }
|
||||
+
|
||||
+ ipa_tcp_ports = range_copy(global_ipa_tcp_ports);
|
||||
+ ipa_udp_ports = range_copy(global_ipa_udp_ports);
|
||||
|
||||
- sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl");
|
||||
- sub_handles[SUB_OML] = find_dissector("gsm_abis_oml");
|
||||
- sub_handles[SUB_SCCP] = find_dissector("sccp");
|
||||
- sub_handles[SUB_MGCP] = find_dissector("mgcp");
|
||||
-
|
||||
- ipa_handle = create_dissector_handle(dissect_ipa, proto_ipa);
|
||||
- dissector_add("tcp.port", TCP_PORT_ABISIP_PRIM, ipa_handle);
|
||||
- dissector_add("tcp.port", TCP_PORT_ABISIP_SEC, ipa_handle);
|
||||
- dissector_add("tcp.port", TCP_PORT_ABISIP_INST, ipa_handle);
|
||||
- dissector_add("tcp.port", TCP_PORT_AIP_PRIM, ipa_handle);
|
||||
- dissector_add("udp.port", TCP_PORT_ABISIP_INST, ipa_handle);
|
||||
+ range_foreach(ipa_tcp_ports, ipa_tcp_add_callback);
|
||||
+ range_foreach(ipa_udp_ports, ipa_udp_add_callback);
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
Index: wireshark/epan/dissectors/packet-gsm_ipa.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-gsm_ipa.c
|
||||
+++ wireshark/epan/dissectors/packet-gsm_ipa.c
|
||||
@@ -40,6 +40,8 @@
|
||||
static dissector_handle_t ipa_handle;
|
||||
static range_t *global_ipa_tcp_ports = NULL;
|
||||
static range_t *global_ipa_udp_ports = NULL;
|
||||
+static gboolean global_ipa_in_root;
|
||||
+static gboolean global_ipa_in_info;
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_ipa = -1;
|
||||
@@ -47,6 +49,7 @@
|
||||
|
||||
static int hf_ipa_data_len = -1;
|
||||
static int hf_ipa_protocol = -1;
|
||||
+static int hf_ipa_hsl_debug = -1;
|
||||
|
||||
static int hf_ipaccess_msgtype = -1;
|
||||
static int hf_ipaccess_attr_tag = -1;
|
||||
@@ -73,6 +76,7 @@
|
||||
#define AIP_SCCP 0xfd
|
||||
#define ABISIP_IPACCESS 0xfe
|
||||
#define ABISIP_OML 0xff
|
||||
+#define HSL_DEBUG 0xdd
|
||||
|
||||
static const value_string ipa_protocol_vals[] = {
|
||||
{ 0x00, "RSL" },
|
||||
@@ -80,6 +84,7 @@
|
||||
{ 0xfd, "SCCP" },
|
||||
{ 0xfe, "IPA" },
|
||||
{ 0xff, "OML" },
|
||||
+ { 0xdd, "HSL Debug" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
@@ -187,7 +192,7 @@
|
||||
|
||||
while ((remaining = tvb_reported_length_remaining(tvb, offset)) > 0) {
|
||||
proto_item *ti;
|
||||
- proto_tree *ipa_tree;
|
||||
+ proto_tree *ipa_tree = NULL;
|
||||
guint16 len, msg_type;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
@@ -241,6 +246,18 @@
|
||||
/* hand this off to the standard MGCP dissector */
|
||||
call_dissector(sub_handles[SUB_MGCP], next_tvb, pinfo, tree);
|
||||
break;
|
||||
+ case HSL_DEBUG:
|
||||
+ if (tree) {
|
||||
+ proto_tree_add_item(ipa_tree, hf_ipa_hsl_debug,
|
||||
+ next_tvb, 0, len, FALSE);
|
||||
+ if (global_ipa_in_root == TRUE)
|
||||
+ proto_tree_add_item(tree, hf_ipa_hsl_debug,
|
||||
+ next_tvb, 0, len, FALSE);
|
||||
+ }
|
||||
+ if (global_ipa_in_info == TRUE)
|
||||
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
+ tvb_get_stringz(next_tvb, 0, NULL));
|
||||
+ break;
|
||||
default:
|
||||
if (msg_type < ABISIP_RSL_MAX) {
|
||||
/* hand this off to the standard A-bis RSL dissector */
|
||||
@@ -269,6 +286,11 @@
|
||||
FT_UINT8, BASE_HEX, VALS(ipa_protocol_vals), 0x0,
|
||||
"The IPA Sub-Protocol", HFILL}
|
||||
},
|
||||
+ {&hf_ipa_hsl_debug,
|
||||
+ {"Debug Message", "ipa.hsl_debug",
|
||||
+ FT_STRING, BASE_NONE, NULL, 0,
|
||||
+ NULL, HFILL}
|
||||
+ },
|
||||
};
|
||||
static hf_register_info hf_ipa[] = {
|
||||
{&hf_ipaccess_msgtype,
|
||||
@@ -321,6 +343,13 @@
|
||||
"Set the port(s) for ip.access IPA"
|
||||
" (default: " IPA_UDP_PORTS ")",
|
||||
&global_ipa_udp_ports, MAX_UDP_PORT);
|
||||
+
|
||||
+ prefs_register_bool_preference(ipa_module, "hsl_debug_in_root_tree",
|
||||
+ "HSL Debug messages in root protocol tree",
|
||||
+ NULL, &global_ipa_in_root);
|
||||
+ prefs_register_bool_preference(ipa_module, "hsl_debug_in_info",
|
||||
+ "HSL Debug messages in INFO column",
|
||||
+ NULL, &global_ipa_in_info);
|
||||
}
|
||||
|
||||
static void ipa_tcp_delete_callback(guint32 port)
|
|
@ -1,13 +0,0 @@
|
|||
Index: wireshark/epan/dissectors/packet-rsl.c
|
||||
===================================================================
|
||||
--- wireshark.orig/epan/dissectors/packet-rsl.c
|
||||
+++ wireshark/epan/dissectors/packet-rsl.c
|
||||
@@ -2291,7 +2291,7 @@
|
||||
|
||||
proto_tree_add_text(ie_tree, tvb,offset,length,"Layer 3 message");
|
||||
next_tvb = tvb_new_subset(tvb, offset, length, length);
|
||||
- /* call_dissector(gsm_a_dtap_handle, next_tvb, pinfo, top_tree);*/
|
||||
+ call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree);
|
||||
|
||||
offset = offset + length;
|
||||
|
Loading…
Reference in New Issue