aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-11 16:41:15 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-11 21:06:21 +0200
commit2c544c8d553de0eaf67b3dcc38bb3402dc463cff (patch)
tree0b3c63305579897d1db832d9ca099f7dee1edd5c /wireshark
parenteb438442d011a6205c8862477f0d25d7a8815116 (diff)
fix parsing of ip.access GPRS OML attributes and RSL IP + Port
Diffstat (limited to 'wireshark')
-rw-r--r--wireshark/abis_oml.patch157
1 files changed, 87 insertions, 70 deletions
diff --git a/wireshark/abis_oml.patch b/wireshark/abis_oml.patch
index 4d13fa23..00069cee 100644
--- a/wireshark/abis_oml.patch
+++ b/wireshark/abis_oml.patch
@@ -1,7 +1,7 @@
Index: wireshark/epan/dissectors/Makefile.common
===================================================================
---- wireshark.orig/epan/dissectors/Makefile.common 2009-07-03 22:20:16.000000000 +0200
-+++ wireshark/epan/dissectors/Makefile.common 2009-07-04 03:46:47.000000000 +0200
+--- wireshark.orig/epan/dissectors/Makefile.common 2009-07-10 23:17:56.000000000 +0200
++++ wireshark/epan/dissectors/Makefile.common 2009-07-11 10:11:29.000000000 +0200
@@ -926,6 +926,7 @@
# Dissectors with warnings.
#
@@ -13,8 +13,8 @@ Index: wireshark/epan/dissectors/Makefile.common
Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ wireshark/epan/dissectors/packet-gsm_abis_oml.c 2009-07-04 03:47:46.000000000 +0200
-@@ -0,0 +1,1241 @@
++++ wireshark/epan/dissectors/packet-gsm_abis_oml.c 2009-07-11 16:40:31.000000000 +0200
+@@ -0,0 +1,1244 @@
+/* packet-abis_oml.c
+ * Routines for packet dissection of GSM A-bis over IP (3GPP TS 12.21)
+ * Copyright 2009 by Harald Welte <laforge@gnumonks.org>
@@ -72,6 +72,7 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+static int hf_oml_fom_attr_val = -1;
+/* FOM attributes */
+static int hf_attr_adm_state = -1;
++static int hf_attr_arfcn = -1;
+static int hf_attr_oper_state = -1;
+static int hf_attr_avail_state = -1;
+static int hf_attr_event_type = -1;
@@ -675,7 +676,10 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ int offset = base_offs;
+
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
++ guint i;
+ guint8 tag, val8;
++ guint16 val16;
++ guint32 val32;
+ unsigned int len, len_len, hlen;
+ const struct tlv_def *tdef;
+ proto_item *ti;
@@ -736,31 +740,30 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ case NM_ATT_ADM_STATE:
+ proto_tree_add_item(att_tree, hf_attr_adm_state, tvb,
+ offset, len, FALSE);
-+ if (check_col(pinfo->cinfo, COL_INFO)) {
-+ val8 = tvb_get_guint8(tvb, offset);
-+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-+ val_to_str(val8,
-+ oml_adm_state_vals,
-+ "%02x"));
-+ }
++ val8 = tvb_get_guint8(tvb, offset);
++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
++ val_to_str(val8, oml_adm_state_vals,
++ "%02x"));
+ break;
+ case NM_ATT_ARFCN_LIST:
++ for (i = 0; i < len; i += 2) {
++ val16 = tvb_get_ntohs(tvb, offset + i);
++ proto_tree_add_uint(att_tree, hf_attr_arfcn,
++ tvb, offset + i, 2, val16);
++ }
+ break;
+ case NM_ATT_AVAIL_STATUS:
-+ proto_tree_add_item(att_tree, hf_attr_avail_state, tvb,
-+ offset, len, FALSE);
-+ if (check_col(pinfo->cinfo, COL_INFO)) {
-+ /* Availability status can have length 0 */
-+ if (len)
-+ val8 = tvb_get_guint8(tvb, offset);
-+ else
-+ val8 = 0xff;
-+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-+ val_to_str(val8,
-+ oml_avail_state_vals,
-+ "%02x"));
-+ }
-+
++ /* Availability status can have length 0 */
++ if (len) {
++ val8 = tvb_get_guint8(tvb, offset);
++ proto_tree_add_item(att_tree,
++ hf_attr_avail_state, tvb,
++ offset, len, FALSE);
++ } else
++ val8 = 0xff;
++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
++ val_to_str(val8, oml_avail_state_vals,
++ "%02x"));
+ break;
+ case NM_ATT_BCCH_ARFCN:
+ proto_tree_add_item(att_tree, hf_attr_bcch_arfcn, tvb,
@@ -785,13 +788,10 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ case NM_ATT_OPER_STATE:
+ proto_tree_add_item(att_tree, hf_attr_oper_state, tvb,
+ offset, len, FALSE);
-+ if (check_col(pinfo->cinfo, COL_INFO)) {
-+ val8 = tvb_get_guint8(tvb, offset);
-+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-+ val_to_str(val8,
-+ oml_oper_state_vals,
-+ "%02x"));
-+ }
++ val8 = tvb_get_guint8(tvb, offset);
++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
++ val_to_str(val8, oml_oper_state_vals,
++ "%02x"));
+ break;
+ case NM_ATT_TEI:
+ proto_tree_add_item(att_tree, hf_attr_tei, tvb,
@@ -811,23 +811,22 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ case NM_ATT_TEST_NO:
+ proto_tree_add_item(att_tree, hf_attr_test_no, tvb,
+ offset, len, TRUE);
-+ if (check_col(pinfo->cinfo, COL_INFO)) {
-+ val8 = tvb_get_guint8(tvb, offset);
-+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-+ val_to_str(val8,
-+ oml_test_no_vals,
-+ "%02x"));
-+ }
++ val8 = tvb_get_guint8(tvb, offset);
++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
++ val_to_str(val8, oml_test_no_vals,
++ "%02x"));
+ break;
+
+ /* proprietary ip.access extensions */
+ case NM_ATT_IPACC_RSL_BSC_IP:
-+ proto_tree_add_item(att_tree, hf_attr_ipa_rsl_ip, tvb,
-+ offset, len, TRUE);
++ val32 = tvb_get_ntohl(tvb, offset);
++ proto_tree_add_ipv4(att_tree, hf_attr_ipa_rsl_ip, tvb,
++ offset, len, val32);
+ break;
+ case NM_ATT_IPACC_RSL_BSC_PORT:
-+ proto_tree_add_item(att_tree, hf_attr_ipa_rsl_port, tvb,
-+ offset, len, TRUE);
++ val16 = tvb_get_ntohs(tvb, offset);
++ proto_tree_add_uint(att_tree, hf_attr_ipa_rsl_port, tvb,
++ offset, len, val16);
+ break;
+ case NM_ATT_IPACC_LOCATION:
+ proto_tree_add_item(att_tree, hf_attr_ipa_location_name,
@@ -847,9 +846,6 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ proto_tree_add_item(att_tree, hf_attr_ipa_prim_oml_port,
+ tvb, offset+1+4, 2, TRUE);
+ break;
-+ case NM_ATT_IPACC_SEC_OML_IP:
-+ /* FIXME */
-+ break;
+ case NM_ATT_IPACC_NV_FLAGS:
+ {
+ guint flags, mask;
@@ -863,6 +859,8 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ tvb, offset+1, 3, mask);
+ }
+ break;
++ case NM_ATT_IPACC_SEC_OML_IP:
++ /* FIXME */
+ default:
+ proto_tree_add_item(att_tree, hf_oml_fom_attr_val, tvb,
+ offset, len, FALSE);
@@ -873,7 +871,8 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+}
+
+static int
-+dissect_oml_fom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
++dissect_oml_fom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
++ int offset, proto_item *top_ti)
+{
+ guint8 msg_type, obj_class, bts_nr, trx_nr, ts_nr;
+ proto_item *ti;
@@ -884,13 +883,16 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ bts_nr = tvb_get_guint8(tvb, offset+2);
+ trx_nr = tvb_get_guint8(tvb, offset+3);
+ ts_nr = tvb_get_guint8(tvb, offset+4);
-+ if (check_col(pinfo->cinfo, COL_INFO)) {
-+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s(%02x,%02x,%02x) %s ",
-+ val_to_str(obj_class, oml_fom_objclass_vals, "%02x"),
-+ bts_nr, trx_nr, ts_nr,
-+ val_to_str(msg_type, oml_fom_msgtype_vals,
-+ "unknown 0x%x"));
-+ }
++ proto_item_append_text(top_ti, ", %s(%02x,%02x,%02x) %s ",
++ val_to_str(obj_class, oml_fom_objclass_vals, "%02x"),
++ bts_nr, trx_nr, ts_nr,
++ val_to_str(msg_type, oml_fom_msgtype_vals,
++ "unknown 0x%x"));
++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s(%02x,%02x,%02x) %s ",
++ val_to_str(obj_class, oml_fom_objclass_vals, "%02x"),
++ bts_nr, trx_nr, ts_nr,
++ val_to_str(msg_type, oml_fom_msgtype_vals,
++ "unknown 0x%x"));
+ ti = proto_tree_add_item(tree, hf_oml_fom_msgtype, tvb, offset++, 1, FALSE);
+ fom_tree = proto_item_add_subtree(ti, ett_oml_fom);
+ proto_tree_add_item(fom_tree, hf_oml_fom_objclass, tvb, offset++, 1, FALSE);
@@ -908,7 +910,8 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+static const guint8 ipaccess_magic[] = "com.ipaccess";
+
+static int
-+dissect_oml_manuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
++dissect_oml_manuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
++ int offset, proto_item *top_ti)
+{
+ if (tvb_get_guint8(tvb, offset) != 0x0d ||
+ tvb_memeql(tvb, offset+1, ipaccess_magic, sizeof(ipaccess_magic)))
@@ -916,7 +919,7 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+
+ offset += sizeof(ipaccess_magic) + 1;
+
-+ return dissect_oml_fom(tvb, pinfo, tree, offset);
++ return dissect_oml_fom(tvb, pinfo, tree, offset, top_ti);
+}
+
+static void
@@ -927,12 +930,7 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+
+ int offset = 0;
+
-+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
-+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OML");
-+#if 0
-+ if (check_col(pinfo->cinfo, COL_INFO))
-+ col_clear(pinfo->cinfo, COL_INFO);
-+#endif
++ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OML");
+
+ top_tree = tree;
+ if (tree) {
@@ -952,10 +950,11 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+
+ switch (msg_disc) {
+ case ABIS_OM_MDISC_FOM:
-+ offset = dissect_oml_fom(tvb, pinfo, oml_tree, offset);
++ 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);
++ offset = dissect_oml_manuf(tvb, pinfo, oml_tree, offset, ti);
+ break;
+ case ABIS_OM_MDISC_MMI:
+ case ABIS_OM_MDISC_TRAU:
@@ -1038,6 +1037,10 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
+ FT_UINT8, BASE_HEX, VALS(oml_adm_state_vals), 0,
+ NULL, HFILL }
+ },
++ { &hf_attr_arfcn,
++ { "ARFCN", "oml.fom.attr.arfcn",
++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
++ },
+ { &hf_attr_oper_state,
+ { "Operational State", "oml.fom.attr.oper_state",
+ FT_UINT8, BASE_HEX, VALS(oml_oper_state_vals), 0,
@@ -1259,8 +1262,8 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c
Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ wireshark/epan/dissectors/packet-gsm_abis_oml.h 2009-07-04 03:46:47.000000000 +0200
-@@ -0,0 +1,726 @@
++++ wireshark/epan/dissectors/packet-gsm_abis_oml.h 2009-07-11 10:54:34.000000000 +0200
+@@ -0,0 +1,740 @@
+/* GSM Network Management messages on the A-bis interface
+ * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
+
@@ -1897,7 +1900,8 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h
+ [NM_ATT_GSM_TIME] = { TLV_TYPE_FIXED, 2 },
+ [NM_ATT_HSN] = { TLV_TYPE_TV },
+ [NM_ATT_HW_CONFIG] = { TLV_TYPE_TL16V },
-+ [NM_ATT_HW_DESC] = { TLV_TYPE_TL16V },
++ //BS11 [NM_ATT_HW_DESC] = { TLV_TYPE_TL16V },
++ [NM_ATT_HW_DESC] = { TLV_TYPE_TLV },
+ [NM_ATT_INTAVE_PARAM] = { TLV_TYPE_TV },
+ [NM_ATT_INTERF_BOUND] = { TLV_TYPE_FIXED, 6 },
+ [NM_ATT_LIST_REQ_ATTR] = { TLV_TYPE_TL16V },
@@ -1964,6 +1968,7 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h
+ [NM_ATT_BS11_PLL] = { TLV_TYPE_TLV },
+ [NM_ATT_BS11_CCLK_ACCURACY] = { TLV_TYPE_TV },
+ [NM_ATT_BS11_CCLK_TYPE] = { TLV_TYPE_TV },
++ [0x95] = { TLV_TYPE_FIXED, 2 },
+ /* ip.access specifics */
+ [NM_ATT_IPACC_RSL_BSC_IP] = { TLV_TYPE_FIXED, 4 },
+ [NM_ATT_IPACC_RSL_BSC_PORT] = { TLV_TYPE_FIXED, 2 },
@@ -1979,10 +1984,22 @@ Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h
+ [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V },
+ [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V },
+ [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V },
-+ //[0x95] = { TLV_TYPE_FIXED, 2 },
-+ [0x9b] = { TLV_TYPE_TL16V },
++ [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V },
+ [0x85] = { TLV_TYPE_TV },
-+
++ [0x9a] = { TLV_TYPE_TL16V },
++ [0x9b] = { TLV_TYPE_TL16V },
++ [0x9c] = { TLV_TYPE_TL16V },
++ [0x9d] = { TLV_TYPE_TL16V },
++ [0x9e] = { TLV_TYPE_TL16V },
++ [0x9f] = { TLV_TYPE_TL16V },
++ [0xa0] = { TLV_TYPE_TL16V },
++ [0xa1] = { TLV_TYPE_TL16V },
++ [0xa2] = { TLV_TYPE_TL16V },
++ [0xa3] = { TLV_TYPE_TL16V },
++ [0xa7] = { TLV_TYPE_TL16V },
++ [0xa8] = { TLV_TYPE_TL16V },
++ [0xa9] = { TLV_TYPE_TL16V },
++ [0xac] = { TLV_TYPE_TL16V },
+ },
+};
+