Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1 | From 6254ee454147eab6f6a51792544716472e20073f Mon Sep 17 00:00:00 2001 |
| 2 | From: Holger Hans Peter Freyther <zecke@selfish.org> |
| 3 | Date: Tue, 11 Jan 2011 15:09:18 +0100 |
| 4 | Subject: [PATCH 2/4] ericsson_rbs2409 |
| 5 | |
| 6 | Add Ericsson RBS2409 dissector |
| 7 | --- |
| 8 | epan/CMakeLists.txt | 2 + |
| 9 | epan/dissectors/Makefile.common | 2 + |
| 10 | epan/dissectors/packet-ehdlc.c | 319 +++++++ |
| 11 | epan/dissectors/packet-gsm_abis_om2000.c | 1439 ++++++++++++++++++++++++++++++ |
| 12 | epan/dissectors/packet-gsm_abis_oml.c | 21 + |
| 13 | epan/dissectors/packet-l2tp.c | 7 + |
| 14 | 6 files changed, 1790 insertions(+), 0 deletions(-) |
| 15 | create mode 100644 epan/dissectors/packet-ehdlc.c |
| 16 | create mode 100644 epan/dissectors/packet-gsm_abis_om2000.c |
| 17 | |
| 18 | diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt |
| 19 | index 0b09335..9217ec0 100644 |
| 20 | --- a/epan/CMakeLists.txt |
| 21 | +++ b/epan/CMakeLists.txt |
| 22 | @@ -184,6 +184,8 @@ set(DIRTY_PIDL_DISSECTOR_SRC |
| 23 | dissectors/packet-dcerpc-eventlog.c |
| 24 | dissectors/packet-dcerpc-lsa.c |
| 25 | dissectors/packet-dcerpc-winreg.c |
| 26 | + dissectors/packet-ehdlc.c |
| 27 | + dissectors/packet-gsm_abis_om2000.c |
| 28 | ) |
| 29 | set(ASN1_DISSECTOR_SRC |
| 30 | dissectors/packet-acp133.c |
| 31 | diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common |
| 32 | index 7ce83b6..4c7094b 100644 |
| 33 | --- a/epan/dissectors/Makefile.common |
| 34 | +++ b/epan/dissectors/Makefile.common |
| 35 | @@ -67,6 +67,8 @@ DIRTY_PIDL_DISSECTOR_SRC = \ |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 36 | packet-dcerpc-dnsserver.c \ |
| 37 | packet-dcerpc-eventlog.c \ |
| 38 | packet-dcerpc-lsa.c \ |
| 39 | + packet-ehdlc.c \ |
| 40 | + packet-gsm_abis_om2000.c \ |
| 41 | packet-dcerpc-winreg.c |
| 42 | |
| 43 | # |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 44 | diff --git a/epan/dissectors/packet-ehdlc.c b/epan/dissectors/packet-ehdlc.c |
| 45 | new file mode 100644 |
| 46 | index 0000000..40bb3ab |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 47 | --- /dev/null |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 48 | +++ b/epan/dissectors/packet-ehdlc.c |
| 49 | @@ -0,0 +1,319 @@ |
| 50 | +/* packet-ehdlc.c |
| 51 | + * Routines for packet dissection of Ericsson HDLC as used in A-bis over IP |
| 52 | + * Copyright 2010 by Harald Welte <laforge@gnumonks.org> |
| 53 | + * |
| 54 | + * $Id: packet-ehdlc.c 33767 2010-08-11 11:59:47Z etxrab $ |
| 55 | + * |
| 56 | + * Wireshark - Network traffic analyzer |
| 57 | + * By Gerald Combs <gerald@wireshark.org> |
| 58 | + * Copyright 1998 Gerald Combs |
| 59 | + * |
| 60 | + * This program is free software; you can redistribute it and/or |
| 61 | + * modify it under the terms of the GNU General Public License |
| 62 | + * as published by the Free Software Foundation; either version 2 |
| 63 | + * of the License, or (at your option) any later version. |
| 64 | + * |
| 65 | + * This program is distributed in the hope that it will be useful, |
| 66 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 67 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 68 | + * GNU General Public License for more details. |
| 69 | + * |
| 70 | + * You should have received a copy of the GNU General Public License |
| 71 | + * along with this program; if not, write to the Free Software |
| 72 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 73 | + */ |
| 74 | + |
| 75 | +#ifdef HAVE_CONFIG_H |
| 76 | +# include "config.h" |
| 77 | +#endif |
| 78 | + |
| 79 | +#include <glib.h> |
| 80 | + |
| 81 | +#include <epan/packet.h> |
| 82 | +#include <epan/ipproto.h> |
| 83 | +#include <epan/xdlc.h> |
| 84 | + |
| 85 | +/* Initialize the protocol and registered fields */ |
| 86 | +static int proto_ehdlc = -1; |
| 87 | + |
| 88 | +static int hf_ehdlc_data_len = -1; |
| 89 | +static int hf_ehdlc_protocol = -1; |
| 90 | +static int hf_ehdlc_sapi = -1; |
| 91 | +static int hf_ehdlc_c_r = -1; |
| 92 | + |
| 93 | +static int hf_ehdlc_xid_payload = -1; |
| 94 | +static int hf_ehdlc_control = -1; |
| 95 | + |
| 96 | +static int hf_ehdlc_p = -1; |
| 97 | +static int hf_ehdlc_f = -1; |
| 98 | +static int hf_ehdlc_u_modifier_cmd = -1; |
| 99 | +static int hf_ehdlc_u_modifier_resp = -1; |
| 100 | +static int hf_ehdlc_ftype_s_u = -1; |
| 101 | + |
| 102 | +static int hf_ehdlc_n_r = -1; |
| 103 | +static int hf_ehdlc_n_s = -1; |
| 104 | +static int hf_ehdlc_p_ext = -1; |
| 105 | +static int hf_ehdlc_f_ext = -1; |
| 106 | +static int hf_ehdlc_s_ftype = -1; |
| 107 | +static int hf_ehdlc_ftype_i = -1; |
| 108 | +static int hf_ehdlc_ftype_s_u_ext = -1; |
| 109 | + |
| 110 | +/* Used only for U frames */ |
| 111 | +static const xdlc_cf_items ehdlc_cf_items = { |
| 112 | + NULL, |
| 113 | + NULL, |
| 114 | + &hf_ehdlc_p, |
| 115 | + &hf_ehdlc_f, |
| 116 | + NULL, |
| 117 | + &hf_ehdlc_u_modifier_cmd, |
| 118 | + &hf_ehdlc_u_modifier_resp, |
| 119 | + NULL, |
| 120 | + &hf_ehdlc_ftype_s_u |
| 121 | +}; |
| 122 | + |
| 123 | +/* Used only for I and S frames */ |
| 124 | +static const xdlc_cf_items ehdlc_cf_items_ext = { |
| 125 | + &hf_ehdlc_n_r, |
| 126 | + &hf_ehdlc_n_s, |
| 127 | + &hf_ehdlc_p_ext, |
| 128 | + &hf_ehdlc_f_ext, |
| 129 | + &hf_ehdlc_s_ftype, |
| 130 | + NULL, |
| 131 | + NULL, |
| 132 | + &hf_ehdlc_ftype_i, |
| 133 | + &hf_ehdlc_ftype_s_u_ext, |
| 134 | +}; |
| 135 | + |
| 136 | +/* Initialize the subtree pointers */ |
| 137 | +static gint ett_ehdlc = -1; |
| 138 | +static gint ett_ehdlc_control = -1; |
| 139 | + |
| 140 | +static const value_string ehdlc_protocol_vals[] = { |
| 141 | + { 0x20, "RSL" }, |
| 142 | + { 0xa0, "ACK" }, |
| 143 | + { 0xc0, "OML" }, |
| 144 | + { 0, NULL } |
| 145 | +}; |
| 146 | + |
| 147 | +enum { |
| 148 | + SUB_RSL, |
| 149 | + SUB_OML, |
| 150 | + SUB_DATA, |
| 151 | + |
| 152 | + SUB_MAX |
| 153 | +}; |
| 154 | + |
| 155 | +static dissector_handle_t sub_handles[SUB_MAX]; |
| 156 | + |
| 157 | +/* Code to actually dissect the packets */ |
| 158 | +static void |
| 159 | +dissect_ehdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
| 160 | +{ |
| 161 | + gint remaining; |
| 162 | + int offset = 4; |
| 163 | + |
| 164 | + col_set_str(pinfo->cinfo, COL_PROTOCOL, "EHDLC"); |
| 165 | + col_clear(pinfo->cinfo, COL_INFO); |
| 166 | + |
| 167 | + while ((remaining = tvb_reported_length_remaining(tvb, offset)) > 0) { |
| 168 | + proto_item *ti = NULL; |
| 169 | + proto_tree *ehdlc_tree = NULL; |
| 170 | + guint16 len, msg_type; |
| 171 | + tvbuff_t *next_tvb; |
| 172 | + guint16 control; |
| 173 | + gboolean is_response = 0, is_extended = TRUE; |
| 174 | + gint header_length = 2; /* Address + Length field */ |
| 175 | + |
| 176 | + msg_type = tvb_get_guint8(tvb, offset); |
| 177 | + len = tvb_get_guint8(tvb, offset+1); |
| 178 | +#if 0 |
| 179 | + col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", |
| 180 | + val_to_str(msg_type, ehdlc_protocol_vals, |
| 181 | + "unknown 0x%02x")); |
| 182 | +#endif |
| 183 | + if (tree) { |
| 184 | + ti = proto_tree_add_protocol_format(tree, proto_ehdlc, |
| 185 | + tvb, offset, len, |
| 186 | + "Ericsson HDLC protocol, type: %s", |
| 187 | + val_to_str(msg_type, ehdlc_protocol_vals, |
| 188 | + "unknown 0x%02x")); |
| 189 | + ehdlc_tree = proto_item_add_subtree(ti, ett_ehdlc); |
| 190 | + proto_tree_add_item(ehdlc_tree, hf_ehdlc_protocol, |
| 191 | + tvb, offset, 1, FALSE); |
| 192 | +#if 0 |
| 193 | + proto_tree_add_item(ehdlc_tree, hf_ehdlc_sapi, |
| 194 | + tvb, offset, 1, FALSE); |
| 195 | + proto_tree_add_item(ehdlc_tree, hf_ehdlc_c_r, |
| 196 | + tvb, offset, 1, FALSE); |
| 197 | +#endif |
| 198 | + proto_tree_add_item(ehdlc_tree, hf_ehdlc_data_len, |
| 199 | + tvb, offset+1, 1, FALSE); |
| 200 | + } |
| 201 | + |
| 202 | + control = dissect_xdlc_control(tvb, offset+2, pinfo, ehdlc_tree, hf_ehdlc_control, |
| 203 | + ett_ehdlc_control, &ehdlc_cf_items, &ehdlc_cf_items_ext, |
| 204 | + NULL, NULL, is_response, is_extended, FALSE); |
| 205 | + header_length += XDLC_CONTROL_LEN(control, is_extended); |
| 206 | + |
| 207 | + if (XDLC_IS_INFORMATION(control)) { |
| 208 | + next_tvb = tvb_new_subset(tvb, offset+header_length, |
| 209 | + len-header_length, len); |
| 210 | + |
| 211 | + switch (msg_type) { |
| 212 | + case 0x20: |
| 213 | + /* len == 4 seems to be some kind of ACK */ |
| 214 | + if (len <= 4) |
| 215 | + break; |
| 216 | + call_dissector(sub_handles[SUB_RSL], next_tvb, pinfo, tree); |
| 217 | + break; |
| 218 | + case 0xbc: |
| 219 | + case 0xdc: |
| 220 | + case 0xa0: |
| 221 | + case 0xc0: |
| 222 | + /* len == 4 seems to be some kind of ACK */ |
| 223 | + if (len <= 4) |
| 224 | + break; |
| 225 | + call_dissector(sub_handles[SUB_OML], next_tvb, pinfo, tree); |
| 226 | + break; |
| 227 | + default: |
| 228 | + call_dissector(sub_handles[SUB_DATA], next_tvb, pinfo, tree); |
| 229 | + break; |
| 230 | + } |
| 231 | + } else if (control == XDLC_U | XDLC_XID) { |
| 232 | + /* XID is formatted like ISO 8885, typically we see |
| 233 | + * something like |
| 234 | + * 82 format identifier |
| 235 | + * 80 group identifier |
| 236 | + * 00 09 length |
| 237 | + * 07 01 05 Window Size Tx |
| 238 | + * 09 01 04 Ack Timer (msec) |
| 239 | + * 08 01 05 Window Size Rx */ |
| 240 | + proto_tree_add_item(ehdlc_tree, hf_ehdlc_xid_payload, |
| 241 | + tvb, offset+header_length, |
| 242 | + len-header_length, FALSE); |
| 243 | + } |
| 244 | + |
| 245 | + offset += len; |
| 246 | + } |
| 247 | +} |
| 248 | + |
| 249 | +void proto_register_ehdlc(void) |
| 250 | +{ |
| 251 | + static hf_register_info hf[] = { |
| 252 | + { &hf_ehdlc_data_len, |
| 253 | + { "DataLen", "ehdlc.data_len", |
| 254 | + FT_UINT8, BASE_DEC, NULL, 0x0, |
| 255 | + "The length of the data (in bytes)", HFILL } |
| 256 | + }, |
| 257 | + { &hf_ehdlc_protocol, |
| 258 | + { "Protocol", "ehdlc.protocol", |
| 259 | + FT_UINT8, BASE_HEX, VALS(ehdlc_protocol_vals), 0x0, |
| 260 | + "The HDLC Sub-Protocol", HFILL } |
| 261 | + }, |
| 262 | + { &hf_ehdlc_sapi, |
| 263 | + { "SAPI", "ehdlc.sapi", |
| 264 | + FT_UINT8, BASE_DEC, NULL, 0x1f, |
| 265 | + NULL, HFILL } |
| 266 | + }, |
| 267 | + { &hf_ehdlc_c_r, |
| 268 | + { "C/R", "ehdlc.c_r", |
| 269 | + FT_UINT8, BASE_HEX, NULL, 0x20, |
| 270 | + NULL, HFILL } |
| 271 | + }, |
| 272 | + { &hf_ehdlc_xid_payload, |
| 273 | + { "XID Payload", "ehdlc.xid_payload", |
| 274 | + FT_BYTES, BASE_NONE, NULL, 0, |
| 275 | + NULL, HFILL } |
| 276 | + }, |
| 277 | + { &hf_ehdlc_control, |
| 278 | + { "Control Field", "ehdlc.control", |
| 279 | + FT_UINT16, BASE_HEX, NULL, 0, |
| 280 | + NULL, HFILL } |
| 281 | + }, |
| 282 | + { &hf_ehdlc_n_r, |
| 283 | + { "N(R)", "ehdlc.control.n_r", |
| 284 | + FT_UINT16, BASE_DEC, NULL, XDLC_N_R_EXT_MASK, |
| 285 | + NULL, HFILL } |
| 286 | + }, |
| 287 | + { &hf_ehdlc_n_s, |
| 288 | + { "N(S)", "ehdlc.control.n_s", |
| 289 | + FT_UINT16, BASE_DEC, NULL, XDLC_N_S_EXT_MASK, |
| 290 | + NULL, HFILL } |
| 291 | + }, |
| 292 | + { &hf_ehdlc_p, |
| 293 | + { "Poll", "ehdlc.control.p", |
| 294 | + FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, |
| 295 | + NULL, HFILL } |
| 296 | + }, |
| 297 | + { &hf_ehdlc_p_ext, |
| 298 | + { "Poll", "ehdlc.control.p", |
| 299 | + FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, |
| 300 | + NULL, HFILL } |
| 301 | + }, |
| 302 | + { &hf_ehdlc_f, |
| 303 | + { "Final", "ehdlc.control.f", |
| 304 | + FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F, |
| 305 | + NULL, HFILL } |
| 306 | + }, |
| 307 | + { &hf_ehdlc_f_ext, |
| 308 | + { "Final", "ehdlc.control.f", |
| 309 | + FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT, |
| 310 | + NULL, HFILL } |
| 311 | + }, |
| 312 | + { &hf_ehdlc_s_ftype, |
| 313 | + { "Supervisory frame type", "ehdlc.control.s_ftype", |
| 314 | + FT_UINT16, BASE_HEX, VALS(stype_vals), XDLC_S_FTYPE_MASK, |
| 315 | + NULL, HFILL } |
| 316 | + }, |
| 317 | + { &hf_ehdlc_u_modifier_cmd, |
| 318 | + { "Command", "ehdlc.control.u_modifier_cmd", |
| 319 | + FT_UINT8, BASE_HEX, VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, |
| 320 | + NULL, HFILL } |
| 321 | + }, |
| 322 | + { &hf_ehdlc_u_modifier_resp, |
| 323 | + { "Response", "ehdlc.control.u_modifier_resp", |
| 324 | + FT_UINT8, BASE_HEX, VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, |
| 325 | + NULL, HFILL } |
| 326 | + }, |
| 327 | + { &hf_ehdlc_ftype_i, |
| 328 | + { "Frame Type", "ehdlc.control.ftype", |
| 329 | + FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_I_MASK, |
| 330 | + NULL, HFILL } |
| 331 | + }, |
| 332 | + { &hf_ehdlc_ftype_s_u, |
| 333 | + { "Frame Type", "ehdlc.control.ftype", |
| 334 | + FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, |
| 335 | + NULL, HFILL } |
| 336 | + }, |
| 337 | + { &hf_ehdlc_ftype_s_u_ext, |
| 338 | + { "Frame Type", "ehdlc.control.ftype", |
| 339 | + FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, |
| 340 | + NULL, HFILL } |
| 341 | + }, |
| 342 | + }; |
| 343 | + |
| 344 | + static gint *ett[] = { |
| 345 | + &ett_ehdlc, |
| 346 | + &ett_ehdlc_control, |
| 347 | + }; |
| 348 | + |
| 349 | + proto_ehdlc = |
| 350 | + proto_register_protocol("Ericsson HDLC", |
| 351 | + "Ericsson HDLC as used in A-bis over IP", "ehdlc"); |
| 352 | + |
| 353 | + proto_register_field_array(proto_ehdlc, hf, array_length(hf)); |
| 354 | + proto_register_subtree_array(ett, array_length(ett)); |
| 355 | + |
| 356 | + register_dissector("ehdlc", dissect_ehdlc, proto_ehdlc); |
| 357 | +} |
| 358 | + |
| 359 | +void proto_reg_handoff_ehdlc(void) |
| 360 | +{ |
| 361 | + dissector_handle_t ehdlc_handle; |
| 362 | + |
| 363 | + sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl"); |
| 364 | + sub_handles[SUB_OML] = find_dissector("gsm_abis_oml"); |
| 365 | + sub_handles[SUB_DATA] = find_dissector("data"); |
| 366 | + |
| 367 | + ehdlc_handle = create_dissector_handle(dissect_ehdlc, proto_ehdlc); |
| 368 | +} |
| 369 | diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c |
| 370 | new file mode 100644 |
| 371 | index 0000000..bf67aea |
| 372 | --- /dev/null |
| 373 | +++ b/epan/dissectors/packet-gsm_abis_om2000.c |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 374 | @@ -0,0 +1,1439 @@ |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 375 | +/* packet-abis_om2000.c |
| 376 | + * Routines for packet dissection of Ericsson A-bis OML (OM 2000) |
| 377 | + * Copyright 2010 by Harald Welte <laforge@gnumonks.org> |
| 378 | + * |
| 379 | + * $Id$ |
| 380 | + * |
| 381 | + * Wireshark - Network traffic analyzer |
| 382 | + * By Gerald Combs <gerald@wireshark.org> |
| 383 | + * Copyright 1998 Gerald Combs |
| 384 | + * |
| 385 | + * This program is free software; you can redistribute it and/or |
| 386 | + * modify it under the terms of the GNU General Public License |
| 387 | + * as published by the Free Software Foundation; either version 2 |
| 388 | + * of the License, or (at your option) any later version. |
| 389 | + * |
| 390 | + * This program is distributed in the hope that it will be useful, |
| 391 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 392 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 393 | + * GNU General Public License for more details. |
| 394 | + * |
| 395 | + * You should have received a copy of the GNU General Public License |
| 396 | + * along with this program; if not, write to the Free Software |
| 397 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 398 | + */ |
| 399 | + |
| 400 | +#ifdef HAVE_CONFIG_H |
| 401 | +# include "config.h" |
| 402 | +#endif |
| 403 | + |
| 404 | +#include <glib.h> |
| 405 | + |
| 406 | +#include <epan/packet.h> |
| 407 | +#include <epan/emem.h> |
| 408 | +#include <epan/lapd_sapi.h> |
| 409 | +#include <epan/prefs.h> |
| 410 | + |
| 411 | +#include "packet-gsm_abis_oml.h" |
| 412 | +#include "packet-gsm_a_common.h" |
| 413 | + |
| 414 | +#include <stdio.h> |
| 415 | + |
| 416 | +/* initialize the protocol and registered fields */ |
| 417 | +static int proto_abis_om2000 = -1; |
| 418 | + |
| 419 | +static int hf_om2k_msg_code = -1; |
| 420 | +static int hf_om2k_mo_if = -1; |
| 421 | +static int hf_om2k_mo_class = -1; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 422 | +static int hf_om2k_mo_instance = -1; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 423 | + |
| 424 | +static int hf_om2k_aip = -1; |
| 425 | +static int hf_om2k_oip = -1; |
| 426 | +static int hf_om2k_comb = -1; |
| 427 | +static int hf_om2k_ts = -1; |
| 428 | +static int hf_om2k_hsn = -1; |
| 429 | +static int hf_om2k_maio = -1; |
| 430 | +static int hf_om2k_bsic = -1; |
| 431 | +static int hf_om2k_diversity = -1; |
| 432 | +static int hf_om2k_fn_offs = -1; |
| 433 | +static int hf_om2k_ext_range = -1; |
| 434 | +static int hf_om2k_irc = -1; |
| 435 | +static int hf_om2k_bs_pa_mfrms = -1; |
| 436 | +static int hf_om2k_bs_ag_blks_res= -1; |
| 437 | +static int hf_om2k_drx_dev_max = -1; |
| 438 | +static int hf_om2k_cr = -1; |
| 439 | +static int hf_om2k_ipt3 = -1; |
| 440 | +static int hf_om2k_aop = -1; |
| 441 | +static int hf_om2k_t3105 = -1; |
| 442 | +static int hf_om2k_ny1 = -1; |
| 443 | +static int hf_om2k_cbi = -1; |
| 444 | +static int hf_om2k_tsc = -1; |
| 445 | +static int hf_om2k_icm = -1; |
| 446 | +static int hf_om2k_tta = -1; |
| 447 | +static int hf_om2k_icm_cr = -1; |
| 448 | +static int hf_om2k_lsc_fm = -1; |
| 449 | +static int hf_om2k_lsc_lsi = -1; |
| 450 | +static int hf_om2k_lsc_lsa = -1; |
| 451 | +static int hf_om2k_ls_ft = -1; |
| 452 | +static int hf_om2k_cst = -1; |
| 453 | +static int hf_om2k_ea = -1; |
| 454 | +static int hf_om2k_unknown_tag = -1; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 455 | +static int hf_om2k_unknown_val = -1; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 456 | +static int hf_om2k_nom_pwr = -1; |
| 457 | +static int hf_om2k_fill_mark = -1; |
| 458 | +static int hf_om2k_bcc = -1; |
| 459 | +static int hf_om2k_mo_state = -1; |
| 460 | +static int hf_om2k_la_state = -1; |
| 461 | +static int hf_om2k_tsn_state = -1; |
| 462 | +static int hf_om2k_bts_manuf = -1; |
| 463 | +static int hf_om2k_bts_gen = -1; |
| 464 | +static int hf_om2k_bts_rev = -1; |
| 465 | +static int hf_om2k_bts_var = -1; |
| 466 | +static int hf_om2k_brr = -1; |
| 467 | +static int hf_om2k_bfr = -1; |
| 468 | +static int hf_om2k_hwinfo_sig = -1; |
| 469 | +static int hf_om2k_capa_sig = -1; |
| 470 | +static int hf_om2k_file_rev = -1; |
| 471 | +static int hf_om2k_filerel_ilr = -1; |
| 472 | +static int hf_om2k_filerel_cur = -1; |
| 473 | +static int hf_om2k_filerel_other = -1; |
| 474 | +static int hf_om2k_cal_time = -1; |
| 475 | +static int hf_om2k_list_nr = -1; |
| 476 | +static int hf_om2k_list_nr_end = -1; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 477 | +static int hf_om2k_isl = -1; |
| 478 | +static int hf_om2k_isl_icp1 = -1; |
| 479 | +static int hf_om2k_isl_icp2 = -1; |
| 480 | +static int hf_om2k_isl_ci = -1; |
| 481 | +static int hf_om2k_conl = -1; |
| 482 | +static int hf_om2k_conl_nr_cgs = -1; |
| 483 | +static int hf_om2k_conl_nr_cps_cg = -1; |
| 484 | +static int hf_om2k_conl_ccp = -1; |
| 485 | +static int hf_om2k_conl_ci = -1; |
| 486 | +static int hf_om2k_conl_tag = -1; |
| 487 | +static int hf_om2k_conl_tei = -1; |
| 488 | +static int hf_om2k_tf_mode = -1; |
| 489 | +static int hf_om2k_tf_fs_offset = -1; |
| 490 | + |
| 491 | + |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 492 | + |
| 493 | +/* initialize the subtree pointers */ |
| 494 | +static int ett_om2000 = -1; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 495 | +static int ett_om2k_mo = -1; |
| 496 | +static int ett_om2k_isl = -1; |
| 497 | +static int ett_om2k_conl = -1; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 498 | + |
| 499 | +static proto_tree *top_tree; |
| 500 | + |
| 501 | +static const value_string om2k_msgcode_vals[] = { |
| 502 | + { 0x0000, "Abort SP Command" }, |
| 503 | + { 0x0002, "Abort SP Complete" }, |
| 504 | + { 0x0004, "Alarm Report ACK" }, |
| 505 | + { 0x0005, "Alarm Report NACK" }, |
| 506 | + { 0x0006, "Alarm Report" }, |
| 507 | + { 0x0008, "Alarm Status Request" }, |
| 508 | + { 0x000a, "Alarm Status Request Accept" }, |
| 509 | + { 0x000b, "Alarm Status Request Reject" }, |
| 510 | + { 0x000c, "Alarm Status Result ACK" }, |
| 511 | + { 0x000d, "Alarm Status Result NACK" }, |
| 512 | + { 0x000e, "Alarm Status Result" }, |
| 513 | + { 0x0010, "Calendar Time Response" }, |
| 514 | + { 0x0011, "Calendar Time Reject" }, |
| 515 | + { 0x0012, "Calendar Time Request" }, |
| 516 | + { 0x0014, "CON Configuration Request" }, |
| 517 | + { 0x0016, "CON Configuration Request Accept" }, |
| 518 | + { 0x0017, "CON Configuration Request Reject" }, |
| 519 | + { 0x0018, "CON Configuration Result ACK" }, |
| 520 | + { 0x0019, "CON Configuration Result NACK" }, |
| 521 | + { 0x001a, "CON Configuration Result" }, |
| 522 | + { 0x001c, "Connect Command" }, |
| 523 | + { 0x001e, "Connect Complete" }, |
| 524 | + { 0x001f, "Connect Rejecte" }, |
| 525 | + { 0x0028, "Disable Request" }, |
| 526 | + { 0x002a, "Disable Request Accept" }, |
| 527 | + { 0x002b, "Disable Request Reject" }, |
| 528 | + { 0x002c, "Disable Result ACK" }, |
| 529 | + { 0x002d, "Disable Result NACK" }, |
| 530 | + { 0x002e, "Disable Result" }, |
| 531 | + { 0x0030, "Disconnect Command" }, |
| 532 | + { 0x0032, "Disconnect Complete" }, |
| 533 | + { 0x0033, "Disconnect Reject" }, |
| 534 | + { 0x0034, "Enable Request" }, |
| 535 | + { 0x0036, "Enable Request Accept" }, |
| 536 | + { 0x0037, "Enable Request Reject" }, |
| 537 | + { 0x0038, "Enable Result ACK" }, |
| 538 | + { 0x0039, "Enable Result NACK" }, |
| 539 | + { 0x003a, "Enable Result" }, |
| 540 | + { 0x003c, "Escape Downlink Normal" }, |
| 541 | + { 0x003d, "Escape Downlink NACK" }, |
| 542 | + { 0x003e, "Escape Uplink Normal" }, |
| 543 | + { 0x003f, "Escape Uplink NACK" }, |
| 544 | + { 0x0040, "Fault Report ACK" }, |
| 545 | + { 0x0041, "Fault Report NACK" }, |
| 546 | + { 0x0042, "Fault Report" }, |
| 547 | + { 0x0044, "File Package End Command" }, |
| 548 | + { 0x0046, "File Package End Result" }, |
| 549 | + { 0x0047, "File Package End Reject" }, |
| 550 | + { 0x0048, "File Relation Request" }, |
| 551 | + { 0x004a, "File Relation Response" }, |
| 552 | + { 0x004b, "File Relation Request Reject" }, |
| 553 | + { 0x004c, "File Segment Transfer" }, |
| 554 | + { 0x004e, "File Segment Transfer Complete" }, |
| 555 | + { 0x004f, "File Segment Transfer Reject" }, |
| 556 | + { 0x0050, "HW Information Request" }, |
| 557 | + { 0x0052, "HW Information Request Accept" }, |
| 558 | + { 0x0053, "HW Information Request Reject" }, |
| 559 | + { 0x0054, "HW Information Result ACK" }, |
| 560 | + { 0x0055, "HW Information Result NACK" }, |
| 561 | + { 0x0056, "HW Information Result" }, |
| 562 | + { 0x0060, "IS Configuration Request" }, |
| 563 | + { 0x0062, "IS Configuration Request Accept" }, |
| 564 | + { 0x0063, "IS Configuration Request Reject" }, |
| 565 | + { 0x0064, "IS Configuration Result ACK" }, |
| 566 | + { 0x0065, "IS Configuration Result NACK" }, |
| 567 | + { 0x0066, "IS Configuration Result" }, |
| 568 | + { 0x0068, "Load Data End" }, |
| 569 | + { 0x006a, "Load Data End Result" }, |
| 570 | + { 0x006b, "Load Data End Reject" }, |
| 571 | + { 0x006c, "Load Data Init" }, |
| 572 | + { 0x006e, "Load Data Init Accept" }, |
| 573 | + { 0x006f, "Load Data Init Reject" }, |
| 574 | + { 0x0070, "Loop Control Command" }, |
| 575 | + { 0x0072, "Loop Control Complete" }, |
| 576 | + { 0x0073, "Loop Control Reject" }, |
| 577 | + { 0x0074, "Operational Information" }, |
| 578 | + { 0x0076, "Operational Information Accept" }, |
| 579 | + { 0x0077, "Operational Information Reject" }, |
| 580 | + { 0x0078, "Reset Command" }, |
| 581 | + { 0x007a, "Reset Complete" }, |
| 582 | + { 0x007b, "Reset Reject" }, |
| 583 | + { 0x007c, "RX Configuration Request" }, |
| 584 | + { 0x007e, "RX Configuration Request Accept" }, |
| 585 | + { 0x007f, "RX Configuration Request Reject" }, |
| 586 | + { 0x0080, "RX Configuration Result ACK" }, |
| 587 | + { 0x0081, "RX Configuration Result NACK" }, |
| 588 | + { 0x0082, "RX Configuration Result" }, |
| 589 | + { 0x0084, "Start Request" }, |
| 590 | + { 0x0086, "Start Request Accept" }, |
| 591 | + { 0x0087, "Start Request Reject" }, |
| 592 | + { 0x0088, "Start Result ACK" }, |
| 593 | + { 0x0089, "Start Result NACK" }, |
| 594 | + { 0x008a, "Start Result" }, |
| 595 | + { 0x008c, "Status Request" }, |
| 596 | + { 0x008e, "Status Response" }, |
| 597 | + { 0x008f, "Status Reject" }, |
| 598 | + { 0x0094, "Test Request" }, |
| 599 | + { 0x0096, "Test Request Accept" }, |
| 600 | + { 0x0097, "Test Request Reject" }, |
| 601 | + { 0x0098, "Test Result ACK" }, |
| 602 | + { 0x0099, "Test Result NACK" }, |
| 603 | + { 0x009a, "Test Result" }, |
| 604 | + { 0x00a0, "TF Configuration Request" }, |
| 605 | + { 0x00a2, "TF Configuration Request Accept" }, |
| 606 | + { 0x00a3, "TF Configuration Request Reject" }, |
| 607 | + { 0x00a4, "TF Configuration Result ACK" }, |
| 608 | + { 0x00a5, "TF Configuration Result NACK" }, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 609 | + { 0x00a6, "TF Configuration Result" }, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 610 | + { 0x00a8, "TS Configuration Request" }, |
| 611 | + { 0x00aa, "TS Configuration Request Accept" }, |
| 612 | + { 0x00ab, "TS Configuration Request Reject" }, |
| 613 | + { 0x00ac, "TS Configuration Result ACK" }, |
| 614 | + { 0x00ad, "TS Configuration Result NACK" }, |
| 615 | + { 0x00ae, "TS Configuration Result" }, |
| 616 | + { 0x00b0, "TX Configuration Request" }, |
| 617 | + { 0x00b2, "TX Configuration Request Accept" }, |
| 618 | + { 0x00b3, "TX Configuration Request Reject" }, |
| 619 | + { 0x00b4, "TX Configuration Result ACK" }, |
| 620 | + { 0x00b5, "TX Configuration Result NACK" }, |
| 621 | + { 0x00b6, "TX Configuration Result" }, |
| 622 | + { 0x00bc, "DIP Alarm Report ACK" }, |
| 623 | + { 0x00bd, "DIP Alarm Report NACK" }, |
| 624 | + { 0x00be, "DIP Alarm Report" }, |
| 625 | + { 0x00c0, "DIP Alarm Status Request" }, |
| 626 | + { 0x00c2, "DIP Alarm Status Response" }, |
| 627 | + { 0x00c3, "DIP Alarm Status Reject" }, |
| 628 | + { 0x00c4, "DIP Quality Report I ACK" }, |
| 629 | + { 0x00c5, "DIP Quality Report I NACK" }, |
| 630 | + { 0x00c6, "DIP Quality Report I" }, |
| 631 | + { 0x00c8, "DIP Quality Report II ACK" }, |
| 632 | + { 0x00c9, "DIP Quality Report II NACK" }, |
| 633 | + { 0x00ca, "DIP Quality Report II" }, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 634 | + { 0x00dc, "DP Configuration Request" }, |
| 635 | + { 0x00de, "DP Configuration Request Accept" }, |
| 636 | + { 0x00df, "DP Configuration Request Reject" }, |
| 637 | + { 0x00e0, "DP Configuration Result ACK" }, |
| 638 | + { 0x00e1, "DP Configuration Result NACK" }, |
| 639 | + { 0x00e2, "DP Configuration Result" }, |
| 640 | + { 0x00e4, "Capabilities HW Info Report ACK" }, |
| 641 | + { 0x00e5, "Capabilities HW Info Report NACK" }, |
| 642 | + { 0x00e6, "Capabilities HW Info Report" }, |
| 643 | + { 0x00e8, "Capabilities Request" }, |
| 644 | + { 0x00ea, "Capabilities Request Accept" }, |
| 645 | + { 0x00eb, "Capabilities Request Reject" }, |
| 646 | + { 0x00ec, "Capabilities Result ACK" }, |
| 647 | + { 0x00ed, "Capabilities Result NACK" }, |
| 648 | + { 0x00ee, "Capabilities Result" }, |
| 649 | + { 0x00f0, "FM Configuration Request" }, |
| 650 | + { 0x00f2, "FM Configuration Request Accept" }, |
| 651 | + { 0x00f3, "FM Configuration Request Reject" }, |
| 652 | + { 0x00f4, "FM Configuration Result ACK" }, |
| 653 | + { 0x00f5, "FM Configuration Result NACK" }, |
| 654 | + { 0x00f6, "FM Configuration Result" }, |
| 655 | + { 0x00f8, "FM Report Request" }, |
| 656 | + { 0x00fa, "FM Report Response" }, |
| 657 | + { 0x00fb, "FM Report Reject" }, |
| 658 | + { 0x00fc, "FM Start Command" }, |
| 659 | + { 0x00fe, "FM Start Complete" }, |
| 660 | + { 0x00ff, "FM Start Reject" }, |
| 661 | + { 0x0100, "FM Stop Command" }, |
| 662 | + { 0x0102, "FM Stop Complete" }, |
| 663 | + { 0x0103, "FM Stop Reject" }, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 664 | + { 0x0104, "Negotiation Request ACK" }, |
| 665 | + { 0x0105, "Negotiation Request NACK" }, |
| 666 | + { 0x0106, "Negotiation Request" }, |
| 667 | + { 0x0108, "BTS Initiated Request ACK" }, |
| 668 | + { 0x0109, "BTS Initiated Request NACK" }, |
| 669 | + { 0x010a, "BTS Initiated Request" }, |
| 670 | + { 0x010c, "Radio Channels Release Command" }, |
| 671 | + { 0x010e, "Radio Channels Release Complete" }, |
| 672 | + { 0x010f, "Radio Channels Release Reject" }, |
| 673 | + { 0x0118, "Feature Control Command" }, |
| 674 | + { 0x011a, "Feature Control Complete" }, |
| 675 | + { 0x011b, "Feature Control Reject" }, |
| 676 | + |
| 677 | + { 0, NULL } |
| 678 | +}; |
| 679 | + |
| 680 | +/* TS 12.21 Section 9.4: Attributes */ |
| 681 | +static const value_string om2k_attr_vals[] = { |
| 682 | + { 0x00, "Accordance indication" }, |
| 683 | + { 0x01, "Alarm Id" }, |
| 684 | + { 0x02, "Alarm Data" }, |
| 685 | + { 0x03, "Alarm Severity" }, |
| 686 | + { 0x04, "Alarm Status" }, |
| 687 | + { 0x05, "Alarm Status Type" }, |
| 688 | + { 0x06, "BCC" }, |
| 689 | + { 0x07, "BS_AG_BKS_RES" }, |
| 690 | + { 0x09, "BSIC" }, |
| 691 | + { 0x0a, "BA_PA_MFRMS" }, |
| 692 | + { 0x0b, "CBCH Indicator" }, |
| 693 | + { 0x0c, "CCCH Options" }, |
| 694 | + { 0x0d, "Calendar Time" }, |
| 695 | + { 0x0f, "Channel Combination" }, |
| 696 | + { 0x10, "CON Connection List" }, |
| 697 | + { 0x11, "Data End Indication" }, |
| 698 | + { 0x12, "DRX_DEV_MAX" }, |
| 699 | + { 0x13, "End List Number" }, |
| 700 | + { 0x14, "External Condition Map Class 1" }, |
| 701 | + { 0x15, "External Condition Map Class 2" }, |
| 702 | + { 0x16, "File Relation Indication" }, |
| 703 | + { 0x17, "File Revision" }, |
| 704 | + { 0x18, "File Segment Data" }, |
| 705 | + { 0x19, "File Segment Length" }, |
| 706 | + { 0x1a, "File Segment Sequence Number" }, |
| 707 | + { 0x1b, "File Size" }, |
| 708 | + { 0x1c, "Filling Marker" }, |
| 709 | + { 0x1d, "FN Offset" }, |
| 710 | + { 0x1e, "Frequency List" }, |
| 711 | + { 0x1f, "Frequency Specifier RX" }, |
| 712 | + { 0x20, "Frequency Specifier TX" }, |
| 713 | + { 0x21, "HSN" }, |
| 714 | + { 0x22, "ICM Indicator" }, |
| 715 | + { 0x23, "Internal Fault Map Class 1A" }, |
| 716 | + { 0x24, "Internal Fault Map Class 1B" }, |
| 717 | + { 0x25, "Internal Fault Map Class 2A" }, |
| 718 | + { 0x26, "Internal Fault Map Class 2A Extension" }, |
| 719 | + { 0x27, "IS Connection List" }, |
| 720 | + { 0x28, "List Number" }, |
| 721 | + { 0x29, "File Package State Indication" }, |
| 722 | + { 0x2a, "Local Access State" }, |
| 723 | + { 0x2b, "MAIO" }, |
| 724 | + { 0x2c, "MO State" }, |
| 725 | + { 0x2d, "Ny1" }, |
| 726 | + { 0x2e, "Operational Information" }, |
| 727 | + { 0x2f, "Power" }, |
| 728 | + { 0x30, "RU Position Data" }, |
| 729 | + { 0x31, "Protocol Error" }, |
| 730 | + { 0x32, "Reason Code" }, |
| 731 | + { 0x33, "Receiver Diversity" }, |
| 732 | + { 0x34, "Replacement Unit Map" }, |
| 733 | + { 0x35, "Result Code" }, |
| 734 | + { 0x36, "RU Revision Data" }, |
| 735 | + { 0x38, "T3105" }, |
| 736 | + { 0x39, "Test Loop Setting" }, |
| 737 | + { 0x3a, "TF Mode" }, |
| 738 | + { 0x3b, "TF Compensation Value" }, |
| 739 | + { 0x3c, "Time Slot Number" }, |
| 740 | + { 0x3d, "TSC" }, |
| 741 | + { 0x3e, "RU Logical Id" }, |
| 742 | + { 0x3f, "RU Serial Number Data" }, |
| 743 | + { 0x40, "BTS Version" }, |
| 744 | + { 0x41, "OML IWD Version" }, |
| 745 | + { 0x42, "RWL IWD Version" }, |
| 746 | + { 0x43, "OML Function Map 1" }, |
| 747 | + { 0x44, "OML Function Map 2" }, |
| 748 | + { 0x45, "RSL Function Map 1" }, |
| 749 | + { 0x46, "RSL Function Map 2" }, |
| 750 | + { 0x47, "Extended Range Indicator" }, |
| 751 | + { 0x48, "Request Indicators" }, |
| 752 | + { 0x49, "DIP Alarm Condition Map" }, |
| 753 | + { 0x4a, "ES Incoming" }, |
| 754 | + { 0x4b, "ES Outgoing" }, |
| 755 | + { 0x4e, "SES Incoming" }, |
| 756 | + { 0x4f, "SES Outgoing" }, |
| 757 | + { 0x50, "Replacement Unit Map Extension" }, |
| 758 | + { 0x52, "UAS Incoming" }, |
| 759 | + { 0x53, "UAS Outgoing" }, |
| 760 | + { 0x58, "DF Incoming" }, |
| 761 | + { 0x5a, "DF Outgoing" }, |
| 762 | + { 0x5c, "SF" }, |
| 763 | + { 0x60, "S Bits Setting" }, |
| 764 | + { 0x61, "CRC-4 Use Option" }, |
| 765 | + { 0x62, "T Parameter" }, |
| 766 | + { 0x63, "N Parameter" }, |
| 767 | + { 0x64, "N1 Parameter" }, |
| 768 | + { 0x65, "N3 Parameter" }, |
| 769 | + { 0x66, "N4 Parameter" }, |
| 770 | + { 0x67, "P Parameter" }, |
| 771 | + { 0x68, "Q Parameter" }, |
| 772 | + { 0x69, "BI_Q1" }, |
| 773 | + { 0x6a, "BI_Q2" }, |
| 774 | + { 0x74, "ICM Boundary Parameters" }, |
| 775 | + { 0x77, "AFT" }, |
| 776 | + { 0x78, "AFT RAI" }, |
| 777 | + { 0x79, "Link Supervision Control" }, |
| 778 | + { 0x7a, "Link Supervision Filtering Time" }, |
| 779 | + { 0x7b, "Call Supervision Time" }, |
| 780 | + { 0x7c, "Interval Length UAS Incoming" }, |
| 781 | + { 0x7d, "Interval Length UAS Outgoing" }, |
| 782 | + { 0x7e, "ICM Channel Rate" }, |
| 783 | + { 0x7f, "Attribute Identifier" }, |
| 784 | + { 0x80, "FM Frequency List" }, |
| 785 | + { 0x81, "FM Frequency Report" }, |
| 786 | + { 0x82, "FM Percentile" }, |
| 787 | + { 0x83, "FM Clear Indication" }, |
| 788 | + { 0x84, "HW Info Signature" }, |
| 789 | + { 0x85, "MO Record" }, |
| 790 | + { 0x86, "TF Synchronisation Source" }, |
| 791 | + { 0x87, "TTA" }, |
| 792 | + { 0x88, "End Segment Number" }, |
| 793 | + { 0x89, "Segment Number" }, |
| 794 | + { 0x8a, "Capabilities Signature" }, |
| 795 | + { 0x8c, "File Relation List" }, |
| 796 | + { 0x90, "Negotiation Record I" }, |
| 797 | + { 0x91, "Negotiation Record II" }, |
| 798 | + { 0x92, "Encryption Algorithm" }, |
| 799 | + { 0x94, "Interference Rejection Combining" }, |
| 800 | + { 0x95, "Dedication Information" }, |
| 801 | + { 0x97, "Feature Code" }, |
| 802 | + { 0x98, "FS Offset" }, |
| 803 | + { 0x99, "ESB Timeslot" }, |
| 804 | + { 0x9a, "Master TG Instance" }, |
| 805 | + { 0x9b, "Master TX Chain Delay" }, |
| 806 | + { 0x9c, "External Condition Class 2 Extension" }, |
| 807 | + { 0x9d, "TSs MO State" }, |
| 808 | + { 0, NULL } |
| 809 | +}; |
| 810 | + |
| 811 | +static const value_string om2k_diversity_vals[] = { |
| 812 | + { 0x01, "B receiver side" }, |
| 813 | + { 0x02, "A receiver side" }, |
| 814 | + { 0x03, "A+B receiver sides" }, |
| 815 | + { 0x04, "A+B+C+D receiver sides" }, |
| 816 | + { 0, NULL } |
| 817 | +}; |
| 818 | + |
| 819 | +static const value_string om2k_oip_vals[] = { |
| 820 | + { 0x00, "Not Operational" }, |
| 821 | + { 0x01, "Operational" }, |
| 822 | + { 0, NULL } |
| 823 | +}; |
| 824 | + |
| 825 | +static const value_string om2k_aip_vals[] = { |
| 826 | + { 0x00, "Data according to request" }, |
| 827 | + { 0x01, "Data not according to request" }, |
| 828 | + { 0x02, "Inconsistent MO data" }, |
| 829 | + { 0x03, "Capability constraint violation" }, |
| 830 | + { 0, NULL } |
| 831 | +}; |
| 832 | + |
| 833 | +static const value_string om2k_comb_vals[] = { |
| 834 | + { 0x03, "SDCCH/8 + SACCH/C8" }, |
| 835 | + { 0x04, "BCCH, non-combined" }, |
| 836 | + { 0x05, "BCCH, combined (SDCCH/4)" }, |
| 837 | + { 0x08, "TCH Type, unspecified" }, |
| 838 | + { 0, NULL } |
| 839 | +}; |
| 840 | + |
| 841 | +static const value_string om2k_icmcr_vals[] = { |
| 842 | + { 0x00, "ICM as per TCH/F" }, |
| 843 | + { 0x01, "ICM as per TCH/H(0 and 1)" }, |
| 844 | + { 0, NULL } |
| 845 | +}; |
| 846 | + |
| 847 | +static const value_string om2k_ea_vals[] = { |
| 848 | + { 0x00, "A5/1 and A5/2" }, |
| 849 | + { 0x01, "A5/2 only" }, |
| 850 | + { 0, NULL } |
| 851 | +}; |
| 852 | + |
| 853 | +static const value_string om2k_fill_vals[] = { |
| 854 | + { 0x00, "Filling" }, |
| 855 | + { 0x01, "No filling" }, |
| 856 | + { 0, NULL } |
| 857 | +}; |
| 858 | + |
| 859 | +static const value_string om2k_mo_state_vals[] = { |
| 860 | + { 0x00, "RESET" }, |
| 861 | + { 0x01, "STARTED" }, |
| 862 | + { 0x02, "ENABLED" }, |
| 863 | + { 0x03, "DISABLED" }, |
| 864 | + { 0, NULL } |
| 865 | +}; |
| 866 | + |
| 867 | +static const value_string om2k_la_state_vals[] = { |
| 868 | + { 0x00, "LOCALLY CONNECTED" }, |
| 869 | + { 0x01, "LOCALLY DISCONNECTED" }, |
| 870 | + { 0, NULL } |
| 871 | +}; |
| 872 | + |
| 873 | +static const value_string filerel_state_vals[] = { |
| 874 | + { 0x00, "Not known in current state (unknown file)" }, |
| 875 | + { 0x01, "alllowed, already loaded" }, |
| 876 | + { 0x02, "allowed, not loaded" }, |
| 877 | + { 0x03, "not allowed" }, |
| 878 | + { 0, NULL } |
| 879 | +}; |
| 880 | + |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 881 | +static const value_string om2k_mo_class_short_vals[] = { |
| 882 | + { 0x01, "TRXC" }, |
| 883 | + { 0x03, "TS" }, |
| 884 | + { 0x04, "TF" }, |
| 885 | + { 0x05, "IS" }, |
| 886 | + { 0x06, "CON" }, |
| 887 | + { 0x0a, "CF" }, |
| 888 | + { 0x0b, "TX" }, |
| 889 | + { 0x0c, "RX" }, |
| 890 | + { 0, NULL } |
| 891 | +}; |
| 892 | + |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 893 | +static const value_string om2k_mo_class_vals[] = { |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 894 | + { 0x01, "TRXC (TRX Controller)" }, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 895 | + { 0x03, "TS (Timeslot)" }, |
| 896 | + { 0x04, "TF (Timing Function)" }, |
| 897 | + { 0x05, "IS (Interface Switch)" }, |
| 898 | + { 0x06, "CON (Concentrator)" }, |
| 899 | + { 0x0a, "CF (Central Function)" }, |
| 900 | + { 0x0b, "TX (Transmitter)" }, |
| 901 | + { 0x0c, "RX (Receiver)" }, |
| 902 | + { 0, NULL } |
| 903 | +}; |
| 904 | + |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 905 | +static const value_string om2k_tf_mode_vals[] = { |
| 906 | + { 0x00, "Master" }, |
| 907 | + { 0x01, "Standalone" }, |
| 908 | + { 0x02, "Slave" }, |
| 909 | + { 0xff, "Not defined" }, |
| 910 | + { 0, NULL } |
| 911 | +}; |
| 912 | + |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 913 | +static gint |
| 914 | +dissect_tss_mo_state(tvbuff_t *tvb, gint offset, packet_info *pinfo, |
| 915 | + proto_tree *tree) |
| 916 | +{ |
| 917 | + guint8 tmp; |
| 918 | + guint i = 0; |
| 919 | + |
| 920 | + for (i = 0; i < 8; i+= 2) { |
| 921 | + tmp = tvb_get_guint8(tvb, offset); |
| 922 | + proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp & 0xf, |
| 923 | + "Timslot %u MO State: %s", i, |
| 924 | + val_to_str(tmp & 0xf, om2k_mo_state_vals, "unknown (%02d)")); |
| 925 | + proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp >> 4, |
| 926 | + "Timslot %u MO State: %s", i+1, |
| 927 | + val_to_str(tmp >> 4, om2k_mo_state_vals, "unknown (%02d)")); |
| 928 | + offset++; |
| 929 | + } |
| 930 | + |
| 931 | + return offset; |
| 932 | +} |
| 933 | + |
| 934 | + |
| 935 | +static gint |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 936 | +dissect_om2k_time(tvbuff_t *tvb, gint offset, proto_tree *tree) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 937 | +{ |
| 938 | + nstime_t tmptime; |
| 939 | + time_t tval; |
| 940 | + struct tm _time; |
| 941 | + |
| 942 | + _time.tm_year = 100 + tvb_get_guint8(tvb, offset++); |
| 943 | + _time.tm_mon = tvb_get_guint8(tvb, offset++) -1; |
| 944 | + _time.tm_mday = tvb_get_guint8(tvb, offset++); |
| 945 | + _time.tm_hour = tvb_get_guint8(tvb, offset++); |
| 946 | + _time.tm_min = tvb_get_guint8(tvb, offset++); |
| 947 | + _time.tm_sec = tvb_get_guint8(tvb, offset++); |
| 948 | + _time.tm_isdst = -1; |
| 949 | + |
| 950 | + tval = mktime(&_time); |
| 951 | + tmptime.secs = tval; |
| 952 | + tmptime.nsecs = 0; |
| 953 | + |
| 954 | + proto_tree_add_time(tree, hf_om2k_cal_time, tvb, offset, 6, |
| 955 | + &tmptime); |
| 956 | + return 6; |
| 957 | +} |
| 958 | + |
| 959 | +static gint |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 960 | +dissect_om2k_attr_unkn(tvbuff_t *tvb, gint offset, gint len, gint iei, proto_tree *tree) |
| 961 | +{ |
| 962 | + proto_tree_add_bytes_format(tree, hf_om2k_unknown_val, tvb, |
| 963 | + offset, len, tvb_get_ptr(tvb, offset, len), |
| 964 | + "%s: %s", |
| 965 | + val_to_str(iei, om2k_attr_vals, "0x%02x"), |
| 966 | + tvb_bytes_to_str(tvb, offset, len)); |
| 967 | + return len; |
| 968 | +} |
| 969 | + |
| 970 | +static gint |
| 971 | +dissect_om2k_is_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) |
| 972 | +{ |
| 973 | + gint offset = base_offset; |
| 974 | + proto_item *ti; |
| 975 | + proto_tree *isl_tree; |
| 976 | + guint8 len = tvb_get_guint8(tvb, offset++); |
| 977 | + |
| 978 | + ti = proto_tree_add_item(tree, hf_om2k_isl, tvb, offset, len, FALSE); |
| 979 | + isl_tree = proto_item_add_subtree(ti, ett_om2k_isl); |
| 980 | + |
| 981 | + while (offset < base_offset + len) { |
| 982 | + proto_tree_add_item(isl_tree, hf_om2k_isl_icp1, tvb, |
| 983 | + offset, 2, FALSE); |
| 984 | + offset += 2; |
| 985 | + proto_tree_add_item(isl_tree, hf_om2k_isl_icp2, tvb, |
| 986 | + offset, 2, FALSE); |
| 987 | + offset += 2; |
| 988 | + proto_tree_add_item(isl_tree, hf_om2k_isl_ci, tvb, |
| 989 | + offset++, 1, FALSE); |
| 990 | + } |
| 991 | + return offset - base_offset; |
| 992 | +} |
| 993 | + |
| 994 | +static gint |
| 995 | +dissect_om2k_con_list(tvbuff_t *tvb, gint base_offset, proto_tree *tree) |
| 996 | +{ |
| 997 | + gint offset = base_offset; |
| 998 | + proto_item *ti; |
| 999 | + proto_tree *conl_tree; |
| 1000 | + guint8 len = tvb_get_guint8(tvb, offset++); |
| 1001 | + |
| 1002 | + ti = proto_tree_add_item(tree, hf_om2k_conl, tvb, offset, len, FALSE); |
| 1003 | + conl_tree = proto_item_add_subtree(ti, ett_om2k_conl); |
| 1004 | + |
| 1005 | + proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cgs, tvb, |
| 1006 | + offset++, 1, FALSE); |
| 1007 | + |
| 1008 | + while (offset < base_offset + len) { |
| 1009 | + guint8 nr_cps_cg = tvb_get_guint8(tvb, offset); |
| 1010 | + proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cps_cg, tvb, |
| 1011 | + offset++, 1, FALSE); |
| 1012 | + while (nr_cps_cg--) { |
| 1013 | + proto_tree_add_item(conl_tree, hf_om2k_conl_ccp, tvb, |
| 1014 | + offset, 2, FALSE); |
| 1015 | + offset += 2; |
| 1016 | + proto_tree_add_item(conl_tree, hf_om2k_conl_ci, tvb, |
| 1017 | + offset++, 1, FALSE); |
| 1018 | + proto_tree_add_item(conl_tree, hf_om2k_conl_tag, tvb, |
| 1019 | + offset++, 1, FALSE); |
| 1020 | + proto_tree_add_item(conl_tree, hf_om2k_conl_tei, tvb, |
| 1021 | + offset++, 1, FALSE); |
| 1022 | + } |
| 1023 | + } |
| 1024 | + return offset - base_offset; |
| 1025 | +} |
| 1026 | + |
| 1027 | + |
| 1028 | +static gint |
| 1029 | +dissect_om2k_attrs(tvbuff_t *tvb, gint base_offs, packet_info *pinfo, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1030 | + proto_tree *tree) |
| 1031 | +{ |
| 1032 | + int offset = base_offs; |
| 1033 | + |
| 1034 | + while (tvb_reported_length_remaining(tvb, offset) != 0) { |
| 1035 | + guint8 iei = tvb_get_guint8(tvb, offset++); |
| 1036 | + guint8 len, tmp; |
| 1037 | + switch (iei) { |
| 1038 | + case 0x00: /* Accordance Information */ |
| 1039 | + proto_tree_add_item(tree, hf_om2k_aip, tvb, |
| 1040 | + offset++, 1, FALSE); |
| 1041 | + break; |
| 1042 | + case 0x06: /* BCC */ |
| 1043 | + proto_tree_add_item(tree, hf_om2k_bcc, tvb, |
| 1044 | + offset++, 1, FALSE); |
| 1045 | + break; |
| 1046 | + case 0x07: /* BS_AG_BLKS_RES */ |
| 1047 | + proto_tree_add_item(tree, hf_om2k_bs_ag_blks_res, tvb, |
| 1048 | + offset++, 1, FALSE); |
| 1049 | + break; |
| 1050 | + case 0x09: /* BSIC */ |
| 1051 | + proto_tree_add_item(tree, hf_om2k_bsic, tvb, |
| 1052 | + offset++, 1, FALSE); |
| 1053 | + break; |
| 1054 | + case 0x0a: /* BS_PA_MFRMS */ |
| 1055 | + proto_tree_add_item(tree, hf_om2k_bs_pa_mfrms, tvb, |
| 1056 | + offset++, 1, FALSE); |
| 1057 | + break; |
| 1058 | + case 0x0b: /* CBCH indicator */ |
| 1059 | + proto_tree_add_item(tree, hf_om2k_cbi, tvb, |
| 1060 | + offset++, 1, FALSE); |
| 1061 | + break; |
| 1062 | + case 0x0c: /* CCCH Options */ |
| 1063 | + tmp = tvb_get_guint8(tvb, offset); |
| 1064 | + proto_tree_add_item(tree, hf_om2k_cr, tvb, |
| 1065 | + offset, 1, FALSE); |
| 1066 | + proto_tree_add_item(tree, hf_om2k_ipt3, tvb, |
| 1067 | + offset, 1, FALSE); |
| 1068 | + proto_tree_add_uint(tree, hf_om2k_aop, tvb, |
| 1069 | + offset, 1, (tmp & 0x3f) >> 2); |
| 1070 | + offset++; |
| 1071 | + break; |
| 1072 | + case 0x0d: /* Calendar Time */ |
| 1073 | + offset += dissect_om2k_time(tvb, offset, tree); |
| 1074 | + break; |
| 1075 | + case 0x0f: /* Combination */ |
| 1076 | + proto_tree_add_item(tree, hf_om2k_comb, tvb, |
| 1077 | + offset++, 1, FALSE); |
| 1078 | + break; |
| 1079 | + case 0x10: /* CON Connection List */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1080 | + offset += dissect_om2k_con_list(tvb, offset, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1081 | + break; |
| 1082 | + case 0x12: /* DRX_DEV_MAX */ |
| 1083 | + proto_tree_add_item(tree, hf_om2k_drx_dev_max, tvb, |
| 1084 | + offset++, 1, FALSE); |
| 1085 | + break; |
| 1086 | + case 0x13: /* End List Number */ |
| 1087 | + proto_tree_add_item(tree, hf_om2k_list_nr_end, tvb, |
| 1088 | + offset++, 1, FALSE); |
| 1089 | + break; |
| 1090 | + case 0x14: /* External Condition Map Class 1 */ |
| 1091 | + /* FIXME */ |
| 1092 | + case 0x15: /* External Condition Map Class 2 */ |
| 1093 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1094 | + offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1095 | + break; |
| 1096 | + case 0x16: /* File Relation Indication */ |
| 1097 | + proto_tree_add_item(tree, hf_om2k_filerel_ilr, tvb, |
| 1098 | + offset, 1, FALSE); |
| 1099 | + proto_tree_add_item(tree, hf_om2k_filerel_cur, tvb, |
| 1100 | + offset, 1, FALSE); |
| 1101 | + offset++; |
| 1102 | + proto_tree_add_item(tree, hf_om2k_filerel_other, tvb, |
| 1103 | + offset, 1, FALSE); |
| 1104 | + offset++; |
| 1105 | + break; |
| 1106 | + case 0x17: /* File Revision */ |
| 1107 | + proto_tree_add_item(tree, hf_om2k_file_rev, tvb, |
| 1108 | + offset, 8, FALSE); |
| 1109 | + offset += 8; |
| 1110 | + break; |
| 1111 | + case 0x1c: /* Filling Marker */ |
| 1112 | + proto_tree_add_item(tree, hf_om2k_fill_mark, tvb, |
| 1113 | + offset++, 1, FALSE); |
| 1114 | + break; |
| 1115 | + case 0x1d: /* FN Offset */ |
| 1116 | + proto_tree_add_item(tree, hf_om2k_fn_offs, tvb, |
| 1117 | + offset, 2, FALSE); |
| 1118 | + offset += 2; |
| 1119 | + break; |
| 1120 | + case 0x1e: /* Frequency List */ |
| 1121 | + len = tvb_get_guint8(tvb, offset++); |
| 1122 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1123 | + offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1124 | + break; |
| 1125 | + case 0x1f: /* Frequency Specifier Rx */ |
| 1126 | + /* FIXME */ |
| 1127 | + case 0x20: /* Frequency Specifier Rx */ |
| 1128 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1129 | + offset += dissect_om2k_attr_unkn(tvb, offset, 2, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1130 | + break; |
| 1131 | + case 0x21: /* HSN */ |
| 1132 | + proto_tree_add_item(tree, hf_om2k_hsn, tvb, |
| 1133 | + offset++, 1, FALSE); |
| 1134 | + break; |
| 1135 | + case 0x22: /* ICM */ |
| 1136 | + proto_tree_add_item(tree, hf_om2k_icm, tvb, |
| 1137 | + offset++, 1, FALSE); |
| 1138 | + break; |
| 1139 | + case 0x23: /* Internal Fault Map Class 1A */ |
| 1140 | + /* FIXME */ |
| 1141 | + case 0x24: /* Internal Fault Map Class 1B */ |
| 1142 | + /* FIXME */ |
| 1143 | + case 0x25: /* Internal Fault Map Class 2A */ |
| 1144 | + /* FIXME */ |
| 1145 | + case 0x26: /* Internal Fault Map Class 2A Ext */ |
| 1146 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1147 | + offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1148 | + break; |
| 1149 | + case 0x27: /* IS Connection List */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1150 | + offset += dissect_om2k_is_list(tvb, offset, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1151 | + break; |
| 1152 | + case 0x28: /* List Number */ |
| 1153 | + proto_tree_add_item(tree, hf_om2k_list_nr, tvb, |
| 1154 | + offset++, 1, FALSE); |
| 1155 | + break; |
| 1156 | + case 0x2a: /* Local Access State */ |
| 1157 | + proto_tree_add_item(tree, hf_om2k_la_state, tvb, |
| 1158 | + offset++, 1, FALSE); |
| 1159 | + break; |
| 1160 | + case 0x2b: /* MAIO */ |
| 1161 | + proto_tree_add_item(tree, hf_om2k_maio, tvb, |
| 1162 | + offset++, 1, FALSE); |
| 1163 | + break; |
| 1164 | + case 0x2c: /* MO State */ |
| 1165 | + proto_tree_add_item(tree, hf_om2k_mo_state, tvb, |
| 1166 | + offset++, 1, FALSE); |
| 1167 | + break; |
| 1168 | + case 0x2d: /* Ny1 */ |
| 1169 | + proto_tree_add_item(tree, hf_om2k_ny1, tvb, |
| 1170 | + offset++, 1, FALSE); |
| 1171 | + break; |
| 1172 | + case 0x2e: /* Operational Information */ |
| 1173 | + proto_tree_add_item(tree, hf_om2k_oip, tvb, |
| 1174 | + offset++, 1, FALSE); |
| 1175 | + break; |
| 1176 | + case 0x2f: /* Nominal Power */ |
| 1177 | + proto_tree_add_item(tree, hf_om2k_nom_pwr, tvb, |
| 1178 | + offset++, 1, FALSE); |
| 1179 | + break; |
| 1180 | + case 0x33: /* Receiver Diversity */ |
| 1181 | + proto_tree_add_item(tree, hf_om2k_diversity, tvb, |
| 1182 | + offset++, 1, FALSE); |
| 1183 | + break; |
| 1184 | + case 0x34: /* Replacement Unit Map */ |
| 1185 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1186 | + offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1187 | + break; |
| 1188 | + case 0x38: /* T3105 */ |
| 1189 | + proto_tree_add_item(tree, hf_om2k_t3105, tvb, |
| 1190 | + offset++, 1, FALSE); |
| 1191 | + break; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1192 | + case 0x3a: /* TF Mode */ |
| 1193 | + proto_tree_add_item(tree, hf_om2k_tf_mode, tvb, |
| 1194 | + offset++, 1, FALSE); |
| 1195 | + break; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1196 | + case 0x3c: /* TS Number */ |
| 1197 | + proto_tree_add_item(tree, hf_om2k_ts, tvb, |
| 1198 | + offset++, 1, FALSE); |
| 1199 | + break; |
| 1200 | + case 0x3d: /* TSC */ |
| 1201 | + proto_tree_add_item(tree, hf_om2k_tsc, tvb, |
| 1202 | + offset++, 1, FALSE); |
| 1203 | + break; |
| 1204 | + case 0x40: /* BTS Version */ |
| 1205 | + proto_tree_add_item(tree, hf_om2k_bts_manuf, tvb, |
| 1206 | + offset, 3, FALSE); |
| 1207 | + offset += 3; |
| 1208 | + proto_tree_add_item(tree, hf_om2k_bts_gen, tvb, |
| 1209 | + offset, 3, FALSE); |
| 1210 | + offset += 3; |
| 1211 | + proto_tree_add_item(tree, hf_om2k_bts_rev, tvb, |
| 1212 | + offset, 3, FALSE); |
| 1213 | + offset += 3; |
| 1214 | + proto_tree_add_item(tree, hf_om2k_bts_var, tvb, |
| 1215 | + offset, 3, FALSE); |
| 1216 | + offset += 3; |
| 1217 | + break; |
| 1218 | + case 0x43: /* OML Function Map 1 */ |
| 1219 | + case 0x44: /* OML Function Map 2 */ |
| 1220 | + case 0x45: /* RSL Function Map 1 */ |
| 1221 | + case 0x46: /* RSL Function Map 2 */ |
| 1222 | + len = tvb_get_guint8(tvb, offset++); |
| 1223 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1224 | + offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1225 | + break; |
| 1226 | + case 0x47: /* Ext Range */ |
| 1227 | + proto_tree_add_item(tree, hf_om2k_ext_range, tvb, |
| 1228 | + offset++, 1, FALSE); |
| 1229 | + break; |
| 1230 | + case 0x48: /* Request Indicators */ |
| 1231 | + proto_tree_add_item(tree, hf_om2k_brr, tvb, |
| 1232 | + offset, 1, FALSE); |
| 1233 | + proto_tree_add_item(tree, hf_om2k_bfr, tvb, |
| 1234 | + offset, 1, FALSE); |
| 1235 | + offset++; |
| 1236 | + break; |
| 1237 | + case 0x50: /* Replacement Unit Map Extension */ |
| 1238 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1239 | + offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1240 | + break; |
| 1241 | + case 0x74: /* ICM Boundary */ |
| 1242 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1243 | + offset += dissect_om2k_attr_unkn(tvb, offset, 5, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1244 | + break; |
| 1245 | + case 0x79: /* Link Supervision Control */ |
| 1246 | + proto_tree_add_item(tree, hf_om2k_lsc_fm, tvb, |
| 1247 | + offset, 1, FALSE); |
| 1248 | + proto_tree_add_item(tree, hf_om2k_lsc_lsi, tvb, |
| 1249 | + offset, 1, FALSE); |
| 1250 | + proto_tree_add_item(tree, hf_om2k_lsc_lsa, tvb, |
| 1251 | + offset, 1, FALSE); |
| 1252 | + offset++; |
| 1253 | + break; |
| 1254 | + case 0x7a: /* Link Supervision Control */ |
| 1255 | + proto_tree_add_item(tree, hf_om2k_ls_ft, tvb, |
| 1256 | + offset++, 1, FALSE); |
| 1257 | + break; |
| 1258 | + case 0x7b: /* Call Supervision Time */ |
| 1259 | + proto_tree_add_item(tree, hf_om2k_cst, tvb, |
| 1260 | + offset++, 1, FALSE); |
| 1261 | + break; |
| 1262 | + case 0x7e: /* ICM Channel Rate */ |
| 1263 | + proto_tree_add_item(tree, hf_om2k_icm_cr, tvb, |
| 1264 | + offset++, 1, FALSE); |
| 1265 | + break; |
| 1266 | + case 0x84: /* HW Info Signature */ |
| 1267 | + proto_tree_add_item(tree, hf_om2k_hwinfo_sig, tvb, |
| 1268 | + offset, 2, FALSE); |
| 1269 | + offset += 2; |
| 1270 | + break; |
| 1271 | + case 0x87: /* TTA */ |
| 1272 | + proto_tree_add_item(tree, hf_om2k_tta, tvb, |
| 1273 | + offset++, 1, FALSE); |
| 1274 | + break; |
| 1275 | + case 0x8a: /* Capabilities Signature */ |
| 1276 | + proto_tree_add_item(tree, hf_om2k_capa_sig, tvb, |
| 1277 | + offset, 2, FALSE); |
| 1278 | + offset += 2; |
| 1279 | + break; |
| 1280 | + case 0x90: /* Negotiation Record I */ |
| 1281 | + case 0x91: /* Negotiation Record II */ |
| 1282 | + len = tvb_get_guint8(tvb, offset++); |
| 1283 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1284 | + offset += dissect_om2k_attr_unkn(tvb, offset, len, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1285 | + break; |
| 1286 | + case 0x92: /* Encryption Algorithm */ |
| 1287 | + proto_tree_add_item(tree, hf_om2k_ea, tvb, |
| 1288 | + offset++, 1, FALSE); |
| 1289 | + break; |
| 1290 | + case 0x94: /* Interference Rejection Combining */ |
| 1291 | + proto_tree_add_item(tree, hf_om2k_irc, tvb, |
| 1292 | + offset++, 1, FALSE); |
| 1293 | + break; |
| 1294 | + case 0x95: /* Dedication information */ |
| 1295 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1296 | + offset += dissect_om2k_attr_unkn(tvb, offset, 3, iei, tree); |
| 1297 | + break; |
| 1298 | + case 0x98: /* FS Offset */ |
| 1299 | + proto_tree_add_item(tree, hf_om2k_tf_fs_offset, tvb, |
| 1300 | + offset, 5, FALSE); |
| 1301 | + offset += 5; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1302 | + break; |
| 1303 | + case 0x9c: /* External Condition Class 2 Extension */ |
| 1304 | + /* FIXME */ |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1305 | + offset += dissect_om2k_attr_unkn(tvb, offset, 4, iei, tree); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1306 | + break; |
| 1307 | + case 0x9d: /* TSs MO State */ |
| 1308 | + dissect_tss_mo_state(tvb, offset, pinfo, tree); |
| 1309 | + offset += 4; |
| 1310 | + break; |
| 1311 | + case 0x9e: |
| 1312 | + case 0x9f: |
| 1313 | + default: |
| 1314 | + tmp = tvb_get_guint8(tvb, offset); |
| 1315 | + proto_tree_add_uint_format(tree, hf_om2k_unknown_tag, tvb, |
| 1316 | + offset-1, 1, tmp, "Tag %s: 0x%02x", |
| 1317 | + val_to_str(iei, om2k_attr_vals, "0x%02x"), tmp); |
| 1318 | + offset++; |
| 1319 | + break; |
| 1320 | + } |
| 1321 | + } |
| 1322 | + |
| 1323 | + return offset; |
| 1324 | +} |
| 1325 | + |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1326 | +static guint |
| 1327 | +dissect_om2k_mo(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree) |
| 1328 | +{ |
| 1329 | + proto_item *ti; |
| 1330 | + proto_tree *mo_tree; |
| 1331 | + guint8 class = tvb_get_guint8(tvb, offset); |
| 1332 | + guint8 inst = tvb_get_guint8(tvb, offset+3); |
| 1333 | + |
| 1334 | + ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset, |
| 1335 | + 4, FALSE); |
| 1336 | + mo_tree = proto_item_add_subtree(ti, ett_om2k_mo); |
| 1337 | + proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset, |
| 1338 | + 1, FALSE); |
| 1339 | + proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3, |
| 1340 | + 1, FALSE); |
| 1341 | + proto_item_append_text(ti, ", Class: %s, Instance: %u", |
| 1342 | + val_to_str(class, om2k_mo_class_vals, "0x%02x"), |
| 1343 | + inst); |
| 1344 | + col_append_fstr(pinfo->cinfo, COL_INFO, ", (%-4s %u)", |
| 1345 | + val_to_str(class, &om2k_mo_class_short_vals, |
| 1346 | + "0x%02x"), inst); |
| 1347 | + return 4; |
| 1348 | +} |
| 1349 | + |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1350 | +static void |
| 1351 | +dissect_abis_om2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
| 1352 | +{ |
| 1353 | + proto_item *ti; |
| 1354 | + proto_tree *om2k_tree; |
| 1355 | + |
| 1356 | + int offset = 0; |
| 1357 | + |
| 1358 | + col_set_str(pinfo->cinfo, COL_PROTOCOL, "OM2000"); |
| 1359 | + |
| 1360 | + top_tree = tree; |
| 1361 | + if (tree) { |
| 1362 | + guint16 msg_code = tvb_get_ntohs(tvb, offset); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1363 | + guint8 tmp; |
| 1364 | + |
| 1365 | + ti = proto_tree_add_item(tree, proto_abis_om2000, |
| 1366 | + tvb, 0, -1, FALSE); |
| 1367 | + om2k_tree = proto_item_add_subtree(ti, ett_om2000); |
| 1368 | + |
| 1369 | + proto_tree_add_item(om2k_tree, hf_om2k_msg_code, tvb, offset, |
| 1370 | + 2, FALSE); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1371 | + offset += 2; |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1372 | + |
| 1373 | + offset += dissect_om2k_mo(tvb, offset, pinfo, om2k_tree); |
| 1374 | + |
| 1375 | + col_append_fstr(pinfo->cinfo, COL_INFO, " %s ", |
| 1376 | + val_to_str(msg_code, &om2k_msgcode_vals, |
| 1377 | + "unknown 0x%04x")); |
| 1378 | + proto_item_append_text(ti, " %s ", |
| 1379 | + val_to_str(msg_code, &om2k_msgcode_vals, |
| 1380 | + "unknown 0x%04x")); |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1381 | + |
| 1382 | + switch (msg_code) { |
| 1383 | + case 0x74: /* Operational Info */ |
| 1384 | + tmp = tvb_get_guint8(tvb, offset+1); |
| 1385 | + proto_item_append_text(ti, ": %s", |
| 1386 | + val_to_str(tmp, om2k_oip_vals, |
| 1387 | + "unknown 0x%02x")); |
| 1388 | + break; |
| 1389 | + case 0x1A: /* CON Configuration Result */ |
| 1390 | + case 0x66: /* IS Configuration Result */ |
| 1391 | + case 0x82: /* RX Configuration Result */ |
| 1392 | + case 0xA6: /* TF Configuration Result */ |
| 1393 | + case 0xAE: /* TS Configuration Result */ |
| 1394 | + case 0xB6: /* TX Configuration Result */ |
| 1395 | + case 0xE2: /* DP Configuration Result */ |
| 1396 | + case 0xF6: /* DP Configuration Result */ |
| 1397 | + tmp = tvb_get_guint8(tvb, offset+1); |
| 1398 | + proto_item_append_text(ti, ": %s", |
| 1399 | + val_to_str(tmp, om2k_aip_vals, |
| 1400 | + "unknown 0x%02x")); |
| 1401 | + break; |
| 1402 | + default: |
| 1403 | + break; |
| 1404 | + } |
| 1405 | + dissect_om2k_attrs(tvb, offset, pinfo, om2k_tree); |
| 1406 | + } |
| 1407 | +} |
| 1408 | + |
| 1409 | +void |
| 1410 | +proto_reg_handoff_abis_om2000(void); |
| 1411 | + |
| 1412 | +void |
| 1413 | +proto_register_abis_om2000(void) |
| 1414 | +{ |
| 1415 | + static hf_register_info hf[] = { |
| 1416 | + { &hf_om2k_msg_code, |
| 1417 | + { "Message Code", "om2000.msg_code", |
| 1418 | + FT_UINT16, BASE_HEX, VALS(om2k_msgcode_vals), 0, |
| 1419 | + NULL, HFILL } |
| 1420 | + }, |
| 1421 | + { &hf_om2k_mo_if, |
| 1422 | + { "MO Interface", "om2000.mo_if", |
| 1423 | + FT_BYTES, BASE_NONE, NULL, 0, |
| 1424 | + NULL, HFILL } |
| 1425 | + }, |
| 1426 | + { &hf_om2k_mo_class, |
| 1427 | + { "MO IF Class", "om2000.mo_if.class", |
| 1428 | + FT_UINT8, BASE_HEX, VALS(om2k_mo_class_vals), 0, |
| 1429 | + NULL, HFILL } |
| 1430 | + }, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1431 | + { &hf_om2k_mo_instance, |
| 1432 | + { "MO IF Instance", "om2000.mo_if.instance", |
| 1433 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1434 | + NULL, HFILL } |
| 1435 | + }, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1436 | + { &hf_om2k_oip, |
| 1437 | + { "OIP (Operational Info)", "om2000.oip", |
| 1438 | + FT_UINT8, BASE_HEX, VALS(om2k_oip_vals), 0, |
| 1439 | + "Operational Information Parameter", HFILL } |
| 1440 | + }, |
| 1441 | + { &hf_om2k_aip, |
| 1442 | + { "AIP (Accordance Info)", "om2000.aip", |
| 1443 | + FT_UINT8, BASE_HEX, VALS(om2k_aip_vals), 0, |
| 1444 | + "Accordance Information Parameter", HFILL } |
| 1445 | + }, |
| 1446 | + { &hf_om2k_comb, |
| 1447 | + { "Channel Combination", "om2000.chan_comb", |
| 1448 | + FT_UINT8, BASE_DEC, VALS(om2k_comb_vals), 0, |
| 1449 | + "Logical Channel Combination", HFILL } |
| 1450 | + }, |
| 1451 | + { &hf_om2k_ts, |
| 1452 | + { "Timeslot Number", "om2000.ts", |
| 1453 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1454 | + NULL, HFILL } |
| 1455 | + }, |
| 1456 | + { &hf_om2k_hsn, |
| 1457 | + { "HSN", "om2000.hsn", |
| 1458 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1459 | + "Hopping Sequence Number", HFILL } |
| 1460 | + }, |
| 1461 | + { &hf_om2k_maio, |
| 1462 | + { "MAIO", "om2000.maio", |
| 1463 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1464 | + "Mobile Allication Index Offset", HFILL } |
| 1465 | + }, |
| 1466 | + { &hf_om2k_bsic, |
| 1467 | + { "BSIC", "om2000.bsic", |
| 1468 | + FT_UINT8, BASE_HEX, NULL, 0, |
| 1469 | + "Base Station Identity Code", HFILL } |
| 1470 | + }, |
| 1471 | + { &hf_om2k_diversity, |
| 1472 | + { "Receiver Diversity", "om2000.diversity", |
| 1473 | + FT_UINT8, BASE_HEX, VALS(om2k_diversity_vals), 0, |
| 1474 | + NULL, HFILL } |
| 1475 | + }, |
| 1476 | + { &hf_om2k_fn_offs, |
| 1477 | + { "FN Offset", "om2000.fn_offset", |
| 1478 | + FT_UINT16, BASE_DEC, NULL, 0, |
| 1479 | + "GSM Frame Number Offset", HFILL } |
| 1480 | + }, |
| 1481 | + { &hf_om2k_ext_range, |
| 1482 | + { "Extended Range", "om2000.ext_range", |
| 1483 | + FT_BOOLEAN, 1, NULL, 0, |
| 1484 | + NULL, HFILL } |
| 1485 | + }, |
| 1486 | + { &hf_om2k_irc, |
| 1487 | + { "Interference Rejection Combining", "om2000.irc", |
| 1488 | + FT_BOOLEAN, 1, NULL, 0, |
| 1489 | + NULL, HFILL } |
| 1490 | + }, |
| 1491 | + { &hf_om2k_bs_pa_mfrms, |
| 1492 | + { "BS_PA_MFRMS", "om2000.bs_pa_mfrms", |
| 1493 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1494 | + NULL, HFILL } |
| 1495 | + }, |
| 1496 | + { &hf_om2k_bs_ag_blks_res, |
| 1497 | + { "BS_AG_BLKS_RES", "om2000.bs_ag_blks_res", |
| 1498 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1499 | + NULL, HFILL } |
| 1500 | + }, |
| 1501 | + { &hf_om2k_drx_dev_max, |
| 1502 | + { "DRX_DEV_MAX", "om2000.drx_dev_max", |
| 1503 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1504 | + NULL, HFILL } |
| 1505 | + }, |
| 1506 | + { &hf_om2k_cr, |
| 1507 | + { "CCCH Repeat", "om2000.ccch_repeat", |
| 1508 | + FT_BOOLEAN, 1, NULL, 0, |
| 1509 | + NULL, HFILL } |
| 1510 | + }, |
| 1511 | + { &hf_om2k_ipt3, |
| 1512 | + { "Inhibit Paging Request Type 3", "om2000.ipt3", |
| 1513 | + FT_BOOLEAN, 2, NULL, 0, |
| 1514 | + NULL, HFILL } |
| 1515 | + }, |
| 1516 | + { &hf_om2k_aop, |
| 1517 | + { "Age Of Paging", "om2000.aop", |
| 1518 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1519 | + NULL, HFILL } |
| 1520 | + }, |
| 1521 | + { &hf_om2k_t3105, |
| 1522 | + { "T3105 (in 10ms)", "om2000.t3105", |
| 1523 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1524 | + NULL, HFILL } |
| 1525 | + }, |
| 1526 | + { &hf_om2k_ny1, |
| 1527 | + { "Ny1", "om2000.ny1", |
| 1528 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1529 | + NULL, HFILL } |
| 1530 | + }, |
| 1531 | + { &hf_om2k_cbi, |
| 1532 | + { "CBCH Indicator", "om2000.ny1", |
| 1533 | + FT_BOOLEAN, 1, NULL, 0, |
| 1534 | + NULL, HFILL } |
| 1535 | + }, |
| 1536 | + { &hf_om2k_tsc, |
| 1537 | + { "Training Sequence Code", "om2000.tsc", |
| 1538 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1539 | + NULL, HFILL } |
| 1540 | + }, |
| 1541 | + { &hf_om2k_icm, |
| 1542 | + { "Idle Channel Measurement", "om2000.icm", |
| 1543 | + FT_BOOLEAN, 1, NULL, 0, |
| 1544 | + NULL, HFILL } |
| 1545 | + }, |
| 1546 | + { &hf_om2k_tta, |
| 1547 | + { "Timer for Time Alignment", "om2000.tta", |
| 1548 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1549 | + NULL, HFILL } |
| 1550 | + }, |
| 1551 | + { &hf_om2k_icm_cr, |
| 1552 | + { "ICM Channel Rate", "om2000.icm_cr", |
| 1553 | + FT_BOOLEAN, 1, VALS(om2k_icmcr_vals), 0, |
| 1554 | + NULL, HFILL } |
| 1555 | + }, |
| 1556 | + { &hf_om2k_lsc_fm, |
| 1557 | + { "LSC Dummy Frequency Measurement", "om2000.lsc.fm", |
| 1558 | + FT_BOOLEAN, 0x80, NULL, 0, |
| 1559 | + NULL, HFILL } |
| 1560 | + }, |
| 1561 | + { &hf_om2k_lsc_lsi, |
| 1562 | + { "LSC Idle Channels", "om2000.ls.lsi", |
| 1563 | + FT_BOOLEAN, 0x01, NULL, 0, |
| 1564 | + NULL, HFILL } |
| 1565 | + }, |
| 1566 | + { &hf_om2k_lsc_lsa, |
| 1567 | + { "LSC Active Channels", "om2000.ls.lsa", |
| 1568 | + FT_BOOLEAN, 0x02, NULL, 0, |
| 1569 | + NULL, HFILL } |
| 1570 | + }, |
| 1571 | + { &hf_om2k_ls_ft, |
| 1572 | + { "Link Supervision Filtering Time (100ms)", "om2000.ls_ft", |
| 1573 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1574 | + NULL, HFILL } |
| 1575 | + }, |
| 1576 | + { &hf_om2k_cst, |
| 1577 | + { "Call Supervision Time (480ms)", "om2000.cst", |
| 1578 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1579 | + NULL, HFILL } |
| 1580 | + }, |
| 1581 | + { &hf_om2k_ea, |
| 1582 | + { "Encryption Algorithm", "om2000.ea", |
| 1583 | + FT_UINT8, BASE_DEC, VALS(om2k_ea_vals), 0, |
| 1584 | + NULL, HFILL } |
| 1585 | + }, |
| 1586 | + { &hf_om2k_nom_pwr, |
| 1587 | + { "Nominal Power (dBm)", "om2000.pwr", |
| 1588 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1589 | + NULL, HFILL } |
| 1590 | + }, |
| 1591 | + { &hf_om2k_fill_mark, |
| 1592 | + { "Filling Marker", "om2000.filling", |
| 1593 | + FT_BOOLEAN, 0x01, VALS(om2k_fill_vals), 0, |
| 1594 | + NULL, HFILL } |
| 1595 | + }, |
| 1596 | + { &hf_om2k_bcc, |
| 1597 | + { "BCC", "om2000.bcc", |
| 1598 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1599 | + "Base Station Color Code", HFILL } |
| 1600 | + }, |
| 1601 | + { &hf_om2k_mo_state, |
| 1602 | + { "MO State", "om2000.mo_state", |
| 1603 | + FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, |
| 1604 | + NULL, HFILL } |
| 1605 | + }, |
| 1606 | + { &hf_om2k_la_state, |
| 1607 | + { "Local Access State", "om2000.la_state", |
| 1608 | + FT_UINT8, BASE_DEC, VALS(om2k_la_state_vals), 0, |
| 1609 | + NULL, HFILL } |
| 1610 | + }, |
| 1611 | + { &hf_om2k_tsn_state, |
| 1612 | + { "Time Slot N MO State", "om2000.tsn_mo_state", |
| 1613 | + FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0, |
| 1614 | + NULL, HFILL } |
| 1615 | + }, |
| 1616 | + { &hf_om2k_bts_manuf, |
| 1617 | + { "BTS Manufacturer ID", "om2000.bts_ver.manuf", |
| 1618 | + FT_STRING, BASE_NONE, NULL, 0, |
| 1619 | + NULL, HFILL } |
| 1620 | + }, |
| 1621 | + { &hf_om2k_bts_gen, |
| 1622 | + { "BTS Generation", "om2000.bts_ver.gen", |
| 1623 | + FT_STRING, BASE_NONE, NULL, 0, |
| 1624 | + NULL, HFILL } |
| 1625 | + }, |
| 1626 | + { &hf_om2k_bts_rev, |
| 1627 | + { "BTS Revision", "om2000.bts_ver.rev", |
| 1628 | + FT_STRING, BASE_NONE, NULL, 0, |
| 1629 | + NULL, HFILL } |
| 1630 | + }, |
| 1631 | + { &hf_om2k_bts_var, |
| 1632 | + { "BTS Variant", "om2000.bts_ver.variant", |
| 1633 | + FT_STRING, BASE_NONE, NULL, 0, |
| 1634 | + NULL, HFILL } |
| 1635 | + }, |
| 1636 | + { &hf_om2k_brr, |
| 1637 | + { "BTS Requested Restart", "om2000.brr", |
| 1638 | + FT_BOOLEAN, 0x01, NULL, 0, |
| 1639 | + NULL, HFILL } |
| 1640 | + }, |
| 1641 | + { &hf_om2k_bfr, |
| 1642 | + { "BTS Requested File Relation", "om2000.bfr", |
| 1643 | + FT_BOOLEAN, 0x01, NULL, 0, |
| 1644 | + NULL, HFILL } |
| 1645 | + }, |
| 1646 | + { &hf_om2k_hwinfo_sig, |
| 1647 | + { "HW Info Signature", "om2000.hwinfo_sig", |
| 1648 | + FT_UINT16, BASE_HEX, NULL, 0, |
| 1649 | + NULL, HFILL } |
| 1650 | + }, |
| 1651 | + { &hf_om2k_capa_sig, |
| 1652 | + { "Capabilities Signature", "om2000.capa_sig", |
| 1653 | + FT_UINT16, BASE_HEX, NULL, 0, |
| 1654 | + NULL, HFILL } |
| 1655 | + }, |
| 1656 | + |
| 1657 | + { &hf_om2k_unknown_tag, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1658 | + { "Unknown Tag", "om2000.unknown.tag", |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1659 | + FT_UINT8, BASE_HEX, NULL, 0, |
| 1660 | + NULL, HFILL } |
| 1661 | + }, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1662 | + { &hf_om2k_unknown_val, |
| 1663 | + { "Unknown Value", "om2000.unknown.val", |
| 1664 | + FT_BYTES, BASE_NONE, NULL, 0, |
| 1665 | + NULL, HFILL } |
| 1666 | + }, |
| 1667 | + |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1668 | + { &hf_om2k_file_rev, |
| 1669 | + { "File Revision", "om2000.file_rev", |
| 1670 | + FT_STRING, BASE_NONE, NULL, 0, |
| 1671 | + NULL, HFILL } |
| 1672 | + }, |
| 1673 | + { &hf_om2k_filerel_ilr, |
| 1674 | + { "Immediate Load Requested", "om2000.filerel.ilr", |
| 1675 | + FT_BOOLEAN, 0x08, NULL, 0, |
| 1676 | + NULL, HFILL } |
| 1677 | + }, |
| 1678 | + { &hf_om2k_filerel_cur, |
| 1679 | + { "Current State", "om2000.filerel.cur", |
| 1680 | + FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, |
| 1681 | + NULL, HFILL } |
| 1682 | + }, |
| 1683 | + { &hf_om2k_filerel_other, |
| 1684 | + { "Other State", "om2000.filerel.other", |
| 1685 | + FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07, |
| 1686 | + NULL, HFILL } |
| 1687 | + }, |
| 1688 | + { &hf_om2k_cal_time, |
| 1689 | + { "Calendar Time", "om2000.cal_time", |
| 1690 | + FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0, |
| 1691 | + NULL, HFILL } |
| 1692 | + }, |
| 1693 | + { &hf_om2k_list_nr, |
| 1694 | + { "List Number", "om2000.list_nr", |
| 1695 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1696 | + NULL, HFILL } |
| 1697 | + }, |
| 1698 | + { &hf_om2k_list_nr_end, |
| 1699 | + { "End List Number", "om2000.list_nr_end", |
| 1700 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1701 | + NULL, HFILL } |
| 1702 | + }, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1703 | + { &hf_om2k_isl, |
| 1704 | + { "IS Connection List", "om2000.is_list", |
| 1705 | + FT_BYTES, BASE_NONE, NULL, 0, |
| 1706 | + NULL, HFILL } |
| 1707 | + }, |
| 1708 | + { &hf_om2k_isl_icp1, |
| 1709 | + { "ICP1", "om2000.is_list.icp1", |
| 1710 | + FT_UINT16, BASE_DEC, NULL, 0x7ff, |
| 1711 | + NULL, HFILL } |
| 1712 | + }, |
| 1713 | + { &hf_om2k_isl_icp2, |
| 1714 | + { "ICP2", "om2000.is_list.icp2", |
| 1715 | + FT_UINT16, BASE_DEC, NULL, 0x7ff, |
| 1716 | + NULL, HFILL } |
| 1717 | + }, |
| 1718 | + { &hf_om2k_isl_ci, |
| 1719 | + { "Contiguity Index", "om2000.is_list.ci", |
| 1720 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1721 | + NULL, HFILL } |
| 1722 | + }, |
| 1723 | + { &hf_om2k_conl, |
| 1724 | + { "Connection List", "om2000.con_list", |
| 1725 | + FT_BYTES, BASE_NONE, NULL, 0, |
| 1726 | + NULL, HFILL } |
| 1727 | + }, |
| 1728 | + { &hf_om2k_conl_nr_cgs, |
| 1729 | + { "Number of CGs", "om2000.con_list.nr_cgs", |
| 1730 | + FT_UINT8, BASE_DEC, NULL, 0x1f, |
| 1731 | + "Number of Concentration Groups in the DE", HFILL } |
| 1732 | + }, |
| 1733 | + { &hf_om2k_conl_nr_cps_cg, |
| 1734 | + { "Number of CPS in CG", "om2000.con_list.nr_cps_cg", |
| 1735 | + FT_UINT8, BASE_DEC, NULL, 0x1f, |
| 1736 | + "Number of CPS in Concentration Group", HFILL } |
| 1737 | + }, |
| 1738 | + { &hf_om2k_conl_ccp, |
| 1739 | + { "CON Connection Point", "om2000.con_list.cpp", |
| 1740 | + FT_UINT16, BASE_DEC, NULL, 0x3ff, |
| 1741 | + NULL, HFILL } |
| 1742 | + }, |
| 1743 | + { &hf_om2k_conl_ci, |
| 1744 | + { "Contiguity Index", "om2000.con_list.ci", |
| 1745 | + FT_UINT8, BASE_DEC, NULL, 0x7, |
| 1746 | + NULL, HFILL } |
| 1747 | + }, |
| 1748 | + { &hf_om2k_conl_tag, |
| 1749 | + { "Tag", "om2000.con_list.tag", |
| 1750 | + FT_UINT8, BASE_DEC, NULL, 0x1f, |
| 1751 | + NULL, HFILL } |
| 1752 | + }, |
| 1753 | + { &hf_om2k_conl_tei, |
| 1754 | + { "TEI", "om2000.con_list.tei", |
| 1755 | + FT_UINT8, BASE_DEC, NULL, 0, |
| 1756 | + NULL, HFILL } |
| 1757 | + }, |
| 1758 | + { &hf_om2k_tf_mode, |
| 1759 | + { "TF Mode", "om2000.tf_mode", |
| 1760 | + FT_UINT8, BASE_HEX, VALS(om2k_tf_mode_vals), 0, |
| 1761 | + NULL, HFILL } |
| 1762 | + }, |
| 1763 | + { &hf_om2k_tf_fs_offset, |
| 1764 | + { "TF FS Offset", "om2000.tf_fs_offset", |
| 1765 | + FT_UINT64, BASE_DEC, NULL, 0, |
| 1766 | + NULL, HFILL } |
| 1767 | + }, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1768 | + }; |
| 1769 | + static gint *ett[] = { |
| 1770 | + &ett_om2000, |
Harald Welte | a36f0ed | 2010-11-29 22:05:34 +0100 | [diff] [blame] | 1771 | + &ett_om2k_mo, |
| 1772 | + &ett_om2k_isl, |
| 1773 | + &ett_om2k_conl, |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1774 | + }; |
| 1775 | + |
| 1776 | + module_t *oml_module; |
| 1777 | + |
| 1778 | + proto_abis_om2000 = proto_register_protocol("Ericsson A-bis OML", |
| 1779 | + "Ericsson OML", |
| 1780 | + "gsm_abis_om2000"); |
| 1781 | + |
| 1782 | + proto_register_field_array(proto_abis_om2000, hf, array_length(hf)); |
| 1783 | + |
| 1784 | + proto_register_subtree_array(ett, array_length(ett)); |
| 1785 | + |
| 1786 | + register_dissector("gsm_abis_om2000", dissect_abis_om2000, |
| 1787 | + proto_abis_om2000); |
| 1788 | +#if 0 |
| 1789 | + oml_module = prefs_register_protocol(proto_abis_oml, proto_reg_handoff_abis_oml); |
| 1790 | + prefs_register_bool_preference(oml_module, "use_ipaccess_oml", |
| 1791 | + "Use nanoBTS definitions", |
| 1792 | + "Use ipaccess nanoBTS specific definitions for OML", |
| 1793 | + &global_oml_use_nano_bts); |
| 1794 | +#endif |
| 1795 | +} |
| 1796 | + |
| 1797 | +/* This function is called once at startup and every time the user hits |
| 1798 | + * 'apply' in the preferences dialogue */ |
| 1799 | +void |
| 1800 | +proto_reg_handoff_abis_om2000(void) |
| 1801 | +{ |
| 1802 | + static gboolean initialized = FALSE; |
| 1803 | + |
| 1804 | + if (!initialized) { |
| 1805 | + dissector_handle_t abis_om2k_handle; |
| 1806 | + |
| 1807 | + abis_om2k_handle = create_dissector_handle(dissect_abis_om2000, |
| 1808 | + proto_abis_om2000); |
| 1809 | + //dissector_add("lapd.gsm.sapi", LAPD_GSM_SAPI_OM_PROC, abis_oml_handle); |
| 1810 | + } else { |
| 1811 | + /* preferences have been changed */ |
| 1812 | + } |
| 1813 | +} |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1814 | diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c |
| 1815 | index f0b69e7..46a9fad 100644 |
| 1816 | --- a/epan/dissectors/packet-gsm_abis_oml.c |
| 1817 | +++ b/epan/dissectors/packet-gsm_abis_oml.c |
| 1818 | @@ -119,9 +119,12 @@ static int ett_oml_fom_att = -1; |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1819 | |
| 1820 | /* Decode things as nanoBTS traces */ |
| 1821 | static gboolean global_oml_use_nano_bts = TRUE; |
| 1822 | +static gboolean global_oml_use_ericsson = TRUE; |
| 1823 | |
| 1824 | static proto_tree *top_tree; |
| 1825 | |
| 1826 | +static dissector_handle_t sub_om2000; |
| 1827 | + |
| 1828 | /* TS 12.21 Chapter 8.1 / TS 08.59 */ |
| 1829 | static const value_string oml_msg_disc_vals[] = { |
| 1830 | { ABIS_OM_MDISC_FOM, "Formatted O&M" }, |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1831 | @@ -1196,6 +1199,7 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1832 | top_tree = tree; |
| 1833 | if (tree) { |
| 1834 | u_int8_t msg_disc = tvb_get_guint8(tvb, offset); |
| 1835 | + u_int8_t len = tvb_get_guint8(tvb, offset+3); |
| 1836 | |
| 1837 | ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, FALSE); |
| 1838 | oml_tree = proto_item_add_subtree(ti, ett_oml); |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1839 | @@ -1209,6 +1213,14 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1840 | proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++, |
| 1841 | 1, TRUE); |
| 1842 | |
| 1843 | + if (global_oml_use_ericsson == TRUE) { |
| 1844 | + tvbuff_t *subtvb; |
| 1845 | + subtvb = tvb_new_subset(tvb, offset, len, len); |
| 1846 | + |
| 1847 | + if (sub_om2000) |
| 1848 | + call_dissector(sub_om2000, subtvb, pinfo, tree); |
| 1849 | + } else { |
| 1850 | + |
| 1851 | switch (msg_disc) { |
| 1852 | case ABIS_OM_MDISC_FOM: |
| 1853 | offset = dissect_oml_fom(tvb, pinfo, oml_tree, |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1854 | @@ -1222,6 +1234,8 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1855 | default: |
| 1856 | break; |
| 1857 | } |
| 1858 | + |
| 1859 | + } |
| 1860 | } |
| 1861 | } |
| 1862 | |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1863 | @@ -1569,6 +1583,11 @@ proto_register_abis_oml(void) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1864 | "Use nanoBTS definitions", |
| 1865 | "Use ipaccess nanoBTS specific definitions for OML", |
| 1866 | &global_oml_use_nano_bts); |
| 1867 | + |
| 1868 | + prefs_register_bool_preference(oml_module, "use_ericsson_oml", |
| 1869 | + "Use Ericsson definitions", |
| 1870 | + "Use Ericsson A-bis OML (OM2000) definitions for OML", |
| 1871 | + &global_oml_use_ericsson); |
| 1872 | } |
| 1873 | |
| 1874 | /* This function is called once at startup and every time the user hits |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1875 | @@ -1605,4 +1624,6 @@ proto_reg_handoff_abis_oml(void) |
Harald Welte | 0326cd5 | 2010-11-29 16:32:47 +0100 | [diff] [blame] | 1876 | oml_fom_attr_vse._vs_num_entries = |
| 1877 | array_length(oml_fom_attr_vals_bs11)-1; |
| 1878 | } |
| 1879 | + |
| 1880 | + sub_om2000 = find_dissector("gsm_abis_om2000"); |
| 1881 | } |
Holger Hans Peter Freyther | 9b5f1d7 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1882 | diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c |
| 1883 | index 4380bbc..0ebcd9d 100644 |
| 1884 | --- a/epan/dissectors/packet-l2tp.c |
| 1885 | +++ b/epan/dissectors/packet-l2tp.c |
| 1886 | @@ -148,6 +148,7 @@ static enum_val_t l2tpv3_cookies[] = { |
| 1887 | #define L2TPv3_PROTOCOL_AAL5 6 |
| 1888 | #define L2TPv3_PROTOCOL_LAPD 7 |
| 1889 | #define L2TPv3_PROTOCOL_DOCSIS_DMPT 8 |
| 1890 | +#define L2TPv3_PROTOCOL_ERICSSON 9 |
| 1891 | |
| 1892 | static enum_val_t l2tpv3_protocols[] = { |
| 1893 | {"eth", "Ethernet", L2TPv3_PROTOCOL_ETH}, |
| 1894 | @@ -159,6 +160,7 @@ static enum_val_t l2tpv3_protocols[] = { |
| 1895 | {"aal5", "AAL5", L2TPv3_PROTOCOL_AAL5}, |
| 1896 | {"lapd", "LAPD", L2TPv3_PROTOCOL_LAPD}, |
| 1897 | {"docsis-dmpt", "DOCSIS-DMPT", L2TPv3_PROTOCOL_DOCSIS_DMPT}, |
| 1898 | + {"ehdlc", "Ericsson HDLC", L2TPv3_PROTOCOL_ERICSSON}, |
| 1899 | {NULL, NULL, 0} |
| 1900 | }; |
| 1901 | |
| 1902 | @@ -583,6 +585,7 @@ static dissector_handle_t atm_oam_handle; |
| 1903 | static dissector_handle_t llc_handle; |
| 1904 | static dissector_handle_t lapd_handle; |
| 1905 | static dissector_handle_t mp2t_handle; |
| 1906 | +static dissector_handle_t ehdlc_handle; |
| 1907 | static dissector_handle_t data_handle; |
| 1908 | |
| 1909 | /* |
| 1910 | @@ -1498,6 +1501,9 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
| 1911 | case L2TPv3_PROTOCOL_LAPD: |
| 1912 | call_dissector(lapd_handle, next_tvb, pinfo, tree); |
| 1913 | break; |
| 1914 | + case L2TPv3_PROTOCOL_ERICSSON: |
| 1915 | + call_dissector(ehdlc_handle, next_tvb, pinfo, tree); |
| 1916 | + break; |
| 1917 | default: |
| 1918 | call_dissector(data_handle, next_tvb, pinfo, tree); |
| 1919 | break; |
| 1920 | @@ -2171,5 +2177,6 @@ proto_reg_handoff_l2tp(void) |
| 1921 | llc_handle = find_dissector("llc"); |
| 1922 | lapd_handle = find_dissector("lapd"); |
| 1923 | mp2t_handle = find_dissector("mp2t"); |
| 1924 | + ehdlc_handle = find_dissector("ehdlc"); |
| 1925 | data_handle = find_dissector("data"); |
| 1926 | } |
| 1927 | -- |
| 1928 | 1.7.3.4 |
| 1929 | |