osmo-msc/wireshark/abis_oml.patch

2174 lines
73 KiB
Diff
Raw Normal View History

Index: wireshark/epan/dissectors/Makefile.common
===================================================================
--- wireshark.orig/epan/dissectors/Makefile.common 2009-10-21 23:03:44.000000000 +0200
+++ wireshark/epan/dissectors/Makefile.common 2009-10-21 23:03:57.000000000 +0200
@@ -472,6 +472,7 @@
packet-gsm_a_gm.c \
packet-gsm_a_rp.c \
packet-gsm_a_rr.c \
+ packet-gsm_abis_oml.c \
packet-gsm_ipa.c \
packet-gsm_bsslap.c \
packet-gsm_bssmap_le.c \
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-10-22 10:06:18.000000000 +0200
@@ -0,0 +1,1365 @@
+/* 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>
+ * based on A-bis OML code in OpenBSC
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * 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 <glib.h>
+
+#include <epan/packet.h>
+#include <epan/emem.h>
+#include <epan/lapd_sapi.h>
+
+#include "packet-gsm_abis_oml.h"
+#include "packet-gsm_a_common.h"
+
+/* initialize the protocol and registered fields */
+static int proto_abis_oml = -1;
+
+/* OML header */
+static int hf_oml_msg_disc = -1;
+static int hf_oml_placement = -1;
+static int hf_oml_sequence = -1;
+static int hf_oml_length = -1;
+/* FOM header */
+static int hf_oml_fom_msgtype = -1;
+static int hf_oml_fom_objclass = -1;
+static int hf_oml_fom_inst_bts = -1;
+static int hf_oml_fom_inst_trx = -1;
+static int hf_oml_fom_inst_ts = -1;
+static int hf_oml_fom_attr_tag = -1;
+static int hf_oml_fom_attr_len = -1;
+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;
+static int hf_attr_severity = -1;
+static int hf_attr_bcch_arfcn = -1;
+static int hf_attr_bsic = -1;
+static int hf_attr_test_no = -1;
+static int hf_attr_tsc = -1;
+static int hf_attr_tei = -1;
+static int hf_attr_ach_btsp = -1;
+static int hf_attr_ach_tslot = -1;
+static int hf_attr_ach_sslot = -1;
+static int hf_attr_gsm_time = -1;
+static int hf_attr_chan_comb = -1;
+/* Ipaccess */
+static int hf_oml_ipa_tres_attr_tag = -1;
+static int hf_oml_ipa_tres_attr_len = -1;
+static int hf_attr_ipa_test_res = -1;
+static int hf_attr_ipa_tr_rxlev = -1;
+static int hf_attr_ipa_tr_b_rxlev = -1;
+static int hf_attr_ipa_tr_arfcn = -1;
+static int hf_attr_ipa_tr_f_qual = -1;
+static int hf_attr_ipa_tr_f_err = -1;
+static int hf_attr_ipa_tr_rxqual = -1;
+static int hf_attr_ipa_tr_frame_offs = -1;
+static int hf_attr_ipa_tr_framenr_offs = -1;
+static int hf_attr_ipa_tr_bsic = -1;
+static int hf_attr_ipa_tr_cell_id = -1;
+static int hf_attr_ipa_tr_si2 = -1;
+static int hf_attr_ipa_tr_si2bis = -1;
+static int hf_attr_ipa_tr_si2ter = -1;
+static int hf_attr_ipa_tr_chan_desc = -1;
+static int hf_attr_ipa_rsl_ip = -1;
+static int hf_attr_ipa_rsl_port = -1;
+static int hf_attr_ipa_prim_oml_ip = -1;
+static int hf_attr_ipa_prim_oml_port = -1;
+static int hf_attr_ipa_location_name = -1;
+static int hf_attr_ipa_unit_id = -1;
+static int hf_attr_ipa_unit_name = -1;
+static int hf_attr_ipa_nv_flags = -1;
+static int hf_attr_ipa_nv_mask = -1;
+static int hf_attr_ipa_nsl_sport = -1;
+static int hf_attr_ipa_nsl_daddr = -1;
+static int hf_attr_ipa_nsl_dport = -1;
+static int hf_attr_ipa_nsei = -1;
+static int hf_attr_ipa_nsvci = -1;
+static int hf_attr_ipa_bvci = -1;
+static int hf_attr_ipa_rac = -1;
+
+/* initialize the subtree pointers */
+static int ett_oml = -1;
+static int ett_oml_fom = -1;
+static int ett_oml_fom_att = -1;
+
+static proto_tree *top_tree;
+
+/* TS 12.21 Chapter 8.1 / TS 08.59 */
+static const value_string oml_msg_disc_vals[] = {
+ { ABIS_OM_MDISC_FOM, "Formatted O&M" },
+ { ABIS_OM_MDISC_MMI, "MMI Transfer" },
+ { ABIS_OM_MDISC_TRAU, "TRAU O&M" },
+ { ABIS_OM_MDISC_MANUF, "Manufacturer specific" },
+};
+
+/* TS 12.21 Chapter 8.1.1 */
+static const value_string oml_placement_vals[] = {
+ { ABIS_OM_PLACEMENT_ONLY, "Only" },
+ { ABIS_OM_PLACEMENT_FIRST, "First" },
+ { ABIS_OM_PLACEMENT_MIDDLE, "Middle" },
+ { ABIS_OM_PLACEMENT_LAST, "Last" },
+};
+
+/* TS 12.21 Chapter 9.2 */
+static const value_string oml_fom_msgtype_vals[] = {
+ { NM_MT_LOAD_INIT, "Software Load Init" },
+ { NM_MT_LOAD_INIT_ACK, "Software Load Init ACK" },
+ { NM_MT_LOAD_INIT_NACK, "Software Load Init NACK" },
+ { NM_MT_LOAD_SEG, "Software Load Segment" },
+ { NM_MT_LOAD_SEG_ACK, "Software Load Segment ACK" },
+ { NM_MT_LOAD_END, "Software Load End" },
+ { NM_MT_LOAD_END_ACK, "Software Load End ACK" },
+ { NM_MT_LOAD_END_NACK, "Software Load End NACK" },
+ { NM_MT_SW_ACT_REQ, "Software Activate Request" },
+ { NM_MT_SW_ACT_REQ_ACK, "Software Activate Request ACK" },
+ { NM_MT_SW_ACT_REQ_NACK, "Software Activate Request NACK" },
+ { NM_MT_ACTIVATE_SW, "Activate Software" },
+ { NM_MT_ACTIVATE_SW_ACK, "Activate Software ACK" },
+ { NM_MT_ACTIVATE_SW_NACK, "Activate Software NACK" },
+ { NM_MT_SW_ACTIVATED_REP, "Software Activated Report" },
+ { NM_MT_ESTABLISH_TEI, "Establish TEI" },
+ { NM_MT_ESTABLISH_TEI_ACK, "Establish TEI ACK" },
+ { NM_MT_ESTABLISH_TEI_NACK, "Establish TEI NACK" },
+ { NM_MT_CONN_TERR_SIGN, "Connect Terrestrial Signalling" },
+ { NM_MT_CONN_TERR_SIGN_ACK, "Connect Terrestrial Signalling ACK" },
+ { NM_MT_CONN_TERR_SIGN_NACK, "Connect Terrestrial Signalling NACK" },
+ { NM_MT_DISC_TERR_SIGN, "Disconnect Terrestrial Signalling" },
+ { NM_MT_DISC_TERR_SIGN_ACK, "Disconnect Terrestrial Signalling ACK" },
+ { NM_MT_DISC_TERR_SIGN_NACK, "Disconnect Terrestrial Signalling NACK" },
+ { NM_MT_CONN_TERR_TRAF, "Connect Terrestrial Traffic" },
+ { NM_MT_CONN_TERR_TRAF_ACK, "Connect Terrestrial Traffic ACK" },
+ { NM_MT_CONN_TERR_TRAF_NACK, "Connect Terrestrial Traffic NACK" },
+ { NM_MT_DISC_TERR_TRAF, "Disconnect Terrestrial Traffic" },
+ { NM_MT_DISC_TERR_TRAF_ACK, "Disconnect Terrestrial Traffic ACK" },
+ { NM_MT_DISC_TERR_TRAF_NACK, "Disconnect Terrestrial Traffic NACK" },
+ { NM_MT_CONN_MDROP_LINK, "Connect Multi-Drop Link" },
+ { NM_MT_CONN_MDROP_LINK_ACK, "Connect Multi-Drop Link ACK" },
+ { NM_MT_CONN_MDROP_LINK_NACK, "Connect Multi-Drop Link NACK" },
+ { NM_MT_DISC_MDROP_LINK, "Disconnect Multi-Drop Link" },
+ { NM_MT_DISC_MDROP_LINK_ACK, "Disconnect Multi-Drop Link ACK" },
+ { NM_MT_DISC_MDROP_LINK_NACK, "Disconnect Multi-Drop Link NACK" },
+ { NM_MT_SET_BTS_ATTR, "Set BTS Attributes" },
+ { NM_MT_SET_BTS_ATTR_ACK, "Set BTS Attributes ACK" },
+ { NM_MT_SET_BTS_ATTR_NACK, "Set BTS Attributes NACK" },
+ { NM_MT_SET_RADIO_ATTR, "Set Radio Carrier Attributes" },
+ { NM_MT_SET_RADIO_ATTR_ACK, "Set Radio Carrier Attributes ACK" },
+ { NM_MT_SET_RADIO_ATTR_NACK, "Set Radio Carrier Attributes NACK" },
+ { NM_MT_SET_CHAN_ATTR, "Set Channel Attributes" },
+ { NM_MT_SET_CHAN_ATTR_ACK, "Set Channel Attributes ACK" },
+ { NM_MT_SET_CHAN_ATTR_NACK, "Set Channel Attributes NACK" },
+ { NM_MT_PERF_TEST, "Perform Test" },
+ { NM_MT_PERF_TEST_ACK, "Perform Test ACK" },
+ { NM_MT_PERF_TEST_NACK, "Perform Test NACK" },
+ { NM_MT_TEST_REP, "Test Report" },
+ { NM_MT_SEND_TEST_REP, "Send Test Report" },
+ { NM_MT_SEND_TEST_REP_ACK, "Send Test Report ACK" },
+ { NM_MT_SEND_TEST_REP_NACK, "Send Test Report NACK" },
+ { NM_MT_STOP_TEST, "Stop Test" },
+ { NM_MT_STOP_TEST_ACK, "Stop Test ACK" },
+ { NM_MT_STOP_TEST_NACK, "Stop Test NACK" },
+ { NM_MT_STATECHG_EVENT_REP, "State Changed Event Report" },
+ { NM_MT_FAILURE_EVENT_REP, "Failure Event Report" },
+ { NM_MT_STOP_EVENT_REP, "Stop Sending Event Reports" },
+ { NM_MT_STOP_EVENT_REP_ACK, "Stop Sending Event Reports ACK" },
+ { NM_MT_STOP_EVENT_REP_NACK, "Stop Sending Event Reports NACK" },
+ { NM_MT_REST_EVENT_REP, "Restart Sending Event Reports" },
+ { NM_MT_REST_EVENT_REP_ACK, "Restart Sending Event Reports ACK" },
+ { NM_MT_REST_EVENT_REP_NACK, "Restart Sending Event Reports NACK" },
+ { NM_MT_CHG_ADM_STATE, "Change Administrative State" },
+ { NM_MT_CHG_ADM_STATE_ACK, "Change Administrative State ACK" },
+ { NM_MT_CHG_ADM_STATE_NACK, "Change Administrative State NACK" },
+ { NM_MT_CHG_ADM_STATE_REQ, "Change Administrative State Request" },
+ { NM_MT_CHG_ADM_STATE_REQ_ACK, "Change Administrative State Request ACK" },
+ { NM_MT_CHG_ADM_STATE_REQ_NACK, "Change Administrative State Request NACK" },
+ { NM_MT_REP_OUTST_ALARMS, "Report Outstanding Alarms" },
+ { NM_MT_REP_OUTST_ALARMS_ACK, "Report Outstanding Alarms ACK" },
+ { NM_MT_REP_OUTST_ALARMS_NACK, "Report Outstanding Alarms NACK" },
+ { NM_MT_CHANGEOVER, "Changeover" },
+ { NM_MT_CHANGEOVER_ACK, "Changeover ACK" },
+ { NM_MT_CHANGEOVER_NACK, "Changeover NACK" },
+ { NM_MT_OPSTART, "Opstart" },
+ { NM_MT_OPSTART_ACK, "Opstart ACK" },
+ { NM_MT_OPSTART_NACK, "Opstart NACK" },
+ { NM_MT_REINIT, "Reinitialize" },
+ { NM_MT_REINIT_ACK, "Reinitialize ACK" },
+ { NM_MT_REINIT_NACK, "Reinitialize NACK" },
+ { NM_MT_SET_SITE_OUT, "Set Site Outputs" },
+ { NM_MT_SET_SITE_OUT_ACK, "Set Site Outputs ACK" },
+ { NM_MT_SET_SITE_OUT_NACK, "Set Site Outputs NACK" },
+ { NM_MT_CHG_HW_CONF, "Change HW Configuration" },
+ { NM_MT_CHG_HW_CONF_ACK, "Change HW Configuration ACK" },
+ { NM_MT_CHG_HW_CONF_NACK, "Change HW Configuration NACK" },
+ { NM_MT_MEAS_RES_REQ, "Measurement Result Request" },
+ { NM_MT_MEAS_RES_RESP, "Measurement Result Response" },
+ { NM_MT_STOP_MEAS, "Stop Measurement" },
+ { NM_MT_START_MEAS, "Start Measurement" },
+ { NM_MT_GET_ATTR, "Get Attributes" },
+ { NM_MT_GET_ATTR_RESP, "Get Attributes Response" },
+ { NM_MT_GET_ATTR_NACK, "Get Attributes NACK" },
+ { NM_MT_SET_ALARM_THRES, "Set Alarm Threshold" },
+ { NM_MT_SET_ALARM_THRES_ACK, "Set Alarm Threshold ACK" },
+ { NM_MT_SET_ALARM_THRES_NACK, "Set Alarm Threshold NACK" },
+ /* proprietary, not in the standard */
+ { NM_MT_IPACC_RESTART, "IPA Restart" },
+ { NM_MT_IPACC_RESTART_ACK, "IPA Restart ACK" },
+ { NM_MT_IPACC_RSL_CONNECT, "IPA RSL Connect" },
+ { NM_MT_IPACC_RSL_CONNECT_ACK, "IPA RSL Connect ACK" },
+ { NM_MT_IPACC_RSL_CONNECT_NACK, "IPA RSL Connect NACK" },
+ { NM_MT_IPACC_RSL_DISCONNECT, "IPA RSL Disconnect" },
+ { NM_MT_IPACC_RSL_DISCONNECT_ACK, "IPA RSL Disconnect ACK" },
+ { NM_MT_IPACC_RSL_DISCONNECT_NACK, "IPA RSL Disconnect NACK" },
+ { NM_MT_IPACC_CONN_TRAF, "IPA Connect Traffic" },
+ { NM_MT_IPACC_CONN_TRAF_ACK, "IPA Connect Traffic ACK" },
+ { NM_MT_IPACC_CONN_TRAF_NACK, "IPA Connect Traffic NACK" },
+ { NM_MT_IPACC_DISC_TRAF, "IPA Disconnect Traffic" },
+ { NM_MT_IPACC_DISC_TRAF_ACK, "IPA Disconnect Traffic ACK" },
+ { NM_MT_IPACC_DISC_TRAF_NACK, "IPA Disconnect Traffic NACK" },
+ { NM_MT_IPACC_DEF_BOOT_SW, "IPA Default Boot Software" },
+ { NM_MT_IPACC_DEF_BOOT_SW_ACK, "IPA Default Boot Software ACK" },
+ { NM_MT_IPACC_DEF_BOOT_SW_NACK, "IPA Default Boot Software NACK" },
+ { NM_MT_IPACC_SET_NVATTR, "IPA Set NVRAM Attributes" },
+ { NM_MT_IPACC_SET_NVATTR_ACK, "IPA Set NVRAM Attributes ACK" },
+ { NM_MT_IPACC_SET_NVATTR_NACK, "IPA Set NVRAM Attributes NACK" },
+ { NM_MT_IPACC_GET_NVATTR, "IPA Get NVRAM Attributes" },
+ { NM_MT_IPACC_GET_NVATTR_ACK, "IPA Get NVRAM Attributes ACK" },
+ { NM_MT_IPACC_GET_NVATTR_NACK, "IPA Get NVRAM Attributes NACK" },
+ { NM_MT_IPACC_SET_ATTR, "IPA Set Attributes" },
+ { NM_MT_IPACC_SET_ATTR_ACK, "IPA Set Attributes ACK" },
+ { NM_MT_IPACC_SET_ATTR_NACK, "IPA Set Attributes NACK" },
+ { NM_MT_IPACC_ATTR_CHG_EVT, "IPA Attribute Change Event" },
+ { NM_MT_IPACC_SW_DEACT, "IPA Software Deactivate" },
+ { NM_MT_IPACC_SW_DEACT_ACK, "IPA Software Deactivate ACK" },
+ { NM_MT_IPACC_SW_DEACT_NACK, "IPA Software Deactivate NACK" },
+ { NM_MT_IPACC_MEAS_RES_REQ_NACK,"IPA Measurement Result Request NACK" },
+ { NM_MT_IPACC_START_MEAS_NACK, "IPA Start Measurement NACK" },
+ { NM_MT_IPACC_STOP_MEAS_NACK, "IPA Stop Measurement NACK" },
+ { NM_MT_BS11_RESET_RESOURCE, "SIE Reset Resource" },
+ { NM_MT_BS11_BEGIN_DB_TX, "SIE Begin Database Transmission" },
+ { NM_MT_BS11_BEGIN_DB_TX_ACK, "SIE Begin Database Transmission ACK" },
+ { NM_MT_BS11_BEGIN_DB_TX_NACK, "SIE Begin Database Transmission NACK" },
+ { NM_MT_BS11_END_DB_TX, "SIE End Database Transmission" },
+ { NM_MT_BS11_END_DB_TX_ACK, "SIE End Database Transmission ACK" },
+ { NM_MT_BS11_END_DB_TX_NACK, "SIE End Database Transmission NACK" },
+ { NM_MT_BS11_CREATE_OBJ, "SIE Create Object" },
+ { NM_MT_BS11_CREATE_OBJ_ACK, "SIE Create Object ACK" },
+ { NM_MT_BS11_CREATE_OBJ_NACK, "SIE Create Object NACK" },
+ { NM_MT_BS11_DELETE_OBJ, "SIE Delete Object" },
+ { NM_MT_BS11_DELETE_OBJ_ACK, "SIE Delete Object ACK" },
+ { NM_MT_BS11_DELETE_OBJ_NACK, "SIE Delete Object NACK" },
+ { NM_MT_BS11_GET_STATE, "SIE Get State" },
+ { NM_MT_BS11_GET_STATE_ACK, "SIE Get State ACK" },
+ { NM_MT_BS11_LMT_LOGON, "SIE LMT Logon" },
+ { NM_MT_BS11_LMT_LOGON_ACK, "SIE LMT Logon ACK" },
+ { NM_MT_BS11_RESTART, "SIE Restart" },
+ { NM_MT_BS11_RESTART_ACK, "SIE Restart ACK" },
+ { NM_MT_BS11_DISCONNECT, "SIE Disconnect BTS" },
+ { NM_MT_BS11_DISCONNECT_ACK, "SIE Disconnect BTS ACK" },
+ { NM_MT_BS11_LMT_LOGOFF, "SIE LMT Logoff" },
+ { NM_MT_BS11_LMT_LOGOFF_ACK, "SIE LMT Logoff ACK" },
+ { NM_MT_BS11_RECONNECT, "SIE Reconnect BTS" },
+ { NM_MT_BS11_RECONNECT_ACK, "SIE Reconnect BTS ACK" },
+};
+
+/* TS 12.21 Section 9.2: Object Class */
+static const value_string oml_fom_objclass_vals[] = {
+ { NM_OC_SITE_MANAGER, "BTS Site Manager" },
+ { NM_OC_BTS, "BTS" },
+ { NM_OC_RADIO_CARRIER, "Radio Carrier" },
+ { NM_OC_CHANNEL, "Radio Channel" },
+ { NM_OC_BASEB_TRANSC, "Baseband Transceiver" },
+ /* proprietary, vendor specific */
+ { NM_OC_BS11_ADJC, "SIE Adjacend Channel" },
+ { NM_OC_BS11_HANDOVER, "SIE Handover" },
+ { NM_OC_BS11_PWR_CTRL, "SIE Power Control" },
+ { NM_OC_BS11_BTSE, "SIE BTSE" },
+ { NM_OC_BS11_RACK, "SIE Rack" },
+ { NM_OC_BS11, "SIE SiemensHW" },
+ { NM_OC_BS11_TEST, "SIE Test" },
+ { NM_OC_BS11_ENVABTSE, "SIE EnvaBTSE" },
+ { NM_OC_BS11_BPORT, "SIE BPort" },
+ { NM_OC_GPRS_NSE, "GPRS NSE" },
+ { NM_OC_GPRS_CELL, "GPRS Cell" },
+ { NM_OC_GPRS_NSVC0, "GPRS NSVC0" },
+ { NM_OC_GPRS_NSVC1, "GPRS NSVC1" },
+ { NM_OC_NULL, "NULL" },
+};
+
+/* TS 12.21 Section 9.4: Attributes */
+static const value_string oml_fom_attr_vals[] = {
+ { NM_ATT_ABIS_CHANNEL, "A-bis Channel" },
+ { NM_ATT_ADD_INFO, "Additional Information" },
+ { NM_ATT_ADD_TEXT, "Additional Text" },
+ { NM_ATT_ADM_STATE, "Administrative State" },
+ { NM_ATT_ARFCN_LIST, "ARFCN List" },
+ { NM_ATT_AUTON_REPORT, "Autonomously Report" },
+ { NM_ATT_AVAIL_STATUS, "Availability Status" },
+ { NM_ATT_BCCH_ARFCN, "BCCH ARFCN" },
+ { NM_ATT_BSIC, "BSIC" },
+ { NM_ATT_BTS_AIR_TIMER, "BTS Air Timer" },
+ { NM_ATT_CCCH_L_I_P, "CCCH Load Indication Period" },
+ { NM_ATT_CCCH_L_T, "CCCH Load Threshold" },
+ { NM_ATT_CHAN_COMB, "Channel Combination" },
+ { NM_ATT_CONN_FAIL_CRIT, "Connection Fail Criterion" },
+ { NM_ATT_DEST, "Destination" },
+ { NM_ATT_EVENT_TYPE, "Event Type" },
+ { NM_ATT_FILE_ID, "File ID" },
+ { NM_ATT_FILE_VERSION, "File Version" },
+ { NM_ATT_GSM_TIME, "GSM Time" },
+ { NM_ATT_HSN, "HSN" },
+ { NM_ATT_HW_CONFIG, "HW Configuration" },
+ { NM_ATT_HW_DESC, "HW Description" },
+ { NM_ATT_INTAVE_PARAM, "Intave Parameter" },
+ { NM_ATT_INTERF_BOUND, "Interference Boundaries" },
+ { NM_ATT_LIST_REQ_ATTR, "List of required Attributes" },
+ { NM_ATT_MAIO, "MAIO" },
+ { NM_ATT_MANUF_STATE, "Manufacturer Dependent State" },
+ { NM_ATT_MANUF_THRESH, "Manufacturer Dependent Thresholds" },
+ { NM_ATT_MANUF_ID, "Manufacturer Id" },
+ { NM_ATT_MAX_TA, "Maximum Timing Advance" },
+ { NM_ATT_MDROP_LINK, "Multi-drop BSC Link" },
+ { NM_ATT_MDROP_NEXT, "Multi-drop next BTS Link" },
+ { NM_ATT_NACK_CAUSES, "NACK Causes" },
+ { NM_ATT_NY1, "Ny1" },
+ { NM_ATT_OPER_STATE, "Operational State" },
+ { NM_ATT_OVERL_PERIOD, "Overload Period" },
+ { NM_ATT_PHYS_CONF, "Physical Config" },
+ { NM_ATT_POWER_CLASS, "Power Class" },
+ { NM_ATT_POWER_THRESH, "Power Output Thresholds" },
+ { NM_ATT_PROB_CAUSE, "Probable Cause" },
+ { NM_ATT_RACH_B_THRESH, "RACH Busy Threshold" },
+ { NM_ATT_LDAVG_SLOTS, "RACH Load Averaging Slots" },
+ { NM_ATT_RAD_SUBC, "Radio Sub Channel" },
+ { NM_ATT_RF_MAXPOWR_R, "RF Max Power Reduction" },
+ { NM_ATT_SITE_INPUTS, "Site Inputs" },
+ { NM_ATT_SITE_OUTPUTS, "Site Outputs" },
+ { NM_ATT_SOURCE, "Source" },
+ { NM_ATT_SPEC_PROB, "Specific Problems" },
+ { NM_ATT_START_TIME, "Starting Time" },
+ { NM_ATT_T200, "T200" },
+ { NM_ATT_TEI, "TEI" },
+ { NM_ATT_TEST_DUR, "Test Duration" },
+ { NM_ATT_TEST_NO, "Test No" },
+ { NM_ATT_TEST_REPORT, "Test Report Info" },
+ { NM_ATT_VSWR_THRESH, "VSWR Thresholds " },
+ { NM_ATT_WINDOW_SIZE, "Window Size" },
+ { NM_ATT_BS11_RSSI_OFFS, "SIE RSSI Offset" },
+ { NM_ATT_BS11_TXPWR, "SIE TX Power" },
+ { NM_ATT_BS11_DIVERSITY, "SIE Diversity" },
+ { NM_ATT_TSC, "Training Sequence Code" },
+ { NM_ATT_SW_CONFIG, "SW Configuration" },
+ { NM_ATT_SW_DESCR, "SW Description" },
+ { NM_ATT_SEVERITY, "Perceived Severity" },
+ { NM_ATT_GET_ARI, "Get ARI" },
+ { NM_ATT_HW_CONF_CHG, "HW Configuration Change" },
+ { NM_ATT_OUTST_ALARM, "Outstanding Alarm" },
+ { NM_ATT_FILE_DATA, "File Data" },
+ { NM_ATT_MEAS_RES, "Measurement Result" },
+ { NM_ATT_MEAS_TYPE, "Measurement Type" },
+ { NM_ATT_BS11_ESN_FW_CODE_NO, "SIE ESN FW Code Number" },
+ { NM_ATT_BS11_ESN_HW_CODE_NO, "SIE ESN HW Code Number" },
+ { NM_ATT_BS11_ESN_PCB_SERIAL, "SIE ESN PCB Serial Number" },
+ { NM_ATT_BS11_EXCESSIVE_DISTANCE, "SIE Excessive Distance" },
+ { NM_ATT_BS11_ALL_TEST_CATG, "SIE All Test Categories" },
+ { NM_ATT_BS11_BTSLS_HOPPING, "SIE BTS LS Hopping" },
+ { NM_ATT_BS11_CELL_ALLOC_NR, "SIE Cell Allocation Number" },
+ { NM_ATT_BS11_CELL_GLOBAL_ID, "SIE Cell Global ID" },
+ { NM_ATT_BS11_ENA_INTERF_CLASS, "SIE Enable Interference Class" },
+ /* FIXME */
+ { NM_ATT_BS11_ENA_MS_PWR_CTRL, "SIE Enable MS Power Control" },
+ { NM_ATT_BS11_ENA_PWR_BDGT_HO, "SIE Enable Power Budget HO" },
+ { NM_ATT_BS11_ENA_RXLEV_HO, "SIE Enable RxLevel HO" },
+ { NM_ATT_BS11_ENA_RXQUAL_HO, "SIE Enable RxQual HO" },
+ { NM_ATT_BS11_FACCH_QUAL, "SIE FACCH Quality" },
+ { NM_ATT_IPACC_DST_IP, "IPA Destination IP Address" },
+ { NM_ATT_IPACC_DST_IP_PORT, "IPA Destionation IP Port" },
+ { NM_ATT_IPACC_SSRC, "IPA RTP SSRC" },
+ { NM_ATT_IPACC_RTP_PAYLD_TYPE, "IPA RTP Payload Type" },
+ { NM_ATT_IPACC_BASEB_ID, "IPA Baseband Identifier" },
+ { NM_ATT_IPACC_STREAM_ID, "IPA Stream Identifier" },
+ { NM_ATT_IPACC_NV_FLAGS, "IPA NVRAM Flags" },
+ { NM_ATT_IPACC_FREQ_CTRL, "IPA Frequency Control" },
+ { NM_ATT_IPACC_PRIM_OML_CFG, "IPA Primary OML Config" },
+ { NM_ATT_IPACC_SEC_OML_CFG, "IPA Secondary OML Config" },
+ { NM_ATT_IPACC_IP_IF_CFG, "IPA IP Interface Config" },
+ { NM_ATT_IPACC_IP_GW_CFG, "IPA IP Gateway Config" },
+ { NM_ATT_IPACC_IN_SERV_TIME, "IPA In Service Time" },
+ { NM_ATT_IPACC_TRX_BTS_ASS, "IPA TRX BTS Assignment" },
+ { NM_ATT_IPACC_LOCATION, "IPA BTS Location Name" },
+ { NM_ATT_IPACC_PAGING_CFG, "IPA Paging Configuration" },
+ { NM_ATT_IPACC_FILE_DATA, "IPA File Data" },
+ { NM_ATT_IPACC_UNIT_ID, "IPA Unit ID" },
+ { NM_ATT_IPACC_PARENT_UNIT_ID, "IPA Parent Unit ID" },
+ { NM_ATT_IPACC_UNIT_NAME, "IPA Unit Name" },
+ { NM_ATT_IPACC_SNMP_CFG, "IPA SNMP Config" },
+ { NM_ATT_IPACC_PRIM_OML_CFG_LIST, "IPA Primary OML Config List" },
+ { NM_ATT_IPACC_PRIM_OML_FB_TOUT,"IPA Primary OML Fallback Timeout" },
+ { NM_ATT_IPACC_CUR_SW_CFG, "IPA Current Software Config" },
+ { NM_ATT_IPACC_TIMING_BUS, "IPA Timing Bus" },
+ { NM_ATT_IPACC_CGI, "IPA CGI" },
+ { NM_ATT_IPACC_RAC, "IPA RAC" },
+ { NM_ATT_IPACC_OBJ_VERSION, "IPA Object Version" },
+ { NM_ATT_IPACC_GPRS_PAGING_CFG, "IPA GPRS Paging Configuration" },
+ { NM_ATT_IPACC_NSEI, "IPA NSEI" },
+ { NM_ATT_IPACC_BVCI, "IPA BVCI" },
+ { NM_ATT_IPACC_NSVCI, "IPA NSVCI" },
+ { NM_ATT_IPACC_NS_CFG, "IPA NS Configuration" },
+ { NM_ATT_IPACC_BSSGP_CFG, "IPA BSSGP Configuration" },
+ { NM_ATT_IPACC_NS_LINK_CFG, "IPA NS Link Configuration" },
+ { NM_ATT_IPACC_RLC_CFG, "IPA RLC Configuration" },
+ { NM_ATT_IPACC_ALM_THRESH_LIST, "IPA Alarm Threshold List" },
+ { NM_ATT_IPACC_MONIT_VAL_LIST, "IPA Monitored Value List" },
+ { NM_ATT_IPACC_TIB_CONTROL, "IPA Timing Interface Bus Control" },
+ { NM_ATT_IPACC_SUPP_FEATURES, "IPA Supported Features" },
+ { NM_ATT_IPACC_CODING_SCHEMES, "IPA Coding Schemes" },
+ { NM_ATT_IPACC_RLC_CFG_2, "IPA RLC Configuration 2" },
+ { NM_ATT_IPACC_HEARTB_TOUT, "IPA Heartbeat Timeout" },
+ { NM_ATT_IPACC_UPTIME, "IPA Uptime" },
+ { NM_ATT_IPACC_RLC_CFG_3, "IPA RLC Configuration 3" },
+ { NM_ATT_IPACC_SSL_CFG, "IPA SSL Configuration" },
+ { NM_ATT_IPACC_SEC_POSSIBLE, "IPA Security Possible" },
+ { NM_ATT_IPACC_IML_SSL_STATE, "IPA IML SSL State" },
+ { NM_ATT_IPACC_REVOC_DATE, "IPA Revocation Date" },
+ /* FIXME: More SIE */
+};
+
+/* Section 9.4.4: Administrative State */
+static const value_string oml_adm_state_vals[] = {
+ { NM_STATE_LOCKED, "Locked" },
+ { NM_STATE_UNLOCKED, "Unlocked" },
+ { NM_STATE_SHUTDOWN, "Shutdown" },
+ { NM_STATE_NULL, "Null" },
+};
+
+static const value_string oml_oper_state_vals[] = {
+ { 1, "Disabled" },
+ { 2, "Enabled" },
+ { 0xff, "NULL" },
+};
+
+/* Section 9.4.7 Availability Status */
+static const value_string oml_avail_state_vals[] = {
+ { 0, "In test" },
+ { 1, "Failed" },
+ { 2, "Power off" },
+ { 3, "Off line" },
+ { 5, "Dependency" },
+ { 6, "Degraded" },
+ { 7, "Not installed" },
+ { 0xff, "OK" },
+};
+
+/* Section 9.4.13: Channel Combination */
+static const value_string oml_chan_comb_vals[] = {
+ { NM_CHANC_TCHFull, "TCH/F" },
+ { NM_CHANC_TCHHalf, "TCH/H" },
+ { NM_CHANC_TCHHalf2, "TCH/H 2" },
+ { NM_CHANC_SDCCH, "SDCCH" },
+ { NM_CHANC_mainBCCH, "Main BCCH" },
+ { NM_CHANC_BCCHComb, "Combined BCCH" },
+ { NM_CHANC_BCCH, "BCCH" },
+ { NM_CHANC_BCCH_CBCH, "BCCH+CBCH" },
+ { NM_CHANC_SDCCH_CBCH, "SDCCH+CBCH" },
+};
+
+/* Section 9.4.16: Event Type */
+static const value_string oml_event_type_vals[] = {
+ { NM_EVT_COMM_FAIL, "Communication Failure" },
+ { NM_EVT_QOS_FAIL, "QoS Failure" },
+ { NM_EVT_PROC_FAIL, "Processor Failure" },
+ { NM_EVT_EQUIP_FAIL, "Equipment Failure" },
+ { NM_EVT_ENV_FAIL, "Environment Failure" },
+};
+
+/* Section 9.4.63: Perceived Severity */
+static const value_string oml_severity_vals[] = {
+ { NM_SEVER_CEASED, "Ceased" },
+ { NM_SEVER_CRITICAL, "Critical" },
+ { NM_SEVER_MAJOR, "Major" },
+ { NM_SEVER_MINOR, "Minor" },
+ { NM_SEVER_WARNING, "Warning" },
+ { NM_SEVER_INDETERMINATE, "Indeterminate" },
+};
+
+/* Section 9.4.36: NACK Causes */
+static const value_string oml_nack_cause[] = {
+ { NM_NACK_INCORR_STRUCT, "Incorrect message structure" },
+ { NM_NACK_MSGTYPE_INVAL, "Invalid message type value" },
+ { NM_NACK_OBJCLASS_INVAL, "Invalid Object class value" },
+ { NM_NACK_OBJCLASS_NOTSUPP, "Object Class not supported" },
+ { NM_NACK_BTSNR_UNKN, "BTS Number unknown" },
+ { NM_NACK_TRXNR_UNKN, "TRX Number unknown" },
+ { NM_NACK_OBJINST_UNKN, "Object Instance unknown" },
+ { NM_NACK_ATTRID_INVAL, "Invalid Attribute ID value" },
+ { NM_NACK_ATTRID_NOTSUPP, "Attribute ID not supported" },
+ { NM_NACK_PARAM_RANGE, "Parameter value out of range" },
+ { NM_NACK_ATTRLIST_INCONSISTENT, "Inconsistency in Attribute list" },
+ { NM_NACK_SPEC_IMPL_NOTSUPP, "Specified Implementation not supported" },
+ { NM_NACK_CANT_PERFORM, "Message cannot be performed" },
+ { NM_NACK_RES_NOTIMPL, "Resource not implemented" },
+ { NM_NACK_RES_NOTAVAIL, "Resource not available" },
+ { NM_NACK_FREQ_NOTAVAIL, "Frequency not available" },
+ { NM_NACK_TEST_NOTSUPP, "Test not supported" },
+ { NM_NACK_CAPACITY_RESTR, "Capacity restrictions" },
+ { NM_NACK_PHYSCFG_NOTPERFORM, "Phys config cannot be performed" },
+ { NM_NACK_TEST_NOTINIT, "Test not initiated" },
+ { NM_NACK_PHYSCFG_NOTRESTORE, "Phys config cannot be restored" },
+ { NM_NACK_TEST_NOSUCH, "No such Test" },
+ { NM_NACK_TEST_NOSTOP, "Test cannot be stopped" },
+ { NM_NACK_MSGINCONSIST_PHYSCFG, "Message inconsisten with physical config" },
+ { NM_NACK_FILE_INCOMPLETE, "Complete file not received" },
+ { NM_NACK_FILE_NOTAVAIL, "File not available at destination" },
+ { NM_NACK_FILE_NOTACTIVATE, "File cannot be activated" },
+ { NM_NACK_REQ_NOT_GRANT, "Request not granted" },
+ { NM_NACK_WAIT, "Wait" },
+ { NM_NACK_NOTH_REPORT_EXIST, "Nothing reportable existing" },
+ { NM_NACK_MEAS_NOTSUPP, "Measurement not supported" },
+ { NM_NACK_MEAS_NOTSTART, "Measurement not started" },
+ { 0xff, "NULL" },
+};
+
+static const value_string oml_test_no_vals[] = {
+ { NM_IPACC_TESTNO_RLOOP_ANT, "Radio Loop test via antenna" },
+ { NM_IPACC_TESTNO_RLOOP_XCVR, "Radio Loop test via transceiver" },
+ { NM_IPACC_TESTNO_FUNC_OBJ, "BTS Functional object self test" },
+ { NM_IPACC_TESTNO_CHAN_USAGE, "Channel Usage" },
+ { NM_IPACC_TESTNO_BCCH_CHAN_USAGE, "BCCH Channel Usage" },
+ { NM_IPACC_TESTNO_FREQ_SYNC, "Frequency Synchronization" },
+ { NM_IPACC_TESTNO_BCCH_INFO, "BCCH Information" },
+ { NM_IPACC_TESTNO_TX_BEACON, "Transmit Beacon" },
+ { NM_IPACC_TESTNO_SYSINFO_MONITOR, "SysInfo Monitor" },
+ { NM_IPACC_TESTNO_BCCCH_MONITOR, "BCCH & CCCH Monitor" },
+};
+
+static const value_string ipacc_test_res_vals[] = {
+ { NM_IPACC_TESTRES_SUCCESS, "Success" },
+ { NM_IPACC_TESTRES_TIMEOUT, "Timeout" },
+ { NM_IPACC_TESTRES_NO_CHANS, "No suitable channels available" },
+ { NM_IPACC_TESTRES_PARTIAL, "Partial" },
+ { NM_IPACC_TESTRES_STOPPED, "Stopped" },
+};
+
+static const value_string ipacc_testres_ie_vals[] = {
+ { NM_IPACC_TR_IE_FREQ_ERR_LIST, "Frequency Error List" },
+ { NM_IPACC_TR_IE_CHAN_USAGE, "Channel Usage" },
+ { NM_IPACC_TR_IE_BCCH_INFO, "BCCH Information" },
+ { NM_IPACC_TR_IE_RESULT_DETAILS,"Result Details" },
+ { NM_IPACC_TR_IE_FREQ_ERR, "Frequency Error" },
+};
+
+/* Parse the ip.access specific BCCH Information IE embedded into the Test
+ * Report IE */
+static gint
+ipacc_tr_ie_bcch(tvbuff_t *tvb, proto_tree *att_tree, int offset)
+{
+ guint16 binfo_type, tmp;
+
+ binfo_type = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+
+ tmp = tvb_get_ntohs(tvb, offset);
+
+ /* FIXME: there are still some bugs remaining here */
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_arfcn,
+ tvb, offset, 2, TRUE);
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_f_qual,
+ tvb, offset, 2, TRUE);
+ offset += 2;
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_b_rxlev,
+ tvb, offset++, 1, TRUE);
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_rxqual,
+ tvb, offset++, 1, TRUE);
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_f_err,
+ tvb, offset, 2, TRUE);
+ offset += 2;
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_frame_offs,
+ tvb, offset, 2, TRUE);
+ offset += 2;
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_framenr_offs,
+ tvb, offset, 4, TRUE);
+ offset += 4;
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_bsic,
+ tvb, offset++, 1, TRUE);
+
+ de_lai(tvb, att_tree, offset, 5, NULL, 0);
+ offset += 5;
+
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_cell_id,
+ tvb, offset, 2, TRUE);
+ offset += 2;
+
+ if (binfo_type & 0x8000) {
+ /* System Information 2 */
+ /* FIXME: Parse 04.18 Neighbour Cell Description */
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_si2,
+ tvb, offset, 16, TRUE);
+ offset += 16;
+ }
+ if (binfo_type & 0x0001) {
+ /* System Information 2bis */
+ /* FIXME: Parse 04.18 Neighbour Cell Description */
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_si2bis,
+ tvb, offset, 16, TRUE);
+ offset += 16;
+ }
+ if (binfo_type & 0x0002) {
+ /* System Information 2ter */
+ /* FIXME: Parse 04.18 Neighbour Cell Description */
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_si2ter,
+ tvb, offset, 16, TRUE);
+ offset += 16;
+ }
+ if (binfo_type & 0x0004) {
+ /* FIXME: Parse 04.18 Cell Channel Description */
+ proto_tree_add_item(att_tree, hf_attr_ipa_tr_chan_desc,
+ tvb, offset, 16, TRUE);
+ offset += 16;
+ }
+
+ return offset;
+}
+
+/* Parse the ip.access specific Channel Usage IE embedded into the Test
+ * Report IE */
+static gint
+ipacc_tr_ie_chan_usage(tvbuff_t *tvb, proto_tree *att_tree, int offset)
+{
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ guint16 result = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_tr_arfcn,
+ tvb, offset, 2, result);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_tr_rxlev,
+ tvb, offset, 2, result);
+ offset += 2;
+ }
+ return offset;
+}
+
+/* Parse the ip.access specific format of the standard test report IE */
+static gint
+dissect_ipacc_test_rep(proto_tree *tree, tvbuff_t *tvb)
+{
+ gint offset = 0;
+
+ proto_tree_add_item(tree, hf_attr_ipa_test_res, tvb, offset++,
+ 1, FALSE);
+
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ guint8 ie = tvb_get_guint8(tvb, offset);
+ guint16 len = tvb_get_ntohs(tvb, offset+1);
+ proto_item *ti;
+ proto_tree *att_tree;
+
+ ti = proto_tree_add_item(tree, hf_oml_ipa_tres_attr_tag, tvb,
+ offset++, 1, FALSE);
+ att_tree = proto_item_add_subtree(ti, ett_oml_fom_att);
+ proto_tree_add_uint(att_tree, hf_oml_ipa_tres_attr_len, tvb,
+ offset, 2, len);
+ offset += 2;
+
+ switch (ie) {
+ case NM_IPACC_TR_IE_CHAN_USAGE:
+ offset = ipacc_tr_ie_chan_usage(tvb,
+ att_tree, offset);
+ break;
+ case NM_IPACC_TR_IE_BCCH_INFO:
+ offset = ipacc_tr_ie_bcch(tvb,
+ att_tree, offset);
+ break;
+ default:
+ break;
+ }
+ }
+ return offset;
+}
+
+/* Dissect OML FOM Attributes after OML + FOM header */
+static gint
+dissect_oml_attrs(tvbuff_t *tvb, int base_offs, packet_info *pinfo,
+ proto_tree *tree)
+{
+ 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;
+ proto_tree *att_tree;
+ tvbuff_t *sub_tvb;
+
+ tag = tvb_get_guint8(tvb, offset);
+ tdef = &nm_att_tlvdef.def[tag];
+
+ switch (tdef->type) {
+ case TLV_TYPE_FIXED:
+ hlen = 1;
+ len_len = 0;
+ len = tdef->fixed_len;
+ break;
+ case TLV_TYPE_T:
+ hlen = 1;
+ len_len = 0;
+ len = 0;
+ break;
+ case TLV_TYPE_TV:
+ hlen = 1;
+ len_len = 0;
+ len = 1;
+ break;
+ case TLV_TYPE_TLV:
+ hlen = 2;
+ len_len = 1;
+ len = tvb_get_guint8(tvb, offset+1);
+ break;
+ case TLV_TYPE_TL16V:
+ hlen = 3;
+ len_len = 2;
+ len = tvb_get_guint8(tvb, offset+1) << 8 |
+ tvb_get_guint8(tvb, offset+2);
+ break;
+ default:
+ hlen = len_len = len = 0;
+ DISSECTOR_ASSERT_NOT_REACHED();
+ break;
+ }
+
+ ti = proto_tree_add_item(tree, hf_oml_fom_attr_tag, tvb,
+ offset, 1, FALSE);
+ att_tree = proto_item_add_subtree(ti, ett_oml_fom_att);
+ proto_tree_add_uint(att_tree, hf_oml_fom_attr_len, tvb,
+ offset+1, len_len, len);
+ offset += hlen;
+
+ sub_tvb = tvb_new_subset(tvb, offset, len, len);
+
+ switch (tag) {
+ /* parse only the most common IE for now */
+ case NM_ATT_ABIS_CHANNEL:
+ proto_tree_add_item(att_tree, hf_attr_ach_btsp, tvb,
+ offset, 1, TRUE);
+ proto_tree_add_item(att_tree, hf_attr_ach_tslot, tvb,
+ offset+1, 1, TRUE);
+ proto_tree_add_item(att_tree, hf_attr_ach_sslot, tvb,
+ offset+2, 1, TRUE);
+ break;
+ case NM_ATT_ADM_STATE:
+ proto_tree_add_item(att_tree, hf_attr_adm_state, tvb,
+ offset, len, FALSE);
+ 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:
+ /* 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,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_BSIC:
+ proto_tree_add_item(att_tree, hf_attr_bsic, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_CHAN_COMB:
+ proto_tree_add_item(att_tree, hf_attr_chan_comb, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_EVENT_TYPE:
+ proto_tree_add_item(att_tree, hf_attr_event_type, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_GSM_TIME:
+ proto_tree_add_item(att_tree, hf_attr_gsm_time, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_OPER_STATE:
+ proto_tree_add_item(att_tree, hf_attr_oper_state, tvb,
+ offset, len, FALSE);
+ 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,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_TSC:
+ proto_tree_add_item(att_tree, hf_attr_tsc, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_SEVERITY:
+ proto_tree_add_item(att_tree, hf_attr_severity, tvb,
+ offset, len, TRUE);
+ break;
+ case NM_ATT_TEST_REPORT:
+ dissect_ipacc_test_rep(att_tree, sub_tvb);
+ break;
+ case NM_ATT_TEST_NO:
+ proto_tree_add_item(att_tree, hf_attr_test_no, tvb,
+ offset, len, TRUE);
+ 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_DST_IP:
+ 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_DST_IP_PORT:
+ 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,
+ tvb, offset, len, TRUE);
+ break;
+ case NM_ATT_IPACC_UNIT_ID:
+ proto_tree_add_item(att_tree, hf_attr_ipa_unit_id,
+ tvb, offset, len, TRUE);
+ break;
+ case NM_ATT_IPACC_UNIT_NAME:
+ proto_tree_add_item(att_tree, hf_attr_ipa_unit_name,
+ tvb, offset, len, TRUE);
+ break;
+ case NM_ATT_IPACC_PRIM_OML_CFG_LIST:
+ proto_tree_add_item(att_tree, hf_attr_ipa_prim_oml_ip,
+ tvb, offset+1, 4, TRUE);
+ proto_tree_add_item(att_tree, hf_attr_ipa_prim_oml_port,
+ tvb, offset+1+4, 2, TRUE);
+ break;
+ case NM_ATT_IPACC_NV_FLAGS:
+ {
+ guint flags, mask;
+ flags = tvb_get_guint8(tvb, offset);
+ mask = tvb_get_guint8(tvb, offset+1);
+ flags |= tvb_get_guint8(tvb, offset+2) << 8;
+ mask |= tvb_get_guint8(tvb, offset+3) << 8;
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nv_flags,
+ tvb, offset, 3, flags);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nv_mask,
+ tvb, offset+1, 3, mask);
+ }
+ break;
+ case NM_ATT_IPACC_RAC:
+ proto_tree_add_item(att_tree, hf_attr_ipa_rac,
+ tvb, offset, 1, TRUE);
+ break;
+ case NM_ATT_IPACC_NSEI:
+ val16 = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nsei,
+ tvb, offset, 2, val16);
+ break;
+ case NM_ATT_IPACC_NSVCI:
+ val16 = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nsvci,
+ tvb, offset, 2, val16);
+ break;
+ case NM_ATT_IPACC_BVCI:
+ val16 = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_bvci,
+ tvb, offset, 2, val16);
+ break;
+ case NM_ATT_IPACC_NS_LINK_CFG:
+ val16 = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nsl_sport,
+ tvb, offset, 2, val16);
+ val32 = tvb_get_ipv4(tvb, offset+2);
+ proto_tree_add_ipv4(att_tree, hf_attr_ipa_nsl_daddr,
+ tvb, offset+2, 4, val32);
+ val16 = tvb_get_ntohs(tvb, offset+6);
+ proto_tree_add_uint(att_tree, hf_attr_ipa_nsl_dport,
+ tvb, offset+6, 2, val16);
+ break;
+ default:
+ proto_tree_add_item(att_tree, hf_oml_fom_attr_val, tvb,
+ offset, len, FALSE);
+ }
+ offset += len;
+ }
+ return offset;
+}
+
+static int
+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;
+ proto_tree *fom_tree;
+
+ msg_type = tvb_get_guint8(tvb, offset);
+ obj_class = tvb_get_guint8(tvb, offset+1);
+ bts_nr = tvb_get_guint8(tvb, offset+2);
+ trx_nr = tvb_get_guint8(tvb, offset+3);
+ ts_nr = tvb_get_guint8(tvb, offset+4);
+ 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);
+ proto_tree_add_item(fom_tree, hf_oml_fom_inst_bts, tvb, offset++, 1, FALSE);
+ proto_tree_add_item(fom_tree, hf_oml_fom_inst_trx, tvb, offset++, 1, FALSE);
+ proto_tree_add_item(fom_tree, hf_oml_fom_inst_ts, tvb, offset++, 1, FALSE);
+
+
+ /* dissect the TLV objects in the message body */
+ offset = dissect_oml_attrs(tvb, offset, pinfo, fom_tree);
+
+ return offset;
+}
+
+static const guint8 ipaccess_magic[] = "com.ipaccess";
+
+static int
+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)))
+ return offset;
+
+ offset += sizeof(ipaccess_magic) + 1;
+
+ return dissect_oml_fom(tvb, pinfo, tree, offset, top_ti);
+}
+
+static void
+dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ proto_item *ti;
+ proto_tree *oml_tree;
+
+ int offset = 0;
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OML");
+
+ top_tree = tree;
+ if (tree) {
+ u_int8_t msg_disc = tvb_get_guint8(tvb, offset);
+
+ ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, FALSE);
+ oml_tree = proto_item_add_subtree(ti, ett_oml);
+
+ proto_tree_add_item(oml_tree, hf_oml_msg_disc, tvb, offset++,
+ 1, TRUE);
+ proto_tree_add_item(oml_tree, hf_oml_placement, tvb, offset++,
+ 1, TRUE);
+ proto_tree_add_item(oml_tree, hf_oml_sequence, tvb, offset++,
+ 1, TRUE);
+ proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++,
+ 1, TRUE);
+
+ 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;
+ }
+ }
+}
+
+void
+proto_register_abis_oml(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_oml_msg_disc,
+ { "Message Discriminator", "oml.msg_dsc",
+ FT_UINT8, BASE_HEX, VALS(oml_msg_disc_vals), 0,
+ "GSM 12.21 Message Discriminator", HFILL }
+ },
+ { &hf_oml_placement,
+ { "Placement Indicator", "oml.placement",
+ FT_UINT8, BASE_HEX, VALS(oml_placement_vals), 0,
+ "GSM 12.21 Placement Indicator", HFILL }
+ },
+ { &hf_oml_sequence,
+ { "Sequence Number", "oml.sequence",
+ FT_UINT8, BASE_HEX, NULL, 0,