aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_abis_oml.c
diff options
context:
space:
mode:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-26 17:30:38 +0000
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2012-02-26 17:30:38 +0000
commit9c6fb794c7de4fdfc0638e8dcb1a44443c4f3b5d (patch)
tree9c9d25b38ed486e8d1e06d77bc17dd85c9cd1b82 /epan/dissectors/packet-gsm_abis_oml.c
parent279010cbcbe9ce56871c5048cf324c9331d2a733 (diff)
Harald Welte <laforge@gnumonks.org>
via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6792 This is a new dissector for the non-standard Ericsson OM2000 protocol, as it is used for the OML on A-bis of Ericsson RBS 2xxx BTSs. It also includes a dissector for a shim-layer protocol that Ericsson uses for IP-based A-bis like the RBS 2409. As the protocol is not publicly documented, I have invented the name "EHDLC" (Ericsson HLDC) for it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41195 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gsm_abis_oml.c')
-rw-r--r--epan/dissectors/packet-gsm_abis_oml.c46
1 files changed, 34 insertions, 12 deletions
diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c
index 392d07c9ff..6f54e56bba 100644
--- a/epan/dissectors/packet-gsm_abis_oml.c
+++ b/epan/dissectors/packet-gsm_abis_oml.c
@@ -735,6 +735,7 @@ enum {
OML_DIALECT_ETSI,
OML_DIALECT_SIEMENS,
OML_DIALECT_IPA,
+ OML_DIALECT_ERICSSON,
};
/* which A-bis OML dialect to use (prefrence) */
@@ -742,6 +743,8 @@ static gint global_oml_dialect = OML_DIALECT_ETSI;
static proto_tree *top_tree;
+static dissector_handle_t sub_om2000;
+
/* TS 12.21 Chapter 8.1 / TS 08.59 */
static const value_string oml_msg_disc_vals[] = {
{ ABIS_OM_MDISC_FOM, "Formatted O&M" },
@@ -1155,6 +1158,7 @@ static const enum_val_t oml_dialect_enumvals[] = {
{ "etsi", "ETSI/3GPP TS 12.21", OML_DIALECT_ETSI },
{ "siemens", "Siemens", OML_DIALECT_SIEMENS },
{ "ipaccess", "ip.access", OML_DIALECT_IPA },
+ { "om2000", "Ericsson OM2000", OML_DIALECT_ERICSSON },
{ NULL, NULL, 0 }
};
@@ -1819,6 +1823,7 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
top_tree = tree;
if (tree) {
guint8 msg_disc = tvb_get_guint8(tvb, offset);
+ guint8 len = tvb_get_guint8(tvb, offset+3);
ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, ENC_NA);
oml_tree = proto_item_add_subtree(ti, ett_oml);
@@ -1832,18 +1837,33 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++,
1, ENC_LITTLE_ENDIAN);
- switch (msg_disc) {
- case ABIS_OM_MDISC_FOM:
- offset = dissect_oml_fom(tvb, pinfo, oml_tree,
- offset, ti);
- break;
- case ABIS_OM_MDISC_MANUF:
- offset = dissect_oml_manuf(tvb, pinfo, oml_tree, offset, ti);
- break;
- case ABIS_OM_MDISC_MMI:
- case ABIS_OM_MDISC_TRAU:
- default:
- break;
+ if (global_oml_dialect == OML_DIALECT_ERICSSON) {
+ /* Ericsson OM2000 only sharese the common header above
+ * and has completely custom/proprietary message format
+ * after that header. Thus, it makes more sense of
+ * putting all of that into an external dissector and
+ * call out to that dissector */
+ tvbuff_t *subtvb;
+ subtvb = tvb_new_subset(tvb, offset, len, len);
+
+ if (sub_om2000)
+ call_dissector(sub_om2000, subtvb, pinfo, tree);
+ } else {
+
+ switch (msg_disc) {
+ case ABIS_OM_MDISC_FOM:
+ offset = dissect_oml_fom(tvb, pinfo, oml_tree,
+ offset, ti);
+ break;
+ case ABIS_OM_MDISC_MANUF:
+ offset = dissect_oml_manuf(tvb, pinfo, oml_tree,
+ offset, ti);
+ break;
+ case ABIS_OM_MDISC_MMI:
+ case ABIS_OM_MDISC_TRAU:
+ default:
+ break;
+ }
}
}
@@ -2373,4 +2393,6 @@ proto_reg_handoff_abis_oml(void)
} else {
/* preferences have been changed */
}
+
+ sub_om2000 = find_dissector("gsm_abis_om2000");
}