From 251e991372adf36bfd700842de25d29b25029993 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 19 Nov 2009 09:53:37 +0100 Subject: [wireshark] Remove patches that are already upstream --- wireshark/abisip.patch | 313 ------------------------------------------ wireshark/gsm_a_rr-rrlp.patch | 179 ------------------------ 2 files changed, 492 deletions(-) delete mode 100644 wireshark/abisip.patch delete mode 100644 wireshark/gsm_a_rr-rrlp.patch (limited to 'wireshark') diff --git a/wireshark/abisip.patch b/wireshark/abisip.patch deleted file mode 100644 index 44ca3ee7f..000000000 --- a/wireshark/abisip.patch +++ /dev/null @@ -1,313 +0,0 @@ -Index: epan/dissectors/Makefile.common -=================================================================== ---- epan/dissectors/Makefile.common.orig -+++ epan/dissectors/Makefile.common -@@ -471,6 +471,7 @@ - packet-gsm_a_gm.c \ - packet-gsm_a_rp.c \ - packet-gsm_a_rr.c \ -+ packet-gsm_abis_ip.c \ - packet-gsm_bsslap.c \ - packet-gsm_bssmap_le.c \ - packet-gsm_sms.c \ -Index: epan/dissectors/packet-rsl.c -=================================================================== ---- epan/dissectors/packet-rsl.c.orig -+++ epan/dissectors/packet-rsl.c -@@ -3950,6 +3950,7 @@ - proto_register_field_array(proto_rsl, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - -+ register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl); - - } - -Index: epan/dissectors/packet-gsm_abis_ip.c -=================================================================== ---- /dev/null -+++ epan/dissectors/packet-gsm_abis_ip.c -@@ -0,0 +1,284 @@ -+/* packet-gsm_abis_ip.c -+ * Routines for packet dissection of ip.access A-bis over IP -+ * Copyright 2009 by Harald Welte -+ * -+ * $Id$ -+ * -+ * Wireshark - Network traffic analyzer -+ * By Gerald Combs -+ * Copyright 1998 Gerald Combs -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ */ -+ -+#ifdef HAVE_CONFIG_H -+# include "config.h" -+#endif -+ -+#include -+ -+#include -+#include -+ -+/* Initialize the protocol and registered fields */ -+static int proto_abisip = -1; -+static int proto_ipaccess = -1; -+ -+static int hf_abisip_data_len = -1; -+static int hf_abisip_protocol = -1; -+ -+static int hf_ipaccess_msgtype = -1; -+static int hf_ipaccess_attr_tag = -1; -+static int hf_ipaccess_attr_string = -1; -+ -+/* Initialize the subtree pointers */ -+static gint ett_abisip = -1; -+static gint ett_ipaccess = -1; -+ -+enum { -+ SUB_OML, -+ SUB_RSL, -+ SUB_IPACCESS, -+ -+ SUB_MAX -+}; -+ -+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 ABISIP_RSL 0x00 -+#define ABISIP_IPACCESS 0xfe -+#define ABISIP_OML 0xff -+ -+static const value_string abisip_protocol_vals[] = { -+ { 0x00, "RSL" }, -+ { 0xfe, "IPA" }, -+ { 0xff, "OML" }, -+ { 0, NULL } -+}; -+ -+static const value_string ipaccess_msgtype_vals[] = { -+ { 0x00, "PING?" }, -+ { 0x01, "PONG!" }, -+ { 0x04, "IDENTITY REQUEST" }, -+ { 0x05, "IDENTITY RESPONSE" }, -+ { 0x06, "IDENTITY CONF" }, -+ { 0, NULL } -+}; -+ -+static const value_string ipaccess_idtag_vals[] = { -+ { 0x00, "Serial Number" }, -+ { 0x01, "Unit Name" }, -+ { 0x02, "Location" }, -+ { 0x04, "Equipment Version" }, -+ { 0x05, "Software Version" }, -+ { 0x06, "IP Address" }, -+ { 0x07, "MAC Address" }, -+ { 0x08, "Unit ID" }, -+}; -+ -+static gint -+dissect_ipa_attr(tvbuff_t *tvb, int base_offs, proto_tree *tree) -+{ -+ guint8 len, attr_type; -+ -+ int offset = base_offs; -+ -+ while (tvb_reported_length_remaining(tvb, offset) != 0) { -+ attr_type = tvb_get_guint8(tvb, offset); -+ -+ switch (attr_type) { -+ case 0x00: /* a string prefixed by its length */ -+ len = tvb_get_guint8(tvb, offset+1); -+ proto_tree_add_item(tree, hf_ipaccess_attr_tag, -+ tvb, offset+2, 1, FALSE); -+ proto_tree_add_item(tree, hf_ipaccess_attr_string, -+ tvb, offset+3, len-1, FALSE); -+ break; -+ case 0x01: /* a single-byte reqest for a certain attr */ -+ len = 0; -+ proto_tree_add_item(tree, hf_ipaccess_attr_tag, -+ tvb, offset+1, 1, FALSE); -+ break; -+ default: -+ len = 0; -+ proto_tree_add_text(tree, tvb, offset+1, 1, -+ "unknonw attribute type 0x%02x", -+ attr_type); -+ break; -+ }; -+ offset += len + 2; -+ }; -+ return offset; -+} -+ -+/* Dissect an ip.access specific message */ -+static gint -+dissect_ipaccess(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -+{ -+ proto_item *ti; -+ proto_tree *ipaccess_tree; -+ guint8 msg_type; -+ -+ msg_type = tvb_get_guint8(tvb, 0); -+ -+ if (check_col(pinfo->cinfo, COL_INFO)) -+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", -+ val_to_str(msg_type, ipaccess_msgtype_vals, -+ "unknown 0x%02x")); -+ if (tree) { -+ ti = proto_tree_add_item(tree, proto_ipaccess, tvb, 0, -1, FALSE); -+ ipaccess_tree = proto_item_add_subtree(ti, ett_ipaccess); -+ proto_tree_add_item(ipaccess_tree, hf_ipaccess_msgtype, -+ tvb, 0, 1, FALSE); -+ switch (msg_type) { -+ case 4: -+ case 5: -+ dissect_ipa_attr(tvb, 1, ipaccess_tree); -+ break; -+ } -+ } -+ -+ return 1; -+} -+ -+ -+/* Code to actually dissect the packets */ -+static void -+dissect_abisip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -+{ -+ -+ int offset = 0; -+ -+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) -+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Abis/IP"); -+ if (check_col(pinfo->cinfo, COL_INFO)) -+ col_clear(pinfo->cinfo, COL_INFO); -+ -+ while (tvb_reported_length_remaining(tvb, offset) != 0) { -+ proto_item *ti; -+ proto_tree *abisip_tree; -+ guint8 len, msg_type; -+ tvbuff_t *next_tvb; -+ -+ len = tvb_get_guint8(tvb, offset+1); -+ msg_type = tvb_get_guint8(tvb, offset+2); -+ -+ if (check_col(pinfo->cinfo, COL_INFO)) -+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", -+ val_to_str(msg_type, abisip_protocol_vals, -+ "unknown 0x%02x")); -+ -+ if (tree) { -+ ti = proto_tree_add_protocol_format(tree, proto_abisip, -+ tvb, offset, len+3, -+ "A-bis/IP protocol ip.access, type: %s", -+ val_to_str(msg_type, abisip_protocol_vals, -+ "unknown 0x%02x")); -+ abisip_tree = proto_item_add_subtree(ti, ett_abisip); -+ proto_tree_add_item(abisip_tree, hf_abisip_data_len, -+ tvb, offset+1, 1, FALSE); -+ proto_tree_add_item(abisip_tree, hf_abisip_protocol, -+ tvb, offset+2, 1, FALSE); -+ } -+ -+ next_tvb = tvb_new_subset(tvb, offset+3, len, len); -+ -+ switch (msg_type) { -+ case ABISIP_RSL: -+ /* hand this off to the standard A-bis RSL dissector */ -+ call_dissector(sub_handles[SUB_RSL], next_tvb, pinfo, tree); -+ break; -+ case ABISIP_OML: -+ /* hand this off to the standard A-bis OML dissector */ -+ if (sub_handles[SUB_OML]) -+ call_dissector(sub_handles[SUB_OML], next_tvb, -+ pinfo, tree); -+ break; -+ case ABISIP_IPACCESS: -+ dissect_ipaccess(next_tvb, pinfo, tree); -+ break; -+ } -+ offset += len + 3; -+ } -+} -+ -+void proto_register_abis_ip(void) -+{ -+ static hf_register_info hf[] = { -+ {&hf_abisip_data_len, -+ {"DataLen", "abisip.data_len", -+ FT_UINT8, BASE_DEC, NULL, 0x0, -+ "The length of the data (in bytes)", HFILL} -+ }, -+ {&hf_abisip_protocol, -+ {"Protocol", "abisip.protocol", -+ FT_UINT8, BASE_HEX, VALS(abisip_protocol_vals), 0x0, -+ "The A-bis/IP Sub-Protocol", HFILL} -+ }, -+ }; -+ static hf_register_info hf_ipa[] = { -+ {&hf_ipaccess_msgtype, -+ {"MessageType", "ipaccess.msg_type", -+ FT_UINT8, BASE_HEX, VALS(ipaccess_msgtype_vals), 0x0, -+ "Type of ip.access messsage", HFILL} -+ }, -+ {&hf_ipaccess_attr_tag, -+ {"Tag", "ipaccess.attr_tag", -+ FT_UINT8, BASE_HEX, VALS(ipaccess_idtag_vals), 0x0, -+ "Attribute Tag", HFILL} -+ }, -+ {&hf_ipaccess_attr_string, -+ {"String", "ipaccess.attr_string", -+ FT_STRING, BASE_NONE, NULL, 0x0, -+ "String attribute", HFILL} -+ }, -+ }; -+ -+ static gint *ett[] = { -+ &ett_abisip, -+ &ett_ipaccess, -+ }; -+ -+ proto_abisip = -+ proto_register_protocol("GSM A-bis/IP protocol as used by ip.access", -+ "GSM A-bis/IP", "gsm_abis_ip"); -+ proto_ipaccess = -+ proto_register_protocol("GSM A-bis/IP ip.access CCM sub-protocol", -+ "IPA", "ipaccess"); -+ -+ proto_register_field_array(proto_abisip, hf, array_length(hf)); -+ proto_register_field_array(proto_ipaccess, hf_ipa, array_length(hf_ipa)); -+ proto_register_subtree_array(ett, array_length(ett)); -+ -+ register_dissector("gsm_abis_ip", dissect_abisip, proto_abisip); -+} -+ -+void proto_reg_handoff_gsm_abis_ip(void) -+{ -+ dissector_handle_t abisip_handle; -+ -+ sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl"); -+ sub_handles[SUB_OML] = find_dissector("gsm_abis_oml"); -+ -+ abisip_handle = create_dissector_handle(dissect_abisip, proto_abisip); -+ dissector_add("tcp.port", TCP_PORT_ABISIP_PRIM, abisip_handle); -+ dissector_add("tcp.port", TCP_PORT_ABISIP_SEC, abisip_handle); -+ dissector_add("tcp.port", TCP_PORT_ABISIP_INST, abisip_handle); -+ dissector_add("udp.port", TCP_PORT_ABISIP_INST, abisip_handle); -+} diff --git a/wireshark/gsm_a_rr-rrlp.patch b/wireshark/gsm_a_rr-rrlp.patch deleted file mode 100644 index e49e92e8b..000000000 --- a/wireshark/gsm_a_rr-rrlp.patch +++ /dev/null @@ -1,179 +0,0 @@ -Index: wireshark/epan/dissectors/packet-gsm_a_rr.c -=================================================================== ---- wireshark.orig/epan/dissectors/packet-gsm_a_rr.c -+++ wireshark/epan/dissectors/packet-gsm_a_rr.c -@@ -301,9 +302,9 @@ - { 0x00, "Extended Measurement Results" }, /* [3] 10.5.2.45 Extended Measurement Results */ - { 0x00, "Extended Measurement Frequency List" }, /* [3] 10.5.2.46 Extended Measurement Frequency List */ - { 0x00, "Suspension Cause" }, /* [3] 10.5.2.47 */ --/* [3] 10.5.2.48 APDU ID -- * [3] 10.5.2.49 APDU Flags -- * [3] 10.5.2.50 APDU Data */ -+ { 0x00, "APDU ID" }, /* [3] 10.5.2.48 APDU ID */ -+ { 0x00, "APDU Flags" }, /* [3] 10.5.2.49 APDU Flags */ -+ { 0x00, "APDU Data" }, /* [3] 10.5.2.50 APDU Data */ - { 0x00, "Handover to UTRAN Command" }, /* [3] 10.5.2.51 Handover To UTRAN Command */ - /* [3] 10.5.2.52 Handover To cdma2000 Command - * [3] 10.5.2.53 (void) -@@ -497,6 +498,9 @@ - static int hf_gsm_a_rr_chnl_needed_ch3 = -1; - static int hf_gsm_a_rr_chnl_needed_ch4 = -1; - static int hf_gsm_a_rr_suspension_cause = -1; -+static int hf_gsm_a_rr_apdu_id = -1; -+static int hf_gsm_a_rr_apdu_flags = -1; -+static int hf_gsm_a_rr_apdu_data = -1; - static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1; - static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1; - static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1; -@@ -691,7 +695,7 @@ - static char a_bigbuf[1024]; - - static dissector_handle_t data_handle; -- -+static dissector_handle_t rrlp_dissector; - - - #define NUM_GSM_RR_ELEM (sizeof(gsm_rr_elem_strings)/sizeof(value_string)) -@@ -6224,9 +6228,50 @@ - } - /* - * [3] 10.5.2.48 APDU ID -+ */ -+static const value_string gsm_a_rr_apdu_id_vals[] = { -+ { 0, "RRLP (GSM 04.31) LCS" }, -+ { 0, NULL }, -+}; -+static guint16 -+de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) -+{ -+ proto_tree_add_item(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, FALSE); -+ -+ return 0; -+} -+ -+/* - * [3] 10.5.2.49 APDU Flags -+ */ -+static const value_string gsm_a_rr_apdu_flags_vals[] = { -+ { 1, "Last or only segment" }, -+ { 2, "First or only segment" }, -+ { 0, NULL }, -+}; -+static guint16 -+de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) -+{ -+ proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags, tvb, offset, 1, FALSE); -+ -+ return 1; -+} -+ -+/* - * [3] 10.5.2.50 APDU Data - */ -+static guint16 -+de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) -+{ -+ tvbuff_t *sub_tvb; -+ static packet_info p_info; -+ -+ sub_tvb = tvb_new_subset(tvb, offset, len, len); -+ -+ call_dissector(rrlp_dissector, sub_tvb, &p_info, tree); -+ -+ return len; -+} - - /* - * [3] 10.5.2.51 Handover To UTRAN Command -@@ -6466,9 +6511,9 @@ - de_rr_ext_meas_result, /* [3] 10.5.2.45 Extended Measurement Results */ - de_rr_ext_meas_freq_list, /* [3] 10.5.2.46 Extended Measurement Frequency List */ - de_rr_sus_cau, /* [3] 10.5.2.47 Suspension Cause */ --/* [3] 10.5.2.48 APDU ID -- * [3] 10.5.2.49 APDU Flags -- * [3] 10.5.2.50 APDU Data */ -+ de_rr_apdu_id, /* [3] 10.5.2.48 APDU ID */ -+ de_rr_apdu_flags, /* [3] 10.5.2.49 APDU Flags */ -+ de_rr_apdu_data, /* [3] 10.5.2.50 APDU Data */ - de_rr_ho_to_utran_cmd, /* [3] 10.5.2.51 Handover To UTRAN Command */ - /* [3] 10.5.2.52 Handover To cdma2000 Command - * [3] 10.5.2.53 (void) -@@ -7864,6 +7909,24 @@ - } - - /* -+ * 9.1.53 Application Information -+ */ -+static void -+dtap_rr_app_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) -+{ -+ guint32 curr_offset; -+ guint32 consumed; -+ guint curr_len; -+ -+ curr_offset = offset; -+ curr_len = len; -+ -+ ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_ID); -+ ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_FLAGS); -+ ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_APDU_DATA, NULL); -+} -+ -+/* - * [4] 9.1.54 Measurement Information - */ - static const value_string gsm_a_rr_3g_wait_vals[] = { -@@ -8386,7 +8449,7 @@ - - NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */ - -- NULL, /* Application Information */ -+ dtap_rr_app_inf, /* Application Information */ - - NULL, /* NONE */ - }; -@@ -9155,6 +9219,21 @@ - FT_UINT8,BASE_DEC, VALS(gsm_a_rr_suspension_cause_vals), 0x0, - NULL, HFILL } - }, -+ { &hf_gsm_a_rr_apdu_id, -+ { "APDU ID","gsm_a.rr.apdu_id", -+ FT_UINT8,BASE_HEX, VALS(gsm_a_rr_apdu_id_vals), 0x0f, -+ NULL, HFILL } -+ }, -+ { &hf_gsm_a_rr_apdu_flags, -+ { "APDU Flags","gsm_a.rr.apdu_flags", -+ FT_UINT8,BASE_HEX, VALS(gsm_a_rr_apdu_flags_vals), 0xf0, -+ NULL, HFILL } -+ }, -+ { &hf_gsm_a_rr_apdu_data, -+ { "APDU Data","gsm_a.rr.apdu_data", -+ FT_BYTES,BASE_HEX, NULL, 0x00, -+ NULL, HFILL } -+ }, - { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8, - { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8", - FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80, -@@ -10157,4 +10236,5 @@ - data_handle = find_dissector("data"); - rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info"); - rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd"); -+ rrlp_dissector = find_dissector("rrlp"); - } -Index: wireshark/epan/dissectors/packet-gsm_a_common.h -=================================================================== ---- wireshark.orig/epan/dissectors/packet-gsm_a_common.h -+++ wireshark/epan/dissectors/packet-gsm_a_common.h -@@ -1101,9 +1101,9 @@ - DE_RR_EXT_MEAS_RESULT, /* [3] 10.5.2.45 Extended Measurement Results */ - DE_RR_EXT_MEAS_FREQ_LIST, /* [3] 10.5.2.46 Extended Measurement Frequency List */ - DE_RR_SUS_CAU, /* [3] 10.5.2.47 Suspension Cause */ --/* [3] 10.5.2.48 APDU ID -- * [3] 10.5.2.49 APDU Flags -- * [3] 10.5.2.50 APDU Data */ -+ DE_RR_APDU_ID, /* [3] 10.5.2.48 APDU ID */ -+ DE_RR_APDU_FLAGS, /* [3] 10.5.2.49 APDU Flags */ -+ DE_RR_APDU_DATA, /* [3] 10.5.2.50 APDU Data */ - DE_RR_HO_TO_UTRAN_CMD, /* [3] 10.5.2.51 Handover To UTRAN Command */ - /* [3] 10.5.2.52 Handover To cdma2000 Command - * [3] 10.5.2.53 (void) -- cgit v1.2.3