From 9b5f1d7b4399932ac83c0f1f14b192a25db8cf53 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 11 Jan 2011 16:33:52 +0100 Subject: wireshark: rebase the patches, rename and add a README Add a short README mentioning the svn version they apply to, how to rebase them in the future, and what they do. The renaming is done to add a hint on in which order to apply them. The abis_oml patch has been updated to some value_string changes in epan, all patches now add the new files to the CMakeLists.txt of epan as well. --- wireshark/0001-abis_oml.patch | 2492 +++++++++++++++++++++++++++++++++ wireshark/0002-ericsson_rbs2409.patch | 1929 +++++++++++++++++++++++++ wireshark/0003-lucent-hnb.patch | 149 ++ wireshark/0004-rsl-ipaccess.patch | 665 +++++++++ wireshark/README | 19 + wireshark/abis_oml.patch | 2473 -------------------------------- wireshark/ericsson_rbs2409.patch | 1894 ------------------------- wireshark/lucent-hnb.patch | 120 -- wireshark/rsl-ipaccess.patch | 664 --------- 9 files changed, 5254 insertions(+), 5151 deletions(-) create mode 100644 wireshark/0001-abis_oml.patch create mode 100644 wireshark/0002-ericsson_rbs2409.patch create mode 100644 wireshark/0003-lucent-hnb.patch create mode 100644 wireshark/0004-rsl-ipaccess.patch create mode 100644 wireshark/README delete mode 100644 wireshark/abis_oml.patch delete mode 100644 wireshark/ericsson_rbs2409.patch delete mode 100644 wireshark/lucent-hnb.patch delete mode 100644 wireshark/rsl-ipaccess.patch diff --git a/wireshark/0001-abis_oml.patch b/wireshark/0001-abis_oml.patch new file mode 100644 index 000000000..2d5b5d45a --- /dev/null +++ b/wireshark/0001-abis_oml.patch @@ -0,0 +1,2492 @@ +From c6c10dab54b9a667308004ab5c72dd08f52e4fc1 Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther +Date: Tue, 11 Jan 2011 15:08:42 +0100 +Subject: [PATCH 1/4] abis_oml + +Add the GSM ABIS OML dissector from OpenBSC +--- + epan/CMakeLists.txt | 1 + + epan/dissectors/Makefile.common | 1 + + epan/dissectors/packet-gsm_abis_oml.c | 1608 +++++++++++++++++++++++++++++++++ + epan/dissectors/packet-gsm_abis_oml.h | 830 +++++++++++++++++ + 4 files changed, 2440 insertions(+), 0 deletions(-) + create mode 100644 epan/dissectors/packet-gsm_abis_oml.c + create mode 100644 epan/dissectors/packet-gsm_abis_oml.h + +diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt +index a22406c..0b09335 100644 +--- a/epan/CMakeLists.txt ++++ b/epan/CMakeLists.txt +@@ -586,6 +586,7 @@ set(DISSECTOR_SRC + dissectors/packet-gsm_a_gm.c + dissectors/packet-gsm_a_rp.c + dissectors/packet-gsm_a_rr.c ++ dissectors/packet-gsm_abis_oml.c + dissectors/packet-gsm_ipa.c + dissectors/packet-gsm_bsslap.c + dissectors/packet-gsm_bssmap_le.c +diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common +index c496b36..7ce83b6 100644 +--- a/epan/dissectors/Makefile.common ++++ b/epan/dissectors/Makefile.common +@@ -496,6 +496,7 @@ DISSECTOR_SRC = \ + packet-gsm_a_gm.c \ + packet-gsm_a_rp.c \ + packet-gsm_a_rr.c \ ++ packet-gsm_abis_oml.c \ + packet-gsm_bsslap.c \ + packet-gsm_bssmap_le.c \ + packet-gsm_ipa.c \ +diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c +new file mode 100644 +index 0000000..f0b69e7 +--- /dev/null ++++ b/epan/dissectors/packet-gsm_abis_oml.c +@@ -0,0 +1,1608 @@ ++/* packet-abis_oml.c ++ * Routines for packet dissection of GSM A-bis over IP (3GPP TS 12.21) ++ * Copyright 2009-2010 by Harald Welte ++ * Copyright 2009 by Holger Hans Peter Freyther ++ * based on A-bis OML code in OpenBSC ++ * ++ * $Id$ ++ * ++ * Wireshark - Network traffic analyzer ++ * By Gerald Combs ++ * 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 ++ ++#include ++#include ++#include ++#include ++ ++#include "packet-gsm_abis_oml.h" ++#include "packet-gsm_a_common.h" ++ ++#include ++ ++/* 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; ++static int hf_attr_hsn = -1; ++static int hf_attr_maio = -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; ++ ++/* Decode things as nanoBTS traces */ ++static gboolean global_oml_use_nano_bts = TRUE; ++ ++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" }, ++}; ++ ++/* Standard Message Types as per 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" }, ++ { 0, NULL } ++}; ++ ++/* proprietary ip.access message types, not in the standard */ ++static const value_string _oml_fom_msgtype_vals_ipa[] = { ++ { 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" }, ++ { 0, NULL } ++}; ++ ++/* proprietary Siemens message types, not in the standard */ ++static const value_string _oml_fom_msgtype_vals_bs11[] = { ++ { 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_SET_ATTR, "SIE Set Attribute" }, ++ { NM_MT_BS11_SET_ATTR_ACK, "SIE Set Attribute ACK" }, ++ { NM_MT_BS11_SET_ATTR_NACK, "SIE Set Attribute 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" }, ++ { 0, NULL } ++}; ++ ++/* initialize with the standard message types only */ ++static value_string_ext oml_fom_msgtype_vse = VALUE_STRING_EXT_INIT(_oml_fom_msgtype_vals); ++ ++/* 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" }, ++ { 0, 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" }, ++ { 0, NULL } ++}; ++ ++static value_string_ext oml_fom_attr_vse = VALUE_STRING_EXT_INIT(_oml_fom_attr_vals); ++ ++/* proprietary Siemens attributes, not in the standard */ ++static const value_string oml_fom_attr_vals_bs11[] = { ++ { NM_ATT_BS11_OM_LAPD_REL_TIMER,"SIE OML LAPD Release Timer" }, ++ { NM_ATT_BS11_RF_RES_IND_PER, "SIE RF Resource Indication Period" }, ++ { NM_ATT_BS11_RX_LEV_MIN_CELL, "SIE RxLevel Min Cell" }, ++ { NM_ATT_BS11_ABIS_EXT_TIME, "SIE A-bis external time" }, ++ { NM_ATT_BS11_TIMER_HO_REQUEST, "SIE Timer Handover Request" }, ++ { NM_ATT_BS11_TIMER_NCELL, "SIE Timer nCell" }, ++ { NM_ATT_BS11_TSYNC, "SIE Timer Tsync" }, ++ { NM_ATT_BS11_TTRAU, "SIE Timer Ttrau" }, ++ { NM_ATT_BS11_EMRG_CFG_MEMBER, "SIE Emergency Config Member" }, ++ { NM_ATT_BS11_TRX_AREA, "SIE TRX Area" }, ++ { NM_ATT_BS11_BCCH_RECONF, "SIE BCCH Reconfiguration" }, ++ { NM_ATT_BS11_BIT_ERR_THESH, "SIE Bit Error Threshold" }, ++ { NM_ATT_BS11_BOOT_SW_VERS, "SIE Boot Software Version" }, ++ { NM_ATT_BS11_CCLK_ACCURACY, "SIE CCLK Accuracy" }, ++ { NM_ATT_BS11_CCLK_TYPE, "SIE CCLK Type" }, ++ { NM_ATT_BS11_INP_IMPEDANCE, "SIE Input Impedance" }, ++ { NM_ATT_BS11_L1_PROT_TYPE, "SIE L1 Protocol Type" }, ++ { NM_ATT_BS11_LINE_CFG, "SIE Line Configuration" }, ++ { NM_ATT_BS11_LI_PORT_1, "SIE Line Interface Port 1" }, ++ { NM_ATT_BS11_LI_PORT_2, "SIE Line Interface Port 2" }, ++ { NM_ATT_BS11_L1_REM_ALM_TYPE, "SIE L1 Remote Alarm Type" }, ++ { NM_ATT_BS11_SW_LOAD_INTENDED, "SIE Software Load Intended" }, ++ { NM_ATT_BS11_SW_LOAD_SAFETY, "SIE Software Load Safety" }, ++ { NM_ATT_BS11_SW_LOAD_STORED, "SIE Software Load Stored" }, ++ { NM_ATT_BS11_VENDOR_NAME, "SIE Vendor Name" }, ++ { NM_ATT_BS11_HOPPING_MODE, "SIE Hopping Mode" }, ++ { NM_ATT_BS11_LMT_LOGON_SESSION,"SIE LMT Logon Session" }, ++ { NM_ATT_BS11_LMT_LOGIN_TIME, "SIE LMT Login Time" }, ++ { NM_ATT_BS11_LMT_USER_ACC_LEV, "SIE LMT User Account Level" }, ++ { NM_ATT_BS11_LMT_USER_NAME, "SIE LMT User Account Name" }, ++ { NM_ATT_BS11_L1_CONTROL_TS, "SIE L1 Control TS" }, ++ { NM_ATT_BS11_RADIO_MEAS_GRAN, "SIE Radio Measurement Granularity" }, ++ { NM_ATT_BS11_RADIO_MEAS_REP, "SIE Rdadio Measurement Report" }, ++ { NM_ATT_BS11_SH_LAPD_INT_TIMER,"SIE LAPD Internal Timer" }, ++ { NM_ATT_BS11_BTS_STATE, "SIE BTS State" }, ++ { NM_ATT_BS11_E1_STATE, "SIE E1 State" }, ++ { NM_ATT_BS11_PLL, "SIE PLL" }, ++ { NM_ATT_BS11_RX_OFFSET, "SIE Rx Offset" }, ++ { NM_ATT_BS11_ANT_TYPE, "SIE Antenna Type" }, ++ { NM_ATT_BS11_PLL_MODE, "SIE PLL Mode" }, ++ { NM_ATT_BS11_PASSWORD, "SIE Password" }, ++ { 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" }, ++ { NM_ATT_BS11_ENA_INT_INTEC_HANDO, "SIE Enable Int Intec Handover" }, ++ { NM_ATT_BS11_ENA_INT_INTRC_HANDO, "SIE Enable Int Intrc Handover" }, ++ { 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" }, ++ { 0, NULL } ++}; ++ ++/* proprietary ip.access attributes, not in the standard */ ++static const value_string oml_fom_attr_vals_ipa[] = { ++ { 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" }, ++ { 0, NULL } ++}; ++ ++#if 0 ++static gint merge_value_strings(value_string **dst, const value_string *base, const value_string delta) ++{ ++ const value_string *cur; ++ guint num_base, num_delta, num_max, num_out; ++ ++ for (cur = base; cur->value || cur->strptr; cur++) ++ num_base++; ++ for (cur = delta; cur->value || cur->strptr; cur++) ++ num_delta++; ++ num_max = num_base + num_delta + 1; /* terminating entry */ ++ ++ *dst = g_malloc(sizeof(value_string) * num_max); ++ if (!*dst) ++ return -ENOMEM; ++ /* zero-initialize the entire array so we always are zero- ++ * terminated */ ++ memset(*dst, 0, sizeof(value_string * num_max)); ++ ++ /* initialize with the 'base' */ ++ memcpy(*dst, base, sizeof(value_string)*num_base); ++ num_out = num_base; ++ ++ /* patch/append the delta */ ++ for (cur = delta; cur->value || cur->strptr; cur++) { ++ guint idx; ++ if (match_strval_idx(cur->value, base, &idx)) { ++ /* the base set already contains a definition, ++ * we need to override it */ ++ memcpy((*dst)[idx], cur, sizeof(value_string)); ++ } else { ++ /* append the entry to the end */ ++ memcpy((*dst)[num_out], cur, sizeof(value_string)); ++ num_out++; ++ } ++ } ++ ++ return 0; ++} ++#endif ++ ++static const gchar * ++_match_oml_fom_msgtype(const guint32 val, const value_string_ext *vs, gint *idx) ++{ ++ const char *ret; ++ ret = match_strval_idx(val, vs->_vs_p, idx); ++ if (!ret) ++ ret = match_strval_idx(val, _oml_fom_msgtype_vals, idx); ++ return ret; ++} ++ ++static const gchar * ++_match_oml_fom_attr(const guint32 val, const value_string_ext *vs, gint *idx) ++{ ++ const char *ret; ++ ret = match_strval_idx(val, vs->_vs_p, idx); ++ if (!ret) ++ ret = match_strval_idx(val, _oml_fom_attr_vals, idx); ++ return ret; ++} ++ ++/* 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" }, ++ { 0, NULL } ++}; ++ ++static const value_string oml_oper_state_vals[] = { ++ { 1, "Disabled" }, ++ { 2, "Enabled" }, ++ { 0xff, "NULL" }, ++ { 0, 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" }, ++ { 0, NULL } ++}; ++ ++/* 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" }, ++ { 0, NULL } ++}; ++ ++/* 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" }, ++ { 0, NULL } ++}; ++ ++/* 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" }, ++ { 0, NULL } ++}; ++ ++/* 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" }, ++ { 0, 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" }, ++ { 0, NULL } ++}; ++ ++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" }, ++ { 0, NULL } ++}; ++ ++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" }, ++ { 0, NULL } ++}; ++ ++static const struct tlv_def * ++find_tlv_tag(guint8 tag) ++{ ++ const struct tlv_def *specific; ++ ++ if (global_oml_use_nano_bts) ++ specific = &nm_att_tlvdef_ipa.def[tag]; ++ else ++ specific = &nm_att_tlvdev_bs11.def[tag]; ++ ++ if (specific->type != TLV_TYPE_UNKNOWN) ++ return specific; ++ ++ return &nm_att_tlvdef_base.def[tag]; ++} ++ ++/* 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; ++ ++ 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; ++ guint16 len; ++ proto_item *ti; ++ proto_tree *att_tree; ++ ++ ie = tvb_get_guint8(tvb, offset); ++ len = tvb_get_ntohs(tvb, offset+1); ++ 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 = find_tlv_tag(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; ++ case TLV_TYPE_TLV16: ++ hlen = 2; ++ len_len = 1; ++ len = tvb_get_guint8(tvb, offset+1) * 2; ++ break; ++ case TLV_TYPE_UNKNOWN: /* fall through */ ++ 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, FALSE); ++ 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; ++ case NM_ATT_HSN: ++ proto_tree_add_item(att_tree, hf_attr_hsn, tvb, ++ offset, len, TRUE); ++ break; ++ case NM_ATT_MAIO: ++ proto_tree_add_item(att_tree, hf_attr_maio, tvb, ++ offset, len, TRUE); ++ break; ++ default: ++ proto_tree_add_item(att_tree, hf_oml_fom_attr_val, tvb, ++ offset, len, FALSE); ++ } ++ ++ if (global_oml_use_nano_bts) switch (tag) { ++ /* 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; ++ } ++ 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_ext(msg_type, &oml_fom_msgtype_vse, ++ "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_ext(msg_type, &oml_fom_msgtype_vse, ++ "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_reg_handoff_abis_oml(void); ++ ++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, ++ "Sequence Number (if multi-part msg)", HFILL } ++ }, ++ { &hf_oml_length, ++ { "Length Indicator", "oml.length", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Total length of payload", HFILL } ++ }, ++ { &hf_oml_fom_msgtype, ++ { "FOM Message Type", "oml.fom.msg_type", ++ FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&oml_fom_msgtype_vse), 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_objclass, ++ { "FOM Object Class", "oml.fom.obj_class", ++ FT_UINT8, BASE_HEX, VALS(oml_fom_objclass_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_inst_bts, ++ { "FOM Object Instance BTS", "oml.fom.obj_inst.bts", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_inst_trx, ++ { "FOM Object Instance TRX", "oml.fom.obj_inst.trx", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_inst_ts, ++ { "FOM Object Instance TS", "oml.fom.obj_inst.ts", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_attr_tag, ++ { "FOM Attribute ID", "oml.fom.attr_id", ++ FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&oml_fom_attr_vse), 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_attr_len, ++ { "FOM Attribute Length", "oml.fom.attr_len", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_oml_fom_attr_val, ++ { "FOM Attribute Value", "oml.fom.attr_val", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ ++ ++ ++ /* OML Attributes */ ++ { &hf_attr_adm_state, ++ { "Administrative State", "oml.fom.attr.adm_state", ++ 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, ++ NULL, HFILL } ++ }, ++ { &hf_attr_avail_state, ++ { "Availability Status", "oml.fom.attr.avail_state", ++ FT_UINT8, BASE_HEX, VALS(oml_avail_state_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_event_type, ++ { "Event Type", "oml.fom.attr.event_type", ++ FT_UINT8, BASE_HEX, VALS(oml_event_type_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_severity, ++ { "Severity", "oml.fom.attr.severity", ++ FT_UINT8, BASE_HEX, VALS(oml_severity_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_bcch_arfcn, ++ { "BCCH ARFCN", "oml.fom.attr.bcch_arfcn", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "ARFCN of the BCCH", HFILL } ++ }, ++ { &hf_attr_bsic, ++ { "BSIC", "oml.fom.attr.bsic", ++ FT_UINT16, BASE_HEX, NULL, 0, ++ "Base Station Identity Cdoe", HFILL } ++ }, ++ { &hf_attr_test_no, ++ { "Test Number", "oml.fom.attr.test_no", ++ FT_UINT8, BASE_HEX, VALS(oml_test_no_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_tsc, ++ { "TSC", "oml.fom.attr.tsc", ++ FT_UINT8, BASE_HEX, NULL, 0, ++ "Training Sequence Code", HFILL } ++ }, ++ { &hf_attr_tei, ++ { "TEI", "oml.fom.attr.tei", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_ach_btsp, ++ { "BTS E1 Port", "oml.fom.attr.abis_ch.bts_port", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_ach_tslot, ++ { "E1 Timeslot", "oml.fom.attr.abis_ch.timeslot", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_ach_sslot, ++ { "E1 Subslot", "oml.fom.attr.abis_ch.subslot", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_gsm_time, ++ { "GSM Time", "oml.fom.attr.gsm_time", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "GSM Time", HFILL } ++ }, ++ { &hf_attr_chan_comb, ++ { "Channel Combination", "oml.fom.attr.chan_comb", ++ FT_UINT8, BASE_HEX, VALS(oml_chan_comb_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_hsn, ++ { "HSN", "oml.fom.attr.hsn", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Hopping Sequence Number", HFILL } ++ }, ++ { &hf_attr_maio, ++ { "MAIO", "oml.fom.attr.maio", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Mobile Allocation Index Offset", HFILL } ++ }, ++ ++ /* IP Access */ ++ { &hf_oml_ipa_tres_attr_tag, ++ { "IPA Test Result Embedded IE", ++ "oml.fom.testrep.ipa_tag", ++ FT_UINT8, BASE_HEX, VALS(ipacc_testres_ie_vals), 0, ++ "Information Element embedded into the Test Result " ++ "of ip.access BTS", HFILL }, ++ }, ++ { &hf_oml_ipa_tres_attr_len, ++ { "IPA Test Result Embedded IE Length", ++ "oml.fom.testrep.ipa_len", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "Length of ip.access Test Result Embedded IE", HFILL } ++ }, ++ { &hf_attr_ipa_test_res, ++ { "IPA Test Result", "oml.fom.testrep.result", ++ FT_UINT8, BASE_DEC, VALS(ipacc_test_res_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_rxlev, ++ { "Rx Level", "oml.fom.testrep.ipa_rxlev", ++ FT_UINT16, BASE_DEC, NULL, 0xfc00, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_b_rxlev, ++ { "Rx Level", "oml.fom.testrep.ipa_rxlev_b", ++ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_arfcn, ++ { "ARFCN", "oml.fom.testrep.ipa_arfcn", ++ FT_UINT16, BASE_DEC, NULL, 0x03ff, "ARFCN", HFILL } ++ }, ++ { &hf_attr_ipa_tr_f_qual, ++ { "Frequency Quality", "oml.fom.testrep.ipa.freq_qual", ++ FT_UINT8, BASE_DEC, NULL, 0xfc, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_f_err, ++ { "Frequency Error", "oml.fom.testrep.ipa.freq_err", ++ FT_INT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_rxqual, ++ { "Rx Quality", "oml.fom.testrep.ipa.rx_qual", ++ FT_UINT8, BASE_DEC, NULL, 0x7, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_frame_offs, ++ { "Frame Offset", "oml.fom.testrep.ipa.frame_offset", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_framenr_offs, ++ { "Frame Number Offset", ++ "oml.fom.testrep.ipa.framenr_offset", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_bsic, ++ { "BSIC", "oml.fom.testrep.ipa.bsic", ++ FT_UINT8, BASE_DEC, NULL, 0x3f, ++ "Base Station Identity Code", HFILL } ++ }, ++ { &hf_attr_ipa_tr_cell_id, ++ { "Cell ID", "oml.fom.testrep.ipa.cell_id", ++ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_rsl_ip, ++ { "BSC RSL IP Address", "oml.fom.attr.ipa.rsl_ip", ++ FT_IPv4, BASE_NONE, NULL, 0, ++ "IP Address to which the BTS establishes " ++ "the RSL link", HFILL } ++ }, ++ { &hf_attr_ipa_rsl_port, ++ { "BSC RSL TCP Port", "oml.fom.attr.ipa.rsl_port", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "Port number to which the BST establishes " ++ "the RSL link", HFILL } ++ }, ++ { &hf_attr_ipa_prim_oml_ip, ++ { "Primary OML IP Address", ++ "oml.fom.attr.ipa.prim_oml_ip", ++ FT_IPv4, BASE_NONE, NULL, 0, ++ "IP Address of the BSC for the primary OML link", ++ HFILL } ++ }, ++ { &hf_attr_ipa_prim_oml_port, ++ { "Primary OML TCP Port", ++ "oml.fom.attr.ipa.prim_oml_port", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "TCP Port of the BSC for the primarly OML link", ++ HFILL } ++ }, ++ { &hf_attr_ipa_location_name, ++ { "Location Name", "oml.fom.attr.ipa.loc_name", ++ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_unit_name, ++ { "Unit Name", "oml.fom.attr.ipa.unit_name", ++ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_unit_id, ++ { "Unit ID", "oml.fom.attr.ipa.unit_id", ++ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nv_flags, ++ { "NVRAM Config Flags", "oml.fom.attr.ipa.nv_flags", ++ FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nv_mask, ++ { "NVRAM Config Mask", "oml.fom.attr.ipa.nv_mask", ++ FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_si2, ++ { "System Information 2", "oml.fom.attr.ipa.si2", ++ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_si2bis, ++ { "System Information 2bis", "oml.fom.attr.ipa.si2bis", ++ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_si2ter, ++ { "System Information 2ter", "oml.fom.attr.ipa.si2ter", ++ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_tr_chan_desc, ++ { "Cell Channel Description", ++ "oml.fom.attr.ipa.chan_desc", ++ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nsl_sport, ++ { "NS Link IP Source Port", ++ "oml.fom.attr.ipa.nsl_sport", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nsl_daddr, ++ { "NS Link IP Destination Addr", ++ "oml.fom.attr.ipa.nsl_daddr", ++ FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nsl_dport, ++ { "NS Link IP Destination Port", ++ "oml.fom.attr.ipa.nsl_dport", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nsei, ++ { "NSEI", "oml.fom.attr.ipa.nsei", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_nsvci, ++ { "NSVCI", "oml.fom.attr.ipa.nsvci", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_bvci, ++ { "BVCI", "oml.fom.attr.ipa.bvci", ++ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_attr_ipa_rac, ++ { "RAC", "oml.fom.attr.ipa.rac", ++ FT_UINT8, BASE_HEX, NULL, 0, ++ "Routing Area Code", HFILL } ++ }, ++ }; ++ static gint *ett[] = { ++ &ett_oml, ++ &ett_oml_fom, ++ &ett_oml_fom_att, ++ }; ++ ++ module_t *oml_module; ++ ++ /* assign our custom match functions */ ++ oml_fom_msgtype_vse._vs_match = _match_oml_fom_msgtype; ++ oml_fom_attr_vse._vs_match = _match_oml_fom_attr; ++ ++ proto_abis_oml = proto_register_protocol("GSM A-bis OML", "A-bis OML", ++ "gsm_abis_oml"); ++ ++ proto_register_field_array(proto_abis_oml, hf, array_length(hf)); ++ ++ proto_register_subtree_array(ett, array_length(ett)); ++ ++ register_dissector("gsm_abis_oml", dissect_abis_oml, proto_abis_oml); ++ ++ oml_module = prefs_register_protocol(proto_abis_oml, proto_reg_handoff_abis_oml); ++ prefs_register_bool_preference(oml_module, "use_ipaccess_oml", ++ "Use nanoBTS definitions", ++ "Use ipaccess nanoBTS specific definitions for OML", ++ &global_oml_use_nano_bts); ++} ++ ++/* This function is called once at startup and every time the user hits ++ * 'apply' in the preferences dialogue */ ++void ++proto_reg_handoff_abis_oml(void) ++{ ++ static gboolean initialized = FALSE; ++ ++ if (!initialized) { ++ dissector_handle_t abis_oml_handle; ++ ++ abis_oml_handle = create_dissector_handle(dissect_abis_oml, proto_abis_oml); ++ dissector_add("lapd.gsm.sapi", LAPD_GSM_SAPI_OM_PROC, abis_oml_handle); ++ ++ } else { ++ /* preferences have been changed */ ++ } ++ ++ if (global_oml_use_nano_bts == TRUE) { ++ /* initialize with nanobts definitions */ ++ oml_fom_msgtype_vse._vs_p = _oml_fom_msgtype_vals_ipa; ++ oml_fom_msgtype_vse._vs_num_entries = ++ array_length(_oml_fom_msgtype_vals_ipa)-1; ++ oml_fom_attr_vse._vs_p = oml_fom_attr_vals_ipa; ++ oml_fom_attr_vse._vs_num_entries = ++ array_length(oml_fom_attr_vals_ipa)-1; ++ } else { ++ /* initialize with BS11 defaults */ ++ oml_fom_msgtype_vse._vs_p = _oml_fom_msgtype_vals_bs11; ++ oml_fom_msgtype_vse._vs_num_entries = ++ array_length(_oml_fom_msgtype_vals_bs11)-1; ++ oml_fom_attr_vse._vs_p = oml_fom_attr_vals_bs11; ++ oml_fom_attr_vse._vs_num_entries = ++ array_length(oml_fom_attr_vals_bs11)-1; ++ } ++} +diff --git a/epan/dissectors/packet-gsm_abis_oml.h b/epan/dissectors/packet-gsm_abis_oml.h +new file mode 100644 +index 0000000..3cd2769 +--- /dev/null ++++ b/epan/dissectors/packet-gsm_abis_oml.h +@@ -0,0 +1,830 @@ ++/* 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 */ ++ ++/* (C) 2008-2009 by Harald Welte ++ * All Rights Reserved ++ * ++ * 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., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#ifndef __PACKET_ABIS_OML_H__ ++#define __PACKET_ABIS_OML_H__ ++ ++#include ++ ++/* From openbsc/include/openbsc/abis_nm.h */ ++ ++/* generic header in front of every OML message according to TS 08.59 */ ++struct abis_om_hdr { ++ guint8 mdisc; ++ guint8 placement; ++ guint8 sequence; ++ guint8 length; ++ guint8 data[0]; ++} __attribute__ ((packed)); ++ ++#define ABIS_OM_MDISC_FOM 0x80 ++#define ABIS_OM_MDISC_MMI 0x40 ++#define ABIS_OM_MDISC_TRAU 0x20 ++#define ABIS_OM_MDISC_MANUF 0x10 ++#define ABIS_OM_PLACEMENT_ONLY 0x80 ++#define ABIS_OM_PLACEMENT_FIRST 0x40 ++#define ABIS_OM_PLACEMENT_MIDDLE 0x20 ++#define ABIS_OM_PLACEMENT_LAST 0x10 ++ ++struct abis_om_obj_inst { ++ guint8 bts_nr; ++ guint8 trx_nr; ++ guint8 ts_nr; ++} __attribute__ ((packed)); ++ ++struct abis_om_fom_hdr { ++ guint8 msg_type; ++ guint8 obj_class; ++ struct abis_om_obj_inst obj_inst; ++ guint8 data[0]; ++} __attribute__ ((packed)); ++ ++#define ABIS_OM_FOM_HDR_SIZE (sizeof(struct abis_om_hdr) + sizeof(struct abis_om_fom_hdr)) ++ ++/* Section 9.1: Message Types */ ++enum abis_nm_msgtype { ++ /* SW Download Management Messages */ ++ NM_MT_LOAD_INIT = 0x01, ++ NM_MT_LOAD_INIT_ACK, ++ NM_MT_LOAD_INIT_NACK, ++ NM_MT_LOAD_SEG, ++ NM_MT_LOAD_SEG_ACK, ++ NM_MT_LOAD_ABORT, ++ NM_MT_LOAD_END, ++ NM_MT_LOAD_END_ACK, ++ NM_MT_LOAD_END_NACK, ++ NM_MT_SW_ACT_REQ, /* BTS->BSC */ ++ NM_MT_SW_ACT_REQ_ACK, ++ NM_MT_SW_ACT_REQ_NACK, ++ NM_MT_ACTIVATE_SW, /* BSC->BTS */ ++ NM_MT_ACTIVATE_SW_ACK, ++ NM_MT_ACTIVATE_SW_NACK, ++ NM_MT_SW_ACTIVATED_REP, /* 0x10 */ ++ /* A-bis Interface Management Messages */ ++ NM_MT_ESTABLISH_TEI = 0x21, ++ NM_MT_ESTABLISH_TEI_ACK, ++ NM_MT_ESTABLISH_TEI_NACK, ++ NM_MT_CONN_TERR_SIGN, ++ NM_MT_CONN_TERR_SIGN_ACK, ++ NM_MT_CONN_TERR_SIGN_NACK, ++ NM_MT_DISC_TERR_SIGN, ++ NM_MT_DISC_TERR_SIGN_ACK, ++ NM_MT_DISC_TERR_SIGN_NACK, ++ NM_MT_CONN_TERR_TRAF, ++ NM_MT_CONN_TERR_TRAF_ACK, ++ NM_MT_CONN_TERR_TRAF_NACK, ++ NM_MT_DISC_TERR_TRAF, ++ NM_MT_DISC_TERR_TRAF_ACK, ++ NM_MT_DISC_TERR_TRAF_NACK, ++ /* Transmission Management Messages */ ++ NM_MT_CONN_MDROP_LINK = 0x31, ++ NM_MT_CONN_MDROP_LINK_ACK, ++ NM_MT_CONN_MDROP_LINK_NACK, ++ NM_MT_DISC_MDROP_LINK, ++ NM_MT_DISC_MDROP_LINK_ACK, ++ NM_MT_DISC_MDROP_LINK_NACK, ++ /* Air Interface Management Messages */ ++ NM_MT_SET_BTS_ATTR = 0x41, ++ NM_MT_SET_BTS_ATTR_ACK, ++ NM_MT_SET_BTS_ATTR_NACK, ++ NM_MT_SET_RADIO_ATTR, ++ NM_MT_SET_RADIO_ATTR_ACK, ++ NM_MT_SET_RADIO_ATTR_NACK, ++ NM_MT_SET_CHAN_ATTR, ++ NM_MT_SET_CHAN_ATTR_ACK, ++ NM_MT_SET_CHAN_ATTR_NACK, ++ /* Test Management Messages */ ++ NM_MT_PERF_TEST = 0x51, ++ NM_MT_PERF_TEST_ACK, ++ NM_MT_PERF_TEST_NACK, ++ NM_MT_TEST_REP, ++ NM_MT_SEND_TEST_REP, ++ NM_MT_SEND_TEST_REP_ACK, ++ NM_MT_SEND_TEST_REP_NACK, ++ NM_MT_STOP_TEST, ++ NM_MT_STOP_TEST_ACK, ++ NM_MT_STOP_TEST_NACK, ++ /* State Management and Event Report Messages */ ++ NM_MT_STATECHG_EVENT_REP = 0x61, ++ NM_MT_FAILURE_EVENT_REP, ++ NM_MT_STOP_EVENT_REP, ++ NM_MT_STOP_EVENT_REP_ACK, ++ NM_MT_STOP_EVENT_REP_NACK, ++ NM_MT_REST_EVENT_REP, ++ NM_MT_REST_EVENT_REP_ACK, ++ NM_MT_REST_EVENT_REP_NACK, ++ NM_MT_CHG_ADM_STATE, ++ NM_MT_CHG_ADM_STATE_ACK, ++ NM_MT_CHG_ADM_STATE_NACK, ++ NM_MT_CHG_ADM_STATE_REQ, ++ NM_MT_CHG_ADM_STATE_REQ_ACK, ++ NM_MT_CHG_ADM_STATE_REQ_NACK, ++ NM_MT_REP_OUTST_ALARMS = 0x93, ++ NM_MT_REP_OUTST_ALARMS_ACK, ++ NM_MT_REP_OUTST_ALARMS_NACK, ++ /* Equipment Management Messages */ ++ NM_MT_CHANGEOVER = 0x71, ++ NM_MT_CHANGEOVER_ACK, ++ NM_MT_CHANGEOVER_NACK, ++ NM_MT_OPSTART, ++ NM_MT_OPSTART_ACK, ++ NM_MT_OPSTART_NACK, ++ NM_MT_REINIT, ++ NM_MT_REINIT_ACK, ++ NM_MT_REINIT_NACK, ++ NM_MT_SET_SITE_OUT, /* BS11: get alarm ?!? */ ++ NM_MT_SET_SITE_OUT_ACK, ++ NM_MT_SET_SITE_OUT_NACK, ++ NM_MT_CHG_HW_CONF = 0x90, ++ NM_MT_CHG_HW_CONF_ACK, ++ NM_MT_CHG_HW_CONF_NACK, ++ /* Measurement Management Messages */ ++ NM_MT_MEAS_RES_REQ = 0x8a, ++ NM_MT_MEAS_RES_RESP, ++ NM_MT_STOP_MEAS, ++ NM_MT_START_MEAS, ++ /* Other Messages */ ++ NM_MT_GET_ATTR = 0x81, ++ NM_MT_GET_ATTR_RESP, ++ NM_MT_GET_ATTR_NACK, ++ NM_MT_SET_ALARM_THRES, ++ NM_MT_SET_ALARM_THRES_ACK, ++ NM_MT_SET_ALARM_THRES_NACK, ++ ++ NM_MT_IPACC_RESTART = 0x87, ++ NM_MT_IPACC_RESTART_ACK, ++}; ++ ++enum abis_nm_msgtype_bs11 { ++ NM_MT_BS11_RESET_RESOURCE = 0x74, ++ ++ NM_MT_BS11_BEGIN_DB_TX = 0xa3, ++ NM_MT_BS11_BEGIN_DB_TX_ACK, ++ NM_MT_BS11_BEGIN_DB_TX_NACK, ++ NM_MT_BS11_END_DB_TX = 0xa6, ++ NM_MT_BS11_END_DB_TX_ACK, ++ NM_MT_BS11_END_DB_TX_NACK, ++ NM_MT_BS11_CREATE_OBJ = 0xa9, ++ NM_MT_BS11_CREATE_OBJ_ACK, ++ NM_MT_BS11_CREATE_OBJ_NACK, ++ NM_MT_BS11_DELETE_OBJ = 0xac, ++ NM_MT_BS11_DELETE_OBJ_ACK, ++ NM_MT_BS11_DELETE_OBJ_NACK, ++ ++ NM_MT_BS11_SET_ATTR = 0xd0, ++ NM_MT_BS11_SET_ATTR_ACK, ++ NM_MT_BS11_SET_ATTR_NACK, ++ NM_MT_BS11_LMT_SESSION = 0xdc, ++ ++ NM_MT_BS11_GET_STATE = 0xe3, ++ NM_MT_BS11_GET_STATE_ACK, ++ NM_MT_BS11_LMT_LOGON = 0xe5, ++ NM_MT_BS11_LMT_LOGON_ACK, ++ NM_MT_BS11_RESTART = 0xe7, ++ NM_MT_BS11_RESTART_ACK, ++ NM_MT_BS11_DISCONNECT = 0xe9, ++ NM_MT_BS11_DISCONNECT_ACK, ++ NM_MT_BS11_LMT_LOGOFF = 0xec, ++ NM_MT_BS11_LMT_LOGOFF_ACK, ++ NM_MT_BS11_RECONNECT = 0xf1, ++ NM_MT_BS11_RECONNECT_ACK, ++}; ++ ++enum abis_nm_msgtype_ipacc { ++ NM_MT_IPACC_RSL_CONNECT = 0xe0, ++ NM_MT_IPACC_RSL_CONNECT_ACK, ++ NM_MT_IPACC_RSL_CONNECT_NACK, ++ NM_MT_IPACC_RSL_DISCONNECT = 0xe3, ++ NM_MT_IPACC_RSL_DISCONNECT_ACK, ++ NM_MT_IPACC_RSL_DISCONNECT_NACK, ++ NM_MT_IPACC_CONN_TRAF = 0xe6, ++ NM_MT_IPACC_CONN_TRAF_ACK, ++ NM_MT_IPACC_CONN_TRAF_NACK, ++ NM_MT_IPACC_DISC_TRAF = 0xe9, ++ NM_MT_IPACC_DISC_TRAF_ACK, ++ NM_MT_IPACC_DISC_TRAF_NACK, ++ NM_MT_IPACC_DEF_BOOT_SW = 0xec, ++ NM_MT_IPACC_DEF_BOOT_SW_ACK, ++ NM_MT_IPACC_DEF_BOOT_SW_NACK, ++ NM_MT_IPACC_SET_NVATTR = 0xef, ++ NM_MT_IPACC_SET_NVATTR_ACK, ++ NM_MT_IPACC_SET_NVATTR_NACK, ++ NM_MT_IPACC_GET_NVATTR = 0xf2, ++ NM_MT_IPACC_GET_NVATTR_ACK, ++ NM_MT_IPACC_GET_NVATTR_NACK, ++ NM_MT_IPACC_SET_ATTR = 0xf5, ++ NM_MT_IPACC_SET_ATTR_ACK, ++ NM_MT_IPACC_SET_ATTR_NACK, ++ NM_MT_IPACC_ATTR_CHG_EVT = 0xf8, ++ NM_MT_IPACC_SW_DEACT = 0xf9, ++ NM_MT_IPACC_SW_DEACT_ACK, ++ NM_MT_IPACC_SW_DEACT_NACK, ++ NM_MT_IPACC_MEAS_RES_REQ_NACK = 0xfc, ++ NM_MT_IPACC_START_MEAS_NACK, ++ NM_MT_IPACC_STOP_MEAS_NACK, ++}; ++ ++enum abis_nm_bs11_cell_alloc { ++ NM_BS11_CANR_GSM = 0x00, ++ NM_BS11_CANR_DCS1800 = 0x01, ++}; ++ ++/* Section 9.2: Object Class */ ++enum abis_nm_obj_class { ++ NM_OC_SITE_MANAGER = 0x00, ++ NM_OC_BTS, ++ NM_OC_RADIO_CARRIER, ++ NM_OC_CHANNEL, ++ NM_OC_BASEB_TRANSC, ++ /* RFU: 05-FE */ ++ NM_OC_BS11_ADJC = 0xa0, ++ NM_OC_BS11_HANDOVER = 0xa1, ++ NM_OC_BS11_PWR_CTRL = 0xa2, ++ NM_OC_BS11_BTSE = 0xa3, /* LMT? */ ++ NM_OC_BS11_RACK = 0xa4, ++ NM_OC_BS11 = 0xa5, /* 01: ALCO */ ++ NM_OC_BS11_TEST = 0xa6, ++ NM_OC_BS11_ENVABTSE = 0xa8, ++ NM_OC_BS11_BPORT = 0xa9, ++ ++ NM_OC_GPRS_NSE = 0xf0, ++ NM_OC_GPRS_CELL = 0xf1, ++ NM_OC_GPRS_NSVC0 = 0xf2, ++ NM_OC_GPRS_NSVC1 = 0xf3, ++ ++ NM_OC_NULL = 0xff, ++}; ++ ++/* Section 9.4: Attributes */ ++enum abis_nm_attr { ++ NM_ATT_ABIS_CHANNEL = 0x01, ++ NM_ATT_ADD_INFO, ++ NM_ATT_ADD_TEXT, ++ NM_ATT_ADM_STATE, ++ NM_ATT_ARFCN_LIST, ++ NM_ATT_AUTON_REPORT, ++ NM_ATT_AVAIL_STATUS, ++ NM_ATT_BCCH_ARFCN, ++ NM_ATT_BSIC, ++ NM_ATT_BTS_AIR_TIMER, ++ NM_ATT_CCCH_L_I_P, ++ NM_ATT_CCCH_L_T, ++ NM_ATT_CHAN_COMB, ++ NM_ATT_CONN_FAIL_CRIT, ++ NM_ATT_DEST, ++ /* res */ ++ NM_ATT_EVENT_TYPE = 0x11, /* BS11: file data ?!? */ ++ NM_ATT_FILE_ID, ++ NM_ATT_FILE_VERSION, ++ NM_ATT_GSM_TIME, ++ NM_ATT_HSN, ++ NM_ATT_HW_CONFIG, ++ NM_ATT_HW_DESC, ++ NM_ATT_INTAVE_PARAM, ++ NM_ATT_INTERF_BOUND, ++ NM_ATT_LIST_REQ_ATTR, ++ NM_ATT_MAIO, ++ NM_ATT_MANUF_STATE, ++ NM_ATT_MANUF_THRESH, ++ NM_ATT_MANUF_ID, ++ NM_ATT_MAX_TA, ++ NM_ATT_MDROP_LINK, /* 0x20 */ ++ NM_ATT_MDROP_NEXT, ++ NM_ATT_NACK_CAUSES, ++ NM_ATT_NY1, ++ NM_ATT_OPER_STATE, ++ NM_ATT_OVERL_PERIOD, ++ NM_ATT_PHYS_CONF, ++ NM_ATT_POWER_CLASS, ++ NM_ATT_POWER_THRESH, ++ NM_ATT_PROB_CAUSE, ++ NM_ATT_RACH_B_THRESH, ++ NM_ATT_LDAVG_SLOTS, ++ NM_ATT_RAD_SUBC, ++ NM_ATT_RF_MAXPOWR_R, ++ NM_ATT_SITE_INPUTS, ++ NM_ATT_SITE_OUTPUTS, ++ NM_ATT_SOURCE, /* 0x30 */ ++ NM_ATT_SPEC_PROB, ++ NM_ATT_START_TIME, ++ NM_ATT_T200, ++ NM_ATT_TEI, ++ NM_ATT_TEST_DUR, ++ NM_ATT_TEST_NO, ++ NM_ATT_TEST_REPORT, ++ NM_ATT_VSWR_THRESH, ++ NM_ATT_WINDOW_SIZE, ++ /* Res */ ++ NM_ATT_BS11_RSSI_OFFS = 0x3d, ++ NM_ATT_BS11_TXPWR = 0x3e, ++ NM_ATT_BS11_DIVERSITY = 0x3f, ++ /* Res */ ++ NM_ATT_TSC = 0x40, ++ NM_ATT_SW_CONFIG, ++ NM_ATT_SW_DESCR, ++ NM_ATT_SEVERITY, ++ NM_ATT_GET_ARI, ++ NM_ATT_HW_CONF_CHG, ++ NM_ATT_OUTST_ALARM, ++ NM_ATT_FILE_DATA, ++ NM_ATT_MEAS_RES, ++ NM_ATT_MEAS_TYPE, ++}; ++ ++enum abis_nm_attr_bs11 { ++ NM_ATT_BS11_OM_LAPD_REL_TIMER = 0x02, ++ NM_ATT_BS11_EMERG_TIMER1 = 0x42, ++ NM_ATT_BS11_EMERG_TIMER2 = 0x44, ++ NM_ATT_BS11_ESN_FW_CODE_NO = 0x4c, ++ NM_ATT_BS11_ESN_HW_CODE_NO = 0x4f, ++ ++ NM_ATT_BS11_FILE_DATA = NM_ATT_EVENT_TYPE, ++ ++ NM_ATT_BS11_ESN_PCB_SERIAL = 0x55, ++ NM_ATT_BS11_EXCESSIVE_DISTANCE = 0x58, ++ ++ NM_ATT_BS11_ALL_TEST_CATG = 0x60, ++ NM_ATT_BS11_BTSLS_HOPPING, ++ NM_ATT_BS11_CELL_ALLOC_NR, ++ NM_ATT_BS11_CELL_GLOBAL_ID, ++ NM_ATT_BS11_ENA_INTERF_CLASS = 0x66, ++ NM_ATT_BS11_ENA_INT_INTEC_HANDO = 0x67, ++ NM_ATT_BS11_ENA_INT_INTRC_HANDO = 0x68, ++ NM_ATT_BS11_ENA_MS_PWR_CTRL = 0x69, ++ NM_ATT_BS11_ENA_PWR_BDGT_HO = 0x6a, ++ NM_ATT_BS11_ENA_PWR_CTRL_RLFW = 0x6b, ++ NM_ATT_BS11_ENA_RXLEV_HO = 0x6c, ++ NM_ATT_BS11_ENA_RXQUAL_HO = 0x6d, ++ NM_ATT_BS11_FACCH_QUAL = 0x6e, ++ ++ NM_ATT_BS11_RF_RES_IND_PER = 0x8f, ++ ++ NM_ATT_BS11_RX_LEV_MIN_CELL = 0x90, ++ NM_ATT_BS11_ABIS_EXT_TIME = 0x91, ++ NM_ATT_BS11_TIMER_HO_REQUEST = 0x92, ++ NM_ATT_BS11_TIMER_NCELL = 0x93, ++ NM_ATT_BS11_TSYNC = 0x94, ++ NM_ATT_BS11_TTRAU = 0x95, ++ NM_ATT_BS11_EMRG_CFG_MEMBER = 0x9b, ++ NM_ATT_BS11_TRX_AREA = 0x9f, ++ ++ NM_ATT_BS11_BCCH_RECONF = 0xd7, ++ NM_ATT_BS11_BIT_ERR_THESH = 0xa0, ++ NM_ATT_BS11_BOOT_SW_VERS = 0xa1, ++ NM_ATT_BS11_CCLK_ACCURACY = 0xa3, ++ NM_ATT_BS11_CCLK_TYPE = 0xa4, ++ NM_ATT_BS11_INP_IMPEDANCE = 0xaa, ++ NM_ATT_BS11_L1_PROT_TYPE = 0xab, ++ NM_ATT_BS11_LINE_CFG = 0xac, ++ NM_ATT_BS11_LI_PORT_1 = 0xad, ++ NM_ATT_BS11_LI_PORT_2 = 0xae, ++ ++ NM_ATT_BS11_L1_REM_ALM_TYPE = 0xb0, ++ NM_ATT_BS11_SW_LOAD_INTENDED = 0xbb, ++ NM_ATT_BS11_SW_LOAD_SAFETY = 0xbc, ++ NM_ATT_BS11_SW_LOAD_STORED = 0xbd, ++ ++ NM_ATT_BS11_VENDOR_NAME = 0xc1, ++ NM_ATT_BS11_HOPPING_MODE = 0xc5, ++ NM_ATT_BS11_LMT_LOGON_SESSION = 0xc6, ++ NM_ATT_BS11_LMT_LOGIN_TIME = 0xc7, ++ NM_ATT_BS11_LMT_USER_ACC_LEV = 0xc8, ++ NM_ATT_BS11_LMT_USER_NAME = 0xc9, ++ ++ NM_ATT_BS11_L1_CONTROL_TS = 0xd8, ++ NM_ATT_BS11_RADIO_MEAS_GRAN = 0xdc, /* in SACCH multiframes */ ++ NM_ATT_BS11_RADIO_MEAS_REP = 0xdd, ++ ++ NM_ATT_BS11_SH_LAPD_INT_TIMER = 0xe8, ++ ++ NM_ATT_BS11_BTS_STATE = 0xf0, ++ NM_ATT_BS11_E1_STATE = 0xf1, ++ NM_ATT_BS11_PLL = 0xf2, ++ NM_ATT_BS11_RX_OFFSET = 0xf3, ++ NM_ATT_BS11_ANT_TYPE = 0xf4, ++ NM_ATT_BS11_PLL_MODE = 0xfc, ++ NM_ATT_BS11_PASSWORD = 0xfd, ++}; ++ ++enum abis_nm_attr_ipa { ++ NM_ATT_IPACC_DST_IP = 0x80, ++ NM_ATT_IPACC_DST_IP_PORT = 0x81, ++ NM_ATT_IPACC_SSRC = 0x82, /* RTP Sync Source */ ++ NM_ATT_IPACC_RTP_PAYLD_TYPE = 0x83, ++ NM_ATT_IPACC_BASEB_ID = 0x84, ++ NM_ATT_IPACC_STREAM_ID = 0x85, ++ NM_ATT_IPACC_NV_FLAGS = 0x86, ++ NM_ATT_IPACC_FREQ_CTRL = 0x87, ++ NM_ATT_IPACC_PRIM_OML_CFG = 0x88, ++ NM_ATT_IPACC_SEC_OML_CFG = 0x89, ++ NM_ATT_IPACC_IP_IF_CFG = 0x8a, /* IP interface */ ++ NM_ATT_IPACC_IP_GW_CFG = 0x8b, /* IP gateway */ ++ NM_ATT_IPACC_IN_SERV_TIME = 0x8c, ++ NM_ATT_IPACC_TRX_BTS_ASS = 0x8d, ++ NM_ATT_IPACC_LOCATION = 0x8e, /* string describing location */ ++ NM_ATT_IPACC_PAGING_CFG = 0x8f, ++ NM_ATT_IPACC_FILE_DATA = 0x90, ++ NM_ATT_IPACC_UNIT_ID = 0x91, /* Site/BTS/TRX */ ++ NM_ATT_IPACC_PARENT_UNIT_ID = 0x92, ++ NM_ATT_IPACC_UNIT_NAME = 0x93, /* default: nbts- */ ++ NM_ATT_IPACC_SNMP_CFG = 0x94, ++ NM_ATT_IPACC_PRIM_OML_CFG_LIST = 0x95, ++ NM_ATT_IPACC_PRIM_OML_FB_TOUT = 0x96, /* fallback timeout */ ++ NM_ATT_IPACC_CUR_SW_CFG = 0x97, ++ NM_ATT_IPACC_TIMING_BUS = 0x98, ++ NM_ATT_IPACC_CGI = 0x99, /* Cell Global ID */ ++ NM_ATT_IPACC_RAC = 0x9a, ++ NM_ATT_IPACC_OBJ_VERSION = 0x9b, ++ NM_ATT_IPACC_GPRS_PAGING_CFG = 0x9c, ++ NM_ATT_IPACC_NSEI = 0x9d, ++ NM_ATT_IPACC_BVCI = 0x9e, ++ NM_ATT_IPACC_NSVCI = 0x9f, ++ NM_ATT_IPACC_NS_CFG = 0xa0, ++ NM_ATT_IPACC_BSSGP_CFG = 0xa1, ++ NM_ATT_IPACC_NS_LINK_CFG = 0xa2, ++ NM_ATT_IPACC_RLC_CFG = 0xa3, ++ NM_ATT_IPACC_ALM_THRESH_LIST = 0xa4, ++ NM_ATT_IPACC_MONIT_VAL_LIST = 0xa5, ++ NM_ATT_IPACC_TIB_CONTROL = 0xa6, ++ NM_ATT_IPACC_SUPP_FEATURES = 0xa7, ++ NM_ATT_IPACC_CODING_SCHEMES = 0xa8, ++ NM_ATT_IPACC_RLC_CFG_2 = 0xa9, ++ NM_ATT_IPACC_HEARTB_TOUT = 0xaa, ++ NM_ATT_IPACC_UPTIME = 0xab, ++ NM_ATT_IPACC_RLC_CFG_3 = 0xac, ++ NM_ATT_IPACC_SSL_CFG = 0xad, ++ NM_ATT_IPACC_SEC_POSSIBLE = 0xae, ++ NM_ATT_IPACC_IML_SSL_STATE = 0xaf, ++ NM_ATT_IPACC_REVOC_DATE = 0xb0, ++}; ++ ++/* Section 9.4.4: Administrative State */ ++enum abis_nm_adm_state { ++ NM_STATE_LOCKED = 0x01, ++ NM_STATE_UNLOCKED = 0x02, ++ NM_STATE_SHUTDOWN = 0x03, ++ NM_STATE_NULL = 0xff, ++}; ++ ++/* Section 9.4.13: Channel Combination */ ++enum abis_nm_chan_comb { ++ NM_CHANC_TCHFull = 0x00, ++ NM_CHANC_TCHHalf = 0x01, ++ NM_CHANC_TCHHalf2 = 0x02, ++ NM_CHANC_SDCCH = 0x03, ++ NM_CHANC_mainBCCH = 0x04, ++ NM_CHANC_BCCHComb = 0x05, ++ NM_CHANC_BCCH = 0x06, ++ NM_CHANC_BCCH_CBCH = 0x07, ++ NM_CHANC_SDCCH_CBCH = 0x08, ++}; ++ ++/* Section 9.4.16: Event Type */ ++enum abis_nm_event_type { ++ NM_EVT_COMM_FAIL = 0x00, ++ NM_EVT_QOS_FAIL = 0x01, ++ NM_EVT_PROC_FAIL = 0x02, ++ NM_EVT_EQUIP_FAIL = 0x03, ++ NM_EVT_ENV_FAIL = 0x04, ++}; ++ ++/* Section: 9.4.63: Perceived Severity */ ++enum abis_nm_severity { ++ NM_SEVER_CEASED = 0x00, ++ NM_SEVER_CRITICAL = 0x01, ++ NM_SEVER_MAJOR = 0x02, ++ NM_SEVER_MINOR = 0x03, ++ NM_SEVER_WARNING = 0x04, ++ NM_SEVER_INDETERMINATE = 0x05, ++}; ++ ++/* Section 9.4.43: Probable Cause Type */ ++enum abis_nm_pcause_type { ++ NM_PCAUSE_T_X721 = 0x01, ++ NM_PCAUSE_T_GSM = 0x02, ++ NM_PCAUSE_T_MANUF = 0x03, ++}; ++ ++/* Section 9.4.36: NACK Causes */ ++enum abis_nm_nack_cause { ++ /* General Nack Causes */ ++ NM_NACK_INCORR_STRUCT = 0x01, ++ NM_NACK_MSGTYPE_INVAL = 0x02, ++ NM_NACK_OBJCLASS_INVAL = 0x05, ++ NM_NACK_OBJCLASS_NOTSUPP = 0x06, ++ NM_NACK_BTSNR_UNKN = 0x07, ++ NM_NACK_TRXNR_UNKN = 0x08, ++ NM_NACK_OBJINST_UNKN = 0x09, ++ NM_NACK_ATTRID_INVAL = 0x0c, ++ NM_NACK_ATTRID_NOTSUPP = 0x0d, ++ NM_NACK_PARAM_RANGE = 0x0e, ++ NM_NACK_ATTRLIST_INCONSISTENT = 0x0f, ++ NM_NACK_SPEC_IMPL_NOTSUPP = 0x10, ++ NM_NACK_CANT_PERFORM = 0x11, ++ /* Specific Nack Causes */ ++ NM_NACK_RES_NOTIMPL = 0x19, ++ NM_NACK_RES_NOTAVAIL = 0x1a, ++ NM_NACK_FREQ_NOTAVAIL = 0x1b, ++ NM_NACK_TEST_NOTSUPP = 0x1c, ++ NM_NACK_CAPACITY_RESTR = 0x1d, ++ NM_NACK_PHYSCFG_NOTPERFORM = 0x1e, ++ NM_NACK_TEST_NOTINIT = 0x1f, ++ NM_NACK_PHYSCFG_NOTRESTORE = 0x20, ++ NM_NACK_TEST_NOSUCH = 0x21, ++ NM_NACK_TEST_NOSTOP = 0x22, ++ NM_NACK_MSGINCONSIST_PHYSCFG = 0x23, ++ NM_NACK_FILE_INCOMPLETE = 0x25, ++ NM_NACK_FILE_NOTAVAIL = 0x26, ++ NM_NACK_FILE_NOTACTIVATE = 0x27, ++ NM_NACK_REQ_NOT_GRANT = 0x28, ++ NM_NACK_WAIT = 0x29, ++ NM_NACK_NOTH_REPORT_EXIST = 0x2a, ++ NM_NACK_MEAS_NOTSUPP = 0x2b, ++ NM_NACK_MEAS_NOTSTART = 0x2c, ++}; ++ ++/* Section 9.4.1 */ ++struct abis_nm_channel { ++ guint8 attrib; ++ guint8 bts_port; ++ guint8 timeslot; ++ guint8 subslot; ++} __attribute__ ((packed)); ++ ++/* Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ ++enum abis_bs11_objtype { ++ BS11_OBJ_ALCO = 0x01, ++ BS11_OBJ_BBSIG = 0x02, /* obj_class: 0,1 */ ++ BS11_OBJ_TRX1 = 0x03, /* only DEACTIVATE TRX1 */ ++ BS11_OBJ_CCLK = 0x04, ++ BS11_OBJ_GPSU = 0x06, ++ BS11_OBJ_LI = 0x07, ++ BS11_OBJ_PA = 0x09, /* obj_class: 0, 1*/ ++}; ++ ++enum abis_bs11_trx_power { ++ BS11_TRX_POWER_GSM_2W = 0x06, ++ BS11_TRX_POWER_GSM_250mW= 0x07, ++ BS11_TRX_POWER_GSM_80mW = 0x08, ++ BS11_TRX_POWER_GSM_30mW = 0x09, ++ BS11_TRX_POWER_DCS_3W = 0x0a, ++ BS11_TRX_POWER_DCS_1W6 = 0x0b, ++ BS11_TRX_POWER_DCS_500mW= 0x0c, ++ BS11_TRX_POWER_DCS_160mW= 0x0d, ++}; ++ ++enum abis_bs11_li_pll_mode { ++ BS11_LI_PLL_LOCKED = 2, ++ BS11_LI_PLL_STANDALONE = 3, ++}; ++ ++enum abis_bs11_phase { ++ BS11_STATE_SOFTWARE_RQD = 0x01, ++ BS11_STATE_LOAD_SMU_INTENDED = 0x11, ++ BS11_STATE_LOAD_SMU_SAFETY = 0x21, ++ BS11_STATE_LOAD_FAILED = 0x31, ++ BS11_STATE_LOAD_DIAGNOSTIC = 0x41, ++ BS11_STATE_WARM_UP = 0x51, ++ BS11_STATE_WARM_UP_2 = 0x52, ++ BS11_STATE_WAIT_MIN_CFG = 0x62, ++ BS11_STATE_MAINTENANCE = 0x72, ++ BS11_STATE_LOAD_MBCCU = 0x92, ++ BS11_STATE_WAIT_MIN_CFG_2 = 0xA2, ++ BS11_STATE_NORMAL = 0x03, ++ BS11_STATE_ABIS_LOAD = 0x13, ++}; ++ ++/* From openbsc/include/openbsc/tlv.h */ ++enum tlv_type { ++ TLV_TYPE_UNKNOWN, ++ TLV_TYPE_FIXED, ++ TLV_TYPE_T, ++ TLV_TYPE_TV, ++ TLV_TYPE_TLV, ++ TLV_TYPE_TL16V, ++ TLV_TYPE_TLV16, ++}; ++ ++struct tlv_def { ++ enum tlv_type type; ++ u_int8_t fixed_len; ++}; ++ ++struct tlv_definition { ++ struct tlv_def def[0xff]; ++}; ++ ++enum abis_nm_ipacc_test_no { ++ NM_IPACC_TESTNO_RLOOP_ANT = 0x01, ++ NM_IPACC_TESTNO_RLOOP_XCVR = 0x02, ++ NM_IPACC_TESTNO_FUNC_OBJ = 0x03, ++ NM_IPACC_TESTNO_CHAN_USAGE = 0x40, ++ NM_IPACC_TESTNO_BCCH_CHAN_USAGE = 0x41, ++ NM_IPACC_TESTNO_FREQ_SYNC = 0x42, ++ NM_IPACC_TESTNO_BCCH_INFO = 0x43, ++ NM_IPACC_TESTNO_TX_BEACON = 0x44, ++ NM_IPACC_TESTNO_SYSINFO_MONITOR = 0x45, ++ NM_IPACC_TESTNO_BCCCH_MONITOR = 0x46, ++}; ++ ++/* first byte after length inside NM_ATT_TEST_REPORT */ ++enum abis_nm_ipacc_test_res { ++ NM_IPACC_TESTRES_SUCCESS = 0, ++ NM_IPACC_TESTRES_TIMEOUT = 1, ++ NM_IPACC_TESTRES_NO_CHANS = 2, ++ NM_IPACC_TESTRES_PARTIAL = 3, ++ NM_IPACC_TESTRES_STOPPED = 4, ++}; ++ ++/* internal IE inside NM_ATT_TEST_REPORT */ ++enum abis_nm_ipacc_testres_ie { ++ NM_IPACC_TR_IE_FREQ_ERR_LIST = 3, ++ NM_IPACC_TR_IE_CHAN_USAGE = 4, ++ NM_IPACC_TR_IE_BCCH_INFO = 6, ++ NM_IPACC_TR_IE_RESULT_DETAILS = 8, ++ NM_IPACC_TR_IE_FREQ_ERR = 18, ++}; ++ ++/* From openbsc/src/abis_nm.c */ ++static const struct tlv_definition nm_att_tlvdef_base = { ++ .def = { ++ [NM_ATT_ABIS_CHANNEL] = { TLV_TYPE_FIXED, 3 }, ++ [NM_ATT_ADD_INFO] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_ADD_TEXT] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_ADM_STATE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_ARFCN_LIST]= { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_AUTON_REPORT] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_AVAIL_STATUS] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_BCCH_ARFCN] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_BSIC] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_BTS_AIR_TIMER] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_CCCH_L_I_P] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_CCCH_L_T] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_CHAN_COMB] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_CONN_FAIL_CRIT] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_DEST] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_EVENT_TYPE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_FILE_ID] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_FILE_VERSION] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_GSM_TIME] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_HSN] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_HW_CONFIG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_HW_DESC] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_INTAVE_PARAM] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_INTERF_BOUND] = { TLV_TYPE_FIXED, 6 }, ++ [NM_ATT_LIST_REQ_ATTR] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_MAIO] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_MANUF_STATE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_MANUF_THRESH] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_MANUF_ID] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_MAX_TA] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_MDROP_LINK] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_MDROP_NEXT] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_NACK_CAUSES] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_NY1] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_OPER_STATE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_OVERL_PERIOD] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_PHYS_CONF] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_POWER_CLASS] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_POWER_THRESH] = { TLV_TYPE_FIXED, 3 }, ++ [NM_ATT_PROB_CAUSE] = { TLV_TYPE_FIXED, 3 }, ++ [NM_ATT_RACH_B_THRESH] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_LDAVG_SLOTS] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_RAD_SUBC] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_RF_MAXPOWR_R] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_SITE_INPUTS] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_SITE_OUTPUTS] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_SOURCE] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_SPEC_PROB] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_START_TIME] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_T200] = { TLV_TYPE_FIXED, 7 }, ++ [NM_ATT_TEI] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_TEST_DUR] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_TEST_NO] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_TEST_REPORT] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_VSWR_THRESH] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_WINDOW_SIZE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_TSC] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_SW_CONFIG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_SEVERITY] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_GET_ARI] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_HW_CONF_CHG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_OUTST_ALARM] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_FILE_DATA] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_MEAS_RES] = { TLV_TYPE_TL16V, 0 }, ++ ++ }, ++}; ++ ++/* BS11 specifics */ ++static const struct tlv_definition nm_att_tlvdev_bs11 = { ++ .def = { ++ /* different stndard IEs */ ++ [NM_ATT_OUTST_ALARM] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_HW_DESC] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_ARFCN_LIST]= { TLV_TYPE_TLV16, 0 }, ++ ++ /* proprietary IEs */ ++ [NM_ATT_BS11_ABIS_EXT_TIME] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_OM_LAPD_REL_TIMER]={ TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_BS11_SH_LAPD_INT_TIMER]={ TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_EMERG_TIMER1] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_EMERG_TIMER2] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_BTSLS_HOPPING] = { TLV_TYPE_FIXED, 1 }, ++ [NM_ATT_BS11_CELL_ALLOC_NR] = { TLV_TYPE_FIXED, 1 }, ++ [NM_ATT_BS11_ENA_INTERF_CLASS]= { TLV_TYPE_FIXED, 1 }, ++ [NM_ATT_BS11_FACCH_QUAL] = { TLV_TYPE_FIXED, 1 }, ++ [NM_ATT_BS11_TSYNC] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_BS11_TTRAU] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_BS11_EXCESSIVE_DISTANCE] = { TLV_TYPE_TLV, 1 }, ++ [NM_ATT_BS11_HOPPING_MODE] = { TLV_TYPE_TLV, 1 }, ++ [NM_ATT_BS11_RF_RES_IND_PER] = { TLV_TYPE_FIXED, 1 }, ++ [NM_ATT_BS11_RADIO_MEAS_GRAN] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_RADIO_MEAS_REP] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_EMRG_CFG_MEMBER] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_TRX_AREA] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_ESN_FW_CODE_NO] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_ESN_HW_CODE_NO] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_ESN_PCB_SERIAL] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_BOOT_SW_VERS] = { TLV_TYPE_TLV, 0 }, ++ [0x59] = { TLV_TYPE_TLV, 0 }, ++ [0xd5] = { TLV_TYPE_TLV, 0 }, ++ [0xa8] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_PASSWORD] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_TXPWR] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_RSSI_OFFS] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_LINE_CFG] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_BS11_L1_PROT_TYPE] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_BS11_BIT_ERR_THESH] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_BS11_DIVERSITY] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_LMT_LOGON_SESSION]={ TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_LMT_LOGIN_TIME] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_LMT_USER_ACC_LEV] ={ TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_LMT_USER_NAME] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_BTS_STATE] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_E1_STATE] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_PLL_MODE] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_PLL] = { TLV_TYPE_TLV, 0 }, ++ [NM_ATT_BS11_CCLK_ACCURACY] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_BS11_CCLK_TYPE] = { TLV_TYPE_TV, 0 }, ++ }, ++}; ++ ++/* ip.access specifics */ ++static const struct tlv_definition nm_att_tlvdef_ipa = { ++ .def = { ++ [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, ++ [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_IPACC_PRIM_OML_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, ++ [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, ++ [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, ++ [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, 0 }, ++ [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_GPRS_PAGING_CFG] ={ TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, ++ [NM_ATT_IPACC_FILE_DATA] = { TLV_TYPE_TL16V, 0 }, ++ [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V, 0 }, ++ }, ++}; ++ ++#endif /* _NM_H */ +-- +1.7.3.4 + diff --git a/wireshark/0002-ericsson_rbs2409.patch b/wireshark/0002-ericsson_rbs2409.patch new file mode 100644 index 000000000..b13e4163c --- /dev/null +++ b/wireshark/0002-ericsson_rbs2409.patch @@ -0,0 +1,1929 @@ +From 6254ee454147eab6f6a51792544716472e20073f Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther +Date: Tue, 11 Jan 2011 15:09:18 +0100 +Subject: [PATCH 2/4] ericsson_rbs2409 + +Add Ericsson RBS2409 dissector +--- + epan/CMakeLists.txt | 2 + + epan/dissectors/Makefile.common | 2 + + epan/dissectors/packet-ehdlc.c | 319 +++++++ + epan/dissectors/packet-gsm_abis_om2000.c | 1439 ++++++++++++++++++++++++++++++ + epan/dissectors/packet-gsm_abis_oml.c | 21 + + epan/dissectors/packet-l2tp.c | 7 + + 6 files changed, 1790 insertions(+), 0 deletions(-) + create mode 100644 epan/dissectors/packet-ehdlc.c + create mode 100644 epan/dissectors/packet-gsm_abis_om2000.c + +diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt +index 0b09335..9217ec0 100644 +--- a/epan/CMakeLists.txt ++++ b/epan/CMakeLists.txt +@@ -184,6 +184,8 @@ set(DIRTY_PIDL_DISSECTOR_SRC + dissectors/packet-dcerpc-eventlog.c + dissectors/packet-dcerpc-lsa.c + dissectors/packet-dcerpc-winreg.c ++ dissectors/packet-ehdlc.c ++ dissectors/packet-gsm_abis_om2000.c + ) + set(ASN1_DISSECTOR_SRC + dissectors/packet-acp133.c +diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common +index 7ce83b6..4c7094b 100644 +--- a/epan/dissectors/Makefile.common ++++ b/epan/dissectors/Makefile.common +@@ -67,6 +67,8 @@ DIRTY_PIDL_DISSECTOR_SRC = \ + packet-dcerpc-dnsserver.c \ + packet-dcerpc-eventlog.c \ + packet-dcerpc-lsa.c \ ++ packet-ehdlc.c \ ++ packet-gsm_abis_om2000.c \ + packet-dcerpc-winreg.c + + # +diff --git a/epan/dissectors/packet-ehdlc.c b/epan/dissectors/packet-ehdlc.c +new file mode 100644 +index 0000000..40bb3ab +--- /dev/null ++++ b/epan/dissectors/packet-ehdlc.c +@@ -0,0 +1,319 @@ ++/* packet-ehdlc.c ++ * Routines for packet dissection of Ericsson HDLC as used in A-bis over IP ++ * Copyright 2010 by Harald Welte ++ * ++ * $Id: packet-ehdlc.c 33767 2010-08-11 11:59:47Z etxrab $ ++ * ++ * Wireshark - Network traffic analyzer ++ * By Gerald Combs ++ * 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 ++ ++#include ++#include ++#include ++ ++/* Initialize the protocol and registered fields */ ++static int proto_ehdlc = -1; ++ ++static int hf_ehdlc_data_len = -1; ++static int hf_ehdlc_protocol = -1; ++static int hf_ehdlc_sapi = -1; ++static int hf_ehdlc_c_r = -1; ++ ++static int hf_ehdlc_xid_payload = -1; ++static int hf_ehdlc_control = -1; ++ ++static int hf_ehdlc_p = -1; ++static int hf_ehdlc_f = -1; ++static int hf_ehdlc_u_modifier_cmd = -1; ++static int hf_ehdlc_u_modifier_resp = -1; ++static int hf_ehdlc_ftype_s_u = -1; ++ ++static int hf_ehdlc_n_r = -1; ++static int hf_ehdlc_n_s = -1; ++static int hf_ehdlc_p_ext = -1; ++static int hf_ehdlc_f_ext = -1; ++static int hf_ehdlc_s_ftype = -1; ++static int hf_ehdlc_ftype_i = -1; ++static int hf_ehdlc_ftype_s_u_ext = -1; ++ ++/* Used only for U frames */ ++static const xdlc_cf_items ehdlc_cf_items = { ++ NULL, ++ NULL, ++ &hf_ehdlc_p, ++ &hf_ehdlc_f, ++ NULL, ++ &hf_ehdlc_u_modifier_cmd, ++ &hf_ehdlc_u_modifier_resp, ++ NULL, ++ &hf_ehdlc_ftype_s_u ++}; ++ ++/* Used only for I and S frames */ ++static const xdlc_cf_items ehdlc_cf_items_ext = { ++ &hf_ehdlc_n_r, ++ &hf_ehdlc_n_s, ++ &hf_ehdlc_p_ext, ++ &hf_ehdlc_f_ext, ++ &hf_ehdlc_s_ftype, ++ NULL, ++ NULL, ++ &hf_ehdlc_ftype_i, ++ &hf_ehdlc_ftype_s_u_ext, ++}; ++ ++/* Initialize the subtree pointers */ ++static gint ett_ehdlc = -1; ++static gint ett_ehdlc_control = -1; ++ ++static const value_string ehdlc_protocol_vals[] = { ++ { 0x20, "RSL" }, ++ { 0xa0, "ACK" }, ++ { 0xc0, "OML" }, ++ { 0, NULL } ++}; ++ ++enum { ++ SUB_RSL, ++ SUB_OML, ++ SUB_DATA, ++ ++ SUB_MAX ++}; ++ ++static dissector_handle_t sub_handles[SUB_MAX]; ++ ++/* Code to actually dissect the packets */ ++static void ++dissect_ehdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ++{ ++ gint remaining; ++ int offset = 4; ++ ++ col_set_str(pinfo->cinfo, COL_PROTOCOL, "EHDLC"); ++ col_clear(pinfo->cinfo, COL_INFO); ++ ++ while ((remaining = tvb_reported_length_remaining(tvb, offset)) > 0) { ++ proto_item *ti = NULL; ++ proto_tree *ehdlc_tree = NULL; ++ guint16 len, msg_type; ++ tvbuff_t *next_tvb; ++ guint16 control; ++ gboolean is_response = 0, is_extended = TRUE; ++ gint header_length = 2; /* Address + Length field */ ++ ++ msg_type = tvb_get_guint8(tvb, offset); ++ len = tvb_get_guint8(tvb, offset+1); ++#if 0 ++ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", ++ val_to_str(msg_type, ehdlc_protocol_vals, ++ "unknown 0x%02x")); ++#endif ++ if (tree) { ++ ti = proto_tree_add_protocol_format(tree, proto_ehdlc, ++ tvb, offset, len, ++ "Ericsson HDLC protocol, type: %s", ++ val_to_str(msg_type, ehdlc_protocol_vals, ++ "unknown 0x%02x")); ++ ehdlc_tree = proto_item_add_subtree(ti, ett_ehdlc); ++ proto_tree_add_item(ehdlc_tree, hf_ehdlc_protocol, ++ tvb, offset, 1, FALSE); ++#if 0 ++ proto_tree_add_item(ehdlc_tree, hf_ehdlc_sapi, ++ tvb, offset, 1, FALSE); ++ proto_tree_add_item(ehdlc_tree, hf_ehdlc_c_r, ++ tvb, offset, 1, FALSE); ++#endif ++ proto_tree_add_item(ehdlc_tree, hf_ehdlc_data_len, ++ tvb, offset+1, 1, FALSE); ++ } ++ ++ control = dissect_xdlc_control(tvb, offset+2, pinfo, ehdlc_tree, hf_ehdlc_control, ++ ett_ehdlc_control, &ehdlc_cf_items, &ehdlc_cf_items_ext, ++ NULL, NULL, is_response, is_extended, FALSE); ++ header_length += XDLC_CONTROL_LEN(control, is_extended); ++ ++ if (XDLC_IS_INFORMATION(control)) { ++ next_tvb = tvb_new_subset(tvb, offset+header_length, ++ len-header_length, len); ++ ++ switch (msg_type) { ++ case 0x20: ++ /* len == 4 seems to be some kind of ACK */ ++ if (len <= 4) ++ break; ++ call_dissector(sub_handles[SUB_RSL], next_tvb, pinfo, tree); ++ break; ++ case 0xbc: ++ case 0xdc: ++ case 0xa0: ++ case 0xc0: ++ /* len == 4 seems to be some kind of ACK */ ++ if (len <= 4) ++ break; ++ call_dissector(sub_handles[SUB_OML], next_tvb, pinfo, tree); ++ break; ++ default: ++ call_dissector(sub_handles[SUB_DATA], next_tvb, pinfo, tree); ++ break; ++ } ++ } else if (control == XDLC_U | XDLC_XID) { ++ /* XID is formatted like ISO 8885, typically we see ++ * something like ++ * 82 format identifier ++ * 80 group identifier ++ * 00 09 length ++ * 07 01 05 Window Size Tx ++ * 09 01 04 Ack Timer (msec) ++ * 08 01 05 Window Size Rx */ ++ proto_tree_add_item(ehdlc_tree, hf_ehdlc_xid_payload, ++ tvb, offset+header_length, ++ len-header_length, FALSE); ++ } ++ ++ offset += len; ++ } ++} ++ ++void proto_register_ehdlc(void) ++{ ++ static hf_register_info hf[] = { ++ { &hf_ehdlc_data_len, ++ { "DataLen", "ehdlc.data_len", ++ FT_UINT8, BASE_DEC, NULL, 0x0, ++ "The length of the data (in bytes)", HFILL } ++ }, ++ { &hf_ehdlc_protocol, ++ { "Protocol", "ehdlc.protocol", ++ FT_UINT8, BASE_HEX, VALS(ehdlc_protocol_vals), 0x0, ++ "The HDLC Sub-Protocol", HFILL } ++ }, ++ { &hf_ehdlc_sapi, ++ { "SAPI", "ehdlc.sapi", ++ FT_UINT8, BASE_DEC, NULL, 0x1f, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_c_r, ++ { "C/R", "ehdlc.c_r", ++ FT_UINT8, BASE_HEX, NULL, 0x20, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_xid_payload, ++ { "XID Payload", "ehdlc.xid_payload", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_control, ++ { "Control Field", "ehdlc.control", ++ FT_UINT16, BASE_HEX, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_n_r, ++ { "N(R)", "ehdlc.control.n_r", ++ FT_UINT16, BASE_DEC, NULL, XDLC_N_R_EXT_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_n_s, ++ { "N(S)", "ehdlc.control.n_s", ++ FT_UINT16, BASE_DEC, NULL, XDLC_N_S_EXT_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_p, ++ { "Poll", "ehdlc.control.p", ++ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_p_ext, ++ { "Poll", "ehdlc.control.p", ++ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_f, ++ { "Final", "ehdlc.control.f", ++ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_f_ext, ++ { "Final", "ehdlc.control.f", ++ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_s_ftype, ++ { "Supervisory frame type", "ehdlc.control.s_ftype", ++ FT_UINT16, BASE_HEX, VALS(stype_vals), XDLC_S_FTYPE_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_u_modifier_cmd, ++ { "Command", "ehdlc.control.u_modifier_cmd", ++ FT_UINT8, BASE_HEX, VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_u_modifier_resp, ++ { "Response", "ehdlc.control.u_modifier_resp", ++ FT_UINT8, BASE_HEX, VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_ftype_i, ++ { "Frame Type", "ehdlc.control.ftype", ++ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_I_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_ftype_s_u, ++ { "Frame Type", "ehdlc.control.ftype", ++ FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, ++ NULL, HFILL } ++ }, ++ { &hf_ehdlc_ftype_s_u_ext, ++ { "Frame Type", "ehdlc.control.ftype", ++ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, ++ NULL, HFILL } ++ }, ++ }; ++ ++ static gint *ett[] = { ++ &ett_ehdlc, ++ &ett_ehdlc_control, ++ }; ++ ++ proto_ehdlc = ++ proto_register_protocol("Ericsson HDLC", ++ "Ericsson HDLC as used in A-bis over IP", "ehdlc"); ++ ++ proto_register_field_array(proto_ehdlc, hf, array_length(hf)); ++ proto_register_subtree_array(ett, array_length(ett)); ++ ++ register_dissector("ehdlc", dissect_ehdlc, proto_ehdlc); ++} ++ ++void proto_reg_handoff_ehdlc(void) ++{ ++ dissector_handle_t ehdlc_handle; ++ ++ sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl"); ++ sub_handles[SUB_OML] = find_dissector("gsm_abis_oml"); ++ sub_handles[SUB_DATA] = find_dissector("data"); ++ ++ ehdlc_handle = create_dissector_handle(dissect_ehdlc, proto_ehdlc); ++} +diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c +new file mode 100644 +index 0000000..bf67aea +--- /dev/null ++++ b/epan/dissectors/packet-gsm_abis_om2000.c +@@ -0,0 +1,1439 @@ ++/* packet-abis_om2000.c ++ * Routines for packet dissection of Ericsson A-bis OML (OM 2000) ++ * Copyright 2010 by Harald Welte ++ * ++ * $Id$ ++ * ++ * Wireshark - Network traffic analyzer ++ * By Gerald Combs ++ * 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 ++ ++#include ++#include ++#include ++#include ++ ++#include "packet-gsm_abis_oml.h" ++#include "packet-gsm_a_common.h" ++ ++#include ++ ++/* initialize the protocol and registered fields */ ++static int proto_abis_om2000 = -1; ++ ++static int hf_om2k_msg_code = -1; ++static int hf_om2k_mo_if = -1; ++static int hf_om2k_mo_class = -1; ++static int hf_om2k_mo_instance = -1; ++ ++static int hf_om2k_aip = -1; ++static int hf_om2k_oip = -1; ++static int hf_om2k_comb = -1; ++static int hf_om2k_ts = -1; ++static int hf_om2k_hsn = -1; ++static int hf_om2k_maio = -1; ++static int hf_om2k_bsic = -1; ++static int hf_om2k_diversity = -1; ++static int hf_om2k_fn_offs = -1; ++static int hf_om2k_ext_range = -1; ++static int hf_om2k_irc = -1; ++static int hf_om2k_bs_pa_mfrms = -1; ++static int hf_om2k_bs_ag_blks_res= -1; ++static int hf_om2k_drx_dev_max = -1; ++static int hf_om2k_cr = -1; ++static int hf_om2k_ipt3 = -1; ++static int hf_om2k_aop = -1; ++static int hf_om2k_t3105 = -1; ++static int hf_om2k_ny1 = -1; ++static int hf_om2k_cbi = -1; ++static int hf_om2k_tsc = -1; ++static int hf_om2k_icm = -1; ++static int hf_om2k_tta = -1; ++static int hf_om2k_icm_cr = -1; ++static int hf_om2k_lsc_fm = -1; ++static int hf_om2k_lsc_lsi = -1; ++static int hf_om2k_lsc_lsa = -1; ++static int hf_om2k_ls_ft = -1; ++static int hf_om2k_cst = -1; ++static int hf_om2k_ea = -1; ++static int hf_om2k_unknown_tag = -1; ++static int hf_om2k_unknown_val = -1; ++static int hf_om2k_nom_pwr = -1; ++static int hf_om2k_fill_mark = -1; ++static int hf_om2k_bcc = -1; ++static int hf_om2k_mo_state = -1; ++static int hf_om2k_la_state = -1; ++static int hf_om2k_tsn_state = -1; ++static int hf_om2k_bts_manuf = -1; ++static int hf_om2k_bts_gen = -1; ++static int hf_om2k_bts_rev = -1; ++static int hf_om2k_bts_var = -1; ++static int hf_om2k_brr = -1; ++static int hf_om2k_bfr = -1; ++static int hf_om2k_hwinfo_sig = -1; ++static int hf_om2k_capa_sig = -1; ++static int hf_om2k_file_rev = -1; ++static int hf_om2k_filerel_ilr = -1; ++static int hf_om2k_filerel_cur = -1; ++static int hf_om2k_filerel_other = -1; ++static int hf_om2k_cal_time = -1; ++static int hf_om2k_list_nr = -1; ++static int hf_om2k_list_nr_end = -1; ++static int hf_om2k_isl = -1; ++static int hf_om2k_isl_icp1 = -1; ++static int hf_om2k_isl_icp2 = -1; ++static int hf_om2k_isl_ci = -1; ++static int hf_om2k_conl = -1; ++static int hf_om2k_conl_nr_cgs = -1; ++static int hf_om2k_conl_nr_cps_cg = -1; ++static int hf_om2k_conl_ccp = -1; ++static int hf_om2k_conl_ci = -1; ++static int hf_om2k_conl_tag = -1; ++static int hf_om2k_conl_tei = -1; ++static int hf_om2k_tf_mode = -1; ++static int hf_om2k_tf_fs_offset = -1; ++ ++ ++ ++/* initialize the subtree pointers */ ++static int ett_om2000 = -1; ++static int ett_om2k_mo = -1; ++static int ett_om2k_isl = -1; ++static int ett_om2k_conl = -1; ++ ++static proto_tree *top_tree; ++ ++static const value_string om2k_msgcode_vals[] = { ++ { 0x0000, "Abort SP Command" }, ++ { 0x0002, "Abort SP Complete" }, ++ { 0x0004, "Alarm Report ACK" }, ++ { 0x0005, "Alarm Report NACK" }, ++ { 0x0006, "Alarm Report" }, ++ { 0x0008, "Alarm Status Request" }, ++ { 0x000a, "Alarm Status Request Accept" }, ++ { 0x000b, "Alarm Status Request Reject" }, ++ { 0x000c, "Alarm Status Result ACK" }, ++ { 0x000d, "Alarm Status Result NACK" }, ++ { 0x000e, "Alarm Status Result" }, ++ { 0x0010, "Calendar Time Response" }, ++ { 0x0011, "Calendar Time Reject" }, ++ { 0x0012, "Calendar Time Request" }, ++ { 0x0014, "CON Configuration Request" }, ++ { 0x0016, "CON Configuration Request Accept" }, ++ { 0x0017, "CON Configuration Request Reject" }, ++ { 0x0018, "CON Configuration Result ACK" }, ++ { 0x0019, "CON Configuration Result NACK" }, ++ { 0x001a, "CON Configuration Result" }, ++ { 0x001c, "Connect Command" }, ++ { 0x001e, "Connect Complete" }, ++ { 0x001f, "Connect Rejecte" }, ++ { 0x0028, "Disable Request" }, ++ { 0x002a, "Disable Request Accept" }, ++ { 0x002b, "Disable Request Reject" }, ++ { 0x002c, "Disable Result ACK" }, ++ { 0x002d, "Disable Result NACK" }, ++ { 0x002e, "Disable Result" }, ++ { 0x0030, "Disconnect Command" }, ++ { 0x0032, "Disconnect Complete" }, ++ { 0x0033, "Disconnect Reject" }, ++ { 0x0034, "Enable Request" }, ++ { 0x0036, "Enable Request Accept" }, ++ { 0x0037, "Enable Request Reject" }, ++ { 0x0038, "Enable Result ACK" }, ++ { 0x0039, "Enable Result NACK" }, ++ { 0x003a, "Enable Result" }, ++ { 0x003c, "Escape Downlink Normal" }, ++ { 0x003d, "Escape Downlink NACK" }, ++ { 0x003e, "Escape Uplink Normal" }, ++ { 0x003f, "Escape Uplink NACK" }, ++ { 0x0040, "Fault Report ACK" }, ++ { 0x0041, "Fault Report NACK" }, ++ { 0x0042, "Fault Report" }, ++ { 0x0044, "File Package End Command" }, ++ { 0x0046, "File Package End Result" }, ++ { 0x0047, "File Package End Reject" }, ++ { 0x0048, "File Relation Request" }, ++ { 0x004a, "File Relation Response" }, ++ { 0x004b, "File Relation Request Reject" }, ++ { 0x004c, "File Segment Transfer" }, ++ { 0x004e, "File Segment Transfer Complete" }, ++ { 0x004f, "File Segment Transfer Reject" }, ++ { 0x0050, "HW Information Request" }, ++ { 0x0052, "HW Information Request Accept" }, ++ { 0x0053, "HW Information Request Reject" }, ++ { 0x0054, "HW Information Result ACK" }, ++ { 0x0055, "HW Information Result NACK" }, ++ { 0x0056, "HW Information Result" }, ++ { 0x0060, "IS Configuration Request" }, ++ { 0x0062, "IS Configuration Request Accept" }, ++ { 0x0063, "IS Configuration Request Reject" }, ++ { 0x0064, "IS Configuration Result ACK" }, ++ { 0x0065, "IS Configuration Result NACK" }, ++ { 0x0066, "IS Configuration Result" }, ++ { 0x0068, "Load Data End" }, ++ { 0x006a, "Load Data End Result" }, ++ { 0x006b, "Load Data End Reject" }, ++ { 0x006c, "Load Data Init" }, ++ { 0x006e, "Load Data Init Accept" }, ++ { 0x006f, "Load Data Init Reject" }, ++ { 0x0070, "Loop Control Command" }, ++ { 0x0072, "Loop Control Complete" }, ++ { 0x0073, "Loop Control Reject" }, ++ { 0x0074, "Operational Information" }, ++ { 0x0076, "Operational Information Accept" }, ++ { 0x0077, "Operational Information Reject" }, ++ { 0x0078, "Reset Command" }, ++ { 0x007a, "Reset Complete" }, ++ { 0x007b, "Reset Reject" }, ++ { 0x007c, "RX Configuration Request" }, ++ { 0x007e, "RX Configuration Request Accept" }, ++ { 0x007f, "RX Configuration Request Reject" }, ++ { 0x0080, "RX Configuration Result ACK" }, ++ { 0x0081, "RX Configuration Result NACK" }, ++ { 0x0082, "RX Configuration Result" }, ++ { 0x0084, "Start Request" }, ++ { 0x0086, "Start Request Accept" }, ++ { 0x0087, "Start Request Reject" }, ++ { 0x0088, "Start Result ACK" }, ++ { 0x0089, "Start Result NACK" }, ++ { 0x008a, "Start Result" }, ++ { 0x008c, "Status Request" }, ++ { 0x008e, "Status Response" }, ++ { 0x008f, "Status Reject" }, ++ { 0x0094, "Test Request" }, ++ { 0x0096, "Test Request Accept" }, ++ { 0x0097, "Test Request Reject" }, ++ { 0x0098, "Test Result ACK" }, ++ { 0x0099, "Test Result NACK" }, ++ { 0x009a, "Test Result" }, ++ { 0x00a0, "TF Configuration Request" }, ++ { 0x00a2, "TF Configuration Request Accept" }, ++ { 0x00a3, "TF Configuration Request Reject" }, ++ { 0x00a4, "TF Configuration Result ACK" }, ++ { 0x00a5, "TF Configuration Result NACK" }, ++ { 0x00a6, "TF Configuration Result" }, ++ { 0x00a8, "TS Configuration Request" }, ++ { 0x00aa, "TS Configuration Request Accept" }, ++ { 0x00ab, "TS Configuration Request Reject" }, ++ { 0x00ac, "TS Configuration Result ACK" }, ++ { 0x00ad, "TS Configuration Result NACK" }, ++ { 0x00ae, "TS Configuration Result" }, ++ { 0x00b0, "TX Configuration Request" }, ++ { 0x00b2, "TX Configuration Request Accept" }, ++ { 0x00b3, "TX Configuration Request Reject" }, ++ { 0x00b4, "TX Configuration Result ACK" }, ++ { 0x00b5, "TX Configuration Result NACK" }, ++ { 0x00b6, "TX Configuration Result" }, ++ { 0x00bc, "DIP Alarm Report ACK" }, ++ { 0x00bd, "DIP Alarm Report NACK" }, ++ { 0x00be, "DIP Alarm Report" }, ++ { 0x00c0, "DIP Alarm Status Request" }, ++ { 0x00c2, "DIP Alarm Status Response" }, ++ { 0x00c3, "DIP Alarm Status Reject" }, ++ { 0x00c4, "DIP Quality Report I ACK" }, ++ { 0x00c5, "DIP Quality Report I NACK" }, ++ { 0x00c6, "DIP Quality Report I" }, ++ { 0x00c8, "DIP Quality Report II ACK" }, ++ { 0x00c9, "DIP Quality Report II NACK" }, ++ { 0x00ca, "DIP Quality Report II" }, ++ { 0x00dc, "DP Configuration Request" }, ++ { 0x00de, "DP Configuration Request Accept" }, ++ { 0x00df, "DP Configuration Request Reject" }, ++ { 0x00e0, "DP Configuration Result ACK" }, ++ { 0x00e1, "DP Configuration Result NACK" }, ++ { 0x00e2, "DP Configuration Result" }, ++ { 0x00e4, "Capabilities HW Info Report ACK" }, ++ { 0x00e5, "Capabilities HW Info Report NACK" }, ++ { 0x00e6, "Capabilities HW Info Report" }, ++ { 0x00e8, "Capabilities Request" }, ++ { 0x00ea, "Capabilities Request Accept" }, ++ { 0x00eb, "Capabilities Request Reject" }, ++ { 0x00ec, "Capabilities Result ACK" }, ++ { 0x00ed, "Capabilities Result NACK" }, ++ { 0x00ee, "Capabilities Result" }, ++ { 0x00f0, "FM Configuration Request" }, ++ { 0x00f2, "FM Configuration Request Accept" }, ++ { 0x00f3, "FM Configuration Request Reject" }, ++ { 0x00f4, "FM Configuration Result ACK" }, ++ { 0x00f5, "FM Configuration Result NACK" }, ++ { 0x00f6, "FM Configuration Result" }, ++ { 0x00f8, "FM Report Request" }, ++ { 0x00fa, "FM Report Response" }, ++ { 0x00fb, "FM Report Reject" }, ++ { 0x00fc, "FM Start Command" }, ++ { 0x00fe, "FM Start Complete" }, ++ { 0x00ff, "FM Start Reject" }, ++ { 0x0100, "FM Stop Command" }, ++ { 0x0102, "FM Stop Complete" }, ++ { 0x0103, "FM Stop Reject" }, ++ { 0x0104, "Negotiation Request ACK" }, ++ { 0x0105, "Negotiation Request NACK" }, ++ { 0x0106, "Negotiation Request" }, ++ { 0x0108, "BTS Initiated Request ACK" }, ++ { 0x0109, "BTS Initiated Request NACK" }, ++ { 0x010a, "BTS Initiated Request" }, ++ { 0x010c, "Radio Channels Release Command" }, ++ { 0x010e, "Radio Channels Release Complete" }, ++ { 0x010f, "Radio Channels Release Reject" }, ++ { 0x0118, "Feature Control Command" }, ++ { 0x011a, "Feature Control Complete" }, ++ { 0x011b, "Feature Control Reject" }, ++ ++ { 0, NULL } ++}; ++ ++/* TS 12.21 Section 9.4: Attributes */ ++static const value_string om2k_attr_vals[] = { ++ { 0x00, "Accordance indication" }, ++ { 0x01, "Alarm Id" }, ++ { 0x02, "Alarm Data" }, ++ { 0x03, "Alarm Severity" }, ++ { 0x04, "Alarm Status" }, ++ { 0x05, "Alarm Status Type" }, ++ { 0x06, "BCC" }, ++ { 0x07, "BS_AG_BKS_RES" }, ++ { 0x09, "BSIC" }, ++ { 0x0a, "BA_PA_MFRMS" }, ++ { 0x0b, "CBCH Indicator" }, ++ { 0x0c, "CCCH Options" }, ++ { 0x0d, "Calendar Time" }, ++ { 0x0f, "Channel Combination" }, ++ { 0x10, "CON Connection List" }, ++ { 0x11, "Data End Indication" }, ++ { 0x12, "DRX_DEV_MAX" }, ++ { 0x13, "End List Number" }, ++ { 0x14, "External Condition Map Class 1" }, ++ { 0x15, "External Condition Map Class 2" }, ++ { 0x16, "File Relation Indication" }, ++ { 0x17, "File Revision" }, ++ { 0x18, "File Segment Data" }, ++ { 0x19, "File Segment Length" }, ++ { 0x1a, "File Segment Sequence Number" }, ++ { 0x1b, "File Size" }, ++ { 0x1c, "Filling Marker" }, ++ { 0x1d, "FN Offset" }, ++ { 0x1e, "Frequency List" }, ++ { 0x1f, "Frequency Specifier RX" }, ++ { 0x20, "Frequency Specifier TX" }, ++ { 0x21, "HSN" }, ++ { 0x22, "ICM Indicator" }, ++ { 0x23, "Internal Fault Map Class 1A" }, ++ { 0x24, "Internal Fault Map Class 1B" }, ++ { 0x25, "Internal Fault Map Class 2A" }, ++ { 0x26, "Internal Fault Map Class 2A Extension" }, ++ { 0x27, "IS Connection List" }, ++ { 0x28, "List Number" }, ++ { 0x29, "File Package State Indication" }, ++ { 0x2a, "Local Access State" }, ++ { 0x2b, "MAIO" }, ++ { 0x2c, "MO State" }, ++ { 0x2d, "Ny1" }, ++ { 0x2e, "Operational Information" }, ++ { 0x2f, "Power" }, ++ { 0x30, "RU Position Data" }, ++ { 0x31, "Protocol Error" }, ++ { 0x32, "Reason Code" }, ++ { 0x33, "Receiver Diversity" }, ++ { 0x34, "Replacement Unit Map" }, ++ { 0x35, "Result Code" }, ++ { 0x36, "RU Revision Data" }, ++ { 0x38, "T3105" }, ++ { 0x39, "Test Loop Setting" }, ++ { 0x3a, "TF Mode" }, ++ { 0x3b, "TF Compensation Value" }, ++ { 0x3c, "Time Slot Number" }, ++ { 0x3d, "TSC" }, ++ { 0x3e, "RU Logical Id" }, ++ { 0x3f, "RU Serial Number Data" }, ++ { 0x40, "BTS Version" }, ++ { 0x41, "OML IWD Version" }, ++ { 0x42, "RWL IWD Version" }, ++ { 0x43, "OML Function Map 1" }, ++ { 0x44, "OML Function Map 2" }, ++ { 0x45, "RSL Function Map 1" }, ++ { 0x46, "RSL Function Map 2" }, ++ { 0x47, "Extended Range Indicator" }, ++ { 0x48, "Request Indicators" }, ++ { 0x49, "DIP Alarm Condition Map" }, ++ { 0x4a, "ES Incoming" }, ++ { 0x4b, "ES Outgoing" }, ++ { 0x4e, "SES Incoming" }, ++ { 0x4f, "SES Outgoing" }, ++ { 0x50, "Replacement Unit Map Extension" }, ++ { 0x52, "UAS Incoming" }, ++ { 0x53, "UAS Outgoing" }, ++ { 0x58, "DF Incoming" }, ++ { 0x5a, "DF Outgoing" }, ++ { 0x5c, "SF" }, ++ { 0x60, "S Bits Setting" }, ++ { 0x61, "CRC-4 Use Option" }, ++ { 0x62, "T Parameter" }, ++ { 0x63, "N Parameter" }, ++ { 0x64, "N1 Parameter" }, ++ { 0x65, "N3 Parameter" }, ++ { 0x66, "N4 Parameter" }, ++ { 0x67, "P Parameter" }, ++ { 0x68, "Q Parameter" }, ++ { 0x69, "BI_Q1" }, ++ { 0x6a, "BI_Q2" }, ++ { 0x74, "ICM Boundary Parameters" }, ++ { 0x77, "AFT" }, ++ { 0x78, "AFT RAI" }, ++ { 0x79, "Link Supervision Control" }, ++ { 0x7a, "Link Supervision Filtering Time" }, ++ { 0x7b, "Call Supervision Time" }, ++ { 0x7c, "Interval Length UAS Incoming" }, ++ { 0x7d, "Interval Length UAS Outgoing" }, ++ { 0x7e, "ICM Channel Rate" }, ++ { 0x7f, "Attribute Identifier" }, ++ { 0x80, "FM Frequency List" }, ++ { 0x81, "FM Frequency Report" }, ++ { 0x82, "FM Percentile" }, ++ { 0x83, "FM Clear Indication" }, ++ { 0x84, "HW Info Signature" }, ++ { 0x85, "MO Record" }, ++ { 0x86, "TF Synchronisation Source" }, ++ { 0x87, "TTA" }, ++ { 0x88, "End Segment Number" }, ++ { 0x89, "Segment Number" }, ++ { 0x8a, "Capabilities Signature" }, ++ { 0x8c, "File Relation List" }, ++ { 0x90, "Negotiation Record I" }, ++ { 0x91, "Negotiation Record II" }, ++ { 0x92, "Encryption Algorithm" }, ++ { 0x94, "Interference Rejection Combining" }, ++ { 0x95, "Dedication Information" }, ++ { 0x97, "Feature Code" }, ++ { 0x98, "FS Offset" }, ++ { 0x99, "ESB Timeslot" }, ++ { 0x9a, "Master TG Instance" }, ++ { 0x9b, "Master TX Chain Delay" }, ++ { 0x9c, "External Condition Class 2 Extension" }, ++ { 0x9d, "TSs MO State" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_diversity_vals[] = { ++ { 0x01, "B receiver side" }, ++ { 0x02, "A receiver side" }, ++ { 0x03, "A+B receiver sides" }, ++ { 0x04, "A+B+C+D receiver sides" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_oip_vals[] = { ++ { 0x00, "Not Operational" }, ++ { 0x01, "Operational" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_aip_vals[] = { ++ { 0x00, "Data according to request" }, ++ { 0x01, "Data not according to request" }, ++ { 0x02, "Inconsistent MO data" }, ++ { 0x03, "Capability constraint violation" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_comb_vals[] = { ++ { 0x03, "SDCCH/8 + SACCH/C8" }, ++ { 0x04, "BCCH, non-combined" }, ++ { 0x05, "BCCH, combined (SDCCH/4)" }, ++ { 0x08, "TCH Type, unspecified" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_icmcr_vals[] = { ++ { 0x00, "ICM as per TCH/F" }, ++ { 0x01, "ICM as per TCH/H(0 and 1)" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_ea_vals[] = { ++ { 0x00, "A5/1 and A5/2" }, ++ { 0x01, "A5/2 only" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_fill_vals[] = { ++ { 0x00, "Filling" }, ++ { 0x01, "No filling" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_mo_state_vals[] = { ++ { 0x00, "RESET" }, ++ { 0x01, "STARTED" }, ++ { 0x02, "ENABLED" }, ++ { 0x03, "DISABLED" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_la_state_vals[] = { ++ { 0x00, "LOCALLY CONNECTED" }, ++ { 0x01, "LOCALLY DISCONNECTED" }, ++ { 0, NULL } ++}; ++ ++static const value_string filerel_state_vals[] = { ++ { 0x00, "Not known in current state (unknown file)" }, ++ { 0x01, "alllowed, already loaded" }, ++ { 0x02, "allowed, not loaded" }, ++ { 0x03, "not allowed" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_mo_class_short_vals[] = { ++ { 0x01, "TRXC" }, ++ { 0x03, "TS" }, ++ { 0x04, "TF" }, ++ { 0x05, "IS" }, ++ { 0x06, "CON" }, ++ { 0x0a, "CF" }, ++ { 0x0b, "TX" }, ++ { 0x0c, "RX" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_mo_class_vals[] = { ++ { 0x01, "TRXC (TRX Controller)" }, ++ { 0x03, "TS (Timeslot)" }, ++ { 0x04, "TF (Timing Function)" }, ++ { 0x05, "IS (Interface Switch)" }, ++ { 0x06, "CON (Concentrator)" }, ++ { 0x0a, "CF (Central Function)" }, ++ { 0x0b, "TX (Transmitter)" }, ++ { 0x0c, "RX (Receiver)" }, ++ { 0, NULL } ++}; ++ ++static const value_string om2k_tf_mode_vals[] = { ++ { 0x00, "Master" }, ++ { 0x01, "Standalone" }, ++ { 0x02, "Slave" }, ++ { 0xff, "Not defined" }, ++ { 0, NULL } ++}; ++ ++static gint ++dissect_tss_mo_state(tvbuff_t *tvb, gint offset, packet_info *pinfo, ++ proto_tree *tree) ++{ ++ guint8 tmp; ++ guint i = 0; ++ ++ for (i = 0; i < 8; i+= 2) { ++ tmp = tvb_get_guint8(tvb, offset); ++ proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp & 0xf, ++ "Timslot %u MO State: %s", i, ++ val_to_str(tmp & 0xf, om2k_mo_state_vals, "unknown (%02d)")); ++ proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp >> 4, ++ "Timslot %u MO State: %s", i+1, ++ val_to_str(tmp >> 4, om2k_mo_state_vals, "unknown (%02d)")); ++ offset++; ++ } ++ ++ return offset; ++} ++ ++ ++static gint ++dissect_om2k_time(tvbuff_t *tvb, gint offset, proto_tree *tree) ++{ ++ nstime_t tmptime; ++ time_t tval; ++ struct tm _time; ++ ++ _time.tm_year = 100 + tvb_get_guint8(tvb, offset++); ++ _time.tm_mon = tvb_get_guint8(tvb, offset++) -1; ++ _time.tm_mday = tvb_get_guint8(tvb, offset++); ++ _time.tm_hour = tvb_get_guint8(tvb, offset++); ++ _time.tm_min = tvb_get_guint8(tvb, offset++); ++ _time.tm_sec = tvb_get_guint8(tvb, offset++); ++ _time.tm_isdst = -1; ++ ++ tval = mktime(&_time); ++ tmptime.secs = tval; ++ tmptime.nsecs = 0; ++ ++ proto_tree_add_time(tree, hf_om2k_cal_time, tvb, offset, 6, ++ &tmptime); ++ return 6; ++} ++ ++static gint ++dissect_om2k_attr_unkn(tvbuff_t *tvb, gint offset, gint len, gint iei, proto_tree *tree) ++{ ++ proto_tree_add_bytes_format(tree, hf_om2k_unknown_val, tvb, ++ offset, len, tvb_get_ptr(tvb, offset, len), ++ "%s: %s", ++ val_to_str(iei, om2k_attr_vals, "0x%02x"), ++ tvb_bytes_to_str(tvb, offset, len)); ++ return len; ++} ++ ++static gint ++dissect_om2k_is_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) ++{ ++ gint offset = base_offset; ++ proto_item *ti; ++ proto_tree *isl_tree; ++ guint8 len = tvb_get_guint8(tvb, offset++); ++ ++ ti = proto_tree_add_item(tree, hf_om2k_isl, tvb, offset, len, FALSE); ++ isl_tree = proto_item_add_subtree(ti, ett_om2k_isl); ++ ++ while (offset < base_offset + len) { ++ proto_tree_add_item(isl_tree, hf_om2k_isl_icp1, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ proto_tree_add_item(isl_tree, hf_om2k_isl_icp2, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ proto_tree_add_item(isl_tree, hf_om2k_isl_ci, tvb, ++ offset++, 1, FALSE); ++ } ++ return offset - base_offset; ++} ++ ++static gint ++dissect_om2k_con_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) ++{ ++ gint offset = base_offset; ++ proto_item *ti; ++ proto_tree *conl_tree; ++ guint8 len = tvb_get_guint8(tvb, offset++); ++ ++ ti = proto_tree_add_item(tree, hf_om2k_conl, tvb, offset, len, FALSE); ++ conl_tree = proto_item_add_subtree(ti, ett_om2k_conl); ++ ++ proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cgs, tvb, ++ offset++, 1, FALSE); ++ ++ while (offset < base_offset + len) { ++ guint8 nr_cps_cg = tvb_get_guint8(tvb, offset); ++ proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cps_cg, tvb, ++ offset++, 1, FALSE); ++ while (nr_cps_cg--) { ++ proto_tree_add_item(conl_tree, hf_om2k_conl_ccp, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ proto_tree_add_item(conl_tree, hf_om2k_conl_ci, tvb, ++ offset++, 1, FALSE); ++ proto_tree_add_item(conl_tree, hf_om2k_conl_tag, tvb, ++ offset++, 1, FALSE); ++ proto_tree_add_item(conl_tree, hf_om2k_conl_tei, tvb, ++ offset++, 1, FALSE); ++ } ++ } ++ return offset - base_offset; ++} ++ ++ ++static gint ++dissect_om2k_attrs(tvbuff_t *tvb, gint base_offs, packet_info *pinfo, ++ proto_tree *tree) ++{ ++ int offset = base_offs; ++ ++ while (tvb_reported_length_remaining(tvb, offset) != 0) { ++ guint8 iei = tvb_get_guint8(tvb, offset++); ++ guint8 len, tmp; ++ switch (iei) { ++ case 0x00: /* Accordance Information */ ++ proto_tree_add_item(tree, hf_om2k_aip, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x06: /* BCC */ ++ proto_tree_add_item(tree, hf_om2k_bcc, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x07: /* BS_AG_BLKS_RES */ ++ proto_tree_add_item(tree, hf_om2k_bs_ag_blks_res, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x09: /* BSIC */ ++ proto_tree_add_item(tree, hf_om2k_bsic, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x0a: /* BS_PA_MFRMS */ ++ proto_tree_add_item(tree, hf_om2k_bs_pa_mfrms, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x0b: /* CBCH indicator */ ++ proto_tree_add_item(tree, hf_om2k_cbi, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x0c: /* CCCH Options */ ++ tmp = tvb_get_guint8(tvb, offset); ++ proto_tree_add_item(tree, hf_om2k_cr, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_item(tree, hf_om2k_ipt3, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_uint(tree, hf_om2k_aop, tvb, ++ offset, 1, (tmp & 0x3f) >> 2); ++ offset++; ++ break; ++ case 0x0d: /* Calendar Time */ ++ offset += dissect_om2k_time(tvb, offset, tree); ++ break; ++ case 0x0f: /* Combination */ ++ proto_tree_add_item(tree, hf_om2k_comb, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x10: /* CON Connection List */ ++ offset += dissect_om2k_con_list(tvb, offset, tree); ++ break; ++ case 0x12: /* DRX_DEV_MAX */ ++ proto_tree_add_item(tree, hf_om2k_drx_dev_max, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x13: /* End List Number */ ++ proto_tree_add_item(tree, hf_om2k_list_nr_end, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x14: /* External Condition Map Class 1 */ ++ /* FIXME */ ++ case 0x15: /* External Condition Map Class 2 */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); ++ break; ++ case 0x16: /* File Relation Indication */ ++ proto_tree_add_item(tree, hf_om2k_filerel_ilr, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_item(tree, hf_om2k_filerel_cur, tvb, ++ offset, 1, FALSE); ++ offset++; ++ proto_tree_add_item(tree, hf_om2k_filerel_other, tvb, ++ offset, 1, FALSE); ++ offset++; ++ break; ++ case 0x17: /* File Revision */ ++ proto_tree_add_item(tree, hf_om2k_file_rev, tvb, ++ offset, 8, FALSE); ++ offset += 8; ++ break; ++ case 0x1c: /* Filling Marker */ ++ proto_tree_add_item(tree, hf_om2k_fill_mark, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x1d: /* FN Offset */ ++ proto_tree_add_item(tree, hf_om2k_fn_offs, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ break; ++ case 0x1e: /* Frequency List */ ++ len = tvb_get_guint8(tvb, offset++); ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); ++ break; ++ case 0x1f: /* Frequency Specifier Rx */ ++ /* FIXME */ ++ case 0x20: /* Frequency Specifier Rx */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); ++ break; ++ case 0x21: /* HSN */ ++ proto_tree_add_item(tree, hf_om2k_hsn, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x22: /* ICM */ ++ proto_tree_add_item(tree, hf_om2k_icm, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x23: /* Internal Fault Map Class 1A */ ++ /* FIXME */ ++ case 0x24: /* Internal Fault Map Class 1B */ ++ /* FIXME */ ++ case 0x25: /* Internal Fault Map Class 2A */ ++ /* FIXME */ ++ case 0x26: /* Internal Fault Map Class 2A Ext */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); ++ break; ++ case 0x27: /* IS Connection List */ ++ offset += dissect_om2k_is_list(tvb, offset, tree); ++ break; ++ case 0x28: /* List Number */ ++ proto_tree_add_item(tree, hf_om2k_list_nr, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2a: /* Local Access State */ ++ proto_tree_add_item(tree, hf_om2k_la_state, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2b: /* MAIO */ ++ proto_tree_add_item(tree, hf_om2k_maio, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2c: /* MO State */ ++ proto_tree_add_item(tree, hf_om2k_mo_state, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2d: /* Ny1 */ ++ proto_tree_add_item(tree, hf_om2k_ny1, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2e: /* Operational Information */ ++ proto_tree_add_item(tree, hf_om2k_oip, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x2f: /* Nominal Power */ ++ proto_tree_add_item(tree, hf_om2k_nom_pwr, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x33: /* Receiver Diversity */ ++ proto_tree_add_item(tree, hf_om2k_diversity, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x34: /* Replacement Unit Map */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); ++ break; ++ case 0x38: /* T3105 */ ++ proto_tree_add_item(tree, hf_om2k_t3105, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x3a: /* TF Mode */ ++ proto_tree_add_item(tree, hf_om2k_tf_mode, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x3c: /* TS Number */ ++ proto_tree_add_item(tree, hf_om2k_ts, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x3d: /* TSC */ ++ proto_tree_add_item(tree, hf_om2k_tsc, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x40: /* BTS Version */ ++ proto_tree_add_item(tree, hf_om2k_bts_manuf, tvb, ++ offset, 3, FALSE); ++ offset += 3; ++ proto_tree_add_item(tree, hf_om2k_bts_gen, tvb, ++ offset, 3, FALSE); ++ offset += 3; ++ proto_tree_add_item(tree, hf_om2k_bts_rev, tvb, ++ offset, 3, FALSE); ++ offset += 3; ++ proto_tree_add_item(tree, hf_om2k_bts_var, tvb, ++ offset, 3, FALSE); ++ offset += 3; ++ break; ++ case 0x43: /* OML Function Map 1 */ ++ case 0x44: /* OML Function Map 2 */ ++ case 0x45: /* RSL Function Map 1 */ ++ case 0x46: /* RSL Function Map 2 */ ++ len = tvb_get_guint8(tvb, offset++); ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); ++ break; ++ case 0x47: /* Ext Range */ ++ proto_tree_add_item(tree, hf_om2k_ext_range, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x48: /* Request Indicators */ ++ proto_tree_add_item(tree, hf_om2k_brr, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_item(tree, hf_om2k_bfr, tvb, ++ offset, 1, FALSE); ++ offset++; ++ break; ++ case 0x50: /* Replacement Unit Map Extension */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); ++ break; ++ case 0x74: /* ICM Boundary */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 5, iei, tree); ++ break; ++ case 0x79: /* Link Supervision Control */ ++ proto_tree_add_item(tree, hf_om2k_lsc_fm, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_item(tree, hf_om2k_lsc_lsi, tvb, ++ offset, 1, FALSE); ++ proto_tree_add_item(tree, hf_om2k_lsc_lsa, tvb, ++ offset, 1, FALSE); ++ offset++; ++ break; ++ case 0x7a: /* Link Supervision Control */ ++ proto_tree_add_item(tree, hf_om2k_ls_ft, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x7b: /* Call Supervision Time */ ++ proto_tree_add_item(tree, hf_om2k_cst, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x7e: /* ICM Channel Rate */ ++ proto_tree_add_item(tree, hf_om2k_icm_cr, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x84: /* HW Info Signature */ ++ proto_tree_add_item(tree, hf_om2k_hwinfo_sig, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ break; ++ case 0x87: /* TTA */ ++ proto_tree_add_item(tree, hf_om2k_tta, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x8a: /* Capabilities Signature */ ++ proto_tree_add_item(tree, hf_om2k_capa_sig, tvb, ++ offset, 2, FALSE); ++ offset += 2; ++ break; ++ case 0x90: /* Negotiation Record I */ ++ case 0x91: /* Negotiation Record II */ ++ len = tvb_get_guint8(tvb, offset++); ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); ++ break; ++ case 0x92: /* Encryption Algorithm */ ++ proto_tree_add_item(tree, hf_om2k_ea, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x94: /* Interference Rejection Combining */ ++ proto_tree_add_item(tree, hf_om2k_irc, tvb, ++ offset++, 1, FALSE); ++ break; ++ case 0x95: /* Dedication information */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 3, iei, tree); ++ break; ++ case 0x98: /* FS Offset */ ++ proto_tree_add_item(tree, hf_om2k_tf_fs_offset, tvb, ++ offset, 5, FALSE); ++ offset += 5; ++ break; ++ case 0x9c: /* External Condition Class 2 Extension */ ++ /* FIXME */ ++ offset += dissect_om2k_attr_unkn(tvb, offset, 4, iei, tree); ++ break; ++ case 0x9d: /* TSs MO State */ ++ dissect_tss_mo_state(tvb, offset, pinfo, tree); ++ offset += 4; ++ break; ++ case 0x9e: ++ case 0x9f: ++ default: ++ tmp = tvb_get_guint8(tvb, offset); ++ proto_tree_add_uint_format(tree, hf_om2k_unknown_tag, tvb, ++ offset-1, 1, tmp, "Tag %s: 0x%02x", ++ val_to_str(iei, om2k_attr_vals, "0x%02x"), tmp); ++ offset++; ++ break; ++ } ++ } ++ ++ return offset; ++} ++ ++static guint ++dissect_om2k_mo(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree) ++{ ++ proto_item *ti; ++ proto_tree *mo_tree; ++ guint8 class = tvb_get_guint8(tvb, offset); ++ guint8 inst = tvb_get_guint8(tvb, offset+3); ++ ++ ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset, ++ 4, FALSE); ++ mo_tree = proto_item_add_subtree(ti, ett_om2k_mo); ++ proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset, ++ 1, FALSE); ++ proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3, ++ 1, FALSE); ++ proto_item_append_text(ti, ", Class: %s, Instance: %u", ++ val_to_str(class, om2k_mo_class_vals, "0x%02x"), ++ inst); ++ col_append_fstr(pinfo->cinfo, COL_INFO, ", (%-4s %u)", ++ val_to_str(class, &om2k_mo_class_short_vals, ++ "0x%02x"), inst); ++ return 4; ++} ++ ++static void ++dissect_abis_om2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ++{ ++ proto_item *ti; ++ proto_tree *om2k_tree; ++ ++ int offset = 0; ++ ++ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OM2000"); ++ ++ top_tree = tree; ++ if (tree) { ++ guint16 msg_code = tvb_get_ntohs(tvb, offset); ++ guint8 tmp; ++ ++ ti = proto_tree_add_item(tree, proto_abis_om2000, ++ tvb, 0, -1, FALSE); ++ om2k_tree = proto_item_add_subtree(ti, ett_om2000); ++ ++ proto_tree_add_item(om2k_tree, hf_om2k_msg_code, tvb, offset, ++ 2, FALSE); ++ offset += 2; ++ ++ offset += dissect_om2k_mo(tvb, offset, pinfo, om2k_tree); ++ ++ col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", ++ val_to_str(msg_code, &om2k_msgcode_vals, ++ "unknown 0x%04x")); ++ proto_item_append_text(ti, " %s ", ++ val_to_str(msg_code, &om2k_msgcode_vals, ++ "unknown 0x%04x")); ++ ++ switch (msg_code) { ++ case 0x74: /* Operational Info */ ++ tmp = tvb_get_guint8(tvb, offset+1); ++ proto_item_append_text(ti, ": %s", ++ val_to_str(tmp, om2k_oip_vals, ++ "unknown 0x%02x")); ++ break; ++ case 0x1A: /* CON Configuration Result */ ++ case 0x66: /* IS Configuration Result */ ++ case 0x82: /* RX Configuration Result */ ++ case 0xA6: /* TF Configuration Result */ ++ case 0xAE: /* TS Configuration Result */ ++ case 0xB6: /* TX Configuration Result */ ++ case 0xE2: /* DP Configuration Result */ ++ case 0xF6: /* DP Configuration Result */ ++ tmp = tvb_get_guint8(tvb, offset+1); ++ proto_item_append_text(ti, ": %s", ++ val_to_str(tmp, om2k_aip_vals, ++ "unknown 0x%02x")); ++ break; ++ default: ++ break; ++ } ++ dissect_om2k_attrs(tvb, offset, pinfo, om2k_tree); ++ } ++} ++ ++void ++proto_reg_handoff_abis_om2000(void); ++ ++void ++proto_register_abis_om2000(void) ++{ ++ static hf_register_info hf[] = { ++ { &hf_om2k_msg_code, ++ { "Message Code", "om2000.msg_code", ++ FT_UINT16, BASE_HEX, VALS(om2k_msgcode_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_mo_if, ++ { "MO Interface", "om2000.mo_if", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_mo_class, ++ { "MO IF Class", "om2000.mo_if.class", ++ FT_UINT8, BASE_HEX, VALS(om2k_mo_class_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_mo_instance, ++ { "MO IF Instance", "om2000.mo_if.instance", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_oip, ++ { "OIP (Operational Info)", "om2000.oip", ++ FT_UINT8, BASE_HEX, VALS(om2k_oip_vals), 0, ++ "Operational Information Parameter", HFILL } ++ }, ++ { &hf_om2k_aip, ++ { "AIP (Accordance Info)", "om2000.aip", ++ FT_UINT8, BASE_HEX, VALS(om2k_aip_vals), 0, ++ "Accordance Information Parameter", HFILL } ++ }, ++ { &hf_om2k_comb, ++ { "Channel Combination", "om2000.chan_comb", ++ FT_UINT8, BASE_DEC, VALS(om2k_comb_vals), 0, ++ "Logical Channel Combination", HFILL } ++ }, ++ { &hf_om2k_ts, ++ { "Timeslot Number", "om2000.ts", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_hsn, ++ { "HSN", "om2000.hsn", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Hopping Sequence Number", HFILL } ++ }, ++ { &hf_om2k_maio, ++ { "MAIO", "om2000.maio", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Mobile Allication Index Offset", HFILL } ++ }, ++ { &hf_om2k_bsic, ++ { "BSIC", "om2000.bsic", ++ FT_UINT8, BASE_HEX, NULL, 0, ++ "Base Station Identity Code", HFILL } ++ }, ++ { &hf_om2k_diversity, ++ { "Receiver Diversity", "om2000.diversity", ++ FT_UINT8, BASE_HEX, VALS(om2k_diversity_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_fn_offs, ++ { "FN Offset", "om2000.fn_offset", ++ FT_UINT16, BASE_DEC, NULL, 0, ++ "GSM Frame Number Offset", HFILL } ++ }, ++ { &hf_om2k_ext_range, ++ { "Extended Range", "om2000.ext_range", ++ FT_BOOLEAN, 1, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_irc, ++ { "Interference Rejection Combining", "om2000.irc", ++ FT_BOOLEAN, 1, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bs_pa_mfrms, ++ { "BS_PA_MFRMS", "om2000.bs_pa_mfrms", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bs_ag_blks_res, ++ { "BS_AG_BLKS_RES", "om2000.bs_ag_blks_res", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_drx_dev_max, ++ { "DRX_DEV_MAX", "om2000.drx_dev_max", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_cr, ++ { "CCCH Repeat", "om2000.ccch_repeat", ++ FT_BOOLEAN, 1, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_ipt3, ++ { "Inhibit Paging Request Type 3", "om2000.ipt3", ++ FT_BOOLEAN, 2, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_aop, ++ { "Age Of Paging", "om2000.aop", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_t3105, ++ { "T3105 (in 10ms)", "om2000.t3105", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_ny1, ++ { "Ny1", "om2000.ny1", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_cbi, ++ { "CBCH Indicator", "om2000.ny1", ++ FT_BOOLEAN, 1, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_tsc, ++ { "Training Sequence Code", "om2000.tsc", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_icm, ++ { "Idle Channel Measurement", "om2000.icm", ++ FT_BOOLEAN, 1, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_tta, ++ { "Timer for Time Alignment", "om2000.tta", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_icm_cr, ++ { "ICM Channel Rate", "om2000.icm_cr", ++ FT_BOOLEAN, 1, VALS(om2k_icmcr_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_lsc_fm, ++ { "LSC Dummy Frequency Measurement", "om2000.lsc.fm", ++ FT_BOOLEAN, 0x80, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_lsc_lsi, ++ { "LSC Idle Channels", "om2000.ls.lsi", ++ FT_BOOLEAN, 0x01, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_lsc_lsa, ++ { "LSC Active Channels", "om2000.ls.lsa", ++ FT_BOOLEAN, 0x02, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_ls_ft, ++ { "Link Supervision Filtering Time (100ms)", "om2000.ls_ft", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_cst, ++ { "Call Supervision Time (480ms)", "om2000.cst", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_ea, ++ { "Encryption Algorithm", "om2000.ea", ++ FT_UINT8, BASE_DEC, VALS(om2k_ea_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_nom_pwr, ++ { "Nominal Power (dBm)", "om2000.pwr", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_fill_mark, ++ { "Filling Marker", "om2000.filling", ++ FT_BOOLEAN, 0x01, VALS(om2k_fill_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bcc, ++ { "BCC", "om2000.bcc", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ "Base Station Color Code", HFILL } ++ }, ++ { &hf_om2k_mo_state, ++ { "MO State", "om2000.mo_state", ++ FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_la_state, ++ { "Local Access State", "om2000.la_state", ++ FT_UINT8, BASE_DEC, VALS(om2k_la_state_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_tsn_state, ++ { "Time Slot N MO State", "om2000.tsn_mo_state", ++ FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bts_manuf, ++ { "BTS Manufacturer ID", "om2000.bts_ver.manuf", ++ FT_STRING, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bts_gen, ++ { "BTS Generation", "om2000.bts_ver.gen", ++ FT_STRING, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bts_rev, ++ { "BTS Revision", "om2000.bts_ver.rev", ++ FT_STRING, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bts_var, ++ { "BTS Variant", "om2000.bts_ver.variant", ++ FT_STRING, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_brr, ++ { "BTS Requested Restart", "om2000.brr", ++ FT_BOOLEAN, 0x01, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_bfr, ++ { "BTS Requested File Relation", "om2000.bfr", ++ FT_BOOLEAN, 0x01, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_hwinfo_sig, ++ { "HW Info Signature", "om2000.hwinfo_sig", ++ FT_UINT16, BASE_HEX, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_capa_sig, ++ { "Capabilities Signature", "om2000.capa_sig", ++ FT_UINT16, BASE_HEX, NULL, 0, ++ NULL, HFILL } ++ }, ++ ++ { &hf_om2k_unknown_tag, ++ { "Unknown Tag", "om2000.unknown.tag", ++ FT_UINT8, BASE_HEX, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_unknown_val, ++ { "Unknown Value", "om2000.unknown.val", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ ++ { &hf_om2k_file_rev, ++ { "File Revision", "om2000.file_rev", ++ FT_STRING, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_filerel_ilr, ++ { "Immediate Load Requested", "om2000.filerel.ilr", ++ FT_BOOLEAN, 0x08, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_filerel_cur, ++ { "Current State", "om2000.filerel.cur", ++ FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_filerel_other, ++ { "Other State", "om2000.filerel.other", ++ FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_cal_time, ++ { "Calendar Time", "om2000.cal_time", ++ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_list_nr, ++ { "List Number", "om2000.list_nr", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_list_nr_end, ++ { "End List Number", "om2000.list_nr_end", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_isl, ++ { "IS Connection List", "om2000.is_list", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_isl_icp1, ++ { "ICP1", "om2000.is_list.icp1", ++ FT_UINT16, BASE_DEC, NULL, 0x7ff, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_isl_icp2, ++ { "ICP2", "om2000.is_list.icp2", ++ FT_UINT16, BASE_DEC, NULL, 0x7ff, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_isl_ci, ++ { "Contiguity Index", "om2000.is_list.ci", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_conl, ++ { "Connection List", "om2000.con_list", ++ FT_BYTES, BASE_NONE, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_conl_nr_cgs, ++ { "Number of CGs", "om2000.con_list.nr_cgs", ++ FT_UINT8, BASE_DEC, NULL, 0x1f, ++ "Number of Concentration Groups in the DE", HFILL } ++ }, ++ { &hf_om2k_conl_nr_cps_cg, ++ { "Number of CPS in CG", "om2000.con_list.nr_cps_cg", ++ FT_UINT8, BASE_DEC, NULL, 0x1f, ++ "Number of CPS in Concentration Group", HFILL } ++ }, ++ { &hf_om2k_conl_ccp, ++ { "CON Connection Point", "om2000.con_list.cpp", ++ FT_UINT16, BASE_DEC, NULL, 0x3ff, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_conl_ci, ++ { "Contiguity Index", "om2000.con_list.ci", ++ FT_UINT8, BASE_DEC, NULL, 0x7, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_conl_tag, ++ { "Tag", "om2000.con_list.tag", ++ FT_UINT8, BASE_DEC, NULL, 0x1f, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_conl_tei, ++ { "TEI", "om2000.con_list.tei", ++ FT_UINT8, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_tf_mode, ++ { "TF Mode", "om2000.tf_mode", ++ FT_UINT8, BASE_HEX, VALS(om2k_tf_mode_vals), 0, ++ NULL, HFILL } ++ }, ++ { &hf_om2k_tf_fs_offset, ++ { "TF FS Offset", "om2000.tf_fs_offset", ++ FT_UINT64, BASE_DEC, NULL, 0, ++ NULL, HFILL } ++ }, ++ }; ++ static gint *ett[] = { ++ &ett_om2000, ++ &ett_om2k_mo, ++ &ett_om2k_isl, ++ &ett_om2k_conl, ++ }; ++ ++ module_t *oml_module; ++ ++ proto_abis_om2000 = proto_register_protocol("Ericsson A-bis OML", ++ "Ericsson OML", ++ "gsm_abis_om2000"); ++ ++ proto_register_field_array(proto_abis_om2000, hf, array_length(hf)); ++ ++ proto_register_subtree_array(ett, array_length(ett)); ++ ++ register_dissector("gsm_abis_om2000", dissect_abis_om2000, ++ proto_abis_om2000); ++#if 0 ++ oml_module = prefs_register_protocol(proto_abis_oml, proto_reg_handoff_abis_oml); ++ prefs_register_bool_preference(oml_module, "use_ipaccess_oml", ++ "Use nanoBTS definitions", ++ "Use ipaccess nanoBTS specific definitions for OML", ++ &global_oml_use_nano_bts); ++#endif ++} ++ ++/* This function is called once at startup and every time the user hits ++ * 'apply' in the preferences dialogue */ ++void ++proto_reg_handoff_abis_om2000(void) ++{ ++ static gboolean initialized = FALSE; ++ ++ if (!initialized) { ++ dissector_handle_t abis_om2k_handle; ++ ++ abis_om2k_handle = create_dissector_handle(dissect_abis_om2000, ++ proto_abis_om2000); ++ //dissector_add("lapd.gsm.sapi", LAPD_GSM_SAPI_OM_PROC, abis_oml_handle); ++ } else { ++ /* preferences have been changed */ ++ } ++} +diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c +index f0b69e7..46a9fad 100644 +--- a/epan/dissectors/packet-gsm_abis_oml.c ++++ b/epan/dissectors/packet-gsm_abis_oml.c +@@ -119,9 +119,12 @@ static int ett_oml_fom_att = -1; + + /* Decode things as nanoBTS traces */ + static gboolean global_oml_use_nano_bts = TRUE; ++static gboolean global_oml_use_ericsson = TRUE; + + 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" }, +@@ -1196,6 +1199,7 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) + top_tree = tree; + if (tree) { + u_int8_t msg_disc = tvb_get_guint8(tvb, offset); ++ u_int8_t len = tvb_get_guint8(tvb, offset+3); + + ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, FALSE); + oml_tree = proto_item_add_subtree(ti, ett_oml); +@@ -1209,6 +1213,14 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) + proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++, + 1, TRUE); + ++ if (global_oml_use_ericsson == TRUE) { ++ 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, +@@ -1222,6 +1234,8 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) + default: + break; + } ++ ++ } + } + } + +@@ -1569,6 +1583,11 @@ proto_register_abis_oml(void) + "Use nanoBTS definitions", + "Use ipaccess nanoBTS specific definitions for OML", + &global_oml_use_nano_bts); ++ ++ prefs_register_bool_preference(oml_module, "use_ericsson_oml", ++ "Use Ericsson definitions", ++ "Use Ericsson A-bis OML (OM2000) definitions for OML", ++ &global_oml_use_ericsson); + } + + /* This function is called once at startup and every time the user hits +@@ -1605,4 +1624,6 @@ proto_reg_handoff_abis_oml(void) + oml_fom_attr_vse._vs_num_entries = + array_length(oml_fom_attr_vals_bs11)-1; + } ++ ++ sub_om2000 = find_dissector("gsm_abis_om2000"); + } +diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c +index 4380bbc..0ebcd9d 100644 +--- a/epan/dissectors/packet-l2tp.c ++++ b/epan/dissectors/packet-l2tp.c +@@ -148,6 +148,7 @@ static enum_val_t l2tpv3_cookies[] = { + #define L2TPv3_PROTOCOL_AAL5 6 + #define L2TPv3_PROTOCOL_LAPD 7 + #define L2TPv3_PROTOCOL_DOCSIS_DMPT 8 ++#define L2TPv3_PROTOCOL_ERICSSON 9 + + static enum_val_t l2tpv3_protocols[] = { + {"eth", "Ethernet", L2TPv3_PROTOCOL_ETH}, +@@ -159,6 +160,7 @@ static enum_val_t l2tpv3_protocols[] = { + {"aal5", "AAL5", L2TPv3_PROTOCOL_AAL5}, + {"lapd", "LAPD", L2TPv3_PROTOCOL_LAPD}, + {"docsis-dmpt", "DOCSIS-DMPT", L2TPv3_PROTOCOL_DOCSIS_DMPT}, ++ {"ehdlc", "Ericsson HDLC", L2TPv3_PROTOCOL_ERICSSON}, + {NULL, NULL, 0} + }; + +@@ -583,6 +585,7 @@ static dissector_handle_t atm_oam_handle; + static dissector_handle_t llc_handle; + static dissector_handle_t lapd_handle; + static dissector_handle_t mp2t_handle; ++static dissector_handle_t ehdlc_handle; + static dissector_handle_t data_handle; + + /* +@@ -1498,6 +1501,9 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, + case L2TPv3_PROTOCOL_LAPD: + call_dissector(lapd_handle, next_tvb, pinfo, tree); + break; ++ case L2TPv3_PROTOCOL_ERICSSON: ++ call_dissector(ehdlc_handle, next_tvb, pinfo, tree); ++ break; + default: + call_dissector(data_handle, next_tvb, pinfo, tree); + break; +@@ -2171,5 +2177,6 @@ proto_reg_handoff_l2tp(void) + llc_handle = find_dissector("llc"); + lapd_handle = find_dissector("lapd"); + mp2t_handle = find_dissector("mp2t"); ++ ehdlc_handle = find_dissector("ehdlc"); + data_handle = find_dissector("data"); + } +-- +1.7.3.4 + diff --git a/wireshark/0003-lucent-hnb.patch b/wireshark/0003-lucent-hnb.patch new file mode 100644 index 000000000..4957db71d --- /dev/null +++ b/wireshark/0003-lucent-hnb.patch @@ -0,0 +1,149 @@ +From 48f2a191de62686c2ffdb97e46b5cc6bb61a868d Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther +Date: Tue, 11 Jan 2011 15:16:19 +0100 +Subject: [PATCH 3/4] lucent-hnb + +Add lucent hnb patch from OpenBSC +--- + epan/CMakeLists.txt | 1 + + epan/dissectors/Makefile.common | 1 + + epan/dissectors/packet-lucent_hnb.c | 103 +++++++++++++++++++++++++++++++++++ + 3 files changed, 105 insertions(+), 0 deletions(-) + create mode 100644 epan/dissectors/packet-lucent_hnb.c + +diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt +index 9217ec0..ac76ab9 100644 +--- a/epan/CMakeLists.txt ++++ b/epan/CMakeLists.txt +@@ -728,6 +728,7 @@ set(DISSECTOR_SRC + dissectors/packet-lpd.c + dissectors/packet-lsc.c + dissectors/packet-ltp.c ++ dissectors/packet-lucent_hnb.c + dissectors/packet-lwapp.c + dissectors/packet-lwres.c + dissectors/packet-m2pa.c +diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common +index 4c7094b..9931f28 100644 +--- a/epan/dissectors/Makefile.common ++++ b/epan/dissectors/Makefile.common +@@ -638,6 +638,7 @@ DISSECTOR_SRC = \ + packet-lpd.c \ + packet-lsc.c \ + packet-ltp.c \ ++ packet-lucent_hnb.c \ + packet-lwapp.c \ + packet-lwres.c \ + packet-m2pa.c \ +diff --git a/epan/dissectors/packet-lucent_hnb.c b/epan/dissectors/packet-lucent_hnb.c +new file mode 100644 +index 0000000..296f98b +--- /dev/null ++++ b/epan/dissectors/packet-lucent_hnb.c +@@ -0,0 +1,103 @@ ++/* packet-lucent_hnb.c ++ * Routines for packet dissection of Alcatel/Lucent HomeNodeB ++ * Copyright 2009 by Harald Welte ++ * ++ * This protocol decoder is based entirely on reverse engineering, i.e. ++ * on educated guesses. ++ * ++ * $Id: packet-lucent_hnb.c 29254 2009-07-31 19:19:25Z gerald $ ++ * ++ * Wireshark - Network traffic analyzer ++ * By Gerald Combs ++ * 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 ++ ++#define LHNB_SCTP_PPI_MM 1 ++#define LHNB_SCTP_PPI_GMM 6 ++ ++#define LHNB_SCTP_PORT 6005 ++ ++#include ++ ++#include ++ ++/* Initialize the protocol and registered fields */ ++static int proto_lhnb = -1; ++ ++static int hf_lhnb_length = -1; ++ ++/* Initialize the subtree pointers */ ++static gint ett_lhnb = -1; ++ ++static dissector_handle_t ranap_handle; ++ ++/* Code to actually dissect the packets */ ++static void ++dissect_lhnb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ++{ ++ ++ int offset = 0; ++ u_int16_t len; ++ tvbuff_t *next_tvb; ++ ++ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LHNB"); ++ col_clear(pinfo->cinfo, COL_INFO); ++ ++ proto_tree_add_item(tree, hf_lhnb_length, tvb, offset+2, 2, FALSE); ++ len = tvb_get_ntohs(tvb, offset+2); ++ next_tvb = tvb_new_subset(tvb, offset+2+6, len-4, -1); ++ ++ call_dissector(ranap_handle, next_tvb, pinfo, tree); ++} ++ ++void proto_register_lucent_hnb(void) ++{ ++ static hf_register_info hf[] = { ++ {&hf_lhnb_length, ++ {"Length", "lhnb.len", ++ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} ++ }, ++ }; ++ ++ static gint *ett[] = { ++ &ett_lhnb, ++ }; ++ ++ proto_lhnb = ++ proto_register_protocol("Alcatel/Lucent HomeNodeB", ++ "Lucent HNB", "lhnb"); ++ ++ proto_register_field_array(proto_lhnb, hf, array_length(hf)); ++ proto_register_subtree_array(ett, array_length(ett)); ++} ++ ++void proto_reg_handoff_lucent_hnb(void) ++{ ++ dissector_handle_t lhnb_handle; ++ ++ ranap_handle = find_dissector("ranap"); ++ ++ lhnb_handle = create_dissector_handle(dissect_lhnb, proto_lhnb); ++ ++ dissector_add("sctp.ppi", LHNB_SCTP_PPI_MM, lhnb_handle); ++ dissector_add("sctp.ppi", LHNB_SCTP_PPI_GMM, lhnb_handle); ++ dissector_add("sctp.port", LHNB_SCTP_PORT, lhnb_handle); ++} +-- +1.7.3.4 + diff --git a/wireshark/0004-rsl-ipaccess.patch b/wireshark/0004-rsl-ipaccess.patch new file mode 100644 index 000000000..6f2b8c132 --- /dev/null +++ b/wireshark/0004-rsl-ipaccess.patch @@ -0,0 +1,665 @@ +From 54882db58b6ec12da6b80071e0ac2344d42df24c Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther +Date: Tue, 11 Jan 2011 16:22:33 +0100 +Subject: [PATCH 4/4] rsl-ipaccess + +Add vendor specific commands for RSL. +--- + epan/dissectors/packet-rsl.c | 522 +++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 515 insertions(+), 7 deletions(-) + +diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c +index bf83f6f..d858e1a 100644 +--- a/epan/dissectors/packet-rsl.c ++++ b/epan/dissectors/packet-rsl.c +@@ -2,6 +2,7 @@ + * Routines for Radio Signalling Link (RSL) dissection. + * + * Copyright 2007, Anders Broman ++ * Copyright 2009, Harald Welte + * + * $Id$ + * +@@ -42,6 +43,8 @@ + #include + + #include "packet-gsm_a_common.h" ++#include "packet-rtp.h" ++#include "packet-rtcp.h" + + /* Initialize the protocol and registered fields */ + static int proto_rsl = -1; +@@ -116,6 +119,24 @@ static int hf_rsl_emlpp_prio = -1; + static int hf_rsl_rtd = -1; + static int hf_rsl_delay_ind = -1; + static int hf_rsl_tfo = -1; ++static int hf_rsl_speech_mode_s = -1; ++static int hf_rsl_speech_mode_m = -1; ++static int hf_rsl_conn_stat = -1; ++static int hf_rsl_conn_id = -1; ++static int hf_rsl_rtp_payload = -1; ++static int hf_rsl_rtp_csd_fmt_d = -1; ++static int hf_rsl_rtp_csd_fmt_ir = -1; ++static int hf_rsl_local_port = -1; ++static int hf_rsl_remote_port = -1; ++static int hf_rsl_local_ip = -1; ++static int hf_rsl_remote_ip = -1; ++static int hf_rsl_cstat_tx_pkts = -1; ++static int hf_rsl_cstat_tx_octs = -1; ++static int hf_rsl_cstat_rx_pkts = -1; ++static int hf_rsl_cstat_rx_octs = -1; ++static int hf_rsl_cstat_lost_pkts = -1; ++static int hf_rsl_cstat_ia_jitter = -1; ++static int hf_rsl_cstat_avg_tx_dly = -1; + + /* Initialize the subtree pointers */ + static int ett_rsl = -1; +@@ -173,6 +194,15 @@ static int ett_ie_cause = -1; + static int ett_ie_meas_res_no = -1; + static int ett_ie_message_id = -1; + static int ett_ie_sys_info_type = -1; ++static int ett_ie_speech_mode = -1; ++static int ett_ie_conn_stat = -1; ++static int ett_ie_conn_id = -1; ++static int ett_ie_remote_ip = -1; ++static int ett_ie_remote_port = -1; ++static int ett_ie_local_port = -1; ++static int ett_ie_local_ip = -1; ++static int ett_ie_rtp_payload = -1; ++ + + static proto_tree *top_tree; + static dissector_handle_t gsm_a_ccch_handle; +@@ -208,8 +238,11 @@ static const value_string rsl_msg_disc_vals[] = { + { 0x06, "Common Channel Management messages" }, + { 0x08, "TRX Management messages" }, + { 0x16, "Location Services messages" }, ++ { 0x3f, "ip.access Vendor Specific messages" }, + { 0, NULL } + }; ++#define RSL_MSGDISC_IPACCESS 0x3f ++ + /* + * 9.2 MESSAGE TYPE + */ +@@ -276,6 +309,49 @@ static const value_string rsl_msg_disc_vals[] = { + /* 0 1 - - - - - - Location Services messages: */ + #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ + ++/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation ++ * about those extensions, all information in this dissector is based on lawful ++ * protocol reverse enginering by Harald Welte */ ++#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60 ++#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61 ++#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62 ++ ++#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48 ++#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49 ++#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a ++#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b ++#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c ++#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d ++ ++#define RSL_MSG_TYPE_IPAC_CRCX 0x70 ++#define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71 ++#define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72 ++#define RSL_MSG_TYPE_IPAC_MDCX 0x73 ++#define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74 ++#define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75 ++#define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76 ++#define RSL_MSG_TYPE_IPAC_DLCX 0x77 ++#define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78 ++#define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79 ++ ++#define RSL_IE_IPAC_SRTP_CONFIG 0xe0 ++#define RSL_IE_IPAC_PROXY_UDP 0xe1 ++#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2 ++#define RSL_IE_IPAC_REMOTE_IP 0xf0 ++#define RSL_IE_IPAC_REMOTE_PORT 0xf1 ++#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2 ++#define RSL_IE_IPAC_LOCAL_PORT 0xf3 ++#define RSL_IE_IPAC_SPEECH_MODE 0xf4 ++#define RSL_IE_IPAC_LOCAL_IP 0xf5 ++#define RSL_IE_IPAC_CONN_STAT 0xf6 ++#define RSL_IE_IPAC_HO_C_PARMS 0xf7 ++#define RSL_IE_IPAC_CONN_ID 0xf8 ++#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9 ++#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa ++#define RSL_IE_IPAC_RTP_COMPR 0xfb ++#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc ++#define RSL_IE_IPAC_RTP_MPLEX 0xfd ++#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe + + static const value_string rsl_msg_type_vals[] = { + /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ +@@ -338,6 +414,26 @@ static const value_string rsl_msg_type_vals[] = { + { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ + /* 0 1 - - - - - - Location Services messages: */ + { 0x41, "Location Information" }, /* 8.7.1 */ ++ /* ip.access */ ++ { 0x48, "ip.access PDCH ACTIVATION" }, ++ { 0x49, "ip.access PDCH ACTIVATION ACK" }, ++ { 0x4a, "ip.access PDCH ACTIVATION NACK" }, ++ { 0x4b, "ip.access PDCH DEACTIVATION" }, ++ { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, ++ { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, ++ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, ++ { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, ++ { 0x62, "ip.access HANDOover CANDidate RESPonse" }, ++ { 0x70, "ip.access CRCX" }, ++ { 0x71, "ip.access CRCX ACK" }, ++ { 0x72, "ip.access CRCX NACK" }, ++ { 0x73, "ip.access MDCX" }, ++ { 0x74, "ip.access MDCX ACK" }, ++ { 0x75, "ip.access MDCX NACK" }, ++ { 0x76, "ip.access DLCX INDication" }, ++ { 0x77, "ip.access DLCX" }, ++ { 0x78, "ip.access DLCX ACK" }, ++ { 0x79, "ip.access DLCX NACK" }, + { 0, NULL } + }; + +@@ -371,10 +467,10 @@ static const value_string rsl_msg_type_vals[] = { + #define RSL_IE_MESSAGE_ID 28 + + #define RSL_IE_SYS_INFO_TYPE 30 +- +- +- +- ++#define RSL_IE_MS_POWER_PARAM 31 ++#define RSL_IE_BS_POWER_PARAM 32 ++#define RSL_IE_PREPROC_PARAM 33 ++#define RSL_IE_PREPROC_MEAS 34 + #define RSL_IE_FULL_IMM_ASS_INF 35 + #define RSL_IE_SMSCB_INF 36 + #define RSL_IE_FULL_MS_TIMING_OFFSET 37 +@@ -477,6 +573,24 @@ static const value_string rsl_ie_type_vals[] = { + Not used + + */ ++ { 0xe0, "SRTP Configuration" }, ++ { 0xe1, "BSC Proxy UDP Port" }, ++ { 0xe2, "BSC Multiplex Timeout" }, ++ { 0xf0, "Remote IP Address" }, ++ { 0xf1, "Remote RTP Port" }, ++ { 0xf2, "RTP Payload Type" }, ++ { 0xf3, "Local RTP Port" }, ++ { 0xf4, "Speech Mode" }, ++ { 0xf5, "Local IP Address" }, ++ { 0xf6, "Connection Statistics" }, ++ { 0xf7, "Handover C Parameters" }, ++ { 0xf8, "Connection Identifier" }, ++ { 0xf9, "RTP CSD Format" }, ++ { 0xfa, "RTP Jitter Buffer" }, ++ { 0xfb, "RTP Compression" }, ++ { 0xfc, "RTP Payload Type 2" }, ++ { 0xfd, "RTP Multiplex" }, ++ { 0xfe, "RTP Multiplex Identifier" }, + { 0, NULL } + }; + +@@ -513,6 +627,96 @@ static const value_string rsl_ch_no_Cbits_vals[] = { + { 0, NULL } + }; + ++/* From openbsc/include/openbsc/tlv.h */ ++enum tlv_type { ++ TLV_TYPE_FIXED, ++ TLV_TYPE_T, ++ TLV_TYPE_TV, ++ TLV_TYPE_TLV, ++ TLV_TYPE_TL16V, ++}; ++ ++struct tlv_def { ++ enum tlv_type type; ++ u_int8_t fixed_len; ++}; ++ ++struct tlv_definition { ++ struct tlv_def def[0xff]; ++}; ++ ++static const struct tlv_definition rsl_att_tlvdef = { ++ .def = { ++ [RSL_IE_CH_NO] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_LINK_ID] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_ACT_TYPE] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_BS_POW] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_CH_ID] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CH_MODE] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_ENC_INF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_FRAME_NO] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_HO_REF] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_L1_INF] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_L3_INF] = { TLV_TYPE_TL16V, 0 }, ++ [RSL_IE_MS_ID] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_MS_POW] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_PAGING_GRP] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_PAGING_LOAD] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_PHY_CTX] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_ACCESS_DELAY] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_RACH_LOAD] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_REQ_REF] = { TLV_TYPE_FIXED, 3 }, ++ [RSL_IE_REL_MODE] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_RESOURCE_INF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_RLM_CAUSE] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_STARTING_TIME] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_TIMING_ADV] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_UPLINK_MEAS] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CAUSE] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_MEAS_RES_NO] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_MESSAGE_ID] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_SYS_INFO_TYPE] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_MS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_BS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_PREPROC_PARAM] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_PREPROC_MEAS] = { TLV_TYPE_TLV, 0 }, ++ //[RSL_IE_IMM_ASS_INFO] = { TLV_TYPE_TLV, 0 }, ++ //[RSL_IE_SMSCB_INFO] = { TLV_TYPE_FIXED, 23 }, ++ //[RSL_IE_MS_TIMING_OFFSET] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_ERR_MSG] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_FULL_BCCH_INF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CH_NEEDED] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_CB_CMD_TYPE] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_SMSCB_MESS] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_FULL_IMM_ASS_INF] = { TLV_TYPE_TLV, 0 }, ++ //[RSL_IE_SACCH_INFO] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CBCH_LOAD_INF] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_SMSCB_CH_IND] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_GRP_CALL_REF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CH_DESC] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_NCH_DRX_INF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CMD_IND] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_EMLPP_PRIO] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_UIC] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_MAIN_CH_REF] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_MULTIRATE_CONF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_MULTIRATE_CNTRL] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_SUP_CODEC_TYPES] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_CODEC_CONF] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_RTD] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_TFO_STATUS] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_LLP_APDU] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 }, ++ [RSL_IE_IPAC_REMOTE_PORT] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 }, ++ [RSL_IE_IPAC_CONN_STAT] = { TLV_TYPE_TLV, 0 }, ++ [RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV, 0 }, ++ [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 }, ++ [RSL_IE_IPAC_RTP_PAYLOAD2] = { TLV_TYPE_TV, 0 }, ++ }, ++}; ++ + /* 9.3.1 Channel number 9.3.1 M TV 2 */ + static int + dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) +@@ -2045,7 +2249,6 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int + proto_item_set_len(ti, length+2); + + proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); +- offset++; + + /* Received Message */ + offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset); +@@ -2910,12 +3113,184 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree + } + + static int ++dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) ++{ ++ guint8 msg_type; ++ guint32 local_addr = 0; ++ guint16 local_port = 0; ++ address src_addr; ++ ++ msg_type = tvb_get_guint8(tvb, offset)&0x7f; ++ offset++; ++ ++#if 0 ++ switch (msg_type) { ++ case RSL_MSG_TYPE_IPAC_CRCX: ++ case RSL_MSG_TYPE_IPAC_CRCX_ACK: ++ case RSL_MSG_TYPE_IPAC_CRCX_NACK: ++ case RSL_MSG_TYPE_IPAC_MDCX: ++ case RSL_MSG_TYPE_IPAC_MDCX_ACK: ++ case RSL_MSG_TYPE_IPAC_MDCX_NACK: ++ case RSL_MSG_TYPE_IPAC_DLCX_IND: ++ case RSL_MSG_TYPE_IPAC_DLCX: ++ case RSL_MSG_TYPE_IPAC_DLCX_ACK: ++ case RSL_MSG_TYPE_IPAC_DLCX_NACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: ++ /* Channel number 9.3.1 M TV 2 */ ++ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); ++ break; ++ } ++#endif ++ /* parse TLV attributes */ ++ while (tvb_reported_length_remaining(tvb, offset) != 0) { ++ guint8 tag; ++ unsigned int len, hlen, len_len; ++ const struct tlv_def *tdef; ++ proto_item *ti; ++ proto_tree *ie_tree; ++ ++ tag = tvb_get_guint8(tvb, offset); ++ tdef = &rsl_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_rsl_ie_id, tvb, offset, 1, FALSE); ++ ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); ++ offset += hlen; ++ ++ switch (tag) { ++ case RSL_IE_CH_NO: ++ dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE); ++ break; ++ case RSL_IE_FRAME_NO: ++ dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE); ++ break; ++ case RSL_IE_MS_POW: ++ dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE); ++ break; ++ case RSL_IE_IPAC_REMOTE_IP: ++ proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_REMOTE_PORT: ++ proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_LOCAL_IP: ++ proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb, ++ offset, len, FALSE); ++ local_addr = tvb_get_ipv4(tvb, offset); ++ break; ++ case RSL_IE_IPAC_LOCAL_PORT: ++ proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, ++ offset, len, FALSE); ++ local_port = tvb_get_ntohs(tvb, offset); ++ break; ++ case RSL_IE_IPAC_SPEECH_MODE: ++ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb, ++ offset, len, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_RTP_PAYLOAD: ++ case RSL_IE_IPAC_RTP_PAYLOAD2: ++ proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_RTP_CSD_FMT: ++ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb, ++ offset, len, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_CONN_ID: ++ proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb, ++ offset, len, FALSE); ++ break; ++ case RSL_IE_IPAC_CONN_STAT: ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb, ++ offset, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb, ++ offset+4, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb, ++ offset+8, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb, ++ offset+12, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb, ++ offset+16, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb, ++ offset+20, 4, FALSE); ++ proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb, ++ offset+24, 4, FALSE); ++ break; ++ } ++ offset += len; ++ } ++ ++ switch (msg_type) { ++ case RSL_MSG_TYPE_IPAC_CRCX_ACK: ++ /* Notify the RTP and RTCP dissectors about a new RTP stream */ ++ src_addr.type = AT_IPv4; ++ src_addr.len = 4; ++ src_addr.data = (guint8 *)&local_addr; ++ rtp_add_address(pinfo, &src_addr, local_port, 0, ++ "GSM A-bis/IP", pinfo->fd->num, 0, NULL); ++ rtcp_add_address(pinfo, &src_addr, local_port+1, 0, ++ "GSM A-bis/IP", pinfo->fd->num); ++ break; ++ } ++ return offset; ++} ++ ++static int + dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) + { +- guint8 msg_type; ++ guint8 msg_disc, msg_type; + ++ msg_disc = tvb_get_guint8(tvb, offset++) >> 1; + msg_type = tvb_get_guint8(tvb,offset)&0x7f; + proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE); ++ ++ if (msg_disc == RSL_MSGDISC_IPACCESS) { ++ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); ++ return offset; ++ } + offset++; + + switch (msg_type){ +@@ -3483,6 +3858,18 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) + /* LLP APDU 9.3.58 M LV 2-N */ + offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); + break; ++ /* the following messages are ip.access specific but sent without ++ * ip.access memssage discriminator */ ++ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: ++ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: ++ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: ++ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); + default: + break; + } +@@ -3490,6 +3877,40 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) + return offset; + + } ++ ++static const value_string rsl_ipacc_spm_s_vals[] = { ++ { 0, "GSM FR codec (GSM type 1, FS)" }, ++ { 1, "GSM EFR codec (GSM type 2, FS)" }, ++ { 2, "GSM AMR/FR codec (GSM type 3, FS)" }, ++ { 3, "GSM HR codec (GSM type 1, HS)" }, ++ { 5, "GSM AMR/HR codec (GSM type 3, HS)" }, ++ { 0xf, "As specified by RTP Payload Type IE" }, ++ { 0, NULL } ++}; ++ ++static const value_string rsl_ipacc_spm_m_vals[] = { ++ { 0, "Send and Receive" }, ++ { 1, "Receive Only" }, ++ { 2, "Send Only" }, ++ { 0, NULL } ++}; ++ ++static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = { ++ { 0, "External TRAU format" }, ++ { 1, "Non-TRAU Packed format" }, ++ { 2, "TRAU within the BTS" }, ++ { 3, "IWF-Free BTS-BTS Data" }, ++ { 0, NULL } ++}; ++ ++static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = { ++ { 0, "8kb/s" }, ++ { 1, "16kb/s" }, ++ { 2, "32kb/s" }, ++ { 3, "64kb/s" }, ++ { 0, NULL } ++}; ++ + static void + dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) + { +@@ -3517,7 +3938,6 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) + /* 9.1 Message discriminator */ + proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE); + proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE); +- offset++; + + offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); + +@@ -3892,6 +4312,86 @@ void proto_register_rsl(void) + FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, + NULL, HFILL } + }, ++ { &hf_rsl_speech_mode_s, ++ { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s", ++ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals), ++ 0xf, NULL, HFILL } ++ }, ++ { &hf_rsl_speech_mode_m, ++ { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m", ++ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals), ++ 0xf0, NULL, HFILL } ++ }, ++ { &hf_rsl_conn_stat, ++ { "ip.access Connection Statistics","rsl.ipacc.conn_stat", ++ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } ++ }, ++ { &hf_rsl_conn_id, ++ { "ip.access Connection ID", "rsl.ipacc.conn_id", ++ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } ++ }, ++ { &hf_rsl_rtp_payload, ++ { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload", ++ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } ++ }, ++ { &hf_rsl_rtp_csd_fmt_d, ++ { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d", ++ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals), ++ 0x0f, NULL, HFILL }, ++ }, ++ { &hf_rsl_rtp_csd_fmt_ir, ++ { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir", ++ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals), ++ 0xf0, NULL, HFILL }, ++ }, ++ { &hf_rsl_local_port, ++ { "ip.access Local RTP Port", "rsl.ipacc.local_port", ++ FT_UINT16, BASE_DEC, NULL, 0x0, ++ "ip.access Local RTP Port", HFILL }, ++ }, ++ { &hf_rsl_remote_port, ++ { "ip.access Remote RTP Port", "rsl.ipacc.remote_port", ++ FT_UINT16, BASE_DEC, NULL, 0x0, ++ "ip.access Remote RTP Port", HFILL }, ++ }, ++ { &hf_rsl_local_ip, ++ { "ip.access Local IP Address", "rsl.ipacc.local_ip", ++ FT_IPv4, BASE_NONE, NULL, 0x0, ++ "ip.access Local IP Address", HFILL }, ++ }, ++ { &hf_rsl_remote_ip, ++ { "ip.access Remote IP Address", "rsl.ipacc.remote_ip", ++ FT_IPv4, BASE_NONE, NULL, 0x0, ++ "ip.access Remote IP Address", HFILL }, ++ }, ++ { &hf_rsl_cstat_tx_pkts, ++ { "Packets Sent", "rsl.ipacc.cstat.tx_pkts", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_tx_octs, ++ { "Octets Sent", "rsl.ipacc.cstat.tx_octets", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_rx_pkts, ++ { "Packets Received", "rsl.ipacc.cstat.rx_pkts", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_rx_octs, ++ { "Octets Received", "rsl.ipacc.cstat.rx_octets", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_lost_pkts, ++ { "Packets Lost", "rsl.ipacc.cstat.lost_pkts", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_ia_jitter, ++ { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, ++ { &hf_rsl_cstat_avg_tx_dly, ++ { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay", ++ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } ++ }, + }; + static gint *ett[] = { + &ett_rsl, +@@ -3949,6 +4449,14 @@ void proto_register_rsl(void) + &ett_ie_meas_res_no, + &ett_ie_message_id, + &ett_ie_sys_info_type, ++ &ett_ie_speech_mode, ++ &ett_ie_conn_stat, ++ &ett_ie_conn_id, ++ &ett_ie_remote_ip, ++ &ett_ie_remote_port, ++ &ett_ie_local_port, ++ &ett_ie_local_ip, ++ &ett_ie_rtp_payload, + }; + + /* Register the protocol name and description */ +-- +1.7.3.4 + diff --git a/wireshark/README b/wireshark/README new file mode 100644 index 000000000..3a28fcf11 --- /dev/null +++ b/wireshark/README @@ -0,0 +1,19 @@ +These are patches to wireshark to add/enhance the GSM support. + +== Basic == +The patches apply to SVN revision r35476 and were created +using git format-patch. They can be either applied via the +patch command or using git am on a git clone of wireshark. + + +== Rebasing with git == +It is the easiest to checkout the above revision, apply the +patches and then use git rebase git-svn to get to the latest +svn version. + +== patches == +0001-abis_oml.patch Add support for Abis OML +0002-ericsson_rbs2409.patch Add support for Ericsson Abis over IP +0003-lucent-hnb.patch Add support for Lucent HomeNodeB +0004-rsl-ipaccess.patch Add IPaccess RSL extensions + diff --git a/wireshark/abis_oml.patch b/wireshark/abis_oml.patch deleted file mode 100644 index ab51a1259..000000000 --- a/wireshark/abis_oml.patch +++ /dev/null @@ -1,2473 +0,0 @@ -From b659280ff645354bb55529b05114419b9f0efd6f Mon Sep 17 00:00:00 2001 -From: Holger Hans Peter Freyther -Date: Mon, 19 Apr 2010 13:23:51 +0800 -Subject: [PATCH 1/2] Add the Abis OML patch. - ---- - epan/dissectors/Makefile.common | 1 + - epan/dissectors/packet-gsm_abis_oml.c | 1405 +++++++++++++++++++++++++++++++++ - epan/dissectors/packet-gsm_abis_oml.h | 800 +++++++++++++++++++ - 3 files changed, 2206 insertions(+), 0 deletions(-) - create mode 100644 epan/dissectors/packet-gsm_abis_oml.c - create mode 100644 epan/dissectors/packet-gsm_abis_oml.h - -Index: wireshark/epan/dissectors/Makefile.common -=================================================================== ---- wireshark.orig/epan/dissectors/Makefile.common -+++ wireshark/epan/dissectors/Makefile.common -@@ -495,6 +495,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 -+++ wireshark/epan/dissectors/packet-gsm_abis_oml.c -@@ -0,0 +1,1608 @@ -+/* packet-abis_oml.c -+ * Routines for packet dissection of GSM A-bis over IP (3GPP TS 12.21) -+ * Copyright 2009-2010 by Harald Welte -+ * Copyright 2009 by Holger Hans Peter Freyther -+ * based on A-bis OML code in OpenBSC -+ * -+ * $Id$ -+ * -+ * Wireshark - Network traffic analyzer -+ * By Gerald Combs -+ * 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 -+ -+#include -+#include -+#include -+#include -+ -+#include "packet-gsm_abis_oml.h" -+#include "packet-gsm_a_common.h" -+ -+#include -+ -+/* 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; -+static int hf_attr_hsn = -1; -+static int hf_attr_maio = -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; -+ -+/* Decode things as nanoBTS traces */ -+static gboolean global_oml_use_nano_bts = TRUE; -+ -+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" }, -+}; -+ -+/* Standard Message Types as per 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" }, -+ { 0, NULL } -+}; -+ -+/* proprietary ip.access message types, not in the standard */ -+static const value_string _oml_fom_msgtype_vals_ipa[] = { -+ { 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" }, -+ { 0, NULL } -+}; -+ -+/* proprietary Siemens message types, not in the standard */ -+static const value_string _oml_fom_msgtype_vals_bs11[] = { -+ { 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_SET_ATTR, "SIE Set Attribute" }, -+ { NM_MT_BS11_SET_ATTR_ACK, "SIE Set Attribute ACK" }, -+ { NM_MT_BS11_SET_ATTR_NACK, "SIE Set Attribute 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" }, -+ { 0, NULL } -+}; -+ -+/* initialize with the standard message types only */ -+static value_string_ext oml_fom_msgtype_vse = VALUE_STRING_EXT_INIT(_oml_fom_msgtype_vals); -+ -+/* 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" }, -+ { 0, 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" }, -+ { 0, NULL } -+}; -+ -+static value_string_ext oml_fom_attr_vse = VALUE_STRING_EXT_INIT(_oml_fom_attr_vals); -+ -+/* proprietary Siemens attributes, not in the standard */ -+static const value_string oml_fom_attr_vals_bs11[] = { -+ { NM_ATT_BS11_OM_LAPD_REL_TIMER,"SIE OML LAPD Release Timer" }, -+ { NM_ATT_BS11_RF_RES_IND_PER, "SIE RF Resource Indication Period" }, -+ { NM_ATT_BS11_RX_LEV_MIN_CELL, "SIE RxLevel Min Cell" }, -+ { NM_ATT_BS11_ABIS_EXT_TIME, "SIE A-bis external time" }, -+ { NM_ATT_BS11_TIMER_HO_REQUEST, "SIE Timer Handover Request" }, -+ { NM_ATT_BS11_TIMER_NCELL, "SIE Timer nCell" }, -+ { NM_ATT_BS11_TSYNC, "SIE Timer Tsync" }, -+ { NM_ATT_BS11_TTRAU, "SIE Timer Ttrau" }, -+ { NM_ATT_BS11_EMRG_CFG_MEMBER, "SIE Emergency Config Member" }, -+ { NM_ATT_BS11_TRX_AREA, "SIE TRX Area" }, -+ { NM_ATT_BS11_BCCH_RECONF, "SIE BCCH Reconfiguration" }, -+ { NM_ATT_BS11_BIT_ERR_THESH, "SIE Bit Error Threshold" }, -+ { NM_ATT_BS11_BOOT_SW_VERS, "SIE Boot Software Version" }, -+ { NM_ATT_BS11_CCLK_ACCURACY, "SIE CCLK Accuracy" }, -+ { NM_ATT_BS11_CCLK_TYPE, "SIE CCLK Type" }, -+ { NM_ATT_BS11_INP_IMPEDANCE, "SIE Input Impedance" }, -+ { NM_ATT_BS11_L1_PROT_TYPE, "SIE L1 Protocol Type" }, -+ { NM_ATT_BS11_LINE_CFG, "SIE Line Configuration" }, -+ { NM_ATT_BS11_LI_PORT_1, "SIE Line Interface Port 1" }, -+ { NM_ATT_BS11_LI_PORT_2, "SIE Line Interface Port 2" }, -+ { NM_ATT_BS11_L1_REM_ALM_TYPE, "SIE L1 Remote Alarm Type" }, -+ { NM_ATT_BS11_SW_LOAD_INTENDED, "SIE Software Load Intended" }, -+ { NM_ATT_BS11_SW_LOAD_SAFETY, "SIE Software Load Safety" }, -+ { NM_ATT_BS11_SW_LOAD_STORED, "SIE Software Load Stored" }, -+ { NM_ATT_BS11_VENDOR_NAME, "SIE Vendor Name" }, -+ { NM_ATT_BS11_HOPPING_MODE, "SIE Hopping Mode" }, -+ { NM_ATT_BS11_LMT_LOGON_SESSION,"SIE LMT Logon Session" }, -+ { NM_ATT_BS11_LMT_LOGIN_TIME, "SIE LMT Login Time" }, -+ { NM_ATT_BS11_LMT_USER_ACC_LEV, "SIE LMT User Account Level" }, -+ { NM_ATT_BS11_LMT_USER_NAME, "SIE LMT User Account Name" }, -+ { NM_ATT_BS11_L1_CONTROL_TS, "SIE L1 Control TS" }, -+ { NM_ATT_BS11_RADIO_MEAS_GRAN, "SIE Radio Measurement Granularity" }, -+ { NM_ATT_BS11_RADIO_MEAS_REP, "SIE Rdadio Measurement Report" }, -+ { NM_ATT_BS11_SH_LAPD_INT_TIMER,"SIE LAPD Internal Timer" }, -+ { NM_ATT_BS11_BTS_STATE, "SIE BTS State" }, -+ { NM_ATT_BS11_E1_STATE, "SIE E1 State" }, -+ { NM_ATT_BS11_PLL, "SIE PLL" }, -+ { NM_ATT_BS11_RX_OFFSET, "SIE Rx Offset" }, -+ { NM_ATT_BS11_ANT_TYPE, "SIE Antenna Type" }, -+ { NM_ATT_BS11_PLL_MODE, "SIE PLL Mode" }, -+ { NM_ATT_BS11_PASSWORD, "SIE Password" }, -+ { 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" }, -+ { NM_ATT_BS11_ENA_INT_INTEC_HANDO, "SIE Enable Int Intec Handover" }, -+ { NM_ATT_BS11_ENA_INT_INTRC_HANDO, "SIE Enable Int Intrc Handover" }, -+ { 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" }, -+ { 0, NULL } -+}; -+ -+/* proprietary ip.access attributes, not in the standard */ -+static const value_string oml_fom_attr_vals_ipa[] = { -+ { 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" }, -+ { 0, NULL } -+}; -+ -+#if 0 -+static gint merge_value_strings(value_string **dst, const value_string *base, const value_string delta) -+{ -+ const value_string *cur; -+ guint num_base, num_delta, num_max, num_out; -+ -+ for (cur = base; cur->value || cur->strptr; cur++) -+ num_base++; -+ for (cur = delta; cur->value || cur->strptr; cur++) -+ num_delta++; -+ num_max = num_base + num_delta + 1; /* terminating entry */ -+ -+ *dst = g_malloc(sizeof(value_string) * num_max); -+ if (!*dst) -+ return -ENOMEM; -+ /* zero-initialize the entire array so we always are zero- -+ * terminated */ -+ memset(*dst, 0, sizeof(value_string * num_max)); -+ -+ /* initialize with the 'base' */ -+ memcpy(*dst, base, sizeof(value_string)*num_base); -+ num_out = num_base; -+ -+ /* patch/append the delta */ -+ for (cur = delta; cur->value || cur->strptr; cur++) { -+ guint idx; -+ if (match_strval_idx(cur->value, base, &idx)) { -+ /* the base set already contains a definition, -+ * we need to override it */ -+ memcpy((*dst)[idx], cur, sizeof(value_string)); -+ } else { -+ /* append the entry to the end */ -+ memcpy((*dst)[num_out], cur, sizeof(value_string)); -+ num_out++; -+ } -+ } -+ -+ return 0; -+} -+#endif -+ -+static const gchar * -+_match_oml_fom_msgtype(const guint32 val, const value_string_ext *vs) -+{ -+ const char *ret; -+ ret = match_strval(val, vs->_vs_p); -+ if (!ret) -+ ret = match_strval(val, _oml_fom_msgtype_vals); -+ return ret; -+} -+ -+static const gchar * -+_match_oml_fom_attr(const guint32 val, const value_string_ext *vs) -+{ -+ const char *ret; -+ ret = match_strval(val, vs->_vs_p); -+ if (!ret) -+ ret = match_strval(val, _oml_fom_attr_vals); -+ return ret; -+} -+ -+/* 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" }, -+ { 0, NULL } -+}; -+ -+static const value_string oml_oper_state_vals[] = { -+ { 1, "Disabled" }, -+ { 2, "Enabled" }, -+ { 0xff, "NULL" }, -+ { 0, 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" }, -+ { 0, NULL } -+}; -+ -+/* 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" }, -+ { 0, NULL } -+}; -+ -+/* 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" }, -+ { 0, NULL } -+}; -+ -+/* 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" }, -+ { 0, NULL } -+}; -+ -+/* 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" }, -+ { 0, 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" }, -+ { 0, NULL } -+}; -+ -+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" }, -+ { 0, NULL } -+}; -+ -+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" }, -+ { 0, NULL } -+}; -+ -+static const struct tlv_def * -+find_tlv_tag(guint8 tag) -+{ -+ const struct tlv_def *specific; -+ -+ if (global_oml_use_nano_bts) -+ specific = &nm_att_tlvdef_ipa.def[tag]; -+ else -+ specific = &nm_att_tlvdev_bs11.def[tag]; -+ -+ if (specific->type != TLV_TYPE_UNKNOWN) -+ return specific; -+ -+ return &nm_att_tlvdef_base.def[tag]; -+} -+ -+/* 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; -+ -+ 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; -+ guint16 len; -+ proto_item *ti; -+ proto_tree *att_tree; -+ -+ ie = tvb_get_guint8(tvb, offset); -+ len = tvb_get_ntohs(tvb, offset+1); -+ 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 = find_tlv_tag(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; -+ case TLV_TYPE_TLV16: -+ hlen = 2; -+ len_len = 1; -+ len = tvb_get_guint8(tvb, offset+1) * 2; -+ break; -+ case TLV_TYPE_UNKNOWN: /* fall through */ -+ 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, FALSE); -+ 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; -+ case NM_ATT_HSN: -+ proto_tree_add_item(att_tree, hf_attr_hsn, tvb, -+ offset, len, TRUE); -+ break; -+ case NM_ATT_MAIO: -+ proto_tree_add_item(att_tree, hf_attr_maio, tvb, -+ offset, len, TRUE); -+ break; -+ default: -+ proto_tree_add_item(att_tree, hf_oml_fom_attr_val, tvb, -+ offset, len, FALSE); -+ } -+ -+ if (global_oml_use_nano_bts) switch (tag) { -+ /* 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; -+ } -+ 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_ext(msg_type, &oml_fom_msgtype_vse, -+ "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_ext(msg_type, &oml_fom_msgtype_vse, -+ "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_reg_handoff_abis_oml(void); -+ -+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, -+ "Sequence Number (if multi-part msg)", HFILL } -+ }, -+ { &hf_oml_length, -+ { "Length Indicator", "oml.length", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Total length of payload", HFILL } -+ }, -+ { &hf_oml_fom_msgtype, -+ { "FOM Message Type", "oml.fom.msg_type", -+ FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&oml_fom_msgtype_vse), 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_objclass, -+ { "FOM Object Class", "oml.fom.obj_class", -+ FT_UINT8, BASE_HEX, VALS(oml_fom_objclass_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_inst_bts, -+ { "FOM Object Instance BTS", "oml.fom.obj_inst.bts", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_inst_trx, -+ { "FOM Object Instance TRX", "oml.fom.obj_inst.trx", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_inst_ts, -+ { "FOM Object Instance TS", "oml.fom.obj_inst.ts", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_attr_tag, -+ { "FOM Attribute ID", "oml.fom.attr_id", -+ FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&oml_fom_attr_vse), 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_attr_len, -+ { "FOM Attribute Length", "oml.fom.attr_len", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_oml_fom_attr_val, -+ { "FOM Attribute Value", "oml.fom.attr_val", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ -+ -+ -+ /* OML Attributes */ -+ { &hf_attr_adm_state, -+ { "Administrative State", "oml.fom.attr.adm_state", -+ 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, -+ NULL, HFILL } -+ }, -+ { &hf_attr_avail_state, -+ { "Availability Status", "oml.fom.attr.avail_state", -+ FT_UINT8, BASE_HEX, VALS(oml_avail_state_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_event_type, -+ { "Event Type", "oml.fom.attr.event_type", -+ FT_UINT8, BASE_HEX, VALS(oml_event_type_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_severity, -+ { "Severity", "oml.fom.attr.severity", -+ FT_UINT8, BASE_HEX, VALS(oml_severity_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_bcch_arfcn, -+ { "BCCH ARFCN", "oml.fom.attr.bcch_arfcn", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "ARFCN of the BCCH", HFILL } -+ }, -+ { &hf_attr_bsic, -+ { "BSIC", "oml.fom.attr.bsic", -+ FT_UINT16, BASE_HEX, NULL, 0, -+ "Base Station Identity Cdoe", HFILL } -+ }, -+ { &hf_attr_test_no, -+ { "Test Number", "oml.fom.attr.test_no", -+ FT_UINT8, BASE_HEX, VALS(oml_test_no_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_tsc, -+ { "TSC", "oml.fom.attr.tsc", -+ FT_UINT8, BASE_HEX, NULL, 0, -+ "Training Sequence Code", HFILL } -+ }, -+ { &hf_attr_tei, -+ { "TEI", "oml.fom.attr.tei", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_ach_btsp, -+ { "BTS E1 Port", "oml.fom.attr.abis_ch.bts_port", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_ach_tslot, -+ { "E1 Timeslot", "oml.fom.attr.abis_ch.timeslot", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_ach_sslot, -+ { "E1 Subslot", "oml.fom.attr.abis_ch.subslot", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_gsm_time, -+ { "GSM Time", "oml.fom.attr.gsm_time", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "GSM Time", HFILL } -+ }, -+ { &hf_attr_chan_comb, -+ { "Channel Combination", "oml.fom.attr.chan_comb", -+ FT_UINT8, BASE_HEX, VALS(oml_chan_comb_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_hsn, -+ { "HSN", "oml.fom.attr.hsn", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Hopping Sequence Number", HFILL } -+ }, -+ { &hf_attr_maio, -+ { "MAIO", "oml.fom.attr.maio", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Mobile Allocation Index Offset", HFILL } -+ }, -+ -+ /* IP Access */ -+ { &hf_oml_ipa_tres_attr_tag, -+ { "IPA Test Result Embedded IE", -+ "oml.fom.testrep.ipa_tag", -+ FT_UINT8, BASE_HEX, VALS(ipacc_testres_ie_vals), 0, -+ "Information Element embedded into the Test Result " -+ "of ip.access BTS", HFILL }, -+ }, -+ { &hf_oml_ipa_tres_attr_len, -+ { "IPA Test Result Embedded IE Length", -+ "oml.fom.testrep.ipa_len", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "Length of ip.access Test Result Embedded IE", HFILL } -+ }, -+ { &hf_attr_ipa_test_res, -+ { "IPA Test Result", "oml.fom.testrep.result", -+ FT_UINT8, BASE_DEC, VALS(ipacc_test_res_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_rxlev, -+ { "Rx Level", "oml.fom.testrep.ipa_rxlev", -+ FT_UINT16, BASE_DEC, NULL, 0xfc00, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_b_rxlev, -+ { "Rx Level", "oml.fom.testrep.ipa_rxlev_b", -+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_arfcn, -+ { "ARFCN", "oml.fom.testrep.ipa_arfcn", -+ FT_UINT16, BASE_DEC, NULL, 0x03ff, "ARFCN", HFILL } -+ }, -+ { &hf_attr_ipa_tr_f_qual, -+ { "Frequency Quality", "oml.fom.testrep.ipa.freq_qual", -+ FT_UINT8, BASE_DEC, NULL, 0xfc, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_f_err, -+ { "Frequency Error", "oml.fom.testrep.ipa.freq_err", -+ FT_INT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_rxqual, -+ { "Rx Quality", "oml.fom.testrep.ipa.rx_qual", -+ FT_UINT8, BASE_DEC, NULL, 0x7, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_frame_offs, -+ { "Frame Offset", "oml.fom.testrep.ipa.frame_offset", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_framenr_offs, -+ { "Frame Number Offset", -+ "oml.fom.testrep.ipa.framenr_offset", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_bsic, -+ { "BSIC", "oml.fom.testrep.ipa.bsic", -+ FT_UINT8, BASE_DEC, NULL, 0x3f, -+ "Base Station Identity Code", HFILL } -+ }, -+ { &hf_attr_ipa_tr_cell_id, -+ { "Cell ID", "oml.fom.testrep.ipa.cell_id", -+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_rsl_ip, -+ { "BSC RSL IP Address", "oml.fom.attr.ipa.rsl_ip", -+ FT_IPv4, BASE_NONE, NULL, 0, -+ "IP Address to which the BTS establishes " -+ "the RSL link", HFILL } -+ }, -+ { &hf_attr_ipa_rsl_port, -+ { "BSC RSL TCP Port", "oml.fom.attr.ipa.rsl_port", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "Port number to which the BST establishes " -+ "the RSL link", HFILL } -+ }, -+ { &hf_attr_ipa_prim_oml_ip, -+ { "Primary OML IP Address", -+ "oml.fom.attr.ipa.prim_oml_ip", -+ FT_IPv4, BASE_NONE, NULL, 0, -+ "IP Address of the BSC for the primary OML link", -+ HFILL } -+ }, -+ { &hf_attr_ipa_prim_oml_port, -+ { "Primary OML TCP Port", -+ "oml.fom.attr.ipa.prim_oml_port", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "TCP Port of the BSC for the primarly OML link", -+ HFILL } -+ }, -+ { &hf_attr_ipa_location_name, -+ { "Location Name", "oml.fom.attr.ipa.loc_name", -+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_unit_name, -+ { "Unit Name", "oml.fom.attr.ipa.unit_name", -+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_unit_id, -+ { "Unit ID", "oml.fom.attr.ipa.unit_id", -+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nv_flags, -+ { "NVRAM Config Flags", "oml.fom.attr.ipa.nv_flags", -+ FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nv_mask, -+ { "NVRAM Config Mask", "oml.fom.attr.ipa.nv_mask", -+ FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_si2, -+ { "System Information 2", "oml.fom.attr.ipa.si2", -+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_si2bis, -+ { "System Information 2bis", "oml.fom.attr.ipa.si2bis", -+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_si2ter, -+ { "System Information 2ter", "oml.fom.attr.ipa.si2ter", -+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_tr_chan_desc, -+ { "Cell Channel Description", -+ "oml.fom.attr.ipa.chan_desc", -+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nsl_sport, -+ { "NS Link IP Source Port", -+ "oml.fom.attr.ipa.nsl_sport", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nsl_daddr, -+ { "NS Link IP Destination Addr", -+ "oml.fom.attr.ipa.nsl_daddr", -+ FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nsl_dport, -+ { "NS Link IP Destination Port", -+ "oml.fom.attr.ipa.nsl_dport", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nsei, -+ { "NSEI", "oml.fom.attr.ipa.nsei", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_nsvci, -+ { "NSVCI", "oml.fom.attr.ipa.nsvci", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_bvci, -+ { "BVCI", "oml.fom.attr.ipa.bvci", -+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_attr_ipa_rac, -+ { "RAC", "oml.fom.attr.ipa.rac", -+ FT_UINT8, BASE_HEX, NULL, 0, -+ "Routing Area Code", HFILL } -+ }, -+ }; -+ static gint *ett[] = { -+ &ett_oml, -+ &ett_oml_fom, -+ &ett_oml_fom_att, -+ }; -+ -+ module_t *oml_module; -+ -+ /* assign our custom match functions */ -+ oml_fom_msgtype_vse._vs_match = _match_oml_fom_msgtype; -+ oml_fom_attr_vse._vs_match = _match_oml_fom_attr; -+ -+ proto_abis_oml = proto_register_protocol("GSM A-bis OML", "A-bis OML", -+ "gsm_abis_oml"); -+ -+ proto_register_field_array(proto_abis_oml, hf, array_length(hf)); -+ -+ proto_register_subtree_array(ett, array_length(ett)); -+ -+ register_dissector("gsm_abis_oml", dissect_abis_oml, proto_abis_oml); -+ -+ oml_module = prefs_register_protocol(proto_abis_oml, proto_reg_handoff_abis_oml); -+ prefs_register_bool_preference(oml_module, "use_ipaccess_oml", -+ "Use nanoBTS definitions", -+ "Use ipaccess nanoBTS specific definitions for OML", -+ &global_oml_use_nano_bts); -+} -+ -+/* This function is called once at startup and every time the user hits -+ * 'apply' in the preferences dialogue */ -+void -+proto_reg_handoff_abis_oml(void) -+{ -+ static gboolean initialized = FALSE; -+ -+ if (!initialized) { -+ dissector_handle_t abis_oml_handle; -+ -+ abis_oml_handle = create_dissector_handle(dissect_abis_oml, proto_abis_oml); -+ dissector_add("lapd.gsm.sapi", LAPD_GSM_SAPI_OM_PROC, abis_oml_handle); -+ -+ } else { -+ /* preferences have been changed */ -+ } -+ -+ if (global_oml_use_nano_bts == TRUE) { -+ /* initialize with nanobts definitions */ -+ oml_fom_msgtype_vse._vs_p = _oml_fom_msgtype_vals_ipa; -+ oml_fom_msgtype_vse._vs_num_entries = -+ array_length(_oml_fom_msgtype_vals_ipa)-1; -+ oml_fom_attr_vse._vs_p = oml_fom_attr_vals_ipa; -+ oml_fom_attr_vse._vs_num_entries = -+ array_length(oml_fom_attr_vals_ipa)-1; -+ } else { -+ /* initialize with BS11 defaults */ -+ oml_fom_msgtype_vse._vs_p = _oml_fom_msgtype_vals_bs11; -+ oml_fom_msgtype_vse._vs_num_entries = -+ array_length(_oml_fom_msgtype_vals_bs11)-1; -+ oml_fom_attr_vse._vs_p = oml_fom_attr_vals_bs11; -+ oml_fom_attr_vse._vs_num_entries = -+ array_length(oml_fom_attr_vals_bs11)-1; -+ } -+} -Index: wireshark/epan/dissectors/packet-gsm_abis_oml.h -=================================================================== ---- /dev/null -+++ wireshark/epan/dissectors/packet-gsm_abis_oml.h -@@ -0,0 +1,830 @@ -+/* 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 */ -+ -+/* (C) 2008-2009 by Harald Welte -+ * All Rights Reserved -+ * -+ * 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., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ */ -+ -+#ifndef __PACKET_ABIS_OML_H__ -+#define __PACKET_ABIS_OML_H__ -+ -+#include -+ -+/* From openbsc/include/openbsc/abis_nm.h */ -+ -+/* generic header in front of every OML message according to TS 08.59 */ -+struct abis_om_hdr { -+ guint8 mdisc; -+ guint8 placement; -+ guint8 sequence; -+ guint8 length; -+ guint8 data[0]; -+} __attribute__ ((packed)); -+ -+#define ABIS_OM_MDISC_FOM 0x80 -+#define ABIS_OM_MDISC_MMI 0x40 -+#define ABIS_OM_MDISC_TRAU 0x20 -+#define ABIS_OM_MDISC_MANUF 0x10 -+#define ABIS_OM_PLACEMENT_ONLY 0x80 -+#define ABIS_OM_PLACEMENT_FIRST 0x40 -+#define ABIS_OM_PLACEMENT_MIDDLE 0x20 -+#define ABIS_OM_PLACEMENT_LAST 0x10 -+ -+struct abis_om_obj_inst { -+ guint8 bts_nr; -+ guint8 trx_nr; -+ guint8 ts_nr; -+} __attribute__ ((packed)); -+ -+struct abis_om_fom_hdr { -+ guint8 msg_type; -+ guint8 obj_class; -+ struct abis_om_obj_inst obj_inst; -+ guint8 data[0]; -+} __attribute__ ((packed)); -+ -+#define ABIS_OM_FOM_HDR_SIZE (sizeof(struct abis_om_hdr) + sizeof(struct abis_om_fom_hdr)) -+ -+/* Section 9.1: Message Types */ -+enum abis_nm_msgtype { -+ /* SW Download Management Messages */ -+ NM_MT_LOAD_INIT = 0x01, -+ NM_MT_LOAD_INIT_ACK, -+ NM_MT_LOAD_INIT_NACK, -+ NM_MT_LOAD_SEG, -+ NM_MT_LOAD_SEG_ACK, -+ NM_MT_LOAD_ABORT, -+ NM_MT_LOAD_END, -+ NM_MT_LOAD_END_ACK, -+ NM_MT_LOAD_END_NACK, -+ NM_MT_SW_ACT_REQ, /* BTS->BSC */ -+ NM_MT_SW_ACT_REQ_ACK, -+ NM_MT_SW_ACT_REQ_NACK, -+ NM_MT_ACTIVATE_SW, /* BSC->BTS */ -+ NM_MT_ACTIVATE_SW_ACK, -+ NM_MT_ACTIVATE_SW_NACK, -+ NM_MT_SW_ACTIVATED_REP, /* 0x10 */ -+ /* A-bis Interface Management Messages */ -+ NM_MT_ESTABLISH_TEI = 0x21, -+ NM_MT_ESTABLISH_TEI_ACK, -+ NM_MT_ESTABLISH_TEI_NACK, -+ NM_MT_CONN_TERR_SIGN, -+ NM_MT_CONN_TERR_SIGN_ACK, -+ NM_MT_CONN_TERR_SIGN_NACK, -+ NM_MT_DISC_TERR_SIGN, -+ NM_MT_DISC_TERR_SIGN_ACK, -+ NM_MT_DISC_TERR_SIGN_NACK, -+ NM_MT_CONN_TERR_TRAF, -+ NM_MT_CONN_TERR_TRAF_ACK, -+ NM_MT_CONN_TERR_TRAF_NACK, -+ NM_MT_DISC_TERR_TRAF, -+ NM_MT_DISC_TERR_TRAF_ACK, -+ NM_MT_DISC_TERR_TRAF_NACK, -+ /* Transmission Management Messages */ -+ NM_MT_CONN_MDROP_LINK = 0x31, -+ NM_MT_CONN_MDROP_LINK_ACK, -+ NM_MT_CONN_MDROP_LINK_NACK, -+ NM_MT_DISC_MDROP_LINK, -+ NM_MT_DISC_MDROP_LINK_ACK, -+ NM_MT_DISC_MDROP_LINK_NACK, -+ /* Air Interface Management Messages */ -+ NM_MT_SET_BTS_ATTR = 0x41, -+ NM_MT_SET_BTS_ATTR_ACK, -+ NM_MT_SET_BTS_ATTR_NACK, -+ NM_MT_SET_RADIO_ATTR, -+ NM_MT_SET_RADIO_ATTR_ACK, -+ NM_MT_SET_RADIO_ATTR_NACK, -+ NM_MT_SET_CHAN_ATTR, -+ NM_MT_SET_CHAN_ATTR_ACK, -+ NM_MT_SET_CHAN_ATTR_NACK, -+ /* Test Management Messages */ -+ NM_MT_PERF_TEST = 0x51, -+ NM_MT_PERF_TEST_ACK, -+ NM_MT_PERF_TEST_NACK, -+ NM_MT_TEST_REP, -+ NM_MT_SEND_TEST_REP, -+ NM_MT_SEND_TEST_REP_ACK, -+ NM_MT_SEND_TEST_REP_NACK, -+ NM_MT_STOP_TEST, -+ NM_MT_STOP_TEST_ACK, -+ NM_MT_STOP_TEST_NACK, -+ /* State Management and Event Report Messages */ -+ NM_MT_STATECHG_EVENT_REP = 0x61, -+ NM_MT_FAILURE_EVENT_REP, -+ NM_MT_STOP_EVENT_REP, -+ NM_MT_STOP_EVENT_REP_ACK, -+ NM_MT_STOP_EVENT_REP_NACK, -+ NM_MT_REST_EVENT_REP, -+ NM_MT_REST_EVENT_REP_ACK, -+ NM_MT_REST_EVENT_REP_NACK, -+ NM_MT_CHG_ADM_STATE, -+ NM_MT_CHG_ADM_STATE_ACK, -+ NM_MT_CHG_ADM_STATE_NACK, -+ NM_MT_CHG_ADM_STATE_REQ, -+ NM_MT_CHG_ADM_STATE_REQ_ACK, -+ NM_MT_CHG_ADM_STATE_REQ_NACK, -+ NM_MT_REP_OUTST_ALARMS = 0x93, -+ NM_MT_REP_OUTST_ALARMS_ACK, -+ NM_MT_REP_OUTST_ALARMS_NACK, -+ /* Equipment Management Messages */ -+ NM_MT_CHANGEOVER = 0x71, -+ NM_MT_CHANGEOVER_ACK, -+ NM_MT_CHANGEOVER_NACK, -+ NM_MT_OPSTART, -+ NM_MT_OPSTART_ACK, -+ NM_MT_OPSTART_NACK, -+ NM_MT_REINIT, -+ NM_MT_REINIT_ACK, -+ NM_MT_REINIT_NACK, -+ NM_MT_SET_SITE_OUT, /* BS11: get alarm ?!? */ -+ NM_MT_SET_SITE_OUT_ACK, -+ NM_MT_SET_SITE_OUT_NACK, -+ NM_MT_CHG_HW_CONF = 0x90, -+ NM_MT_CHG_HW_CONF_ACK, -+ NM_MT_CHG_HW_CONF_NACK, -+ /* Measurement Management Messages */ -+ NM_MT_MEAS_RES_REQ = 0x8a, -+ NM_MT_MEAS_RES_RESP, -+ NM_MT_STOP_MEAS, -+ NM_MT_START_MEAS, -+ /* Other Messages */ -+ NM_MT_GET_ATTR = 0x81, -+ NM_MT_GET_ATTR_RESP, -+ NM_MT_GET_ATTR_NACK, -+ NM_MT_SET_ALARM_THRES, -+ NM_MT_SET_ALARM_THRES_ACK, -+ NM_MT_SET_ALARM_THRES_NACK, -+ -+ NM_MT_IPACC_RESTART = 0x87, -+ NM_MT_IPACC_RESTART_ACK, -+}; -+ -+enum abis_nm_msgtype_bs11 { -+ NM_MT_BS11_RESET_RESOURCE = 0x74, -+ -+ NM_MT_BS11_BEGIN_DB_TX = 0xa3, -+ NM_MT_BS11_BEGIN_DB_TX_ACK, -+ NM_MT_BS11_BEGIN_DB_TX_NACK, -+ NM_MT_BS11_END_DB_TX = 0xa6, -+ NM_MT_BS11_END_DB_TX_ACK, -+ NM_MT_BS11_END_DB_TX_NACK, -+ NM_MT_BS11_CREATE_OBJ = 0xa9, -+ NM_MT_BS11_CREATE_OBJ_ACK, -+ NM_MT_BS11_CREATE_OBJ_NACK, -+ NM_MT_BS11_DELETE_OBJ = 0xac, -+ NM_MT_BS11_DELETE_OBJ_ACK, -+ NM_MT_BS11_DELETE_OBJ_NACK, -+ -+ NM_MT_BS11_SET_ATTR = 0xd0, -+ NM_MT_BS11_SET_ATTR_ACK, -+ NM_MT_BS11_SET_ATTR_NACK, -+ NM_MT_BS11_LMT_SESSION = 0xdc, -+ -+ NM_MT_BS11_GET_STATE = 0xe3, -+ NM_MT_BS11_GET_STATE_ACK, -+ NM_MT_BS11_LMT_LOGON = 0xe5, -+ NM_MT_BS11_LMT_LOGON_ACK, -+ NM_MT_BS11_RESTART = 0xe7, -+ NM_MT_BS11_RESTART_ACK, -+ NM_MT_BS11_DISCONNECT = 0xe9, -+ NM_MT_BS11_DISCONNECT_ACK, -+ NM_MT_BS11_LMT_LOGOFF = 0xec, -+ NM_MT_BS11_LMT_LOGOFF_ACK, -+ NM_MT_BS11_RECONNECT = 0xf1, -+ NM_MT_BS11_RECONNECT_ACK, -+}; -+ -+enum abis_nm_msgtype_ipacc { -+ NM_MT_IPACC_RSL_CONNECT = 0xe0, -+ NM_MT_IPACC_RSL_CONNECT_ACK, -+ NM_MT_IPACC_RSL_CONNECT_NACK, -+ NM_MT_IPACC_RSL_DISCONNECT = 0xe3, -+ NM_MT_IPACC_RSL_DISCONNECT_ACK, -+ NM_MT_IPACC_RSL_DISCONNECT_NACK, -+ NM_MT_IPACC_CONN_TRAF = 0xe6, -+ NM_MT_IPACC_CONN_TRAF_ACK, -+ NM_MT_IPACC_CONN_TRAF_NACK, -+ NM_MT_IPACC_DISC_TRAF = 0xe9, -+ NM_MT_IPACC_DISC_TRAF_ACK, -+ NM_MT_IPACC_DISC_TRAF_NACK, -+ NM_MT_IPACC_DEF_BOOT_SW = 0xec, -+ NM_MT_IPACC_DEF_BOOT_SW_ACK, -+ NM_MT_IPACC_DEF_BOOT_SW_NACK, -+ NM_MT_IPACC_SET_NVATTR = 0xef, -+ NM_MT_IPACC_SET_NVATTR_ACK, -+ NM_MT_IPACC_SET_NVATTR_NACK, -+ NM_MT_IPACC_GET_NVATTR = 0xf2, -+ NM_MT_IPACC_GET_NVATTR_ACK, -+ NM_MT_IPACC_GET_NVATTR_NACK, -+ NM_MT_IPACC_SET_ATTR = 0xf5, -+ NM_MT_IPACC_SET_ATTR_ACK, -+ NM_MT_IPACC_SET_ATTR_NACK, -+ NM_MT_IPACC_ATTR_CHG_EVT = 0xf8, -+ NM_MT_IPACC_SW_DEACT = 0xf9, -+ NM_MT_IPACC_SW_DEACT_ACK, -+ NM_MT_IPACC_SW_DEACT_NACK, -+ NM_MT_IPACC_MEAS_RES_REQ_NACK = 0xfc, -+ NM_MT_IPACC_START_MEAS_NACK, -+ NM_MT_IPACC_STOP_MEAS_NACK, -+}; -+ -+enum abis_nm_bs11_cell_alloc { -+ NM_BS11_CANR_GSM = 0x00, -+ NM_BS11_CANR_DCS1800 = 0x01, -+}; -+ -+/* Section 9.2: Object Class */ -+enum abis_nm_obj_class { -+ NM_OC_SITE_MANAGER = 0x00, -+ NM_OC_BTS, -+ NM_OC_RADIO_CARRIER, -+ NM_OC_CHANNEL, -+ NM_OC_BASEB_TRANSC, -+ /* RFU: 05-FE */ -+ NM_OC_BS11_ADJC = 0xa0, -+ NM_OC_BS11_HANDOVER = 0xa1, -+ NM_OC_BS11_PWR_CTRL = 0xa2, -+ NM_OC_BS11_BTSE = 0xa3, /* LMT? */ -+ NM_OC_BS11_RACK = 0xa4, -+ NM_OC_BS11 = 0xa5, /* 01: ALCO */ -+ NM_OC_BS11_TEST = 0xa6, -+ NM_OC_BS11_ENVABTSE = 0xa8, -+ NM_OC_BS11_BPORT = 0xa9, -+ -+ NM_OC_GPRS_NSE = 0xf0, -+ NM_OC_GPRS_CELL = 0xf1, -+ NM_OC_GPRS_NSVC0 = 0xf2, -+ NM_OC_GPRS_NSVC1 = 0xf3, -+ -+ NM_OC_NULL = 0xff, -+}; -+ -+/* Section 9.4: Attributes */ -+enum abis_nm_attr { -+ NM_ATT_ABIS_CHANNEL = 0x01, -+ NM_ATT_ADD_INFO, -+ NM_ATT_ADD_TEXT, -+ NM_ATT_ADM_STATE, -+ NM_ATT_ARFCN_LIST, -+ NM_ATT_AUTON_REPORT, -+ NM_ATT_AVAIL_STATUS, -+ NM_ATT_BCCH_ARFCN, -+ NM_ATT_BSIC, -+ NM_ATT_BTS_AIR_TIMER, -+ NM_ATT_CCCH_L_I_P, -+ NM_ATT_CCCH_L_T, -+ NM_ATT_CHAN_COMB, -+ NM_ATT_CONN_FAIL_CRIT, -+ NM_ATT_DEST, -+ /* res */ -+ NM_ATT_EVENT_TYPE = 0x11, /* BS11: file data ?!? */ -+ NM_ATT_FILE_ID, -+ NM_ATT_FILE_VERSION, -+ NM_ATT_GSM_TIME, -+ NM_ATT_HSN, -+ NM_ATT_HW_CONFIG, -+ NM_ATT_HW_DESC, -+ NM_ATT_INTAVE_PARAM, -+ NM_ATT_INTERF_BOUND, -+ NM_ATT_LIST_REQ_ATTR, -+ NM_ATT_MAIO, -+ NM_ATT_MANUF_STATE, -+ NM_ATT_MANUF_THRESH, -+ NM_ATT_MANUF_ID, -+ NM_ATT_MAX_TA, -+ NM_ATT_MDROP_LINK, /* 0x20 */ -+ NM_ATT_MDROP_NEXT, -+ NM_ATT_NACK_CAUSES, -+ NM_ATT_NY1, -+ NM_ATT_OPER_STATE, -+ NM_ATT_OVERL_PERIOD, -+ NM_ATT_PHYS_CONF, -+ NM_ATT_POWER_CLASS, -+ NM_ATT_POWER_THRESH, -+ NM_ATT_PROB_CAUSE, -+ NM_ATT_RACH_B_THRESH, -+ NM_ATT_LDAVG_SLOTS, -+ NM_ATT_RAD_SUBC, -+ NM_ATT_RF_MAXPOWR_R, -+ NM_ATT_SITE_INPUTS, -+ NM_ATT_SITE_OUTPUTS, -+ NM_ATT_SOURCE, /* 0x30 */ -+ NM_ATT_SPEC_PROB, -+ NM_ATT_START_TIME, -+ NM_ATT_T200, -+ NM_ATT_TEI, -+ NM_ATT_TEST_DUR, -+ NM_ATT_TEST_NO, -+ NM_ATT_TEST_REPORT, -+ NM_ATT_VSWR_THRESH, -+ NM_ATT_WINDOW_SIZE, -+ /* Res */ -+ NM_ATT_BS11_RSSI_OFFS = 0x3d, -+ NM_ATT_BS11_TXPWR = 0x3e, -+ NM_ATT_BS11_DIVERSITY = 0x3f, -+ /* Res */ -+ NM_ATT_TSC = 0x40, -+ NM_ATT_SW_CONFIG, -+ NM_ATT_SW_DESCR, -+ NM_ATT_SEVERITY, -+ NM_ATT_GET_ARI, -+ NM_ATT_HW_CONF_CHG, -+ NM_ATT_OUTST_ALARM, -+ NM_ATT_FILE_DATA, -+ NM_ATT_MEAS_RES, -+ NM_ATT_MEAS_TYPE, -+}; -+ -+enum abis_nm_attr_bs11 { -+ NM_ATT_BS11_OM_LAPD_REL_TIMER = 0x02, -+ NM_ATT_BS11_EMERG_TIMER1 = 0x42, -+ NM_ATT_BS11_EMERG_TIMER2 = 0x44, -+ NM_ATT_BS11_ESN_FW_CODE_NO = 0x4c, -+ NM_ATT_BS11_ESN_HW_CODE_NO = 0x4f, -+ -+ NM_ATT_BS11_FILE_DATA = NM_ATT_EVENT_TYPE, -+ -+ NM_ATT_BS11_ESN_PCB_SERIAL = 0x55, -+ NM_ATT_BS11_EXCESSIVE_DISTANCE = 0x58, -+ -+ NM_ATT_BS11_ALL_TEST_CATG = 0x60, -+ NM_ATT_BS11_BTSLS_HOPPING, -+ NM_ATT_BS11_CELL_ALLOC_NR, -+ NM_ATT_BS11_CELL_GLOBAL_ID, -+ NM_ATT_BS11_ENA_INTERF_CLASS = 0x66, -+ NM_ATT_BS11_ENA_INT_INTEC_HANDO = 0x67, -+ NM_ATT_BS11_ENA_INT_INTRC_HANDO = 0x68, -+ NM_ATT_BS11_ENA_MS_PWR_CTRL = 0x69, -+ NM_ATT_BS11_ENA_PWR_BDGT_HO = 0x6a, -+ NM_ATT_BS11_ENA_PWR_CTRL_RLFW = 0x6b, -+ NM_ATT_BS11_ENA_RXLEV_HO = 0x6c, -+ NM_ATT_BS11_ENA_RXQUAL_HO = 0x6d, -+ NM_ATT_BS11_FACCH_QUAL = 0x6e, -+ -+ NM_ATT_BS11_RF_RES_IND_PER = 0x8f, -+ -+ NM_ATT_BS11_RX_LEV_MIN_CELL = 0x90, -+ NM_ATT_BS11_ABIS_EXT_TIME = 0x91, -+ NM_ATT_BS11_TIMER_HO_REQUEST = 0x92, -+ NM_ATT_BS11_TIMER_NCELL = 0x93, -+ NM_ATT_BS11_TSYNC = 0x94, -+ NM_ATT_BS11_TTRAU = 0x95, -+ NM_ATT_BS11_EMRG_CFG_MEMBER = 0x9b, -+ NM_ATT_BS11_TRX_AREA = 0x9f, -+ -+ NM_ATT_BS11_BCCH_RECONF = 0xd7, -+ NM_ATT_BS11_BIT_ERR_THESH = 0xa0, -+ NM_ATT_BS11_BOOT_SW_VERS = 0xa1, -+ NM_ATT_BS11_CCLK_ACCURACY = 0xa3, -+ NM_ATT_BS11_CCLK_TYPE = 0xa4, -+ NM_ATT_BS11_INP_IMPEDANCE = 0xaa, -+ NM_ATT_BS11_L1_PROT_TYPE = 0xab, -+ NM_ATT_BS11_LINE_CFG = 0xac, -+ NM_ATT_BS11_LI_PORT_1 = 0xad, -+ NM_ATT_BS11_LI_PORT_2 = 0xae, -+ -+ NM_ATT_BS11_L1_REM_ALM_TYPE = 0xb0, -+ NM_ATT_BS11_SW_LOAD_INTENDED = 0xbb, -+ NM_ATT_BS11_SW_LOAD_SAFETY = 0xbc, -+ NM_ATT_BS11_SW_LOAD_STORED = 0xbd, -+ -+ NM_ATT_BS11_VENDOR_NAME = 0xc1, -+ NM_ATT_BS11_HOPPING_MODE = 0xc5, -+ NM_ATT_BS11_LMT_LOGON_SESSION = 0xc6, -+ NM_ATT_BS11_LMT_LOGIN_TIME = 0xc7, -+ NM_ATT_BS11_LMT_USER_ACC_LEV = 0xc8, -+ NM_ATT_BS11_LMT_USER_NAME = 0xc9, -+ -+ NM_ATT_BS11_L1_CONTROL_TS = 0xd8, -+ NM_ATT_BS11_RADIO_MEAS_GRAN = 0xdc, /* in SACCH multiframes */ -+ NM_ATT_BS11_RADIO_MEAS_REP = 0xdd, -+ -+ NM_ATT_BS11_SH_LAPD_INT_TIMER = 0xe8, -+ -+ NM_ATT_BS11_BTS_STATE = 0xf0, -+ NM_ATT_BS11_E1_STATE = 0xf1, -+ NM_ATT_BS11_PLL = 0xf2, -+ NM_ATT_BS11_RX_OFFSET = 0xf3, -+ NM_ATT_BS11_ANT_TYPE = 0xf4, -+ NM_ATT_BS11_PLL_MODE = 0xfc, -+ NM_ATT_BS11_PASSWORD = 0xfd, -+}; -+ -+enum abis_nm_attr_ipa { -+ NM_ATT_IPACC_DST_IP = 0x80, -+ NM_ATT_IPACC_DST_IP_PORT = 0x81, -+ NM_ATT_IPACC_SSRC = 0x82, /* RTP Sync Source */ -+ NM_ATT_IPACC_RTP_PAYLD_TYPE = 0x83, -+ NM_ATT_IPACC_BASEB_ID = 0x84, -+ NM_ATT_IPACC_STREAM_ID = 0x85, -+ NM_ATT_IPACC_NV_FLAGS = 0x86, -+ NM_ATT_IPACC_FREQ_CTRL = 0x87, -+ NM_ATT_IPACC_PRIM_OML_CFG = 0x88, -+ NM_ATT_IPACC_SEC_OML_CFG = 0x89, -+ NM_ATT_IPACC_IP_IF_CFG = 0x8a, /* IP interface */ -+ NM_ATT_IPACC_IP_GW_CFG = 0x8b, /* IP gateway */ -+ NM_ATT_IPACC_IN_SERV_TIME = 0x8c, -+ NM_ATT_IPACC_TRX_BTS_ASS = 0x8d, -+ NM_ATT_IPACC_LOCATION = 0x8e, /* string describing location */ -+ NM_ATT_IPACC_PAGING_CFG = 0x8f, -+ NM_ATT_IPACC_FILE_DATA = 0x90, -+ NM_ATT_IPACC_UNIT_ID = 0x91, /* Site/BTS/TRX */ -+ NM_ATT_IPACC_PARENT_UNIT_ID = 0x92, -+ NM_ATT_IPACC_UNIT_NAME = 0x93, /* default: nbts- */ -+ NM_ATT_IPACC_SNMP_CFG = 0x94, -+ NM_ATT_IPACC_PRIM_OML_CFG_LIST = 0x95, -+ NM_ATT_IPACC_PRIM_OML_FB_TOUT = 0x96, /* fallback timeout */ -+ NM_ATT_IPACC_CUR_SW_CFG = 0x97, -+ NM_ATT_IPACC_TIMING_BUS = 0x98, -+ NM_ATT_IPACC_CGI = 0x99, /* Cell Global ID */ -+ NM_ATT_IPACC_RAC = 0x9a, -+ NM_ATT_IPACC_OBJ_VERSION = 0x9b, -+ NM_ATT_IPACC_GPRS_PAGING_CFG = 0x9c, -+ NM_ATT_IPACC_NSEI = 0x9d, -+ NM_ATT_IPACC_BVCI = 0x9e, -+ NM_ATT_IPACC_NSVCI = 0x9f, -+ NM_ATT_IPACC_NS_CFG = 0xa0, -+ NM_ATT_IPACC_BSSGP_CFG = 0xa1, -+ NM_ATT_IPACC_NS_LINK_CFG = 0xa2, -+ NM_ATT_IPACC_RLC_CFG = 0xa3, -+ NM_ATT_IPACC_ALM_THRESH_LIST = 0xa4, -+ NM_ATT_IPACC_MONIT_VAL_LIST = 0xa5, -+ NM_ATT_IPACC_TIB_CONTROL = 0xa6, -+ NM_ATT_IPACC_SUPP_FEATURES = 0xa7, -+ NM_ATT_IPACC_CODING_SCHEMES = 0xa8, -+ NM_ATT_IPACC_RLC_CFG_2 = 0xa9, -+ NM_ATT_IPACC_HEARTB_TOUT = 0xaa, -+ NM_ATT_IPACC_UPTIME = 0xab, -+ NM_ATT_IPACC_RLC_CFG_3 = 0xac, -+ NM_ATT_IPACC_SSL_CFG = 0xad, -+ NM_ATT_IPACC_SEC_POSSIBLE = 0xae, -+ NM_ATT_IPACC_IML_SSL_STATE = 0xaf, -+ NM_ATT_IPACC_REVOC_DATE = 0xb0, -+}; -+ -+/* Section 9.4.4: Administrative State */ -+enum abis_nm_adm_state { -+ NM_STATE_LOCKED = 0x01, -+ NM_STATE_UNLOCKED = 0x02, -+ NM_STATE_SHUTDOWN = 0x03, -+ NM_STATE_NULL = 0xff, -+}; -+ -+/* Section 9.4.13: Channel Combination */ -+enum abis_nm_chan_comb { -+ NM_CHANC_TCHFull = 0x00, -+ NM_CHANC_TCHHalf = 0x01, -+ NM_CHANC_TCHHalf2 = 0x02, -+ NM_CHANC_SDCCH = 0x03, -+ NM_CHANC_mainBCCH = 0x04, -+ NM_CHANC_BCCHComb = 0x05, -+ NM_CHANC_BCCH = 0x06, -+ NM_CHANC_BCCH_CBCH = 0x07, -+ NM_CHANC_SDCCH_CBCH = 0x08, -+}; -+ -+/* Section 9.4.16: Event Type */ -+enum abis_nm_event_type { -+ NM_EVT_COMM_FAIL = 0x00, -+ NM_EVT_QOS_FAIL = 0x01, -+ NM_EVT_PROC_FAIL = 0x02, -+ NM_EVT_EQUIP_FAIL = 0x03, -+ NM_EVT_ENV_FAIL = 0x04, -+}; -+ -+/* Section: 9.4.63: Perceived Severity */ -+enum abis_nm_severity { -+ NM_SEVER_CEASED = 0x00, -+ NM_SEVER_CRITICAL = 0x01, -+ NM_SEVER_MAJOR = 0x02, -+ NM_SEVER_MINOR = 0x03, -+ NM_SEVER_WARNING = 0x04, -+ NM_SEVER_INDETERMINATE = 0x05, -+}; -+ -+/* Section 9.4.43: Probable Cause Type */ -+enum abis_nm_pcause_type { -+ NM_PCAUSE_T_X721 = 0x01, -+ NM_PCAUSE_T_GSM = 0x02, -+ NM_PCAUSE_T_MANUF = 0x03, -+}; -+ -+/* Section 9.4.36: NACK Causes */ -+enum abis_nm_nack_cause { -+ /* General Nack Causes */ -+ NM_NACK_INCORR_STRUCT = 0x01, -+ NM_NACK_MSGTYPE_INVAL = 0x02, -+ NM_NACK_OBJCLASS_INVAL = 0x05, -+ NM_NACK_OBJCLASS_NOTSUPP = 0x06, -+ NM_NACK_BTSNR_UNKN = 0x07, -+ NM_NACK_TRXNR_UNKN = 0x08, -+ NM_NACK_OBJINST_UNKN = 0x09, -+ NM_NACK_ATTRID_INVAL = 0x0c, -+ NM_NACK_ATTRID_NOTSUPP = 0x0d, -+ NM_NACK_PARAM_RANGE = 0x0e, -+ NM_NACK_ATTRLIST_INCONSISTENT = 0x0f, -+ NM_NACK_SPEC_IMPL_NOTSUPP = 0x10, -+ NM_NACK_CANT_PERFORM = 0x11, -+ /* Specific Nack Causes */ -+ NM_NACK_RES_NOTIMPL = 0x19, -+ NM_NACK_RES_NOTAVAIL = 0x1a, -+ NM_NACK_FREQ_NOTAVAIL = 0x1b, -+ NM_NACK_TEST_NOTSUPP = 0x1c, -+ NM_NACK_CAPACITY_RESTR = 0x1d, -+ NM_NACK_PHYSCFG_NOTPERFORM = 0x1e, -+ NM_NACK_TEST_NOTINIT = 0x1f, -+ NM_NACK_PHYSCFG_NOTRESTORE = 0x20, -+ NM_NACK_TEST_NOSUCH = 0x21, -+ NM_NACK_TEST_NOSTOP = 0x22, -+ NM_NACK_MSGINCONSIST_PHYSCFG = 0x23, -+ NM_NACK_FILE_INCOMPLETE = 0x25, -+ NM_NACK_FILE_NOTAVAIL = 0x26, -+ NM_NACK_FILE_NOTACTIVATE = 0x27, -+ NM_NACK_REQ_NOT_GRANT = 0x28, -+ NM_NACK_WAIT = 0x29, -+ NM_NACK_NOTH_REPORT_EXIST = 0x2a, -+ NM_NACK_MEAS_NOTSUPP = 0x2b, -+ NM_NACK_MEAS_NOTSTART = 0x2c, -+}; -+ -+/* Section 9.4.1 */ -+struct abis_nm_channel { -+ guint8 attrib; -+ guint8 bts_port; -+ guint8 timeslot; -+ guint8 subslot; -+} __attribute__ ((packed)); -+ -+/* Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ -+enum abis_bs11_objtype { -+ BS11_OBJ_ALCO = 0x01, -+ BS11_OBJ_BBSIG = 0x02, /* obj_class: 0,1 */ -+ BS11_OBJ_TRX1 = 0x03, /* only DEACTIVATE TRX1 */ -+ BS11_OBJ_CCLK = 0x04, -+ BS11_OBJ_GPSU = 0x06, -+ BS11_OBJ_LI = 0x07, -+ BS11_OBJ_PA = 0x09, /* obj_class: 0, 1*/ -+}; -+ -+enum abis_bs11_trx_power { -+ BS11_TRX_POWER_GSM_2W = 0x06, -+ BS11_TRX_POWER_GSM_250mW= 0x07, -+ BS11_TRX_POWER_GSM_80mW = 0x08, -+ BS11_TRX_POWER_GSM_30mW = 0x09, -+ BS11_TRX_POWER_DCS_3W = 0x0a, -+ BS11_TRX_POWER_DCS_1W6 = 0x0b, -+ BS11_TRX_POWER_DCS_500mW= 0x0c, -+ BS11_TRX_POWER_DCS_160mW= 0x0d, -+}; -+ -+enum abis_bs11_li_pll_mode { -+ BS11_LI_PLL_LOCKED = 2, -+ BS11_LI_PLL_STANDALONE = 3, -+}; -+ -+enum abis_bs11_phase { -+ BS11_STATE_SOFTWARE_RQD = 0x01, -+ BS11_STATE_LOAD_SMU_INTENDED = 0x11, -+ BS11_STATE_LOAD_SMU_SAFETY = 0x21, -+ BS11_STATE_LOAD_FAILED = 0x31, -+ BS11_STATE_LOAD_DIAGNOSTIC = 0x41, -+ BS11_STATE_WARM_UP = 0x51, -+ BS11_STATE_WARM_UP_2 = 0x52, -+ BS11_STATE_WAIT_MIN_CFG = 0x62, -+ BS11_STATE_MAINTENANCE = 0x72, -+ BS11_STATE_LOAD_MBCCU = 0x92, -+ BS11_STATE_WAIT_MIN_CFG_2 = 0xA2, -+ BS11_STATE_NORMAL = 0x03, -+ BS11_STATE_ABIS_LOAD = 0x13, -+}; -+ -+/* From openbsc/include/openbsc/tlv.h */ -+enum tlv_type { -+ TLV_TYPE_UNKNOWN, -+ TLV_TYPE_FIXED, -+ TLV_TYPE_T, -+ TLV_TYPE_TV, -+ TLV_TYPE_TLV, -+ TLV_TYPE_TL16V, -+ TLV_TYPE_TLV16, -+}; -+ -+struct tlv_def { -+ enum tlv_type type; -+ u_int8_t fixed_len; -+}; -+ -+struct tlv_definition { -+ struct tlv_def def[0xff]; -+}; -+ -+enum abis_nm_ipacc_test_no { -+ NM_IPACC_TESTNO_RLOOP_ANT = 0x01, -+ NM_IPACC_TESTNO_RLOOP_XCVR = 0x02, -+ NM_IPACC_TESTNO_FUNC_OBJ = 0x03, -+ NM_IPACC_TESTNO_CHAN_USAGE = 0x40, -+ NM_IPACC_TESTNO_BCCH_CHAN_USAGE = 0x41, -+ NM_IPACC_TESTNO_FREQ_SYNC = 0x42, -+ NM_IPACC_TESTNO_BCCH_INFO = 0x43, -+ NM_IPACC_TESTNO_TX_BEACON = 0x44, -+ NM_IPACC_TESTNO_SYSINFO_MONITOR = 0x45, -+ NM_IPACC_TESTNO_BCCCH_MONITOR = 0x46, -+}; -+ -+/* first byte after length inside NM_ATT_TEST_REPORT */ -+enum abis_nm_ipacc_test_res { -+ NM_IPACC_TESTRES_SUCCESS = 0, -+ NM_IPACC_TESTRES_TIMEOUT = 1, -+ NM_IPACC_TESTRES_NO_CHANS = 2, -+ NM_IPACC_TESTRES_PARTIAL = 3, -+ NM_IPACC_TESTRES_STOPPED = 4, -+}; -+ -+/* internal IE inside NM_ATT_TEST_REPORT */ -+enum abis_nm_ipacc_testres_ie { -+ NM_IPACC_TR_IE_FREQ_ERR_LIST = 3, -+ NM_IPACC_TR_IE_CHAN_USAGE = 4, -+ NM_IPACC_TR_IE_BCCH_INFO = 6, -+ NM_IPACC_TR_IE_RESULT_DETAILS = 8, -+ NM_IPACC_TR_IE_FREQ_ERR = 18, -+}; -+ -+/* From openbsc/src/abis_nm.c */ -+static const struct tlv_definition nm_att_tlvdef_base = { -+ .def = { -+ [NM_ATT_ABIS_CHANNEL] = { TLV_TYPE_FIXED, 3 }, -+ [NM_ATT_ADD_INFO] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_ADD_TEXT] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_ADM_STATE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_ARFCN_LIST]= { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_AUTON_REPORT] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_AVAIL_STATUS] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_BCCH_ARFCN] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_BSIC] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_BTS_AIR_TIMER] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_CCCH_L_I_P] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_CCCH_L_T] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_CHAN_COMB] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_CONN_FAIL_CRIT] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_DEST] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_EVENT_TYPE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_FILE_ID] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_FILE_VERSION] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_GSM_TIME] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_HSN] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_HW_CONFIG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_HW_DESC] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_INTAVE_PARAM] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_INTERF_BOUND] = { TLV_TYPE_FIXED, 6 }, -+ [NM_ATT_LIST_REQ_ATTR] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_MAIO] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_MANUF_STATE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_MANUF_THRESH] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_MANUF_ID] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_MAX_TA] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_MDROP_LINK] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_MDROP_NEXT] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_NACK_CAUSES] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_NY1] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_OPER_STATE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_OVERL_PERIOD] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_PHYS_CONF] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_POWER_CLASS] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_POWER_THRESH] = { TLV_TYPE_FIXED, 3 }, -+ [NM_ATT_PROB_CAUSE] = { TLV_TYPE_FIXED, 3 }, -+ [NM_ATT_RACH_B_THRESH] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_LDAVG_SLOTS] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_RAD_SUBC] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_RF_MAXPOWR_R] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_SITE_INPUTS] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_SITE_OUTPUTS] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_SOURCE] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_SPEC_PROB] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_START_TIME] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_T200] = { TLV_TYPE_FIXED, 7 }, -+ [NM_ATT_TEI] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_TEST_DUR] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_TEST_NO] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_TEST_REPORT] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_VSWR_THRESH] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_WINDOW_SIZE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_TSC] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_SW_CONFIG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_SEVERITY] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_GET_ARI] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_HW_CONF_CHG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_OUTST_ALARM] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_FILE_DATA] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_MEAS_RES] = { TLV_TYPE_TL16V, 0 }, -+ -+ }, -+}; -+ -+/* BS11 specifics */ -+static const struct tlv_definition nm_att_tlvdev_bs11 = { -+ .def = { -+ /* different stndard IEs */ -+ [NM_ATT_OUTST_ALARM] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_HW_DESC] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_ARFCN_LIST]= { TLV_TYPE_TLV16, 0 }, -+ -+ /* proprietary IEs */ -+ [NM_ATT_BS11_ABIS_EXT_TIME] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_OM_LAPD_REL_TIMER]={ TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_BS11_SH_LAPD_INT_TIMER]={ TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_EMERG_TIMER1] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_EMERG_TIMER2] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_BTSLS_HOPPING] = { TLV_TYPE_FIXED, 1 }, -+ [NM_ATT_BS11_CELL_ALLOC_NR] = { TLV_TYPE_FIXED, 1 }, -+ [NM_ATT_BS11_ENA_INTERF_CLASS]= { TLV_TYPE_FIXED, 1 }, -+ [NM_ATT_BS11_FACCH_QUAL] = { TLV_TYPE_FIXED, 1 }, -+ [NM_ATT_BS11_TSYNC] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_BS11_TTRAU] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_BS11_EXCESSIVE_DISTANCE] = { TLV_TYPE_TLV, 1 }, -+ [NM_ATT_BS11_HOPPING_MODE] = { TLV_TYPE_TLV, 1 }, -+ [NM_ATT_BS11_RF_RES_IND_PER] = { TLV_TYPE_FIXED, 1 }, -+ [NM_ATT_BS11_RADIO_MEAS_GRAN] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_RADIO_MEAS_REP] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_EMRG_CFG_MEMBER] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_TRX_AREA] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_ESN_FW_CODE_NO] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_ESN_HW_CODE_NO] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_ESN_PCB_SERIAL] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_BOOT_SW_VERS] = { TLV_TYPE_TLV, 0 }, -+ [0x59] = { TLV_TYPE_TLV, 0 }, -+ [0xd5] = { TLV_TYPE_TLV, 0 }, -+ [0xa8] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_PASSWORD] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_TXPWR] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_RSSI_OFFS] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_LINE_CFG] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_BS11_L1_PROT_TYPE] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_BS11_BIT_ERR_THESH] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_BS11_DIVERSITY] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_LMT_LOGON_SESSION]={ TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_LMT_LOGIN_TIME] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_LMT_USER_ACC_LEV] ={ TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_LMT_USER_NAME] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_BTS_STATE] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_E1_STATE] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_PLL_MODE] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_PLL] = { TLV_TYPE_TLV, 0 }, -+ [NM_ATT_BS11_CCLK_ACCURACY] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_BS11_CCLK_TYPE] = { TLV_TYPE_TV, 0 }, -+ }, -+}; -+ -+/* ip.access specifics */ -+static const struct tlv_definition nm_att_tlvdef_ipa = { -+ .def = { -+ [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, -+ [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_IPACC_PRIM_OML_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, -+ [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, -+ [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, -+ [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, 0 }, -+ [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_GPRS_PAGING_CFG] ={ TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, -+ [NM_ATT_IPACC_FILE_DATA] = { TLV_TYPE_TL16V, 0 }, -+ [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V, 0 }, -+ }, -+}; -+ -+#endif /* _NM_H */ diff --git a/wireshark/ericsson_rbs2409.patch b/wireshark/ericsson_rbs2409.patch deleted file mode 100644 index e8cdb8698..000000000 --- a/wireshark/ericsson_rbs2409.patch +++ /dev/null @@ -1,1894 +0,0 @@ -Index: wireshark/epan/dissectors/Makefile.common -=================================================================== ---- wireshark.orig/epan/dissectors/Makefile.common -+++ wireshark/epan/dissectors/Makefile.common -@@ -67,6 +67,8 @@ - packet-dcerpc-dnsserver.c \ - packet-dcerpc-eventlog.c \ - packet-dcerpc-lsa.c \ -+ packet-ehdlc.c \ -+ packet-gsm_abis_om2000.c \ - packet-dcerpc-winreg.c - - # -Index: wireshark/epan/dissectors/packet-l2tp.c -=================================================================== ---- wireshark.orig/epan/dissectors/packet-l2tp.c -+++ wireshark/epan/dissectors/packet-l2tp.c -@@ -148,6 +148,7 @@ - #define L2TPv3_PROTOCOL_AAL5 6 - #define L2TPv3_PROTOCOL_LAPD 7 - #define L2TPv3_PROTOCOL_DOCSIS_DMPT 8 -+#define L2TPv3_PROTOCOL_ERICSSON 9 - - static enum_val_t l2tpv3_protocols[] = { - {"eth", "Ethernet", L2TPv3_PROTOCOL_ETH}, -@@ -159,6 +160,7 @@ - {"aal5", "AAL5", L2TPv3_PROTOCOL_AAL5}, - {"lapd", "LAPD", L2TPv3_PROTOCOL_LAPD}, - {"docsis-dmpt", "DOCSIS-DMPT", L2TPv3_PROTOCOL_DOCSIS_DMPT}, -+ {"ehdlc", "Ericsson HDLC", L2TPv3_PROTOCOL_ERICSSON}, - {NULL, NULL, 0} - }; - -@@ -583,6 +585,7 @@ - static dissector_handle_t llc_handle; - static dissector_handle_t lapd_handle; - static dissector_handle_t mp2t_handle; -+static dissector_handle_t ehdlc_handle; - static dissector_handle_t data_handle; - - /* -@@ -1498,6 +1501,9 @@ - case L2TPv3_PROTOCOL_LAPD: - call_dissector(lapd_handle, next_tvb, pinfo, tree); - break; -+ case L2TPv3_PROTOCOL_ERICSSON: -+ call_dissector(ehdlc_handle, next_tvb, pinfo, tree); -+ break; - default: - call_dissector(data_handle, next_tvb, pinfo, tree); - break; -@@ -2171,5 +2177,6 @@ - llc_handle = find_dissector("llc"); - lapd_handle = find_dissector("lapd"); - mp2t_handle = find_dissector("mp2t"); -+ ehdlc_handle = find_dissector("ehdlc"); - data_handle = find_dissector("data"); - } -Index: wireshark/epan/dissectors/packet-gsm_abis_om2000.c -=================================================================== ---- /dev/null -+++ wireshark/epan/dissectors/packet-gsm_abis_om2000.c -@@ -0,0 +1,1439 @@ -+/* packet-abis_om2000.c -+ * Routines for packet dissection of Ericsson A-bis OML (OM 2000) -+ * Copyright 2010 by Harald Welte -+ * -+ * $Id$ -+ * -+ * Wireshark - Network traffic analyzer -+ * By Gerald Combs -+ * 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 -+ -+#include -+#include -+#include -+#include -+ -+#include "packet-gsm_abis_oml.h" -+#include "packet-gsm_a_common.h" -+ -+#include -+ -+/* initialize the protocol and registered fields */ -+static int proto_abis_om2000 = -1; -+ -+static int hf_om2k_msg_code = -1; -+static int hf_om2k_mo_if = -1; -+static int hf_om2k_mo_class = -1; -+static int hf_om2k_mo_instance = -1; -+ -+static int hf_om2k_aip = -1; -+static int hf_om2k_oip = -1; -+static int hf_om2k_comb = -1; -+static int hf_om2k_ts = -1; -+static int hf_om2k_hsn = -1; -+static int hf_om2k_maio = -1; -+static int hf_om2k_bsic = -1; -+static int hf_om2k_diversity = -1; -+static int hf_om2k_fn_offs = -1; -+static int hf_om2k_ext_range = -1; -+static int hf_om2k_irc = -1; -+static int hf_om2k_bs_pa_mfrms = -1; -+static int hf_om2k_bs_ag_blks_res= -1; -+static int hf_om2k_drx_dev_max = -1; -+static int hf_om2k_cr = -1; -+static int hf_om2k_ipt3 = -1; -+static int hf_om2k_aop = -1; -+static int hf_om2k_t3105 = -1; -+static int hf_om2k_ny1 = -1; -+static int hf_om2k_cbi = -1; -+static int hf_om2k_tsc = -1; -+static int hf_om2k_icm = -1; -+static int hf_om2k_tta = -1; -+static int hf_om2k_icm_cr = -1; -+static int hf_om2k_lsc_fm = -1; -+static int hf_om2k_lsc_lsi = -1; -+static int hf_om2k_lsc_lsa = -1; -+static int hf_om2k_ls_ft = -1; -+static int hf_om2k_cst = -1; -+static int hf_om2k_ea = -1; -+static int hf_om2k_unknown_tag = -1; -+static int hf_om2k_unknown_val = -1; -+static int hf_om2k_nom_pwr = -1; -+static int hf_om2k_fill_mark = -1; -+static int hf_om2k_bcc = -1; -+static int hf_om2k_mo_state = -1; -+static int hf_om2k_la_state = -1; -+static int hf_om2k_tsn_state = -1; -+static int hf_om2k_bts_manuf = -1; -+static int hf_om2k_bts_gen = -1; -+static int hf_om2k_bts_rev = -1; -+static int hf_om2k_bts_var = -1; -+static int hf_om2k_brr = -1; -+static int hf_om2k_bfr = -1; -+static int hf_om2k_hwinfo_sig = -1; -+static int hf_om2k_capa_sig = -1; -+static int hf_om2k_file_rev = -1; -+static int hf_om2k_filerel_ilr = -1; -+static int hf_om2k_filerel_cur = -1; -+static int hf_om2k_filerel_other = -1; -+static int hf_om2k_cal_time = -1; -+static int hf_om2k_list_nr = -1; -+static int hf_om2k_list_nr_end = -1; -+static int hf_om2k_isl = -1; -+static int hf_om2k_isl_icp1 = -1; -+static int hf_om2k_isl_icp2 = -1; -+static int hf_om2k_isl_ci = -1; -+static int hf_om2k_conl = -1; -+static int hf_om2k_conl_nr_cgs = -1; -+static int hf_om2k_conl_nr_cps_cg = -1; -+static int hf_om2k_conl_ccp = -1; -+static int hf_om2k_conl_ci = -1; -+static int hf_om2k_conl_tag = -1; -+static int hf_om2k_conl_tei = -1; -+static int hf_om2k_tf_mode = -1; -+static int hf_om2k_tf_fs_offset = -1; -+ -+ -+ -+/* initialize the subtree pointers */ -+static int ett_om2000 = -1; -+static int ett_om2k_mo = -1; -+static int ett_om2k_isl = -1; -+static int ett_om2k_conl = -1; -+ -+static proto_tree *top_tree; -+ -+static const value_string om2k_msgcode_vals[] = { -+ { 0x0000, "Abort SP Command" }, -+ { 0x0002, "Abort SP Complete" }, -+ { 0x0004, "Alarm Report ACK" }, -+ { 0x0005, "Alarm Report NACK" }, -+ { 0x0006, "Alarm Report" }, -+ { 0x0008, "Alarm Status Request" }, -+ { 0x000a, "Alarm Status Request Accept" }, -+ { 0x000b, "Alarm Status Request Reject" }, -+ { 0x000c, "Alarm Status Result ACK" }, -+ { 0x000d, "Alarm Status Result NACK" }, -+ { 0x000e, "Alarm Status Result" }, -+ { 0x0010, "Calendar Time Response" }, -+ { 0x0011, "Calendar Time Reject" }, -+ { 0x0012, "Calendar Time Request" }, -+ { 0x0014, "CON Configuration Request" }, -+ { 0x0016, "CON Configuration Request Accept" }, -+ { 0x0017, "CON Configuration Request Reject" }, -+ { 0x0018, "CON Configuration Result ACK" }, -+ { 0x0019, "CON Configuration Result NACK" }, -+ { 0x001a, "CON Configuration Result" }, -+ { 0x001c, "Connect Command" }, -+ { 0x001e, "Connect Complete" }, -+ { 0x001f, "Connect Rejecte" }, -+ { 0x0028, "Disable Request" }, -+ { 0x002a, "Disable Request Accept" }, -+ { 0x002b, "Disable Request Reject" }, -+ { 0x002c, "Disable Result ACK" }, -+ { 0x002d, "Disable Result NACK" }, -+ { 0x002e, "Disable Result" }, -+ { 0x0030, "Disconnect Command" }, -+ { 0x0032, "Disconnect Complete" }, -+ { 0x0033, "Disconnect Reject" }, -+ { 0x0034, "Enable Request" }, -+ { 0x0036, "Enable Request Accept" }, -+ { 0x0037, "Enable Request Reject" }, -+ { 0x0038, "Enable Result ACK" }, -+ { 0x0039, "Enable Result NACK" }, -+ { 0x003a, "Enable Result" }, -+ { 0x003c, "Escape Downlink Normal" }, -+ { 0x003d, "Escape Downlink NACK" }, -+ { 0x003e, "Escape Uplink Normal" }, -+ { 0x003f, "Escape Uplink NACK" }, -+ { 0x0040, "Fault Report ACK" }, -+ { 0x0041, "Fault Report NACK" }, -+ { 0x0042, "Fault Report" }, -+ { 0x0044, "File Package End Command" }, -+ { 0x0046, "File Package End Result" }, -+ { 0x0047, "File Package End Reject" }, -+ { 0x0048, "File Relation Request" }, -+ { 0x004a, "File Relation Response" }, -+ { 0x004b, "File Relation Request Reject" }, -+ { 0x004c, "File Segment Transfer" }, -+ { 0x004e, "File Segment Transfer Complete" }, -+ { 0x004f, "File Segment Transfer Reject" }, -+ { 0x0050, "HW Information Request" }, -+ { 0x0052, "HW Information Request Accept" }, -+ { 0x0053, "HW Information Request Reject" }, -+ { 0x0054, "HW Information Result ACK" }, -+ { 0x0055, "HW Information Result NACK" }, -+ { 0x0056, "HW Information Result" }, -+ { 0x0060, "IS Configuration Request" }, -+ { 0x0062, "IS Configuration Request Accept" }, -+ { 0x0063, "IS Configuration Request Reject" }, -+ { 0x0064, "IS Configuration Result ACK" }, -+ { 0x0065, "IS Configuration Result NACK" }, -+ { 0x0066, "IS Configuration Result" }, -+ { 0x0068, "Load Data End" }, -+ { 0x006a, "Load Data End Result" }, -+ { 0x006b, "Load Data End Reject" }, -+ { 0x006c, "Load Data Init" }, -+ { 0x006e, "Load Data Init Accept" }, -+ { 0x006f, "Load Data Init Reject" }, -+ { 0x0070, "Loop Control Command" }, -+ { 0x0072, "Loop Control Complete" }, -+ { 0x0073, "Loop Control Reject" }, -+ { 0x0074, "Operational Information" }, -+ { 0x0076, "Operational Information Accept" }, -+ { 0x0077, "Operational Information Reject" }, -+ { 0x0078, "Reset Command" }, -+ { 0x007a, "Reset Complete" }, -+ { 0x007b, "Reset Reject" }, -+ { 0x007c, "RX Configuration Request" }, -+ { 0x007e, "RX Configuration Request Accept" }, -+ { 0x007f, "RX Configuration Request Reject" }, -+ { 0x0080, "RX Configuration Result ACK" }, -+ { 0x0081, "RX Configuration Result NACK" }, -+ { 0x0082, "RX Configuration Result" }, -+ { 0x0084, "Start Request" }, -+ { 0x0086, "Start Request Accept" }, -+ { 0x0087, "Start Request Reject" }, -+ { 0x0088, "Start Result ACK" }, -+ { 0x0089, "Start Result NACK" }, -+ { 0x008a, "Start Result" }, -+ { 0x008c, "Status Request" }, -+ { 0x008e, "Status Response" }, -+ { 0x008f, "Status Reject" }, -+ { 0x0094, "Test Request" }, -+ { 0x0096, "Test Request Accept" }, -+ { 0x0097, "Test Request Reject" }, -+ { 0x0098, "Test Result ACK" }, -+ { 0x0099, "Test Result NACK" }, -+ { 0x009a, "Test Result" }, -+ { 0x00a0, "TF Configuration Request" }, -+ { 0x00a2, "TF Configuration Request Accept" }, -+ { 0x00a3, "TF Configuration Request Reject" }, -+ { 0x00a4, "TF Configuration Result ACK" }, -+ { 0x00a5, "TF Configuration Result NACK" }, -+ { 0x00a6, "TF Configuration Result" }, -+ { 0x00a8, "TS Configuration Request" }, -+ { 0x00aa, "TS Configuration Request Accept" }, -+ { 0x00ab, "TS Configuration Request Reject" }, -+ { 0x00ac, "TS Configuration Result ACK" }, -+ { 0x00ad, "TS Configuration Result NACK" }, -+ { 0x00ae, "TS Configuration Result" }, -+ { 0x00b0, "TX Configuration Request" }, -+ { 0x00b2, "TX Configuration Request Accept" }, -+ { 0x00b3, "TX Configuration Request Reject" }, -+ { 0x00b4, "TX Configuration Result ACK" }, -+ { 0x00b5, "TX Configuration Result NACK" }, -+ { 0x00b6, "TX Configuration Result" }, -+ { 0x00bc, "DIP Alarm Report ACK" }, -+ { 0x00bd, "DIP Alarm Report NACK" }, -+ { 0x00be, "DIP Alarm Report" }, -+ { 0x00c0, "DIP Alarm Status Request" }, -+ { 0x00c2, "DIP Alarm Status Response" }, -+ { 0x00c3, "DIP Alarm Status Reject" }, -+ { 0x00c4, "DIP Quality Report I ACK" }, -+ { 0x00c5, "DIP Quality Report I NACK" }, -+ { 0x00c6, "DIP Quality Report I" }, -+ { 0x00c8, "DIP Quality Report II ACK" }, -+ { 0x00c9, "DIP Quality Report II NACK" }, -+ { 0x00ca, "DIP Quality Report II" }, -+ { 0x00dc, "DP Configuration Request" }, -+ { 0x00de, "DP Configuration Request Accept" }, -+ { 0x00df, "DP Configuration Request Reject" }, -+ { 0x00e0, "DP Configuration Result ACK" }, -+ { 0x00e1, "DP Configuration Result NACK" }, -+ { 0x00e2, "DP Configuration Result" }, -+ { 0x00e4, "Capabilities HW Info Report ACK" }, -+ { 0x00e5, "Capabilities HW Info Report NACK" }, -+ { 0x00e6, "Capabilities HW Info Report" }, -+ { 0x00e8, "Capabilities Request" }, -+ { 0x00ea, "Capabilities Request Accept" }, -+ { 0x00eb, "Capabilities Request Reject" }, -+ { 0x00ec, "Capabilities Result ACK" }, -+ { 0x00ed, "Capabilities Result NACK" }, -+ { 0x00ee, "Capabilities Result" }, -+ { 0x00f0, "FM Configuration Request" }, -+ { 0x00f2, "FM Configuration Request Accept" }, -+ { 0x00f3, "FM Configuration Request Reject" }, -+ { 0x00f4, "FM Configuration Result ACK" }, -+ { 0x00f5, "FM Configuration Result NACK" }, -+ { 0x00f6, "FM Configuration Result" }, -+ { 0x00f8, "FM Report Request" }, -+ { 0x00fa, "FM Report Response" }, -+ { 0x00fb, "FM Report Reject" }, -+ { 0x00fc, "FM Start Command" }, -+ { 0x00fe, "FM Start Complete" }, -+ { 0x00ff, "FM Start Reject" }, -+ { 0x0100, "FM Stop Command" }, -+ { 0x0102, "FM Stop Complete" }, -+ { 0x0103, "FM Stop Reject" }, -+ { 0x0104, "Negotiation Request ACK" }, -+ { 0x0105, "Negotiation Request NACK" }, -+ { 0x0106, "Negotiation Request" }, -+ { 0x0108, "BTS Initiated Request ACK" }, -+ { 0x0109, "BTS Initiated Request NACK" }, -+ { 0x010a, "BTS Initiated Request" }, -+ { 0x010c, "Radio Channels Release Command" }, -+ { 0x010e, "Radio Channels Release Complete" }, -+ { 0x010f, "Radio Channels Release Reject" }, -+ { 0x0118, "Feature Control Command" }, -+ { 0x011a, "Feature Control Complete" }, -+ { 0x011b, "Feature Control Reject" }, -+ -+ { 0, NULL } -+}; -+ -+/* TS 12.21 Section 9.4: Attributes */ -+static const value_string om2k_attr_vals[] = { -+ { 0x00, "Accordance indication" }, -+ { 0x01, "Alarm Id" }, -+ { 0x02, "Alarm Data" }, -+ { 0x03, "Alarm Severity" }, -+ { 0x04, "Alarm Status" }, -+ { 0x05, "Alarm Status Type" }, -+ { 0x06, "BCC" }, -+ { 0x07, "BS_AG_BKS_RES" }, -+ { 0x09, "BSIC" }, -+ { 0x0a, "BA_PA_MFRMS" }, -+ { 0x0b, "CBCH Indicator" }, -+ { 0x0c, "CCCH Options" }, -+ { 0x0d, "Calendar Time" }, -+ { 0x0f, "Channel Combination" }, -+ { 0x10, "CON Connection List" }, -+ { 0x11, "Data End Indication" }, -+ { 0x12, "DRX_DEV_MAX" }, -+ { 0x13, "End List Number" }, -+ { 0x14, "External Condition Map Class 1" }, -+ { 0x15, "External Condition Map Class 2" }, -+ { 0x16, "File Relation Indication" }, -+ { 0x17, "File Revision" }, -+ { 0x18, "File Segment Data" }, -+ { 0x19, "File Segment Length" }, -+ { 0x1a, "File Segment Sequence Number" }, -+ { 0x1b, "File Size" }, -+ { 0x1c, "Filling Marker" }, -+ { 0x1d, "FN Offset" }, -+ { 0x1e, "Frequency List" }, -+ { 0x1f, "Frequency Specifier RX" }, -+ { 0x20, "Frequency Specifier TX" }, -+ { 0x21, "HSN" }, -+ { 0x22, "ICM Indicator" }, -+ { 0x23, "Internal Fault Map Class 1A" }, -+ { 0x24, "Internal Fault Map Class 1B" }, -+ { 0x25, "Internal Fault Map Class 2A" }, -+ { 0x26, "Internal Fault Map Class 2A Extension" }, -+ { 0x27, "IS Connection List" }, -+ { 0x28, "List Number" }, -+ { 0x29, "File Package State Indication" }, -+ { 0x2a, "Local Access State" }, -+ { 0x2b, "MAIO" }, -+ { 0x2c, "MO State" }, -+ { 0x2d, "Ny1" }, -+ { 0x2e, "Operational Information" }, -+ { 0x2f, "Power" }, -+ { 0x30, "RU Position Data" }, -+ { 0x31, "Protocol Error" }, -+ { 0x32, "Reason Code" }, -+ { 0x33, "Receiver Diversity" }, -+ { 0x34, "Replacement Unit Map" }, -+ { 0x35, "Result Code" }, -+ { 0x36, "RU Revision Data" }, -+ { 0x38, "T3105" }, -+ { 0x39, "Test Loop Setting" }, -+ { 0x3a, "TF Mode" }, -+ { 0x3b, "TF Compensation Value" }, -+ { 0x3c, "Time Slot Number" }, -+ { 0x3d, "TSC" }, -+ { 0x3e, "RU Logical Id" }, -+ { 0x3f, "RU Serial Number Data" }, -+ { 0x40, "BTS Version" }, -+ { 0x41, "OML IWD Version" }, -+ { 0x42, "RWL IWD Version" }, -+ { 0x43, "OML Function Map 1" }, -+ { 0x44, "OML Function Map 2" }, -+ { 0x45, "RSL Function Map 1" }, -+ { 0x46, "RSL Function Map 2" }, -+ { 0x47, "Extended Range Indicator" }, -+ { 0x48, "Request Indicators" }, -+ { 0x49, "DIP Alarm Condition Map" }, -+ { 0x4a, "ES Incoming" }, -+ { 0x4b, "ES Outgoing" }, -+ { 0x4e, "SES Incoming" }, -+ { 0x4f, "SES Outgoing" }, -+ { 0x50, "Replacement Unit Map Extension" }, -+ { 0x52, "UAS Incoming" }, -+ { 0x53, "UAS Outgoing" }, -+ { 0x58, "DF Incoming" }, -+ { 0x5a, "DF Outgoing" }, -+ { 0x5c, "SF" }, -+ { 0x60, "S Bits Setting" }, -+ { 0x61, "CRC-4 Use Option" }, -+ { 0x62, "T Parameter" }, -+ { 0x63, "N Parameter" }, -+ { 0x64, "N1 Parameter" }, -+ { 0x65, "N3 Parameter" }, -+ { 0x66, "N4 Parameter" }, -+ { 0x67, "P Parameter" }, -+ { 0x68, "Q Parameter" }, -+ { 0x69, "BI_Q1" }, -+ { 0x6a, "BI_Q2" }, -+ { 0x74, "ICM Boundary Parameters" }, -+ { 0x77, "AFT" }, -+ { 0x78, "AFT RAI" }, -+ { 0x79, "Link Supervision Control" }, -+ { 0x7a, "Link Supervision Filtering Time" }, -+ { 0x7b, "Call Supervision Time" }, -+ { 0x7c, "Interval Length UAS Incoming" }, -+ { 0x7d, "Interval Length UAS Outgoing" }, -+ { 0x7e, "ICM Channel Rate" }, -+ { 0x7f, "Attribute Identifier" }, -+ { 0x80, "FM Frequency List" }, -+ { 0x81, "FM Frequency Report" }, -+ { 0x82, "FM Percentile" }, -+ { 0x83, "FM Clear Indication" }, -+ { 0x84, "HW Info Signature" }, -+ { 0x85, "MO Record" }, -+ { 0x86, "TF Synchronisation Source" }, -+ { 0x87, "TTA" }, -+ { 0x88, "End Segment Number" }, -+ { 0x89, "Segment Number" }, -+ { 0x8a, "Capabilities Signature" }, -+ { 0x8c, "File Relation List" }, -+ { 0x90, "Negotiation Record I" }, -+ { 0x91, "Negotiation Record II" }, -+ { 0x92, "Encryption Algorithm" }, -+ { 0x94, "Interference Rejection Combining" }, -+ { 0x95, "Dedication Information" }, -+ { 0x97, "Feature Code" }, -+ { 0x98, "FS Offset" }, -+ { 0x99, "ESB Timeslot" }, -+ { 0x9a, "Master TG Instance" }, -+ { 0x9b, "Master TX Chain Delay" }, -+ { 0x9c, "External Condition Class 2 Extension" }, -+ { 0x9d, "TSs MO State" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_diversity_vals[] = { -+ { 0x01, "B receiver side" }, -+ { 0x02, "A receiver side" }, -+ { 0x03, "A+B receiver sides" }, -+ { 0x04, "A+B+C+D receiver sides" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_oip_vals[] = { -+ { 0x00, "Not Operational" }, -+ { 0x01, "Operational" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_aip_vals[] = { -+ { 0x00, "Data according to request" }, -+ { 0x01, "Data not according to request" }, -+ { 0x02, "Inconsistent MO data" }, -+ { 0x03, "Capability constraint violation" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_comb_vals[] = { -+ { 0x03, "SDCCH/8 + SACCH/C8" }, -+ { 0x04, "BCCH, non-combined" }, -+ { 0x05, "BCCH, combined (SDCCH/4)" }, -+ { 0x08, "TCH Type, unspecified" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_icmcr_vals[] = { -+ { 0x00, "ICM as per TCH/F" }, -+ { 0x01, "ICM as per TCH/H(0 and 1)" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_ea_vals[] = { -+ { 0x00, "A5/1 and A5/2" }, -+ { 0x01, "A5/2 only" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_fill_vals[] = { -+ { 0x00, "Filling" }, -+ { 0x01, "No filling" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_mo_state_vals[] = { -+ { 0x00, "RESET" }, -+ { 0x01, "STARTED" }, -+ { 0x02, "ENABLED" }, -+ { 0x03, "DISABLED" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_la_state_vals[] = { -+ { 0x00, "LOCALLY CONNECTED" }, -+ { 0x01, "LOCALLY DISCONNECTED" }, -+ { 0, NULL } -+}; -+ -+static const value_string filerel_state_vals[] = { -+ { 0x00, "Not known in current state (unknown file)" }, -+ { 0x01, "alllowed, already loaded" }, -+ { 0x02, "allowed, not loaded" }, -+ { 0x03, "not allowed" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_mo_class_short_vals[] = { -+ { 0x01, "TRXC" }, -+ { 0x03, "TS" }, -+ { 0x04, "TF" }, -+ { 0x05, "IS" }, -+ { 0x06, "CON" }, -+ { 0x0a, "CF" }, -+ { 0x0b, "TX" }, -+ { 0x0c, "RX" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_mo_class_vals[] = { -+ { 0x01, "TRXC (TRX Controller)" }, -+ { 0x03, "TS (Timeslot)" }, -+ { 0x04, "TF (Timing Function)" }, -+ { 0x05, "IS (Interface Switch)" }, -+ { 0x06, "CON (Concentrator)" }, -+ { 0x0a, "CF (Central Function)" }, -+ { 0x0b, "TX (Transmitter)" }, -+ { 0x0c, "RX (Receiver)" }, -+ { 0, NULL } -+}; -+ -+static const value_string om2k_tf_mode_vals[] = { -+ { 0x00, "Master" }, -+ { 0x01, "Standalone" }, -+ { 0x02, "Slave" }, -+ { 0xff, "Not defined" }, -+ { 0, NULL } -+}; -+ -+static gint -+dissect_tss_mo_state(tvbuff_t *tvb, gint offset, packet_info *pinfo, -+ proto_tree *tree) -+{ -+ guint8 tmp; -+ guint i = 0; -+ -+ for (i = 0; i < 8; i+= 2) { -+ tmp = tvb_get_guint8(tvb, offset); -+ proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp & 0xf, -+ "Timslot %u MO State: %s", i, -+ val_to_str(tmp & 0xf, om2k_mo_state_vals, "unknown (%02d)")); -+ proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp >> 4, -+ "Timslot %u MO State: %s", i+1, -+ val_to_str(tmp >> 4, om2k_mo_state_vals, "unknown (%02d)")); -+ offset++; -+ } -+ -+ return offset; -+} -+ -+ -+static gint -+dissect_om2k_time(tvbuff_t *tvb, gint offset, proto_tree *tree) -+{ -+ nstime_t tmptime; -+ time_t tval; -+ struct tm _time; -+ -+ _time.tm_year = 100 + tvb_get_guint8(tvb, offset++); -+ _time.tm_mon = tvb_get_guint8(tvb, offset++) -1; -+ _time.tm_mday = tvb_get_guint8(tvb, offset++); -+ _time.tm_hour = tvb_get_guint8(tvb, offset++); -+ _time.tm_min = tvb_get_guint8(tvb, offset++); -+ _time.tm_sec = tvb_get_guint8(tvb, offset++); -+ _time.tm_isdst = -1; -+ -+ tval = mktime(&_time); -+ tmptime.secs = tval; -+ tmptime.nsecs = 0; -+ -+ proto_tree_add_time(tree, hf_om2k_cal_time, tvb, offset, 6, -+ &tmptime); -+ return 6; -+} -+ -+static gint -+dissect_om2k_attr_unkn(tvbuff_t *tvb, gint offset, gint len, gint iei, proto_tree *tree) -+{ -+ proto_tree_add_bytes_format(tree, hf_om2k_unknown_val, tvb, -+ offset, len, tvb_get_ptr(tvb, offset, len), -+ "%s: %s", -+ val_to_str(iei, om2k_attr_vals, "0x%02x"), -+ tvb_bytes_to_str(tvb, offset, len)); -+ return len; -+} -+ -+static gint -+dissect_om2k_is_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) -+{ -+ gint offset = base_offset; -+ proto_item *ti; -+ proto_tree *isl_tree; -+ guint8 len = tvb_get_guint8(tvb, offset++); -+ -+ ti = proto_tree_add_item(tree, hf_om2k_isl, tvb, offset, len, FALSE); -+ isl_tree = proto_item_add_subtree(ti, ett_om2k_isl); -+ -+ while (offset < base_offset + len) { -+ proto_tree_add_item(isl_tree, hf_om2k_isl_icp1, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ proto_tree_add_item(isl_tree, hf_om2k_isl_icp2, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ proto_tree_add_item(isl_tree, hf_om2k_isl_ci, tvb, -+ offset++, 1, FALSE); -+ } -+ return offset - base_offset; -+} -+ -+static gint -+dissect_om2k_con_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) -+{ -+ gint offset = base_offset; -+ proto_item *ti; -+ proto_tree *conl_tree; -+ guint8 len = tvb_get_guint8(tvb, offset++); -+ -+ ti = proto_tree_add_item(tree, hf_om2k_conl, tvb, offset, len, FALSE); -+ conl_tree = proto_item_add_subtree(ti, ett_om2k_conl); -+ -+ proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cgs, tvb, -+ offset++, 1, FALSE); -+ -+ while (offset < base_offset + len) { -+ guint8 nr_cps_cg = tvb_get_guint8(tvb, offset); -+ proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cps_cg, tvb, -+ offset++, 1, FALSE); -+ while (nr_cps_cg--) { -+ proto_tree_add_item(conl_tree, hf_om2k_conl_ccp, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ proto_tree_add_item(conl_tree, hf_om2k_conl_ci, tvb, -+ offset++, 1, FALSE); -+ proto_tree_add_item(conl_tree, hf_om2k_conl_tag, tvb, -+ offset++, 1, FALSE); -+ proto_tree_add_item(conl_tree, hf_om2k_conl_tei, tvb, -+ offset++, 1, FALSE); -+ } -+ } -+ return offset - base_offset; -+} -+ -+ -+static gint -+dissect_om2k_attrs(tvbuff_t *tvb, gint base_offs, packet_info *pinfo, -+ proto_tree *tree) -+{ -+ int offset = base_offs; -+ -+ while (tvb_reported_length_remaining(tvb, offset) != 0) { -+ guint8 iei = tvb_get_guint8(tvb, offset++); -+ guint8 len, tmp; -+ switch (iei) { -+ case 0x00: /* Accordance Information */ -+ proto_tree_add_item(tree, hf_om2k_aip, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x06: /* BCC */ -+ proto_tree_add_item(tree, hf_om2k_bcc, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x07: /* BS_AG_BLKS_RES */ -+ proto_tree_add_item(tree, hf_om2k_bs_ag_blks_res, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x09: /* BSIC */ -+ proto_tree_add_item(tree, hf_om2k_bsic, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x0a: /* BS_PA_MFRMS */ -+ proto_tree_add_item(tree, hf_om2k_bs_pa_mfrms, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x0b: /* CBCH indicator */ -+ proto_tree_add_item(tree, hf_om2k_cbi, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x0c: /* CCCH Options */ -+ tmp = tvb_get_guint8(tvb, offset); -+ proto_tree_add_item(tree, hf_om2k_cr, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_item(tree, hf_om2k_ipt3, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_uint(tree, hf_om2k_aop, tvb, -+ offset, 1, (tmp & 0x3f) >> 2); -+ offset++; -+ break; -+ case 0x0d: /* Calendar Time */ -+ offset += dissect_om2k_time(tvb, offset, tree); -+ break; -+ case 0x0f: /* Combination */ -+ proto_tree_add_item(tree, hf_om2k_comb, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x10: /* CON Connection List */ -+ offset += dissect_om2k_con_list(tvb, offset, tree); -+ break; -+ case 0x12: /* DRX_DEV_MAX */ -+ proto_tree_add_item(tree, hf_om2k_drx_dev_max, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x13: /* End List Number */ -+ proto_tree_add_item(tree, hf_om2k_list_nr_end, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x14: /* External Condition Map Class 1 */ -+ /* FIXME */ -+ case 0x15: /* External Condition Map Class 2 */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); -+ break; -+ case 0x16: /* File Relation Indication */ -+ proto_tree_add_item(tree, hf_om2k_filerel_ilr, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_item(tree, hf_om2k_filerel_cur, tvb, -+ offset, 1, FALSE); -+ offset++; -+ proto_tree_add_item(tree, hf_om2k_filerel_other, tvb, -+ offset, 1, FALSE); -+ offset++; -+ break; -+ case 0x17: /* File Revision */ -+ proto_tree_add_item(tree, hf_om2k_file_rev, tvb, -+ offset, 8, FALSE); -+ offset += 8; -+ break; -+ case 0x1c: /* Filling Marker */ -+ proto_tree_add_item(tree, hf_om2k_fill_mark, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x1d: /* FN Offset */ -+ proto_tree_add_item(tree, hf_om2k_fn_offs, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ break; -+ case 0x1e: /* Frequency List */ -+ len = tvb_get_guint8(tvb, offset++); -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); -+ break; -+ case 0x1f: /* Frequency Specifier Rx */ -+ /* FIXME */ -+ case 0x20: /* Frequency Specifier Rx */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); -+ break; -+ case 0x21: /* HSN */ -+ proto_tree_add_item(tree, hf_om2k_hsn, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x22: /* ICM */ -+ proto_tree_add_item(tree, hf_om2k_icm, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x23: /* Internal Fault Map Class 1A */ -+ /* FIXME */ -+ case 0x24: /* Internal Fault Map Class 1B */ -+ /* FIXME */ -+ case 0x25: /* Internal Fault Map Class 2A */ -+ /* FIXME */ -+ case 0x26: /* Internal Fault Map Class 2A Ext */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); -+ break; -+ case 0x27: /* IS Connection List */ -+ offset += dissect_om2k_is_list(tvb, offset, tree); -+ break; -+ case 0x28: /* List Number */ -+ proto_tree_add_item(tree, hf_om2k_list_nr, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2a: /* Local Access State */ -+ proto_tree_add_item(tree, hf_om2k_la_state, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2b: /* MAIO */ -+ proto_tree_add_item(tree, hf_om2k_maio, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2c: /* MO State */ -+ proto_tree_add_item(tree, hf_om2k_mo_state, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2d: /* Ny1 */ -+ proto_tree_add_item(tree, hf_om2k_ny1, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2e: /* Operational Information */ -+ proto_tree_add_item(tree, hf_om2k_oip, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x2f: /* Nominal Power */ -+ proto_tree_add_item(tree, hf_om2k_nom_pwr, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x33: /* Receiver Diversity */ -+ proto_tree_add_item(tree, hf_om2k_diversity, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x34: /* Replacement Unit Map */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); -+ break; -+ case 0x38: /* T3105 */ -+ proto_tree_add_item(tree, hf_om2k_t3105, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x3a: /* TF Mode */ -+ proto_tree_add_item(tree, hf_om2k_tf_mode, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x3c: /* TS Number */ -+ proto_tree_add_item(tree, hf_om2k_ts, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x3d: /* TSC */ -+ proto_tree_add_item(tree, hf_om2k_tsc, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x40: /* BTS Version */ -+ proto_tree_add_item(tree, hf_om2k_bts_manuf, tvb, -+ offset, 3, FALSE); -+ offset += 3; -+ proto_tree_add_item(tree, hf_om2k_bts_gen, tvb, -+ offset, 3, FALSE); -+ offset += 3; -+ proto_tree_add_item(tree, hf_om2k_bts_rev, tvb, -+ offset, 3, FALSE); -+ offset += 3; -+ proto_tree_add_item(tree, hf_om2k_bts_var, tvb, -+ offset, 3, FALSE); -+ offset += 3; -+ break; -+ case 0x43: /* OML Function Map 1 */ -+ case 0x44: /* OML Function Map 2 */ -+ case 0x45: /* RSL Function Map 1 */ -+ case 0x46: /* RSL Function Map 2 */ -+ len = tvb_get_guint8(tvb, offset++); -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); -+ break; -+ case 0x47: /* Ext Range */ -+ proto_tree_add_item(tree, hf_om2k_ext_range, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x48: /* Request Indicators */ -+ proto_tree_add_item(tree, hf_om2k_brr, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_item(tree, hf_om2k_bfr, tvb, -+ offset, 1, FALSE); -+ offset++; -+ break; -+ case 0x50: /* Replacement Unit Map Extension */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); -+ break; -+ case 0x74: /* ICM Boundary */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 5, iei, tree); -+ break; -+ case 0x79: /* Link Supervision Control */ -+ proto_tree_add_item(tree, hf_om2k_lsc_fm, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_item(tree, hf_om2k_lsc_lsi, tvb, -+ offset, 1, FALSE); -+ proto_tree_add_item(tree, hf_om2k_lsc_lsa, tvb, -+ offset, 1, FALSE); -+ offset++; -+ break; -+ case 0x7a: /* Link Supervision Control */ -+ proto_tree_add_item(tree, hf_om2k_ls_ft, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x7b: /* Call Supervision Time */ -+ proto_tree_add_item(tree, hf_om2k_cst, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x7e: /* ICM Channel Rate */ -+ proto_tree_add_item(tree, hf_om2k_icm_cr, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x84: /* HW Info Signature */ -+ proto_tree_add_item(tree, hf_om2k_hwinfo_sig, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ break; -+ case 0x87: /* TTA */ -+ proto_tree_add_item(tree, hf_om2k_tta, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x8a: /* Capabilities Signature */ -+ proto_tree_add_item(tree, hf_om2k_capa_sig, tvb, -+ offset, 2, FALSE); -+ offset += 2; -+ break; -+ case 0x90: /* Negotiation Record I */ -+ case 0x91: /* Negotiation Record II */ -+ len = tvb_get_guint8(tvb, offset++); -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); -+ break; -+ case 0x92: /* Encryption Algorithm */ -+ proto_tree_add_item(tree, hf_om2k_ea, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x94: /* Interference Rejection Combining */ -+ proto_tree_add_item(tree, hf_om2k_irc, tvb, -+ offset++, 1, FALSE); -+ break; -+ case 0x95: /* Dedication information */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 3, iei, tree); -+ break; -+ case 0x98: /* FS Offset */ -+ proto_tree_add_item(tree, hf_om2k_tf_fs_offset, tvb, -+ offset, 5, FALSE); -+ offset += 5; -+ break; -+ case 0x9c: /* External Condition Class 2 Extension */ -+ /* FIXME */ -+ offset += dissect_om2k_attr_unkn(tvb, offset, 4, iei, tree); -+ break; -+ case 0x9d: /* TSs MO State */ -+ dissect_tss_mo_state(tvb, offset, pinfo, tree); -+ offset += 4; -+ break; -+ case 0x9e: -+ case 0x9f: -+ default: -+ tmp = tvb_get_guint8(tvb, offset); -+ proto_tree_add_uint_format(tree, hf_om2k_unknown_tag, tvb, -+ offset-1, 1, tmp, "Tag %s: 0x%02x", -+ val_to_str(iei, om2k_attr_vals, "0x%02x"), tmp); -+ offset++; -+ break; -+ } -+ } -+ -+ return offset; -+} -+ -+static guint -+dissect_om2k_mo(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree) -+{ -+ proto_item *ti; -+ proto_tree *mo_tree; -+ guint8 class = tvb_get_guint8(tvb, offset); -+ guint8 inst = tvb_get_guint8(tvb, offset+3); -+ -+ ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset, -+ 4, FALSE); -+ mo_tree = proto_item_add_subtree(ti, ett_om2k_mo); -+ proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset, -+ 1, FALSE); -+ proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3, -+ 1, FALSE); -+ proto_item_append_text(ti, ", Class: %s, Instance: %u", -+ val_to_str(class, om2k_mo_class_vals, "0x%02x"), -+ inst); -+ col_append_fstr(pinfo->cinfo, COL_INFO, ", (%-4s %u)", -+ val_to_str(class, &om2k_mo_class_short_vals, -+ "0x%02x"), inst); -+ return 4; -+} -+ -+static void -+dissect_abis_om2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -+{ -+ proto_item *ti; -+ proto_tree *om2k_tree; -+ -+ int offset = 0; -+ -+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OM2000"); -+ -+ top_tree = tree; -+ if (tree) { -+ guint16 msg_code = tvb_get_ntohs(tvb, offset); -+ guint8 tmp; -+ -+ ti = proto_tree_add_item(tree, proto_abis_om2000, -+ tvb, 0, -1, FALSE); -+ om2k_tree = proto_item_add_subtree(ti, ett_om2000); -+ -+ proto_tree_add_item(om2k_tree, hf_om2k_msg_code, tvb, offset, -+ 2, FALSE); -+ offset += 2; -+ -+ offset += dissect_om2k_mo(tvb, offset, pinfo, om2k_tree); -+ -+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", -+ val_to_str(msg_code, &om2k_msgcode_vals, -+ "unknown 0x%04x")); -+ proto_item_append_text(ti, " %s ", -+ val_to_str(msg_code, &om2k_msgcode_vals, -+ "unknown 0x%04x")); -+ -+ switch (msg_code) { -+ case 0x74: /* Operational Info */ -+ tmp = tvb_get_guint8(tvb, offset+1); -+ proto_item_append_text(ti, ": %s", -+ val_to_str(tmp, om2k_oip_vals, -+ "unknown 0x%02x")); -+ break; -+ case 0x1A: /* CON Configuration Result */ -+ case 0x66: /* IS Configuration Result */ -+ case 0x82: /* RX Configuration Result */ -+ case 0xA6: /* TF Configuration Result */ -+ case 0xAE: /* TS Configuration Result */ -+ case 0xB6: /* TX Configuration Result */ -+ case 0xE2: /* DP Configuration Result */ -+ case 0xF6: /* DP Configuration Result */ -+ tmp = tvb_get_guint8(tvb, offset+1); -+ proto_item_append_text(ti, ": %s", -+ val_to_str(tmp, om2k_aip_vals, -+ "unknown 0x%02x")); -+ break; -+ default: -+ break; -+ } -+ dissect_om2k_attrs(tvb, offset, pinfo, om2k_tree); -+ } -+} -+ -+void -+proto_reg_handoff_abis_om2000(void); -+ -+void -+proto_register_abis_om2000(void) -+{ -+ static hf_register_info hf[] = { -+ { &hf_om2k_msg_code, -+ { "Message Code", "om2000.msg_code", -+ FT_UINT16, BASE_HEX, VALS(om2k_msgcode_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_mo_if, -+ { "MO Interface", "om2000.mo_if", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_mo_class, -+ { "MO IF Class", "om2000.mo_if.class", -+ FT_UINT8, BASE_HEX, VALS(om2k_mo_class_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_mo_instance, -+ { "MO IF Instance", "om2000.mo_if.instance", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_oip, -+ { "OIP (Operational Info)", "om2000.oip", -+ FT_UINT8, BASE_HEX, VALS(om2k_oip_vals), 0, -+ "Operational Information Parameter", HFILL } -+ }, -+ { &hf_om2k_aip, -+ { "AIP (Accordance Info)", "om2000.aip", -+ FT_UINT8, BASE_HEX, VALS(om2k_aip_vals), 0, -+ "Accordance Information Parameter", HFILL } -+ }, -+ { &hf_om2k_comb, -+ { "Channel Combination", "om2000.chan_comb", -+ FT_UINT8, BASE_DEC, VALS(om2k_comb_vals), 0, -+ "Logical Channel Combination", HFILL } -+ }, -+ { &hf_om2k_ts, -+ { "Timeslot Number", "om2000.ts", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_hsn, -+ { "HSN", "om2000.hsn", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Hopping Sequence Number", HFILL } -+ }, -+ { &hf_om2k_maio, -+ { "MAIO", "om2000.maio", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Mobile Allication Index Offset", HFILL } -+ }, -+ { &hf_om2k_bsic, -+ { "BSIC", "om2000.bsic", -+ FT_UINT8, BASE_HEX, NULL, 0, -+ "Base Station Identity Code", HFILL } -+ }, -+ { &hf_om2k_diversity, -+ { "Receiver Diversity", "om2000.diversity", -+ FT_UINT8, BASE_HEX, VALS(om2k_diversity_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_fn_offs, -+ { "FN Offset", "om2000.fn_offset", -+ FT_UINT16, BASE_DEC, NULL, 0, -+ "GSM Frame Number Offset", HFILL } -+ }, -+ { &hf_om2k_ext_range, -+ { "Extended Range", "om2000.ext_range", -+ FT_BOOLEAN, 1, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_irc, -+ { "Interference Rejection Combining", "om2000.irc", -+ FT_BOOLEAN, 1, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bs_pa_mfrms, -+ { "BS_PA_MFRMS", "om2000.bs_pa_mfrms", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bs_ag_blks_res, -+ { "BS_AG_BLKS_RES", "om2000.bs_ag_blks_res", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_drx_dev_max, -+ { "DRX_DEV_MAX", "om2000.drx_dev_max", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_cr, -+ { "CCCH Repeat", "om2000.ccch_repeat", -+ FT_BOOLEAN, 1, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_ipt3, -+ { "Inhibit Paging Request Type 3", "om2000.ipt3", -+ FT_BOOLEAN, 2, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_aop, -+ { "Age Of Paging", "om2000.aop", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_t3105, -+ { "T3105 (in 10ms)", "om2000.t3105", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_ny1, -+ { "Ny1", "om2000.ny1", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_cbi, -+ { "CBCH Indicator", "om2000.ny1", -+ FT_BOOLEAN, 1, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_tsc, -+ { "Training Sequence Code", "om2000.tsc", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_icm, -+ { "Idle Channel Measurement", "om2000.icm", -+ FT_BOOLEAN, 1, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_tta, -+ { "Timer for Time Alignment", "om2000.tta", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_icm_cr, -+ { "ICM Channel Rate", "om2000.icm_cr", -+ FT_BOOLEAN, 1, VALS(om2k_icmcr_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_lsc_fm, -+ { "LSC Dummy Frequency Measurement", "om2000.lsc.fm", -+ FT_BOOLEAN, 0x80, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_lsc_lsi, -+ { "LSC Idle Channels", "om2000.ls.lsi", -+ FT_BOOLEAN, 0x01, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_lsc_lsa, -+ { "LSC Active Channels", "om2000.ls.lsa", -+ FT_BOOLEAN, 0x02, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_ls_ft, -+ { "Link Supervision Filtering Time (100ms)", "om2000.ls_ft", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_cst, -+ { "Call Supervision Time (480ms)", "om2000.cst", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_ea, -+ { "Encryption Algorithm", "om2000.ea", -+ FT_UINT8, BASE_DEC, VALS(om2k_ea_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_nom_pwr, -+ { "Nominal Power (dBm)", "om2000.pwr", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_fill_mark, -+ { "Filling Marker", "om2000.filling", -+ FT_BOOLEAN, 0x01, VALS(om2k_fill_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bcc, -+ { "BCC", "om2000.bcc", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ "Base Station Color Code", HFILL } -+ }, -+ { &hf_om2k_mo_state, -+ { "MO State", "om2000.mo_state", -+ FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_la_state, -+ { "Local Access State", "om2000.la_state", -+ FT_UINT8, BASE_DEC, VALS(om2k_la_state_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_tsn_state, -+ { "Time Slot N MO State", "om2000.tsn_mo_state", -+ FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bts_manuf, -+ { "BTS Manufacturer ID", "om2000.bts_ver.manuf", -+ FT_STRING, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bts_gen, -+ { "BTS Generation", "om2000.bts_ver.gen", -+ FT_STRING, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bts_rev, -+ { "BTS Revision", "om2000.bts_ver.rev", -+ FT_STRING, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bts_var, -+ { "BTS Variant", "om2000.bts_ver.variant", -+ FT_STRING, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_brr, -+ { "BTS Requested Restart", "om2000.brr", -+ FT_BOOLEAN, 0x01, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_bfr, -+ { "BTS Requested File Relation", "om2000.bfr", -+ FT_BOOLEAN, 0x01, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_hwinfo_sig, -+ { "HW Info Signature", "om2000.hwinfo_sig", -+ FT_UINT16, BASE_HEX, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_capa_sig, -+ { "Capabilities Signature", "om2000.capa_sig", -+ FT_UINT16, BASE_HEX, NULL, 0, -+ NULL, HFILL } -+ }, -+ -+ { &hf_om2k_unknown_tag, -+ { "Unknown Tag", "om2000.unknown.tag", -+ FT_UINT8, BASE_HEX, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_unknown_val, -+ { "Unknown Value", "om2000.unknown.val", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ -+ { &hf_om2k_file_rev, -+ { "File Revision", "om2000.file_rev", -+ FT_STRING, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_filerel_ilr, -+ { "Immediate Load Requested", "om2000.filerel.ilr", -+ FT_BOOLEAN, 0x08, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_filerel_cur, -+ { "Current State", "om2000.filerel.cur", -+ FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_filerel_other, -+ { "Other State", "om2000.filerel.other", -+ FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_cal_time, -+ { "Calendar Time", "om2000.cal_time", -+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_list_nr, -+ { "List Number", "om2000.list_nr", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_list_nr_end, -+ { "End List Number", "om2000.list_nr_end", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_isl, -+ { "IS Connection List", "om2000.is_list", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_isl_icp1, -+ { "ICP1", "om2000.is_list.icp1", -+ FT_UINT16, BASE_DEC, NULL, 0x7ff, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_isl_icp2, -+ { "ICP2", "om2000.is_list.icp2", -+ FT_UINT16, BASE_DEC, NULL, 0x7ff, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_isl_ci, -+ { "Contiguity Index", "om2000.is_list.ci", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_conl, -+ { "Connection List", "om2000.con_list", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_conl_nr_cgs, -+ { "Number of CGs", "om2000.con_list.nr_cgs", -+ FT_UINT8, BASE_DEC, NULL, 0x1f, -+ "Number of Concentration Groups in the DE", HFILL } -+ }, -+ { &hf_om2k_conl_nr_cps_cg, -+ { "Number of CPS in CG", "om2000.con_list.nr_cps_cg", -+ FT_UINT8, BASE_DEC, NULL, 0x1f, -+ "Number of CPS in Concentration Group", HFILL } -+ }, -+ { &hf_om2k_conl_ccp, -+ { "CON Connection Point", "om2000.con_list.cpp", -+ FT_UINT16, BASE_DEC, NULL, 0x3ff, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_conl_ci, -+ { "Contiguity Index", "om2000.con_list.ci", -+ FT_UINT8, BASE_DEC, NULL, 0x7, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_conl_tag, -+ { "Tag", "om2000.con_list.tag", -+ FT_UINT8, BASE_DEC, NULL, 0x1f, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_conl_tei, -+ { "TEI", "om2000.con_list.tei", -+ FT_UINT8, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_tf_mode, -+ { "TF Mode", "om2000.tf_mode", -+ FT_UINT8, BASE_HEX, VALS(om2k_tf_mode_vals), 0, -+ NULL, HFILL } -+ }, -+ { &hf_om2k_tf_fs_offset, -+ { "TF FS Offset", "om2000.tf_fs_offset", -+ FT_UINT64, BASE_DEC, NULL, 0, -+ NULL, HFILL } -+ }, -+ }; -+ static gint *ett[] = { -+ &ett_om2000, -+ &ett_om2k_mo, -+ &ett_om2k_isl, -+ &ett_om2k_conl, -+ }; -+ -+ module_t *oml_module; -+ -+ proto_abis_om2000 = proto_register_protocol("Ericsson A-bis OML", -+ "Ericsson OML", -+ "gsm_abis_om2000"); -+ -+ proto_register_field_array(proto_abis_om2000, hf, array_length(hf)); -+ -+ proto_register_subtree_array(ett, array_length(ett)); -+ -+ register_dissector("gsm_abis_om2000", dissect_abis_om2000, -+ proto_abis_om2000); -+#if 0 -+ oml_module = prefs_register_protocol(proto_abis_oml, proto_reg_handoff_abis_oml); -+ prefs_register_bool_preference(oml_module, "use_ipaccess_oml", -+ "Use nanoBTS definitions", -+ "Use ipaccess nanoBTS specific definitions for OML", -+ &global_oml_use_nano_bts); -+#endif -+} -+ -+/* This function is called once at startup and every time the user hits -+ * 'apply' in the preferences dialogue */ -+void -+proto_reg_handoff_abis_om2000(void) -+{ -+ static gboolean initialized = FALSE; -+ -+ if (!initialized) { -+ dissector_handle_t abis_om2k_handle; -+ -+ abis_om2k_handle = create_dissector_handle(dissect_abis_om2000, -+ proto_abis_om2000); -+ //dissector_add("lapd.gsm.sapi", LAPD_GSM_SAPI_OM_PROC, abis_oml_handle); -+ } else { -+ /* preferences have been changed */ -+ } -+} -Index: wireshark/epan/dissectors/packet-gsm_abis_oml.c -=================================================================== ---- wireshark.orig/epan/dissectors/packet-gsm_abis_oml.c -+++ wireshark/epan/dissectors/packet-gsm_abis_oml.c -@@ -119,9 +119,12 @@ - - /* Decode things as nanoBTS traces */ - static gboolean global_oml_use_nano_bts = TRUE; -+static gboolean global_oml_use_ericsson = TRUE; - - 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" }, -@@ -1196,6 +1199,7 @@ - top_tree = tree; - if (tree) { - u_int8_t msg_disc = tvb_get_guint8(tvb, offset); -+ u_int8_t len = tvb_get_guint8(tvb, offset+3); - - ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, FALSE); - oml_tree = proto_item_add_subtree(ti, ett_oml); -@@ -1209,6 +1213,14 @@ - proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++, - 1, TRUE); - -+ if (global_oml_use_ericsson == TRUE) { -+ 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, -@@ -1222,6 +1234,8 @@ - default: - break; - } -+ -+ } - } - } - -@@ -1569,6 +1583,11 @@ - "Use nanoBTS definitions", - "Use ipaccess nanoBTS specific definitions for OML", - &global_oml_use_nano_bts); -+ -+ prefs_register_bool_preference(oml_module, "use_ericsson_oml", -+ "Use Ericsson definitions", -+ "Use Ericsson A-bis OML (OM2000) definitions for OML", -+ &global_oml_use_ericsson); - } - - /* This function is called once at startup and every time the user hits -@@ -1605,4 +1624,6 @@ - oml_fom_attr_vse._vs_num_entries = - array_length(oml_fom_attr_vals_bs11)-1; - } -+ -+ sub_om2000 = find_dissector("gsm_abis_om2000"); - } -Index: wireshark/epan/dissectors/packet-ehdlc.c -=================================================================== ---- /dev/null -+++ wireshark/epan/dissectors/packet-ehdlc.c -@@ -0,0 +1,319 @@ -+/* packet-ehdlc.c -+ * Routines for packet dissection of Ericsson HDLC as used in A-bis over IP -+ * Copyright 2010 by Harald Welte -+ * -+ * $Id: packet-ehdlc.c 33767 2010-08-11 11:59:47Z etxrab $ -+ * -+ * Wireshark - Network traffic analyzer -+ * By Gerald Combs -+ * 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 -+ -+#include -+#include -+#include -+ -+/* Initialize the protocol and registered fields */ -+static int proto_ehdlc = -1; -+ -+static int hf_ehdlc_data_len = -1; -+static int hf_ehdlc_protocol = -1; -+static int hf_ehdlc_sapi = -1; -+static int hf_ehdlc_c_r = -1; -+ -+static int hf_ehdlc_xid_payload = -1; -+static int hf_ehdlc_control = -1; -+ -+static int hf_ehdlc_p = -1; -+static int hf_ehdlc_f = -1; -+static int hf_ehdlc_u_modifier_cmd = -1; -+static int hf_ehdlc_u_modifier_resp = -1; -+static int hf_ehdlc_ftype_s_u = -1; -+ -+static int hf_ehdlc_n_r = -1; -+static int hf_ehdlc_n_s = -1; -+static int hf_ehdlc_p_ext = -1; -+static int hf_ehdlc_f_ext = -1; -+static int hf_ehdlc_s_ftype = -1; -+static int hf_ehdlc_ftype_i = -1; -+static int hf_ehdlc_ftype_s_u_ext = -1; -+ -+/* Used only for U frames */ -+static const xdlc_cf_items ehdlc_cf_items = { -+ NULL, -+ NULL, -+ &hf_ehdlc_p, -+ &hf_ehdlc_f, -+ NULL, -+ &hf_ehdlc_u_modifier_cmd, -+ &hf_ehdlc_u_modifier_resp, -+ NULL, -+ &hf_ehdlc_ftype_s_u -+}; -+ -+/* Used only for I and S frames */ -+static const xdlc_cf_items ehdlc_cf_items_ext = { -+ &hf_ehdlc_n_r, -+ &hf_ehdlc_n_s, -+ &hf_ehdlc_p_ext, -+ &hf_ehdlc_f_ext, -+ &hf_ehdlc_s_ftype, -+ NULL, -+ NULL, -+ &hf_ehdlc_ftype_i, -+ &hf_ehdlc_ftype_s_u_ext, -+}; -+ -+/* Initialize the subtree pointers */ -+static gint ett_ehdlc = -1; -+static gint ett_ehdlc_control = -1; -+ -+static const value_string ehdlc_protocol_vals[] = { -+ { 0x20, "RSL" }, -+ { 0xa0, "ACK" }, -+ { 0xc0, "OML" }, -+ { 0, NULL } -+}; -+ -+enum { -+ SUB_RSL, -+ SUB_OML, -+ SUB_DATA, -+ -+ SUB_MAX -+}; -+ -+static dissector_handle_t sub_handles[SUB_MAX]; -+ -+/* Code to actually dissect the packets */ -+static void -+dissect_ehdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -+{ -+ gint remaining; -+ int offset = 4; -+ -+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "EHDLC"); -+ col_clear(pinfo->cinfo, COL_INFO); -+ -+ while ((remaining = tvb_reported_length_remaining(tvb, offset)) > 0) { -+ proto_item *ti = NULL; -+ proto_tree *ehdlc_tree = NULL; -+ guint16 len, msg_type; -+ tvbuff_t *next_tvb; -+ guint16 control; -+ gboolean is_response = 0, is_extended = TRUE; -+ gint header_length = 2; /* Address + Length field */ -+ -+ msg_type = tvb_get_guint8(tvb, offset); -+ len = tvb_get_guint8(tvb, offset+1); -+#if 0 -+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", -+ val_to_str(msg_type, ehdlc_protocol_vals, -+ "unknown 0x%02x")); -+#endif -+ if (tree) { -+ ti = proto_tree_add_protocol_format(tree, proto_ehdlc, -+ tvb, offset, len, -+ "Ericsson HDLC protocol, type: %s", -+ val_to_str(msg_type, ehdlc_protocol_vals, -+ "unknown 0x%02x")); -+ ehdlc_tree = proto_item_add_subtree(ti, ett_ehdlc); -+ proto_tree_add_item(ehdlc_tree, hf_ehdlc_protocol, -+ tvb, offset, 1, FALSE); -+#if 0 -+ proto_tree_add_item(ehdlc_tree, hf_ehdlc_sapi, -+ tvb, offset, 1, FALSE); -+ proto_tree_add_item(ehdlc_tree, hf_ehdlc_c_r, -+ tvb, offset, 1, FALSE); -+#endif -+ proto_tree_add_item(ehdlc_tree, hf_ehdlc_data_len, -+ tvb, offset+1, 1, FALSE); -+ } -+ -+ control = dissect_xdlc_control(tvb, offset+2, pinfo, ehdlc_tree, hf_ehdlc_control, -+ ett_ehdlc_control, &ehdlc_cf_items, &ehdlc_cf_items_ext, -+ NULL, NULL, is_response, is_extended, FALSE); -+ header_length += XDLC_CONTROL_LEN(control, is_extended); -+ -+ if (XDLC_IS_INFORMATION(control)) { -+ next_tvb = tvb_new_subset(tvb, offset+header_length, -+ len-header_length, len); -+ -+ switch (msg_type) { -+ case 0x20: -+ /* len == 4 seems to be some kind of ACK */ -+ if (len <= 4) -+ break; -+ call_dissector(sub_handles[SUB_RSL], next_tvb, pinfo, tree); -+ break; -+ case 0xbc: -+ case 0xdc: -+ case 0xa0: -+ case 0xc0: -+ /* len == 4 seems to be some kind of ACK */ -+ if (len <= 4) -+ break; -+ call_dissector(sub_handles[SUB_OML], next_tvb, pinfo, tree); -+ break; -+ default: -+ call_dissector(sub_handles[SUB_DATA], next_tvb, pinfo, tree); -+ break; -+ } -+ } else if (control == XDLC_U | XDLC_XID) { -+ /* XID is formatted like ISO 8885, typically we see -+ * something like -+ * 82 format identifier -+ * 80 group identifier -+ * 00 09 length -+ * 07 01 05 Window Size Tx -+ * 09 01 04 Ack Timer (msec) -+ * 08 01 05 Window Size Rx */ -+ proto_tree_add_item(ehdlc_tree, hf_ehdlc_xid_payload, -+ tvb, offset+header_length, -+ len-header_length, FALSE); -+ } -+ -+ offset += len; -+ } -+} -+ -+void proto_register_ehdlc(void) -+{ -+ static hf_register_info hf[] = { -+ { &hf_ehdlc_data_len, -+ { "DataLen", "ehdlc.data_len", -+ FT_UINT8, BASE_DEC, NULL, 0x0, -+ "The length of the data (in bytes)", HFILL } -+ }, -+ { &hf_ehdlc_protocol, -+ { "Protocol", "ehdlc.protocol", -+ FT_UINT8, BASE_HEX, VALS(ehdlc_protocol_vals), 0x0, -+ "The HDLC Sub-Protocol", HFILL } -+ }, -+ { &hf_ehdlc_sapi, -+ { "SAPI", "ehdlc.sapi", -+ FT_UINT8, BASE_DEC, NULL, 0x1f, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_c_r, -+ { "C/R", "ehdlc.c_r", -+ FT_UINT8, BASE_HEX, NULL, 0x20, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_xid_payload, -+ { "XID Payload", "ehdlc.xid_payload", -+ FT_BYTES, BASE_NONE, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_control, -+ { "Control Field", "ehdlc.control", -+ FT_UINT16, BASE_HEX, NULL, 0, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_n_r, -+ { "N(R)", "ehdlc.control.n_r", -+ FT_UINT16, BASE_DEC, NULL, XDLC_N_R_EXT_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_n_s, -+ { "N(S)", "ehdlc.control.n_s", -+ FT_UINT16, BASE_DEC, NULL, XDLC_N_S_EXT_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_p, -+ { "Poll", "ehdlc.control.p", -+ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_p_ext, -+ { "Poll", "ehdlc.control.p", -+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_f, -+ { "Final", "ehdlc.control.f", -+ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_f_ext, -+ { "Final", "ehdlc.control.f", -+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_s_ftype, -+ { "Supervisory frame type", "ehdlc.control.s_ftype", -+ FT_UINT16, BASE_HEX, VALS(stype_vals), XDLC_S_FTYPE_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_u_modifier_cmd, -+ { "Command", "ehdlc.control.u_modifier_cmd", -+ FT_UINT8, BASE_HEX, VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_u_modifier_resp, -+ { "Response", "ehdlc.control.u_modifier_resp", -+ FT_UINT8, BASE_HEX, VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_ftype_i, -+ { "Frame Type", "ehdlc.control.ftype", -+ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_I_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_ftype_s_u, -+ { "Frame Type", "ehdlc.control.ftype", -+ FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, -+ NULL, HFILL } -+ }, -+ { &hf_ehdlc_ftype_s_u_ext, -+ { "Frame Type", "ehdlc.control.ftype", -+ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, -+ NULL, HFILL } -+ }, -+ }; -+ -+ static gint *ett[] = { -+ &ett_ehdlc, -+ &ett_ehdlc_control, -+ }; -+ -+ proto_ehdlc = -+ proto_register_protocol("Ericsson HDLC", -+ "Ericsson HDLC as used in A-bis over IP", "ehdlc"); -+ -+ proto_register_field_array(proto_ehdlc, hf, array_length(hf)); -+ proto_register_subtree_array(ett, array_length(ett)); -+ -+ register_dissector("ehdlc", dissect_ehdlc, proto_ehdlc); -+} -+ -+void proto_reg_handoff_ehdlc(void) -+{ -+ dissector_handle_t ehdlc_handle; -+ -+ sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl"); -+ sub_handles[SUB_OML] = find_dissector("gsm_abis_oml"); -+ sub_handles[SUB_DATA] = find_dissector("data"); -+ -+ ehdlc_handle = create_dissector_handle(dissect_ehdlc, proto_ehdlc); -+} diff --git a/wireshark/lucent-hnb.patch b/wireshark/lucent-hnb.patch deleted file mode 100644 index 4c85195ea..000000000 --- a/wireshark/lucent-hnb.patch +++ /dev/null @@ -1,120 +0,0 @@ -Index: wireshark/epan/dissectors/packet-lucent_hnb.c -=================================================================== ---- /dev/null -+++ wireshark/epan/dissectors/packet-lucent_hnb.c -@@ -0,0 +1,103 @@ -+/* packet-lucent_hnb.c -+ * Routines for packet dissection of Alcatel/Lucent HomeNodeB -+ * Copyright 2009 by Harald Welte -+ * -+ * This protocol decoder is based entirely on reverse engineering, i.e. -+ * on educated guesses. -+ * -+ * $Id: packet-lucent_hnb.c 29254 2009-07-31 19:19:25Z gerald $ -+ * -+ * Wireshark - Network traffic analyzer -+ * By Gerald Combs -+ * 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 -+ -+#define LHNB_SCTP_PPI_MM 1 -+#define LHNB_SCTP_PPI_GMM 6 -+ -+#define LHNB_SCTP_PORT 6005 -+ -+#include -+ -+#include -+ -+/* Initialize the protocol and registered fields */ -+static int proto_lhnb = -1; -+ -+static int hf_lhnb_length = -1; -+ -+/* Initialize the subtree pointers */ -+static gint ett_lhnb = -1; -+ -+static dissector_handle_t ranap_handle; -+ -+/* Code to actually dissect the packets */ -+static void -+dissect_lhnb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -+{ -+ -+ int offset = 0; -+ u_int16_t len; -+ tvbuff_t *next_tvb; -+ -+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LHNB"); -+ col_clear(pinfo->cinfo, COL_INFO); -+ -+ proto_tree_add_item(tree, hf_lhnb_length, tvb, offset+2, 2, FALSE); -+ len = tvb_get_ntohs(tvb, offset+2); -+ next_tvb = tvb_new_subset(tvb, offset+2+6, len-4, -1); -+ -+ call_dissector(ranap_handle, next_tvb, pinfo, tree); -+} -+ -+void proto_register_lucent_hnb(void) -+{ -+ static hf_register_info hf[] = { -+ {&hf_lhnb_length, -+ {"Length", "lhnb.len", -+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} -+ }, -+ }; -+ -+ static gint *ett[] = { -+ &ett_lhnb, -+ }; -+ -+ proto_lhnb = -+ proto_register_protocol("Alcatel/Lucent HomeNodeB", -+ "Lucent HNB", "lhnb"); -+ -+ proto_register_field_array(proto_lhnb, hf, array_length(hf)); -+ proto_register_subtree_array(ett, array_length(ett)); -+} -+ -+void proto_reg_handoff_lucent_hnb(void) -+{ -+ dissector_handle_t lhnb_handle; -+ -+ ranap_handle = find_dissector("ranap"); -+ -+ lhnb_handle = create_dissector_handle(dissect_lhnb, proto_lhnb); -+ -+ dissector_add("sctp.ppi", LHNB_SCTP_PPI_MM, lhnb_handle); -+ dissector_add("sctp.ppi", LHNB_SCTP_PPI_GMM, lhnb_handle); -+ dissector_add("sctp.port", LHNB_SCTP_PORT, lhnb_handle); -+} -Index: wireshark/epan/dissectors/Makefile.common -=================================================================== ---- wireshark.orig/epan/dissectors/Makefile.common -+++ wireshark/epan/dissectors/Makefile.common -@@ -605,6 +605,7 @@ - packet-loop.c \ - packet-lpd.c \ - packet-lsc.c \ -+ packet-lucent_hnb.c \ - packet-lwapp.c \ - packet-lwres.c \ - packet-m2pa.c \ diff --git a/wireshark/rsl-ipaccess.patch b/wireshark/rsl-ipaccess.patch deleted file mode 100644 index 29220b87b..000000000 --- a/wireshark/rsl-ipaccess.patch +++ /dev/null @@ -1,664 +0,0 @@ -From 8f35d623641dbba90e6186604c11e892bf515ecc Mon Sep 17 00:00:00 2001 -From: Holger Hans Peter Freyther -Date: Mon, 19 Apr 2010 13:32:58 +0800 -Subject: [PATCH 2/2] RSL patch - ---- - epan/dissectors/packet-rsl.c | 522 +++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 515 insertions(+), 7 deletions(-) - -diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c -index b10a671..a455cf3 100644 ---- a/epan/dissectors/packet-rsl.c -+++ b/epan/dissectors/packet-rsl.c -@@ -2,6 +2,7 @@ - * Routines for Radio Signalling Link (RSL) dissection. - * - * Copyright 2007, Anders Broman -+ * Copyright 2009, Harald Welte - * - * $Id$ - * -@@ -42,6 +43,8 @@ - #include - - #include "packet-gsm_a_common.h" -+#include "packet-rtp.h" -+#include "packet-rtcp.h" - - /* Initialize the protocol and registered fields */ - static int proto_rsl = -1; -@@ -115,6 +118,24 @@ static int hf_rsl_emlpp_prio = -1; - static int hf_rsl_rtd = -1; - static int hf_rsl_delay_ind = -1; - static int hf_rsl_tfo = -1; -+static int hf_rsl_speech_mode_s = -1; -+static int hf_rsl_speech_mode_m = -1; -+static int hf_rsl_conn_stat = -1; -+static int hf_rsl_conn_id = -1; -+static int hf_rsl_rtp_payload = -1; -+static int hf_rsl_rtp_csd_fmt_d = -1; -+static int hf_rsl_rtp_csd_fmt_ir = -1; -+static int hf_rsl_local_port = -1; -+static int hf_rsl_remote_port = -1; -+static int hf_rsl_local_ip = -1; -+static int hf_rsl_remote_ip = -1; -+static int hf_rsl_cstat_tx_pkts = -1; -+static int hf_rsl_cstat_tx_octs = -1; -+static int hf_rsl_cstat_rx_pkts = -1; -+static int hf_rsl_cstat_rx_octs = -1; -+static int hf_rsl_cstat_lost_pkts = -1; -+static int hf_rsl_cstat_ia_jitter = -1; -+static int hf_rsl_cstat_avg_tx_dly = -1; - - /* Initialize the subtree pointers */ - static int ett_rsl = -1; -@@ -172,6 +193,15 @@ static int ett_ie_cause = -1; - static int ett_ie_meas_res_no = -1; - static int ett_ie_message_id = -1; - static int ett_ie_sys_info_type = -1; -+static int ett_ie_speech_mode = -1; -+static int ett_ie_conn_stat = -1; -+static int ett_ie_conn_id = -1; -+static int ett_ie_remote_ip = -1; -+static int ett_ie_remote_port = -1; -+static int ett_ie_local_port = -1; -+static int ett_ie_local_ip = -1; -+static int ett_ie_rtp_payload = -1; -+ - - proto_tree *top_tree; - dissector_handle_t gsm_a_ccch_handle; -@@ -207,8 +237,11 @@ static const value_string rsl_msg_disc_vals[] = { - { 0x06, "Common Channel Management messages" }, - { 0x08, "TRX Management messages" }, - { 0x16, "Location Services messages" }, -+ { 0x3f, "ip.access Vendor Specific messages" }, - { 0, NULL } - }; -+#define RSL_MSGDISC_IPACCESS 0x3f -+ - /* - * 9.2 MESSAGE TYPE - */ -@@ -275,6 +308,49 @@ static const value_string rsl_msg_disc_vals[] = { - /* 0 1 - - - - - - Location Services messages: */ - #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ - -+/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation -+ * about those extensions, all information in this dissector is based on lawful -+ * protocol reverse enginering by Harald Welte */ -+#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60 -+#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61 -+#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62 -+ -+#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48 -+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49 -+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a -+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b -+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c -+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d -+ -+#define RSL_MSG_TYPE_IPAC_CRCX 0x70 -+#define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71 -+#define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72 -+#define RSL_MSG_TYPE_IPAC_MDCX 0x73 -+#define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74 -+#define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75 -+#define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76 -+#define RSL_MSG_TYPE_IPAC_DLCX 0x77 -+#define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78 -+#define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79 -+ -+#define RSL_IE_IPAC_SRTP_CONFIG 0xe0 -+#define RSL_IE_IPAC_PROXY_UDP 0xe1 -+#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2 -+#define RSL_IE_IPAC_REMOTE_IP 0xf0 -+#define RSL_IE_IPAC_REMOTE_PORT 0xf1 -+#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2 -+#define RSL_IE_IPAC_LOCAL_PORT 0xf3 -+#define RSL_IE_IPAC_SPEECH_MODE 0xf4 -+#define RSL_IE_IPAC_LOCAL_IP 0xf5 -+#define RSL_IE_IPAC_CONN_STAT 0xf6 -+#define RSL_IE_IPAC_HO_C_PARMS 0xf7 -+#define RSL_IE_IPAC_CONN_ID 0xf8 -+#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9 -+#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa -+#define RSL_IE_IPAC_RTP_COMPR 0xfb -+#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc -+#define RSL_IE_IPAC_RTP_MPLEX 0xfd -+#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe - - static const value_string rsl_msg_type_vals[] = { - /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ -@@ -337,6 +413,26 @@ static const value_string rsl_msg_type_vals[] = { - { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ - /* 0 1 - - - - - - Location Services messages: */ - { 0x41, "Location Information" }, /* 8.7.1 */ -+ /* ip.access */ -+ { 0x48, "ip.access PDCH ACTIVATION" }, -+ { 0x49, "ip.access PDCH ACTIVATION ACK" }, -+ { 0x4a, "ip.access PDCH ACTIVATION NACK" }, -+ { 0x4b, "ip.access PDCH DEACTIVATION" }, -+ { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, -+ { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, -+ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, -+ { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, -+ { 0x62, "ip.access HANDOover CANDidate RESPonse" }, -+ { 0x70, "ip.access CRCX" }, -+ { 0x71, "ip.access CRCX ACK" }, -+ { 0x72, "ip.access CRCX NACK" }, -+ { 0x73, "ip.access MDCX" }, -+ { 0x74, "ip.access MDCX ACK" }, -+ { 0x75, "ip.access MDCX NACK" }, -+ { 0x76, "ip.access DLCX INDication" }, -+ { 0x77, "ip.access DLCX" }, -+ { 0x78, "ip.access DLCX ACK" }, -+ { 0x79, "ip.access DLCX NACK" }, - { 0, NULL } - }; - -@@ -370,10 +466,10 @@ static const value_string rsl_msg_type_vals[] = { - #define RSL_IE_MESSAGE_ID 28 - - #define RSL_IE_SYS_INFO_TYPE 30 -- -- -- -- -+#define RSL_IE_MS_POWER_PARAM 31 -+#define RSL_IE_BS_POWER_PARAM 32 -+#define RSL_IE_PREPROC_PARAM 33 -+#define RSL_IE_PREPROC_MEAS 34 - #define RSL_IE_FULL_IMM_ASS_INF 35 - #define RSL_IE_SMSCB_INF 36 - #define RSL_IE_FULL_MS_TIMING_OFFSET 37 -@@ -476,6 +572,24 @@ static const value_string rsl_ie_type_vals[] = { - Not used - - */ -+ { 0xe0, "SRTP Configuration" }, -+ { 0xe1, "BSC Proxy UDP Port" }, -+ { 0xe2, "BSC Multiplex Timeout" }, -+ { 0xf0, "Remote IP Address" }, -+ { 0xf1, "Remote RTP Port" }, -+ { 0xf2, "RTP Payload Type" }, -+ { 0xf3, "Local RTP Port" }, -+ { 0xf4, "Speech Mode" }, -+ { 0xf5, "Local IP Address" }, -+ { 0xf6, "Connection Statistics" }, -+ { 0xf7, "Handover C Parameters" }, -+ { 0xf8, "Connection Identifier" }, -+ { 0xf9, "RTP CSD Format" }, -+ { 0xfa, "RTP Jitter Buffer" }, -+ { 0xfb, "RTP Compression" }, -+ { 0xfc, "RTP Payload Type 2" }, -+ { 0xfd, "RTP Multiplex" }, -+ { 0xfe, "RTP Multiplex Identifier" }, - { 0, NULL } - }; - -@@ -512,6 +626,96 @@ static const value_string rsl_ch_no_Cbits_vals[] = { - { 0, NULL } - }; - -+/* From openbsc/include/openbsc/tlv.h */ -+enum tlv_type { -+ TLV_TYPE_FIXED, -+ TLV_TYPE_T, -+ TLV_TYPE_TV, -+ TLV_TYPE_TLV, -+ TLV_TYPE_TL16V, -+}; -+ -+struct tlv_def { -+ enum tlv_type type; -+ u_int8_t fixed_len; -+}; -+ -+struct tlv_definition { -+ struct tlv_def def[0xff]; -+}; -+ -+static const struct tlv_definition rsl_att_tlvdef = { -+ .def = { -+ [RSL_IE_CH_NO] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_LINK_ID] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_ACT_TYPE] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_BS_POW] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_CH_ID] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CH_MODE] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_ENC_INF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_FRAME_NO] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_HO_REF] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_L1_INF] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_L3_INF] = { TLV_TYPE_TL16V, 0 }, -+ [RSL_IE_MS_ID] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_MS_POW] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_PAGING_GRP] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_PAGING_LOAD] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_PHY_CTX] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_ACCESS_DELAY] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_RACH_LOAD] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_REQ_REF] = { TLV_TYPE_FIXED, 3 }, -+ [RSL_IE_REL_MODE] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_RESOURCE_INF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_RLM_CAUSE] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_STARTING_TIME] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_TIMING_ADV] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_UPLINK_MEAS] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CAUSE] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_MEAS_RES_NO] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_MESSAGE_ID] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_SYS_INFO_TYPE] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_MS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_BS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_PREPROC_PARAM] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_PREPROC_MEAS] = { TLV_TYPE_TLV, 0 }, -+ //[RSL_IE_IMM_ASS_INFO] = { TLV_TYPE_TLV, 0 }, -+ //[RSL_IE_SMSCB_INFO] = { TLV_TYPE_FIXED, 23 }, -+ //[RSL_IE_MS_TIMING_OFFSET] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_ERR_MSG] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_FULL_BCCH_INF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CH_NEEDED] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_CB_CMD_TYPE] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_SMSCB_MESS] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_FULL_IMM_ASS_INF] = { TLV_TYPE_TLV, 0 }, -+ //[RSL_IE_SACCH_INFO] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CBCH_LOAD_INF] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_SMSCB_CH_IND] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_GRP_CALL_REF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CH_DESC] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_NCH_DRX_INF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CMD_IND] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_EMLPP_PRIO] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_UIC] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_MAIN_CH_REF] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_MULTIRATE_CONF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_MULTIRATE_CNTRL] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_SUP_CODEC_TYPES] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_CODEC_CONF] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_RTD] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_TFO_STATUS] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_LLP_APDU] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 }, -+ [RSL_IE_IPAC_REMOTE_PORT] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 }, -+ [RSL_IE_IPAC_CONN_STAT] = { TLV_TYPE_TLV, 0 }, -+ [RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV, 0 }, -+ [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 }, -+ [RSL_IE_IPAC_RTP_PAYLOAD2] = { TLV_TYPE_TV, 0 }, -+ }, -+}; -+ - /* 9.3.1 Channel number 9.3.1 M TV 2 */ - static int - dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) -@@ -2042,7 +2246,6 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int - proto_item_set_len(ti, length+2); - - proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); -- offset++; - - /* Received Message */ - offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset); -@@ -2907,12 +3110,184 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree - } - - static int -+dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) -+{ -+ guint8 msg_type; -+ guint32 local_addr = 0; -+ guint16 local_port = 0; -+ address src_addr; -+ -+ msg_type = tvb_get_guint8(tvb, offset)&0x7f; -+ offset++; -+ -+#if 0 -+ switch (msg_type) { -+ case RSL_MSG_TYPE_IPAC_CRCX: -+ case RSL_MSG_TYPE_IPAC_CRCX_ACK: -+ case RSL_MSG_TYPE_IPAC_CRCX_NACK: -+ case RSL_MSG_TYPE_IPAC_MDCX: -+ case RSL_MSG_TYPE_IPAC_MDCX_ACK: -+ case RSL_MSG_TYPE_IPAC_MDCX_NACK: -+ case RSL_MSG_TYPE_IPAC_DLCX_IND: -+ case RSL_MSG_TYPE_IPAC_DLCX: -+ case RSL_MSG_TYPE_IPAC_DLCX_ACK: -+ case RSL_MSG_TYPE_IPAC_DLCX_NACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: -+ /* Channel number 9.3.1 M TV 2 */ -+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); -+ break; -+ } -+#endif -+ /* parse TLV attributes */ -+ while (tvb_reported_length_remaining(tvb, offset) != 0) { -+ guint8 tag; -+ unsigned int len, hlen, len_len; -+ const struct tlv_def *tdef; -+ proto_item *ti; -+ proto_tree *ie_tree; -+ -+ tag = tvb_get_guint8(tvb, offset); -+ tdef = &rsl_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_rsl_ie_id, tvb, offset, 1, FALSE); -+ ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); -+ offset += hlen; -+ -+ switch (tag) { -+ case RSL_IE_CH_NO: -+ dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE); -+ break; -+ case RSL_IE_FRAME_NO: -+ dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE); -+ break; -+ case RSL_IE_MS_POW: -+ dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE); -+ break; -+ case RSL_IE_IPAC_REMOTE_IP: -+ proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_REMOTE_PORT: -+ proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_LOCAL_IP: -+ proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb, -+ offset, len, FALSE); -+ local_addr = tvb_get_ipv4(tvb, offset); -+ break; -+ case RSL_IE_IPAC_LOCAL_PORT: -+ proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, -+ offset, len, FALSE); -+ local_port = tvb_get_ntohs(tvb, offset); -+ break; -+ case RSL_IE_IPAC_SPEECH_MODE: -+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb, -+ offset, len, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_RTP_PAYLOAD: -+ case RSL_IE_IPAC_RTP_PAYLOAD2: -+ proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_RTP_CSD_FMT: -+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb, -+ offset, len, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_CONN_ID: -+ proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb, -+ offset, len, FALSE); -+ break; -+ case RSL_IE_IPAC_CONN_STAT: -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb, -+ offset, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb, -+ offset+4, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb, -+ offset+8, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb, -+ offset+12, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb, -+ offset+16, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb, -+ offset+20, 4, FALSE); -+ proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb, -+ offset+24, 4, FALSE); -+ break; -+ } -+ offset += len; -+ } -+ -+ switch (msg_type) { -+ case RSL_MSG_TYPE_IPAC_CRCX_ACK: -+ /* Notify the RTP and RTCP dissectors about a new RTP stream */ -+ src_addr.type = AT_IPv4; -+ src_addr.len = 4; -+ src_addr.data = (guint8 *)&local_addr; -+ rtp_add_address(pinfo, &src_addr, local_port, 0, -+ "GSM A-bis/IP", pinfo->fd->num, 0, NULL); -+ rtcp_add_address(pinfo, &src_addr, local_port+1, 0, -+ "GSM A-bis/IP", pinfo->fd->num); -+ break; -+ } -+ return offset; -+} -+ -+static int - dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) - { -- guint8 msg_type; -+ guint8 msg_disc, msg_type; - -+ msg_disc = tvb_get_guint8(tvb, offset++) >> 1; - msg_type = tvb_get_guint8(tvb,offset)&0x7f; - proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE); -+ -+ if (msg_disc == RSL_MSGDISC_IPACCESS) { -+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); -+ return offset; -+ } - offset++; - - switch (msg_type){ -@@ -3480,6 +3855,18 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) - /* LLP APDU 9.3.58 M LV 2-N */ - offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); - break; -+ /* the following messages are ip.access specific but sent without -+ * ip.access memssage discriminator */ -+ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: -+ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: -+ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: -+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); - default: - break; - } -@@ -3487,6 +3874,40 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) - return offset; - - } -+ -+static const value_string rsl_ipacc_spm_s_vals[] = { -+ { 0, "GSM FR codec (GSM type 1, FS)" }, -+ { 1, "GSM EFR codec (GSM type 2, FS)" }, -+ { 2, "GSM AMR/FR codec (GSM type 3, FS)" }, -+ { 3, "GSM HR codec (GSM type 1, HS)" }, -+ { 5, "GSM AMR/HR codec (GSM type 3, HS)" }, -+ { 0xf, "As specified by RTP Payload Type IE" }, -+ { 0, NULL } -+}; -+ -+static const value_string rsl_ipacc_spm_m_vals[] = { -+ { 0, "Send and Receive" }, -+ { 1, "Receive Only" }, -+ { 2, "Send Only" }, -+ { 0, NULL } -+}; -+ -+static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = { -+ { 0, "External TRAU format" }, -+ { 1, "Non-TRAU Packed format" }, -+ { 2, "TRAU within the BTS" }, -+ { 3, "IWF-Free BTS-BTS Data" }, -+ { 0, NULL } -+}; -+ -+static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = { -+ { 0, "8kb/s" }, -+ { 1, "16kb/s" }, -+ { 2, "32kb/s" }, -+ { 3, "64kb/s" }, -+ { 0, NULL } -+}; -+ - static void - dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) - { -@@ -3514,7 +3935,6 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) - /* 9.1 Message discriminator */ - proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE); - proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE); -- offset++; - - offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); - -@@ -3884,6 +4304,86 @@ void proto_register_rsl(void) - FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, - NULL, HFILL } - }, -+ { &hf_rsl_speech_mode_s, -+ { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s", -+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals), -+ 0xf, NULL, HFILL } -+ }, -+ { &hf_rsl_speech_mode_m, -+ { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m", -+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals), -+ 0xf0, NULL, HFILL } -+ }, -+ { &hf_rsl_conn_stat, -+ { "ip.access Connection Statistics","rsl.ipacc.conn_stat", -+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } -+ }, -+ { &hf_rsl_conn_id, -+ { "ip.access Connection ID", "rsl.ipacc.conn_id", -+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } -+ }, -+ { &hf_rsl_rtp_payload, -+ { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload", -+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } -+ }, -+ { &hf_rsl_rtp_csd_fmt_d, -+ { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d", -+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals), -+ 0x0f, NULL, HFILL }, -+ }, -+ { &hf_rsl_rtp_csd_fmt_ir, -+ { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir", -+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals), -+ 0xf0, NULL, HFILL }, -+ }, -+ { &hf_rsl_local_port, -+ { "ip.access Local RTP Port", "rsl.ipacc.local_port", -+ FT_UINT16, BASE_DEC, NULL, 0x0, -+ "ip.access Local RTP Port", HFILL }, -+ }, -+ { &hf_rsl_remote_port, -+ { "ip.access Remote RTP Port", "rsl.ipacc.remote_port", -+ FT_UINT16, BASE_DEC, NULL, 0x0, -+ "ip.access Remote RTP Port", HFILL }, -+ }, -+ { &hf_rsl_local_ip, -+ { "ip.access Local IP Address", "rsl.ipacc.local_ip", -+ FT_IPv4, BASE_NONE, NULL, 0x0, -+ "ip.access Local IP Address", HFILL }, -+ }, -+ { &hf_rsl_remote_ip, -+ { "ip.access Remote IP Address", "rsl.ipacc.remote_ip", -+ FT_IPv4, BASE_NONE, NULL, 0x0, -+ "ip.access Remote IP Address", HFILL }, -+ }, -+ { &hf_rsl_cstat_tx_pkts, -+ { "Packets Sent", "rsl.ipacc.cstat.tx_pkts", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_tx_octs, -+ { "Octets Sent", "rsl.ipacc.cstat.tx_octets", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_rx_pkts, -+ { "Packets Received", "rsl.ipacc.cstat.rx_pkts", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_rx_octs, -+ { "Octets Received", "rsl.ipacc.cstat.rx_octets", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_lost_pkts, -+ { "Packets Lost", "rsl.ipacc.cstat.lost_pkts", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_ia_jitter, -+ { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, -+ { &hf_rsl_cstat_avg_tx_dly, -+ { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay", -+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } -+ }, - }; - static gint *ett[] = { - &ett_rsl, -@@ -3941,6 +4441,14 @@ void proto_register_rsl(void) - &ett_ie_meas_res_no, - &ett_ie_message_id, - &ett_ie_sys_info_type, -+ &ett_ie_speech_mode, -+ &ett_ie_conn_stat, -+ &ett_ie_conn_id, -+ &ett_ie_remote_ip, -+ &ett_ie_remote_port, -+ &ett_ie_local_port, -+ &ett_ie_local_ip, -+ &ett_ie_rtp_payload, - }; - - /* Register the protocol name and description */ --- -1.7.0.1 - -- cgit v1.2.3