aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/CMakeLists.txt2
-rw-r--r--epan/dissectors/packet-bicc_mst.c102
-rw-r--r--epan/dissectors/packet-bicc_mst.h26
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c16
4 files changed, 137 insertions, 9 deletions
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt
index dae00cb5f5..3fc3b1e13c 100644
--- a/epan/dissectors/CMakeLists.txt
+++ b/epan/dissectors/CMakeLists.txt
@@ -262,6 +262,7 @@ set(DISSECTOR_PUBLIC_HEADERS
packet-ber.h
packet-bfd.h
packet-bgp.h
+ packet-bicc_mst.h
packet-bluetooth.h
packet-bssap.h
packet-bssgp.h
@@ -718,6 +719,7 @@ set(DISSECTOR_SRC
${CMAKE_CURRENT_SOURCE_DIR}/packet-bfcp.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-bfd.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-bgp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/packet-bicc_mst.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-bitcoin.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-bittorrent.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-bjnp.c
diff --git a/epan/dissectors/packet-bicc_mst.c b/epan/dissectors/packet-bicc_mst.c
new file mode 100644
index 0000000000..5a096509df
--- /dev/null
+++ b/epan/dissectors/packet-bicc_mst.c
@@ -0,0 +1,102 @@
+/* packet-bicc_mst.c
+ * (Incomplete) Dissector for the 3GPP TS 29.205 BICC MST (Mobile Service Transport)
+ *
+ * This currently only dissects a single MST IE, which is required by the BSSMAP
+ * dissector in order to decode the LCLS (Local Call Local Switch)
+ * GCR (Global Call Reference)
+ *
+ * Copyright 2019 by Harald Welte <laforge@gnumonks.org>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/tap.h>
+#include <epan/expert.h>
+
+#include "packet-bicc_mst.h"
+
+void proto_register_bicc_mst(void);
+
+static int proto_bicc_mst = -1;
+
+static int hf_lcls_gcr_network_id_len = -1;
+static int hf_lcls_gcr_network_id = -1;
+static int hf_lcls_gcr_node_id_len = -1;
+static int hf_lcls_gcr_node_id = -1;
+static int hf_lcls_gcr_call_ref_id_len = -1;
+static int hf_lcls_gcr_call_ref_id = -1;
+
+static int ett_lcls_gcr = -1;
+
+guint
+dissect_bicc_mst_lcls_gcr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
+{
+ guint net_id_len, node_id_len, call_ref_id_len;
+ guint32 curr_offset = offset;
+ proto_tree *subtree;
+ proto_item *ti;
+
+ ti = proto_tree_add_protocol_format(tree, proto_bicc_mst, tvb, offset, len, "BICC MST GCR");
+ subtree = proto_item_add_subtree(ti, ett_lcls_gcr);
+
+ proto_tree_add_item_ret_uint(subtree, hf_lcls_gcr_network_id_len, tvb, curr_offset++, 1, ENC_NA, &net_id_len);
+ proto_tree_add_item(subtree, hf_lcls_gcr_network_id, tvb, curr_offset, net_id_len, ENC_NA);
+ curr_offset += net_id_len;
+
+ proto_tree_add_item_ret_uint(subtree, hf_lcls_gcr_node_id_len, tvb, curr_offset++, 1, ENC_NA, &node_id_len);
+ proto_tree_add_item(subtree, hf_lcls_gcr_node_id, tvb, curr_offset, node_id_len, ENC_NA);
+ curr_offset += node_id_len;
+
+ proto_tree_add_item_ret_uint(subtree, hf_lcls_gcr_call_ref_id_len, tvb, curr_offset++, 1, ENC_NA, &call_ref_id_len);
+ proto_tree_add_item(subtree, hf_lcls_gcr_call_ref_id, tvb, curr_offset, call_ref_id_len, ENC_NA);
+ curr_offset += call_ref_id_len;
+
+ return curr_offset - offset;
+}
+
+void
+proto_register_bicc_mst(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_lcls_gcr_network_id_len, { "Length of LCLS GCR Network ID",
+ "bicc_mst.lcls_gcr.network_id_len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_lcls_gcr_network_id, { "LCLS GCR Network ID",
+ "bicc_mst.lcls_gcr.network_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_lcls_gcr_node_id_len, { "Length of LCLS GCR Node ID",
+ "bicc_mst.lcls_gcr.node_id_len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_lcls_gcr_node_id, { "LCLS GCR Network ID",
+ "bicc_mst.lcls_gcr.network_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_lcls_gcr_call_ref_id_len, { "Length of LCLS GCR Call Ref ID",
+ "bicc_mst.lcls_gcr.call_ref_id_len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_lcls_gcr_call_ref_id, { "LCLS GCR Call Ref ID",
+ "bicc_mst.lcls_gcr.call_ref_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ };
+
+ static gint *ett[] = {
+ &ett_lcls_gcr,
+ };
+
+ proto_bicc_mst = proto_register_protocol("3GPP BICC MST", "BICC-MST", "bicc_mst");
+ proto_register_field_array(proto_bicc_mst, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-bicc_mst.h b/epan/dissectors/packet-bicc_mst.h
new file mode 100644
index 0000000000..f2ff9019bb
--- /dev/null
+++ b/epan/dissectors/packet-bicc_mst.h
@@ -0,0 +1,26 @@
+/* packet-bicc_mst.c
+ * (Incomplete) Dissector for the 3GPP TS 29.205 BICC MST (Mobile Service Transport)
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __PACKET_BICC_MST_H__
+#define __PACKET_BICC_MST_H__
+
+guint
+dissect_bicc_mst_lcls_gcr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
+
+#endif
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index 09659c343a..7ba12becf0 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -41,6 +41,7 @@
#include "packet-rtcp.h"
#include "packet-rtp.h"
#include "packet-gsm_map.h"
+#include "packet-bicc_mst.h"
void proto_register_gsm_a_bssmap(void);
void proto_reg_handoff_gsm_a_bssmap(void);
@@ -706,6 +707,7 @@ static dissector_handle_t gsm_bsslap_handle = NULL;
static dissector_handle_t dtap_handle;
static dissector_handle_t bssgp_handle;
static dissector_handle_t rrc_handle;
+static dissector_handle_t bicc_mst_handle;
static dissector_handle_t bssmap_handle;
static proto_tree *g_tree;
@@ -4248,20 +4250,16 @@ be_reroute_outcome(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
}
/*
- * 3.2.2.115 Global Call Reference
+ * 3.2.2.115 Global Call Reference as per 3GPP TS 29.205 Section B.2.1.9
*/
static guint16
-be_global_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+be_global_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
- curr_offset = offset;
-
- /* Global Call Reference Identifier */
- proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len, "Field Element not decoded yet");
+ dissect_bicc_mst_lcls_gcr(tvb, tree, offset, len);
return len;
-
}
+
/*
* 3.2.2.116 LCLS-Configuration
*/
@@ -8126,7 +8124,7 @@ proto_reg_handoff_gsm_a_bssmap(void)
gsm_bsslap_handle = find_dissector_add_dependency("gsm_bsslap", proto_a_bssmap);
bssgp_handle = find_dissector_add_dependency("bssgp", proto_a_bssmap);
rrc_handle = find_dissector_add_dependency("rrc", proto_a_bssmap);
-
+ bicc_mst_handle = find_dissector_add_dependency("bicc_mst", proto_a_bssmap);
}
/*