diff options
author | Jörg Mayer <jmayer@loplof.de> | 2012-02-26 17:30:38 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2012-02-26 17:30:38 +0000 |
commit | 1e61547b45e420cb7ad3d251299eff8efab53034 (patch) | |
tree | 9c9d25b38ed486e8d1e06d77bc17dd85c9cd1b82 /epan/dissectors/packet-gsm_abis_oml.c | |
parent | f97ad440312f11893465d83a45f14c59f3f4229e (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.
svn path=/trunk/; revision=41195
Diffstat (limited to 'epan/dissectors/packet-gsm_abis_oml.c')
-rw-r--r-- | epan/dissectors/packet-gsm_abis_oml.c | 46 |
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"); } |