1 /* packet-abis_om2000.c
2 * Routines for packet dissection of Ericsson A-bis OML (OM 2000)
3 * Copyright 2010-2012 by Harald Welte <laforge@gnumonks.org>
7 * This dissector is not 100% complete, i.e. there are a number of FIXMEs
8 * indicating where portions of the protocol are not dissected completely.
9 * However, even a partial protocol decode is much more useful than no protocol
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 #include <epan/packet.h>
36 #include <epan/emem.h>
37 #include <epan/lapd_sapi.h>
39 #include "packet-gsm_a_common.h"
43 /* initialize the protocol and registered fields */
44 static int proto_abis_om2000
= -1;
46 static int hf_om2k_msg_code
= -1;
47 static int hf_om2k_mo_if
= -1;
48 static int hf_om2k_mo_class
= -1;
49 static int hf_om2k_mo_sub1
= -1;
50 static int hf_om2k_mo_sub2
= -1;
51 static int hf_om2k_mo_instance
= -1;
53 static int hf_om2k_aip
= -1;
54 static int hf_om2k_oip
= -1;
55 static int hf_om2k_comb
= -1;
56 static int hf_om2k_ts
= -1;
57 static int hf_om2k_hsn
= -1;
58 static int hf_om2k_maio
= -1;
59 static int hf_om2k_bsic
= -1;
60 static int hf_om2k_diversity
= -1;
61 static int hf_om2k_fn_offs
= -1;
62 static int hf_om2k_ext_range
= -1;
63 static int hf_om2k_irc
= -1;
64 static int hf_om2k_bs_pa_mfrms
= -1;
65 static int hf_om2k_bs_ag_blks_res
= -1;
66 static int hf_om2k_drx_dev_max
= -1;
67 static int hf_om2k_cr
= -1;
68 static int hf_om2k_ipt3
= -1;
69 static int hf_om2k_aop
= -1;
70 static int hf_om2k_t3105
= -1;
71 static int hf_om2k_ny1
= -1;
72 static int hf_om2k_cbi
= -1;
73 static int hf_om2k_tsc
= -1;
74 static int hf_om2k_icm
= -1;
75 static int hf_om2k_tta
= -1;
76 static int hf_om2k_icm_cr
= -1;
77 static int hf_om2k_lsc_fm
= -1;
78 static int hf_om2k_lsc_lsi
= -1;
79 static int hf_om2k_lsc_lsa
= -1;
80 static int hf_om2k_ls_ft
= -1;
81 static int hf_om2k_cst
= -1;
82 static int hf_om2k_ea
= -1;
83 static int hf_om2k_unknown_tag
= -1;
84 static int hf_om2k_unknown_val
= -1;
85 static int hf_om2k_nom_pwr
= -1;
86 static int hf_om2k_fill_mark
= -1;
87 static int hf_om2k_bcc
= -1;
88 static int hf_om2k_mo_state
= -1;
89 static int hf_om2k_la_state
= -1;
90 static int hf_om2k_tsn_state
= -1;
91 static int hf_om2k_bts_manuf
= -1;
92 static int hf_om2k_bts_gen
= -1;
93 static int hf_om2k_bts_rev
= -1;
94 static int hf_om2k_bts_var
= -1;
95 static int hf_om2k_brr
= -1;
96 static int hf_om2k_bfr
= -1;
97 static int hf_om2k_hwinfo_sig
= -1;
98 static int hf_om2k_capa_sig
= -1;
99 static int hf_om2k_file_rev
= -1;
100 static int hf_om2k_filerel_ilr
= -1;
101 static int hf_om2k_filerel_cur
= -1;
102 static int hf_om2k_filerel_other
= -1;
103 static int hf_om2k_cal_time
= -1;
104 static int hf_om2k_list_nr
= -1;
105 static int hf_om2k_list_nr_end
= -1;
106 static int hf_om2k_isl
= -1;
107 static int hf_om2k_isl_icp1
= -1;
108 static int hf_om2k_isl_icp2
= -1;
109 static int hf_om2k_isl_ci
= -1;
110 static int hf_om2k_conl
= -1;
111 static int hf_om2k_conl_nr_cgs
= -1;
112 static int hf_om2k_conl_nr_cps_cg
= -1;
113 static int hf_om2k_conl_ccp
= -1;
114 static int hf_om2k_conl_ci
= -1;
115 static int hf_om2k_conl_tag
= -1;
116 static int hf_om2k_conl_tei
= -1;
117 static int hf_om2k_tf_mode
= -1;
118 static int hf_om2k_tf_fs_offset
= -1;
120 /* initialize the subtree pointers */
121 static int ett_om2000
= -1;
122 static int ett_om2k_mo
= -1;
123 static int ett_om2k_isl
= -1;
124 static int ett_om2k_conl
= -1;
126 static const value_string om2k_msgcode_vals
[] = {
127 { 0x0000, "Abort SP Command" },
128 { 0x0002, "Abort SP Complete" },
129 { 0x0004, "Alarm Report ACK" },
130 { 0x0005, "Alarm Report NACK" },
131 { 0x0006, "Alarm Report" },
132 { 0x0008, "Alarm Status Request" },
133 { 0x000a, "Alarm Status Request Accept" },
134 { 0x000b, "Alarm Status Request Reject" },
135 { 0x000c, "Alarm Status Result ACK" },
136 { 0x000d, "Alarm Status Result NACK" },
137 { 0x000e, "Alarm Status Result" },
138 { 0x0010, "Calendar Time Response" },
139 { 0x0011, "Calendar Time Reject" },
140 { 0x0012, "Calendar Time Request" },
141 { 0x0014, "CON Configuration Request" },
142 { 0x0016, "CON Configuration Request Accept" },
143 { 0x0017, "CON Configuration Request Reject" },
144 { 0x0018, "CON Configuration Result ACK" },
145 { 0x0019, "CON Configuration Result NACK" },
146 { 0x001a, "CON Configuration Result" },
147 { 0x001c, "Connect Command" },
148 { 0x001e, "Connect Complete" },
149 { 0x001f, "Connect Rejecte" },
150 { 0x0028, "Disable Request" },
151 { 0x002a, "Disable Request Accept" },
152 { 0x002b, "Disable Request Reject" },
153 { 0x002c, "Disable Result ACK" },
154 { 0x002d, "Disable Result NACK" },
155 { 0x002e, "Disable Result" },
156 { 0x0030, "Disconnect Command" },
157 { 0x0032, "Disconnect Complete" },
158 { 0x0033, "Disconnect Reject" },
159 { 0x0034, "Enable Request" },
160 { 0x0036, "Enable Request Accept" },
161 { 0x0037, "Enable Request Reject" },
162 { 0x0038, "Enable Result ACK" },
163 { 0x0039, "Enable Result NACK" },
164 { 0x003a, "Enable Result" },
165 { 0x003c, "Escape Downlink Normal" },
166 { 0x003d, "Escape Downlink NACK" },
167 { 0x003e, "Escape Uplink Normal" },
168 { 0x003f, "Escape Uplink NACK" },
169 { 0x0040, "Fault Report ACK" },
170 { 0x0041, "Fault Report NACK" },
171 { 0x0042, "Fault Report" },
172 { 0x0044, "File Package End Command" },
173 { 0x0046, "File Package End Result" },
174 { 0x0047, "File Package End Reject" },
175 { 0x0048, "File Relation Request" },
176 { 0x004a, "File Relation Response" },
177 { 0x004b, "File Relation Request Reject" },
178 { 0x004c, "File Segment Transfer" },
179 { 0x004e, "File Segment Transfer Complete" },
180 { 0x004f, "File Segment Transfer Reject" },
181 { 0x0050, "HW Information Request" },
182 { 0x0052, "HW Information Request Accept" },
183 { 0x0053, "HW Information Request Reject" },
184 { 0x0054, "HW Information Result ACK" },
185 { 0x0055, "HW Information Result NACK" },
186 { 0x0056, "HW Information Result" },
187 { 0x0060, "IS Configuration Request" },
188 { 0x0062, "IS Configuration Request Accept" },
189 { 0x0063, "IS Configuration Request Reject" },
190 { 0x0064, "IS Configuration Result ACK" },
191 { 0x0065, "IS Configuration Result NACK" },
192 { 0x0066, "IS Configuration Result" },
193 { 0x0068, "Load Data End" },
194 { 0x006a, "Load Data End Result" },
195 { 0x006b, "Load Data End Reject" },
196 { 0x006c, "Load Data Init" },
197 { 0x006e, "Load Data Init Accept" },
198 { 0x006f, "Load Data Init Reject" },
199 { 0x0070, "Loop Control Command" },
200 { 0x0072, "Loop Control Complete" },
201 { 0x0073, "Loop Control Reject" },
202 { 0x0074, "Operational Information" },
203 { 0x0076, "Operational Information Accept" },
204 { 0x0077, "Operational Information Reject" },
205 { 0x0078, "Reset Command" },
206 { 0x007a, "Reset Complete" },
207 { 0x007b, "Reset Reject" },
208 { 0x007c, "RX Configuration Request" },
209 { 0x007e, "RX Configuration Request Accept" },
210 { 0x007f, "RX Configuration Request Reject" },
211 { 0x0080, "RX Configuration Result ACK" },
212 { 0x0081, "RX Configuration Result NACK" },
213 { 0x0082, "RX Configuration Result" },
214 { 0x0084, "Start Request" },
215 { 0x0086, "Start Request Accept" },
216 { 0x0087, "Start Request Reject" },
217 { 0x0088, "Start Result ACK" },
218 { 0x0089, "Start Result NACK" },
219 { 0x008a, "Start Result" },
220 { 0x008c, "Status Request" },
221 { 0x008e, "Status Response" },
222 { 0x008f, "Status Reject" },
223 { 0x0094, "Test Request" },
224 { 0x0096, "Test Request Accept" },
225 { 0x0097, "Test Request Reject" },
226 { 0x0098, "Test Result ACK" },
227 { 0x0099, "Test Result NACK" },
228 { 0x009a, "Test Result" },
229 { 0x00a0, "TF Configuration Request" },
230 { 0x00a2, "TF Configuration Request Accept" },
231 { 0x00a3, "TF Configuration Request Reject" },
232 { 0x00a4, "TF Configuration Result ACK" },
233 { 0x00a5, "TF Configuration Result NACK" },
234 { 0x00a6, "TF Configuration Result" },
235 { 0x00a8, "TS Configuration Request" },
236 { 0x00aa, "TS Configuration Request Accept" },
237 { 0x00ab, "TS Configuration Request Reject" },
238 { 0x00ac, "TS Configuration Result ACK" },
239 { 0x00ad, "TS Configuration Result NACK" },
240 { 0x00ae, "TS Configuration Result" },
241 { 0x00b0, "TX Configuration Request" },
242 { 0x00b2, "TX Configuration Request Accept" },
243 { 0x00b3, "TX Configuration Request Reject" },
244 { 0x00b4, "TX Configuration Result ACK" },
245 { 0x00b5, "TX Configuration Result NACK" },
246 { 0x00b6, "TX Configuration Result" },
247 { 0x00bc, "DIP Alarm Report ACK" },
248 { 0x00bd, "DIP Alarm Report NACK" },
249 { 0x00be, "DIP Alarm Report" },
250 { 0x00c0, "DIP Alarm Status Request" },
251 { 0x00c2, "DIP Alarm Status Response" },
252 { 0x00c3, "DIP Alarm Status Reject" },
253 { 0x00c4, "DIP Quality Report I ACK" },
254 { 0x00c5, "DIP Quality Report I NACK" },
255 { 0x00c6, "DIP Quality Report I" },
256 { 0x00c8, "DIP Quality Report II ACK" },
257 { 0x00c9, "DIP Quality Report II NACK" },
258 { 0x00ca, "DIP Quality Report II" },
259 { 0x00dc, "DP Configuration Request" },
260 { 0x00de, "DP Configuration Request Accept" },
261 { 0x00df, "DP Configuration Request Reject" },
262 { 0x00e0, "DP Configuration Result ACK" },
263 { 0x00e1, "DP Configuration Result NACK" },
264 { 0x00e2, "DP Configuration Result" },
265 { 0x00e4, "Capabilities HW Info Report ACK" },
266 { 0x00e5, "Capabilities HW Info Report NACK" },
267 { 0x00e6, "Capabilities HW Info Report" },
268 { 0x00e8, "Capabilities Request" },
269 { 0x00ea, "Capabilities Request Accept" },
270 { 0x00eb, "Capabilities Request Reject" },
271 { 0x00ec, "Capabilities Result ACK" },
272 { 0x00ed, "Capabilities Result NACK" },
273 { 0x00ee, "Capabilities Result" },
274 { 0x00f0, "FM Configuration Request" },
275 { 0x00f2, "FM Configuration Request Accept" },
276 { 0x00f3, "FM Configuration Request Reject" },
277 { 0x00f4, "FM Configuration Result ACK" },
278 { 0x00f5, "FM Configuration Result NACK" },
279 { 0x00f6, "FM Configuration Result" },
280 { 0x00f8, "FM Report Request" },
281 { 0x00fa, "FM Report Response" },
282 { 0x00fb, "FM Report Reject" },
283 { 0x00fc, "FM Start Command" },
284 { 0x00fe, "FM Start Complete" },
285 { 0x00ff, "FM Start Reject" },
286 { 0x0100, "FM Stop Command" },
287 { 0x0102, "FM Stop Complete" },
288 { 0x0103, "FM Stop Reject" },
289 { 0x0104, "Negotiation Request ACK" },
290 { 0x0105, "Negotiation Request NACK" },
291 { 0x0106, "Negotiation Request" },
292 { 0x0108, "BTS Initiated Request ACK" },
293 { 0x0109, "BTS Initiated Request NACK" },
294 { 0x010a, "BTS Initiated Request" },
295 { 0x010c, "Radio Channels Release Command" },
296 { 0x010e, "Radio Channels Release Complete" },
297 { 0x010f, "Radio Channels Release Reject" },
298 { 0x0118, "Feature Control Command" },
299 { 0x011a, "Feature Control Complete" },
300 { 0x011b, "Feature Control Reject" },
304 static value_string_ext om2k_msgcode_vals_ext
= VALUE_STRING_EXT_INIT(om2k_msgcode_vals
);
306 /* TS 12.21 Section 9.4: Attributes */
307 static const value_string om2k_attr_vals
[] = {
308 { 0x00, "Accordance indication" },
309 { 0x01, "Alarm Id" },
310 { 0x02, "Alarm Data" },
311 { 0x03, "Alarm Severity" },
312 { 0x04, "Alarm Status" },
313 { 0x05, "Alarm Status Type" },
315 { 0x07, "BS_AG_BKS_RES" },
317 { 0x0a, "BA_PA_MFRMS" },
318 { 0x0b, "CBCH Indicator" },
319 { 0x0c, "CCCH Options" },
320 { 0x0d, "Calendar Time" },
321 { 0x0f, "Channel Combination" },
322 { 0x10, "CON Connection List" },
323 { 0x11, "Data End Indication" },
324 { 0x12, "DRX_DEV_MAX" },
325 { 0x13, "End List Number" },
326 { 0x14, "External Condition Map Class 1" },
327 { 0x15, "External Condition Map Class 2" },
328 { 0x16, "File Relation Indication" },
329 { 0x17, "File Revision" },
330 { 0x18, "File Segment Data" },
331 { 0x19, "File Segment Length" },
332 { 0x1a, "File Segment Sequence Number" },
333 { 0x1b, "File Size" },
334 { 0x1c, "Filling Marker" },
335 { 0x1d, "FN Offset" },
336 { 0x1e, "Frequency List" },
337 { 0x1f, "Frequency Specifier RX" },
338 { 0x20, "Frequency Specifier TX" },
340 { 0x22, "ICM Indicator" },
341 { 0x23, "Internal Fault Map Class 1A" },
342 { 0x24, "Internal Fault Map Class 1B" },
343 { 0x25, "Internal Fault Map Class 2A" },
344 { 0x26, "Internal Fault Map Class 2A Extension" },
345 { 0x27, "IS Connection List" },
346 { 0x28, "List Number" },
347 { 0x29, "File Package State Indication" },
348 { 0x2a, "Local Access State" },
350 { 0x2c, "MO State" },
352 { 0x2e, "Operational Information" },
354 { 0x30, "RU Position Data" },
355 { 0x31, "Protocol Error" },
356 { 0x32, "Reason Code" },
357 { 0x33, "Receiver Diversity" },
358 { 0x34, "Replacement Unit Map" },
359 { 0x35, "Result Code" },
360 { 0x36, "RU Revision Data" },
362 { 0x39, "Test Loop Setting" },
364 { 0x3b, "TF Compensation Value" },
365 { 0x3c, "Time Slot Number" },
367 { 0x3e, "RU Logical Id" },
368 { 0x3f, "RU Serial Number Data" },
369 { 0x40, "BTS Version" },
370 { 0x41, "OML IWD Version" },
371 { 0x42, "RWL IWD Version" },
372 { 0x43, "OML Function Map 1" },
373 { 0x44, "OML Function Map 2" },
374 { 0x45, "RSL Function Map 1" },
375 { 0x46, "RSL Function Map 2" },
376 { 0x47, "Extended Range Indicator" },
377 { 0x48, "Request Indicators" },
378 { 0x49, "DIP Alarm Condition Map" },
379 { 0x4a, "ES Incoming" },
380 { 0x4b, "ES Outgoing" },
381 { 0x4e, "SES Incoming" },
382 { 0x4f, "SES Outgoing" },
383 { 0x50, "Replacement Unit Map Extension" },
384 { 0x52, "UAS Incoming" },
385 { 0x53, "UAS Outgoing" },
386 { 0x58, "DF Incoming" },
387 { 0x5a, "DF Outgoing" },
389 { 0x60, "S Bits Setting" },
390 { 0x61, "CRC-4 Use Option" },
391 { 0x62, "T Parameter" },
392 { 0x63, "N Parameter" },
393 { 0x64, "N1 Parameter" },
394 { 0x65, "N3 Parameter" },
395 { 0x66, "N4 Parameter" },
396 { 0x67, "P Parameter" },
397 { 0x68, "Q Parameter" },
400 { 0x74, "ICM Boundary Parameters" },
403 { 0x79, "Link Supervision Control" },
404 { 0x7a, "Link Supervision Filtering Time" },
405 { 0x7b, "Call Supervision Time" },
406 { 0x7c, "Interval Length UAS Incoming" },
407 { 0x7d, "Interval Length UAS Outgoing" },
408 { 0x7e, "ICM Channel Rate" },
409 { 0x7f, "Attribute Identifier" },
410 { 0x80, "FM Frequency List" },
411 { 0x81, "FM Frequency Report" },
412 { 0x82, "FM Percentile" },
413 { 0x83, "FM Clear Indication" },
414 { 0x84, "HW Info Signature" },
415 { 0x85, "MO Record" },
416 { 0x86, "TF Synchronisation Source" },
418 { 0x88, "End Segment Number" },
419 { 0x89, "Segment Number" },
420 { 0x8a, "Capabilities Signature" },
421 { 0x8c, "File Relation List" },
422 { 0x90, "Negotiation Record I" },
423 { 0x91, "Negotiation Record II" },
424 { 0x92, "Encryption Algorithm" },
425 { 0x94, "Interference Rejection Combining" },
426 { 0x95, "Dedication Information" },
427 { 0x97, "Feature Code" },
428 { 0x98, "FS Offset" },
429 { 0x99, "ESB Timeslot" },
430 { 0x9a, "Master TG Instance" },
431 { 0x9b, "Master TX Chain Delay" },
432 { 0x9c, "External Condition Class 2 Extension" },
433 { 0x9d, "TSs MO State" },
436 static value_string_ext om2k_attr_vals_ext
= VALUE_STRING_EXT_INIT(om2k_attr_vals
);
438 static const value_string om2k_diversity_vals
[] = {
439 { 0x01, "B receiver side" },
440 { 0x02, "A receiver side" },
441 { 0x03, "A+B receiver sides" },
442 { 0x04, "A+B+C+D receiver sides" },
446 static const value_string om2k_oip_vals
[] = {
447 { 0x00, "Not Operational" },
448 { 0x01, "Operational" },
452 static const value_string om2k_aip_vals
[] = {
453 { 0x00, "Data according to request" },
454 { 0x01, "Data not according to request" },
455 { 0x02, "Inconsistent MO data" },
456 { 0x03, "Capability constraint violation" },
460 static const value_string om2k_comb_vals
[] = {
461 { 0x03, "SDCCH/8 + SACCH/C8" },
462 { 0x04, "BCCH, non-combined" },
463 { 0x05, "BCCH, combined (SDCCH/4)" },
464 { 0x08, "TCH Type, unspecified" },
468 static const value_string om2k_icmcr_vals
[] = {
469 { 0x00, "ICM as per TCH/F" },
470 { 0x01, "ICM as per TCH/H(0 and 1)" },
474 static const value_string om2k_ea_vals
[] = {
475 { 0x00, "A5/1 and A5/2" },
476 { 0x01, "A5/2 only" },
480 static const value_string om2k_fill_vals
[] = {
482 { 0x01, "No filling" },
486 static const value_string om2k_mo_state_vals
[] = {
490 { 0x03, "DISABLED" },
494 static const value_string om2k_la_state_vals
[] = {
495 { 0x00, "LOCALLY CONNECTED" },
496 { 0x01, "LOCALLY DISCONNECTED" },
500 static const value_string filerel_state_vals
[] = {
501 { 0x00, "Not known in current state (unknown file)" },
502 { 0x01, "allowed, already loaded" },
503 { 0x02, "allowed, not loaded" },
504 { 0x03, "not allowed" },
508 static const value_string om2k_mo_class_short_vals
[] = {
520 static const value_string om2k_mo_class_vals
[] = {
521 { 0x01, "TRXC (TRX Controller)" },
522 { 0x03, "TS (Timeslot)" },
523 { 0x04, "TF (Timing Function)" },
524 { 0x05, "IS (Interface Switch)" },
525 { 0x06, "CON (Concentrator)" },
526 { 0x0a, "CF (Central Function)" },
527 { 0x0b, "TX (Transmitter)" },
528 { 0x0c, "RX (Receiver)" },
532 static const value_string om2k_tf_mode_vals
[] = {
534 { 0x01, "Standalone" },
536 { 0xff, "Not defined" },
541 dissect_tss_mo_state(tvbuff_t
*tvb
, gint offset
, proto_tree
*tree
)
546 for (i
= 0; i
< 8; i
+= 2) {
547 tmp
= tvb_get_guint8(tvb
, offset
);
548 proto_tree_add_uint_format(tree
, hf_om2k_tsn_state
, tvb
, offset
, 1, tmp
& 0xf,
549 "Timslot %u MO State: %s", i
,
550 val_to_str(tmp
& 0xf, om2k_mo_state_vals
, "unknown (%02d)"));
551 proto_tree_add_uint_format(tree
, hf_om2k_tsn_state
, tvb
, offset
, 1, tmp
>> 4,
552 "Timslot %u MO State: %s", i
+1,
553 val_to_str(tmp
>> 4, om2k_mo_state_vals
, "unknown (%02d)"));
562 dissect_om2k_time(tvbuff_t
*tvb
, gint offset
, proto_tree
*tree
)
568 _time
.tm_year
= 100 + tvb_get_guint8(tvb
, offset
++);
569 _time
.tm_mon
= tvb_get_guint8(tvb
, offset
++) - 1;
570 _time
.tm_mday
= tvb_get_guint8(tvb
, offset
++);
571 _time
.tm_hour
= tvb_get_guint8(tvb
, offset
++);
572 _time
.tm_min
= tvb_get_guint8(tvb
, offset
++);
573 _time
.tm_sec
= tvb_get_guint8(tvb
, offset
++);
576 tval
= mktime(&_time
);
580 proto_tree_add_time(tree
, hf_om2k_cal_time
, tvb
, offset
, 6,
586 dissect_om2k_attr_unkn(tvbuff_t
*tvb
, gint offset
, gint len
, gint iei
, proto_tree
*tree
)
588 proto_tree_add_bytes_format(tree
, hf_om2k_unknown_val
, tvb
,
591 val_to_str_ext(iei
, &om2k_attr_vals_ext
, "0x%02x"),
592 tvb_bytes_to_str(tvb
, offset
, len
));
597 dissect_om2k_is_list(tvbuff_t
*tvb
, gint base_offset
, proto_tree
*tree
)
599 gint offset
= base_offset
;
601 proto_tree
*isl_tree
;
602 guint8 len
= tvb_get_guint8(tvb
, offset
++);
604 ti
= proto_tree_add_item(tree
, hf_om2k_isl
, tvb
, offset
, len
, ENC_NA
);
605 isl_tree
= proto_item_add_subtree(ti
, ett_om2k_isl
);
607 while (offset
< base_offset
+ len
) {
608 proto_tree_add_item(isl_tree
, hf_om2k_isl_icp1
, tvb
,
609 offset
, 2, ENC_BIG_ENDIAN
);
611 proto_tree_add_item(isl_tree
, hf_om2k_isl_icp2
, tvb
,
612 offset
, 2, ENC_BIG_ENDIAN
);
614 proto_tree_add_item(isl_tree
, hf_om2k_isl_ci
, tvb
,
615 offset
++, 1, ENC_BIG_ENDIAN
);
617 return offset
- base_offset
;
621 dissect_om2k_con_list(tvbuff_t
*tvb
, gint base_offset
, proto_tree
*tree
)
623 gint offset
= base_offset
;
625 proto_tree
*conl_tree
;
626 guint8 len
= tvb_get_guint8(tvb
, offset
++);
628 ti
= proto_tree_add_item(tree
, hf_om2k_conl
, tvb
, offset
, len
, ENC_NA
);
629 conl_tree
= proto_item_add_subtree(ti
, ett_om2k_conl
);
631 proto_tree_add_item(conl_tree
, hf_om2k_conl_nr_cgs
, tvb
,
632 offset
++, 1, ENC_BIG_ENDIAN
);
634 while (offset
< base_offset
+ len
) {
635 guint8 nr_cps_cg
= tvb_get_guint8(tvb
, offset
);
636 proto_tree_add_item(conl_tree
, hf_om2k_conl_nr_cps_cg
, tvb
,
637 offset
++, 1, ENC_BIG_ENDIAN
);
638 while (nr_cps_cg
--) {
639 proto_tree_add_item(conl_tree
, hf_om2k_conl_ccp
, tvb
,
640 offset
, 2, ENC_BIG_ENDIAN
);
642 proto_tree_add_item(conl_tree
, hf_om2k_conl_ci
, tvb
,
643 offset
++, 1, ENC_BIG_ENDIAN
);
644 proto_tree_add_item(conl_tree
, hf_om2k_conl_tag
, tvb
,
645 offset
++, 1, ENC_BIG_ENDIAN
);
646 proto_tree_add_item(conl_tree
, hf_om2k_conl_tei
, tvb
,
647 offset
++, 1, ENC_BIG_ENDIAN
);
650 return offset
- base_offset
;
655 dissect_om2k_attrs(tvbuff_t
*tvb
, gint offset
, proto_tree
*tree
)
657 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
658 guint8 iei
= tvb_get_guint8(tvb
, offset
++);
662 case 0x00: /* Accordance Information */
663 proto_tree_add_item(tree
, hf_om2k_aip
, tvb
,
664 offset
++, 1, ENC_BIG_ENDIAN
);
667 proto_tree_add_item(tree
, hf_om2k_bcc
, tvb
,
668 offset
++, 1, ENC_BIG_ENDIAN
);
670 case 0x07: /* BS_AG_BLKS_RES */
671 proto_tree_add_item(tree
, hf_om2k_bs_ag_blks_res
, tvb
,
672 offset
++, 1, ENC_BIG_ENDIAN
);
674 case 0x09: /* BSIC */
675 proto_tree_add_item(tree
, hf_om2k_bsic
, tvb
,
676 offset
++, 1, ENC_BIG_ENDIAN
);
678 case 0x0a: /* BS_PA_MFRMS */
679 proto_tree_add_item(tree
, hf_om2k_bs_pa_mfrms
, tvb
,
680 offset
++, 1, ENC_BIG_ENDIAN
);
682 case 0x0b: /* CBCH indicator */
683 proto_tree_add_item(tree
, hf_om2k_cbi
, tvb
,
684 offset
++, 1, ENC_BIG_ENDIAN
);
686 case 0x0c: /* CCCH Options */
687 proto_tree_add_item(tree
, hf_om2k_cr
, tvb
,
688 offset
, 1, ENC_BIG_ENDIAN
);
689 proto_tree_add_item(tree
, hf_om2k_ipt3
, tvb
,
690 offset
, 1, ENC_BIG_ENDIAN
);
691 proto_tree_add_item(tree
, hf_om2k_aop
, tvb
,
692 offset
, 1, ENC_BIG_ENDIAN
);
695 case 0x0d: /* Calendar Time */
696 offset
+= dissect_om2k_time(tvb
, offset
, tree
);
698 case 0x0f: /* Combination */
699 proto_tree_add_item(tree
, hf_om2k_comb
, tvb
,
700 offset
++, 1, ENC_BIG_ENDIAN
);
702 case 0x10: /* CON Connection List */
703 offset
+= dissect_om2k_con_list(tvb
, offset
, tree
);
705 case 0x12: /* DRX_DEV_MAX */
706 proto_tree_add_item(tree
, hf_om2k_drx_dev_max
, tvb
,
707 offset
++, 1, ENC_BIG_ENDIAN
);
709 case 0x13: /* End List Number */
710 proto_tree_add_item(tree
, hf_om2k_list_nr_end
, tvb
,
711 offset
++, 1, ENC_BIG_ENDIAN
);
713 case 0x14: /* External Condition Map Class 1 */
715 case 0x15: /* External Condition Map Class 2 */
717 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 2, iei
, tree
);
719 case 0x16: /* File Relation Indication */
720 proto_tree_add_item(tree
, hf_om2k_filerel_ilr
, tvb
,
721 offset
, 1, ENC_BIG_ENDIAN
);
722 proto_tree_add_item(tree
, hf_om2k_filerel_cur
, tvb
,
723 offset
, 1, ENC_BIG_ENDIAN
);
725 proto_tree_add_item(tree
, hf_om2k_filerel_other
, tvb
,
726 offset
, 1, ENC_BIG_ENDIAN
);
729 case 0x17: /* File Revision */
730 proto_tree_add_item(tree
, hf_om2k_file_rev
, tvb
,
731 offset
, 8, ENC_ASCII
|ENC_NA
);
734 case 0x1c: /* Filling Marker */
735 proto_tree_add_item(tree
, hf_om2k_fill_mark
, tvb
,
736 offset
++, 1, ENC_BIG_ENDIAN
);
738 case 0x1d: /* FN Offset */
739 proto_tree_add_item(tree
, hf_om2k_fn_offs
, tvb
,
740 offset
, 2, ENC_BIG_ENDIAN
);
743 case 0x1e: /* Frequency List */
744 len
= tvb_get_guint8(tvb
, offset
++);
746 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, len
, iei
, tree
);
748 case 0x1f: /* Frequency Specifier Rx */
750 case 0x20: /* Frequency Specifier Rx */
752 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 2, iei
, tree
);
755 proto_tree_add_item(tree
, hf_om2k_hsn
, tvb
,
756 offset
++, 1, ENC_BIG_ENDIAN
);
759 proto_tree_add_item(tree
, hf_om2k_icm
, tvb
,
760 offset
++, 1, ENC_BIG_ENDIAN
);
762 case 0x23: /* Internal Fault Map Class 1A */
764 case 0x24: /* Internal Fault Map Class 1B */
766 case 0x25: /* Internal Fault Map Class 2A */
768 case 0x26: /* Internal Fault Map Class 2A Ext */
770 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 6, iei
, tree
);
772 case 0x27: /* IS Connection List */
773 offset
+= dissect_om2k_is_list(tvb
, offset
, tree
);
775 case 0x28: /* List Number */
776 proto_tree_add_item(tree
, hf_om2k_list_nr
, tvb
,
777 offset
++, 1, ENC_BIG_ENDIAN
);
779 case 0x2a: /* Local Access State */
780 proto_tree_add_item(tree
, hf_om2k_la_state
, tvb
,
781 offset
++, 1, ENC_BIG_ENDIAN
);
783 case 0x2b: /* MAIO */
784 proto_tree_add_item(tree
, hf_om2k_maio
, tvb
,
785 offset
++, 1, ENC_BIG_ENDIAN
);
787 case 0x2c: /* MO State */
788 proto_tree_add_item(tree
, hf_om2k_mo_state
, tvb
,
789 offset
++, 1, ENC_BIG_ENDIAN
);
792 proto_tree_add_item(tree
, hf_om2k_ny1
, tvb
,
793 offset
++, 1, ENC_BIG_ENDIAN
);
795 case 0x2e: /* Operational Information */
796 proto_tree_add_item(tree
, hf_om2k_oip
, tvb
,
797 offset
++, 1, ENC_BIG_ENDIAN
);
799 case 0x2f: /* Nominal Power */
800 proto_tree_add_item(tree
, hf_om2k_nom_pwr
, tvb
,
801 offset
++, 1, ENC_BIG_ENDIAN
);
803 case 0x33: /* Receiver Diversity */
804 proto_tree_add_item(tree
, hf_om2k_diversity
, tvb
,
805 offset
++, 1, ENC_BIG_ENDIAN
);
807 case 0x34: /* Replacement Unit Map */
809 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 6, iei
, tree
);
811 case 0x38: /* T3105 */
812 proto_tree_add_item(tree
, hf_om2k_t3105
, tvb
,
813 offset
++, 1, ENC_BIG_ENDIAN
);
815 case 0x3a: /* TF Mode */
816 proto_tree_add_item(tree
, hf_om2k_tf_mode
, tvb
,
817 offset
++, 1, ENC_BIG_ENDIAN
);
819 case 0x3c: /* TS Number */
820 proto_tree_add_item(tree
, hf_om2k_ts
, tvb
,
821 offset
++, 1, ENC_BIG_ENDIAN
);
824 proto_tree_add_item(tree
, hf_om2k_tsc
, tvb
,
825 offset
++, 1, ENC_BIG_ENDIAN
);
827 case 0x40: /* BTS Version */
828 proto_tree_add_item(tree
, hf_om2k_bts_manuf
, tvb
,
829 offset
, 3, ENC_ASCII
|ENC_NA
);
831 proto_tree_add_item(tree
, hf_om2k_bts_gen
, tvb
,
832 offset
, 3, ENC_ASCII
|ENC_NA
);
834 proto_tree_add_item(tree
, hf_om2k_bts_rev
, tvb
,
835 offset
, 3, ENC_ASCII
|ENC_NA
);
837 proto_tree_add_item(tree
, hf_om2k_bts_var
, tvb
,
838 offset
, 3, ENC_ASCII
|ENC_NA
);
841 case 0x43: /* OML Function Map 1 */
842 case 0x44: /* OML Function Map 2 */
843 case 0x45: /* RSL Function Map 1 */
844 case 0x46: /* RSL Function Map 2 */
845 len
= tvb_get_guint8(tvb
, offset
++);
847 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, len
, iei
, tree
);
849 case 0x47: /* Ext Range */
850 proto_tree_add_item(tree
, hf_om2k_ext_range
, tvb
,
851 offset
++, 1, ENC_BIG_ENDIAN
);
853 case 0x48: /* Request Indicators */
854 proto_tree_add_item(tree
, hf_om2k_brr
, tvb
,
855 offset
, 1, ENC_BIG_ENDIAN
);
856 proto_tree_add_item(tree
, hf_om2k_bfr
, tvb
,
857 offset
, 1, ENC_BIG_ENDIAN
);
860 case 0x50: /* Replacement Unit Map Extension */
862 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 6, iei
, tree
);
864 case 0x74: /* ICM Boundary */
866 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 5, iei
, tree
);
868 case 0x79: /* Link Supervision Control */
869 proto_tree_add_item(tree
, hf_om2k_lsc_fm
, tvb
,
870 offset
, 1, ENC_BIG_ENDIAN
);
871 proto_tree_add_item(tree
, hf_om2k_lsc_lsi
, tvb
,
872 offset
, 1, ENC_BIG_ENDIAN
);
873 proto_tree_add_item(tree
, hf_om2k_lsc_lsa
, tvb
,
874 offset
, 1, ENC_BIG_ENDIAN
);
877 case 0x7a: /* Link Supervision Control */
878 proto_tree_add_item(tree
, hf_om2k_ls_ft
, tvb
,
879 offset
++, 1, ENC_BIG_ENDIAN
);
881 case 0x7b: /* Call Supervision Time */
882 proto_tree_add_item(tree
, hf_om2k_cst
, tvb
,
883 offset
++, 1, ENC_BIG_ENDIAN
);
885 case 0x7e: /* ICM Channel Rate */
886 proto_tree_add_item(tree
, hf_om2k_icm_cr
, tvb
,
887 offset
++, 1, ENC_BIG_ENDIAN
);
889 case 0x84: /* HW Info Signature */
890 proto_tree_add_item(tree
, hf_om2k_hwinfo_sig
, tvb
,
891 offset
, 2, ENC_BIG_ENDIAN
);
895 proto_tree_add_item(tree
, hf_om2k_tta
, tvb
,
896 offset
++, 1, ENC_BIG_ENDIAN
);
898 case 0x8a: /* Capabilities Signature */
899 proto_tree_add_item(tree
, hf_om2k_capa_sig
, tvb
,
900 offset
, 2, ENC_BIG_ENDIAN
);
903 case 0x90: /* Negotiation Record I */
904 case 0x91: /* Negotiation Record II */
905 len
= tvb_get_guint8(tvb
, offset
++);
907 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, len
, iei
, tree
);
909 case 0x92: /* Encryption Algorithm */
910 proto_tree_add_item(tree
, hf_om2k_ea
, tvb
,
911 offset
++, 1, ENC_BIG_ENDIAN
);
913 case 0x94: /* Interference Rejection Combining */
914 proto_tree_add_item(tree
, hf_om2k_irc
, tvb
,
915 offset
++, 1, ENC_BIG_ENDIAN
);
917 case 0x95: /* Dedication information */
919 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 3, iei
, tree
);
921 case 0x98: /* FS Offset */
922 proto_tree_add_item(tree
, hf_om2k_tf_fs_offset
, tvb
,
923 offset
, 5, ENC_BIG_ENDIAN
);
926 case 0x9c: /* External Condition Class 2 Extension */
928 offset
+= dissect_om2k_attr_unkn(tvb
, offset
, 4, iei
, tree
);
930 case 0x9d: /* TSs MO State */
931 offset
+= dissect_tss_mo_state(tvb
, offset
, tree
);
936 tmp
= tvb_get_guint8(tvb
, offset
);
937 proto_tree_add_uint_format(tree
, hf_om2k_unknown_tag
, tvb
,
938 offset
-1, 1, tmp
, "Tag %s: 0x%02x",
939 val_to_str_ext(iei
, &om2k_attr_vals_ext
, "0x%02x"), tmp
);
949 dissect_om2k_mo(tvbuff_t
*tvb
, gint offset
, packet_info
*pinfo
, proto_tree
*tree
)
951 guint8 mo_class
= tvb_get_guint8(tvb
, offset
);
952 guint8 inst
= tvb_get_guint8(tvb
, offset
+3);
954 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", (%-4s %u)",
955 val_to_str(mo_class
, om2k_mo_class_short_vals
,
960 guint8 sub1
= tvb_get_guint8(tvb
, offset
+1);
961 guint8 sub2
= tvb_get_guint8(tvb
, offset
+2);
963 ti
= proto_tree_add_item(tree
, hf_om2k_mo_if
, tvb
, offset
,
965 mo_tree
= proto_item_add_subtree(ti
, ett_om2k_mo
);
966 proto_tree_add_item(mo_tree
, hf_om2k_mo_class
, tvb
, offset
,
968 proto_tree_add_item(mo_tree
, hf_om2k_mo_sub1
, tvb
, offset
+1,
970 proto_tree_add_item(mo_tree
, hf_om2k_mo_sub2
, tvb
, offset
+2,
972 proto_tree_add_item(mo_tree
, hf_om2k_mo_instance
, tvb
, offset
+3,
974 proto_item_append_text(ti
, ", Class: %s, Sub: %02x/%02x, Instance: %u",
975 val_to_str(mo_class
, om2k_mo_class_vals
, "0x%02x"),
982 dissect_abis_om2000(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
985 proto_tree
*om2k_tree
;
991 if ((tree
== NULL
) && (pinfo
->cinfo
== NULL
))
992 return; /* no dissection required */
994 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "OM2000");
995 /* Don't do col_clear() so this dissector can append to COL_INFO*/
999 ti
= proto_tree_add_item(tree
, proto_abis_om2000
,
1000 tvb
, 0, -1, ENC_NA
);
1001 om2k_tree
= proto_item_add_subtree(ti
, ett_om2000
);
1003 msg_code
= tvb_get_ntohs(tvb
, offset
);
1004 proto_tree_add_item(om2k_tree
, hf_om2k_msg_code
, tvb
, offset
,
1008 offset
+= dissect_om2k_mo(tvb
, offset
, pinfo
, om2k_tree
); /* appends to COL_INFO */
1010 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " %s ",
1011 val_to_str_ext(msg_code
, &om2k_msgcode_vals_ext
,
1015 return; /* No refs to COL_... beyond this point */
1017 proto_item_append_text(ti
, " %s ",
1018 val_to_str_ext(msg_code
, &om2k_msgcode_vals_ext
,
1022 case 0x74: /* Operational Info */
1023 tmp
= tvb_get_guint8(tvb
, offset
+1);
1024 proto_item_append_text(ti
, ": %s",
1025 val_to_str(tmp
, om2k_oip_vals
,
1028 case 0x1A: /* CON Configuration Result */
1029 case 0x66: /* IS Configuration Result */
1030 case 0x82: /* RX Configuration Result */
1031 case 0xA6: /* TF Configuration Result */
1032 case 0xAE: /* TS Configuration Result */
1033 case 0xB6: /* TX Configuration Result */
1034 case 0xE2: /* DP Configuration Result */
1035 case 0xF6: /* DP Configuration Result */
1036 tmp
= tvb_get_guint8(tvb
, offset
+1);
1037 proto_item_append_text(ti
, ": %s",
1038 val_to_str(tmp
, om2k_aip_vals
,
1044 dissect_om2k_attrs(tvb
, offset
, om2k_tree
);
1048 proto_register_abis_om2000(void)
1050 static hf_register_info hf
[] = {
1051 { &hf_om2k_msg_code
,
1052 { "Message Code", "gsm_abis_om2000.msg_code",
1053 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &om2k_msgcode_vals_ext
, 0,
1057 { "MO Interface", "gsm_abis_om2000.mo_if",
1058 FT_BYTES
, BASE_NONE
, NULL
, 0,
1061 { &hf_om2k_mo_class
,
1062 { "MO IF Class", "gsm_abis_om2000.mo_if.class",
1063 FT_UINT8
, BASE_HEX
, VALS(om2k_mo_class_vals
), 0,
1067 { "MO IF Sub 1", "gsm_abis_om2000.mo_if.sub1",
1068 FT_UINT8
, BASE_HEX
, NULL
, 0,
1072 { "MO IF Sub 2", "gsm_abis_om2000.mo_if.sub2",
1073 FT_UINT8
, BASE_HEX
, NULL
, 0,
1076 { &hf_om2k_mo_instance
,
1077 { "MO IF Instance", "gsm_abis_om2000.mo_if.instance",
1078 FT_UINT8
, BASE_DEC
, NULL
, 0,
1082 { "OIP (Operational Info)", "gsm_abis_om2000.oip",
1083 FT_UINT8
, BASE_HEX
, VALS(om2k_oip_vals
), 0,
1084 "Operational Information Parameter", HFILL
}
1087 { "AIP (Accordance Info)", "gsm_abis_om2000.aip",
1088 FT_UINT8
, BASE_HEX
, VALS(om2k_aip_vals
), 0,
1089 "Accordance Information Parameter", HFILL
}
1092 { "Channel Combination", "gsm_abis_om2000.chan_comb",
1093 FT_UINT8
, BASE_DEC
, VALS(om2k_comb_vals
), 0,
1094 "Logical Channel Combination", HFILL
}
1097 { "Timeslot Number", "gsm_abis_om2000.ts",
1098 FT_UINT8
, BASE_DEC
, NULL
, 0,
1102 { "HSN", "gsm_abis_om2000.hsn",
1103 FT_UINT8
, BASE_DEC
, NULL
, 0,
1104 "Hopping Sequence Number", HFILL
}
1107 { "MAIO", "gsm_abis_om2000.maio",
1108 FT_UINT8
, BASE_DEC
, NULL
, 0,
1109 "Mobile Allication Index Offset", HFILL
}
1112 { "BSIC", "gsm_abis_om2000.bsic",
1113 FT_UINT8
, BASE_HEX
, NULL
, 0,
1114 "Base Station Identity Code", HFILL
}
1116 { &hf_om2k_diversity
,
1117 { "Receiver Diversity", "gsm_abis_om2000.diversity",
1118 FT_UINT8
, BASE_HEX
, VALS(om2k_diversity_vals
), 0,
1122 { "FN Offset", "gsm_abis_om2000.fn_offset",
1123 FT_UINT16
, BASE_DEC
, NULL
, 0,
1124 "GSM Frame Number Offset", HFILL
}
1126 { &hf_om2k_ext_range
,
1127 { "Extended Range", "gsm_abis_om2000.ext_range",
1128 FT_BOOLEAN
, 1, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01' ? */
1132 { "Interference Rejection Combining", "gsm_abis_om2000.irc",
1133 FT_BOOLEAN
, 1, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1136 { &hf_om2k_bs_pa_mfrms
,
1137 { "BS_PA_MFRMS", "gsm_abis_om2000.bs_pa_mfrms",
1138 FT_UINT8
, BASE_DEC
, NULL
, 0,
1141 { &hf_om2k_bs_ag_blks_res
,
1142 { "BS_AG_BLKS_RES", "gsm_abis_om2000.bs_ag_blks_res",
1143 FT_UINT8
, BASE_DEC
, NULL
, 0,
1146 { &hf_om2k_drx_dev_max
,
1147 { "DRX_DEV_MAX", "gsm_abis_om2000.drx_dev_max",
1148 FT_UINT8
, BASE_DEC
, NULL
, 0,
1152 { "CCCH Repeat", "gsm_abis_om2000.ccch_repeat",
1153 FT_BOOLEAN
, 1, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1157 { "Inhibit Paging Request Type 3", "gsm_abis_om2000.ipt3",
1158 FT_BOOLEAN
, 2, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x02,' ? */
1162 { "Age Of Paging", "gsm_abis_om2000.aop",
1163 FT_UINT8
, BASE_DEC
, NULL
, 0x3C, /* XXX: Verify bitmask */
1167 { "T3105 (in 10ms)", "gsm_abis_om2000.t3105",
1168 FT_UINT8
, BASE_DEC
, NULL
, 0,
1172 { "Ny1", "gsm_abis_om2000.ny1",
1173 FT_UINT8
, BASE_DEC
, NULL
, 0,
1177 { "CBCH Indicator", "gsm_abis_om2000.cbi",
1178 FT_BOOLEAN
, 1, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1182 { "Training Sequence Code", "gsm_abis_om2000.tsc",
1183 FT_UINT8
, BASE_DEC
, NULL
, 0,
1187 { "Idle Channel Measurement", "gsm_abis_om2000.icm",
1188 FT_BOOLEAN
, 1, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1192 { "Timer for Time Alignment", "gsm_abis_om2000.tta",
1193 FT_UINT8
, BASE_DEC
, NULL
, 0,
1197 { "ICM Channel Rate", "gsm_abis_om2000.icm_cr",
1198 FT_UINT8
, BASE_DEC
, VALS(om2k_icmcr_vals
), 0,
1202 { "LSC Dummy Frequency Measurement", "gsm_abis_om2000.lsc.fm",
1203 FT_BOOLEAN
, 8, NULL
, 0x80,
1207 { "LSC Idle Channels", "gsm_abis_om2000.ls.lsi",
1208 FT_BOOLEAN
, 8, NULL
, 0x01,
1212 { "LSC Active Channels", "gsm_abis_om2000.ls.lsa",
1213 FT_BOOLEAN
, 8, NULL
, 0x02,
1217 { "Link Supervision Filtering Time (100ms)", "gsm_abis_om2000.ls_ft",
1218 FT_UINT8
, BASE_DEC
, NULL
, 0,
1222 { "Call Supervision Time (480ms)", "gsm_abis_om2000.cst",
1223 FT_UINT8
, BASE_DEC
, NULL
, 0,
1227 { "Encryption Algorithm", "gsm_abis_om2000.ea",
1228 FT_UINT8
, BASE_DEC
, VALS(om2k_ea_vals
), 0,
1232 { "Nominal Power (dBm)", "gsm_abis_om2000.pwr",
1233 FT_UINT8
, BASE_DEC
, NULL
, 0,
1236 { &hf_om2k_fill_mark
,
1237 { "Filling Marker", "gsm_abis_om2000.filling",
1238 FT_UINT8
, BASE_DEC
, VALS(om2k_fill_vals
), 0,
1242 { "BCC", "gsm_abis_om2000.bcc",
1243 FT_UINT8
, BASE_DEC
, NULL
, 0,
1244 "Base Station Color Code", HFILL
}
1246 { &hf_om2k_mo_state
,
1247 { "MO State", "gsm_abis_om2000.mo_state",
1248 FT_UINT8
, BASE_DEC
, VALS(om2k_mo_state_vals
), 0,
1251 { &hf_om2k_la_state
,
1252 { "Local Access State", "gsm_abis_om2000.la_state",
1253 FT_UINT8
, BASE_DEC
, VALS(om2k_la_state_vals
), 0,
1256 { &hf_om2k_tsn_state
,
1257 { "Time Slot N MO State", "gsm_abis_om2000.tsn_mo_state",
1258 FT_UINT8
, BASE_DEC
, VALS(om2k_mo_state_vals
), 0,
1261 { &hf_om2k_bts_manuf
,
1262 { "BTS Manufacturer ID", "gsm_abis_om2000.bts_ver.manuf",
1263 FT_STRING
, BASE_NONE
, NULL
, 0,
1267 { "BTS Generation", "gsm_abis_om2000.bts_ver.gen",
1268 FT_STRING
, BASE_NONE
, NULL
, 0,
1272 { "BTS Revision", "gsm_abis_om2000.bts_ver.rev",
1273 FT_STRING
, BASE_NONE
, NULL
, 0,
1277 { "BTS Variant", "gsm_abis_om2000.bts_ver.variant",
1278 FT_STRING
, BASE_NONE
, NULL
, 0,
1282 { "BTS Requested Restart", "gsm_abis_om2000.brr",
1283 FT_BOOLEAN
, 0x01, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x??,' ? */
1287 { "BTS Requested File Relation", "gsm_abis_om2000.bfr",
1288 FT_BOOLEAN
, 0x01, NULL
, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x??,' ? */
1291 { &hf_om2k_hwinfo_sig
,
1292 { "HW Info Signature", "gsm_abis_om2000.hwinfo_sig",
1293 FT_UINT16
, BASE_HEX
, NULL
, 0,
1296 { &hf_om2k_capa_sig
,
1297 { "Capabilities Signature", "gsm_abis_om2000.capa_sig",
1298 FT_UINT16
, BASE_HEX
, NULL
, 0,
1302 { &hf_om2k_unknown_tag
,
1303 { "Unknown Tag", "gsm_abis_om2000.unknown.tag",
1304 FT_UINT8
, BASE_HEX
, NULL
, 0,
1307 { &hf_om2k_unknown_val
,
1308 { "Unknown Value", "gsm_abis_om2000.unknown.val",
1309 FT_BYTES
, BASE_NONE
, NULL
, 0,
1313 { &hf_om2k_file_rev
,
1314 { "File Revision", "gsm_abis_om2000.file_rev",
1315 FT_STRING
, BASE_NONE
, NULL
, 0,
1318 { &hf_om2k_filerel_ilr
,
1319 { "Immediate Load Requested", "gsm_abis_om2000.filerel.ilr",
1320 FT_BOOLEAN
, 8, NULL
, 0x08,
1323 { &hf_om2k_filerel_cur
,
1324 { "Current State", "gsm_abis_om2000.filerel.cur",
1325 FT_UINT8
, BASE_HEX
, VALS(filerel_state_vals
), 0x07,
1328 { &hf_om2k_filerel_other
,
1329 { "Other State", "gsm_abis_om2000.filerel.other",
1330 FT_UINT8
, BASE_HEX
, VALS(filerel_state_vals
), 0x07,
1333 { &hf_om2k_cal_time
,
1334 { "Calendar Time", "gsm_abis_om2000.cal_time",
1335 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0,
1339 { "List Number", "gsm_abis_om2000.list_nr",
1340 FT_UINT8
, BASE_DEC
, NULL
, 0,
1343 { &hf_om2k_list_nr_end
,
1344 { "End List Number", "gsm_abis_om2000.list_nr_end",
1345 FT_UINT8
, BASE_DEC
, NULL
, 0,
1349 { "IS Connection List", "gsm_abis_om2000.is_list",
1350 FT_BYTES
, BASE_NONE
, NULL
, 0,
1353 { &hf_om2k_isl_icp1
,
1354 { "ICP1", "gsm_abis_om2000.is_list.icp1",
1355 FT_UINT16
, BASE_DEC
, NULL
, 0x7ff,
1358 { &hf_om2k_isl_icp2
,
1359 { "ICP2", "gsm_abis_om2000.is_list.icp2",
1360 FT_UINT16
, BASE_DEC
, NULL
, 0x7ff,
1364 { "Contiguity Index", "gsm_abis_om2000.is_list.ci",
1365 FT_UINT8
, BASE_DEC
, NULL
, 0,
1369 { "Connection List", "gsm_abis_om2000.con_list",
1370 FT_BYTES
, BASE_NONE
, NULL
, 0,
1373 { &hf_om2k_conl_nr_cgs
,
1374 { "Number of CGs", "gsm_abis_om2000.con_list.nr_cgs",
1375 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1376 "Number of Concentration Groups in the DE", HFILL
}
1378 { &hf_om2k_conl_nr_cps_cg
,
1379 { "Number of CPS in CG", "gsm_abis_om2000.con_list.nr_cps_cg",
1380 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1381 "Number of CPS in Concentration Group", HFILL
}
1383 { &hf_om2k_conl_ccp
,
1384 { "CON Connection Point", "gsm_abis_om2000.con_list.cpp",
1385 FT_UINT16
, BASE_DEC
, NULL
, 0x3ff,
1389 { "Contiguity Index", "gsm_abis_om2000.con_list.ci",
1390 FT_UINT8
, BASE_DEC
, NULL
, 0x7,
1393 { &hf_om2k_conl_tag
,
1394 { "Tag", "gsm_abis_om2000.con_list.tag",
1395 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1398 { &hf_om2k_conl_tei
,
1399 { "TEI", "gsm_abis_om2000.con_list.tei",
1400 FT_UINT8
, BASE_DEC
, NULL
, 0,
1404 { "TF Mode", "gsm_abis_om2000.tf_mode",
1405 FT_UINT8
, BASE_HEX
, VALS(om2k_tf_mode_vals
), 0,
1408 { &hf_om2k_tf_fs_offset
,
1409 { "TF FS Offset", "gsm_abis_om2000.tf_fs_offset",
1410 FT_UINT64
, BASE_DEC
, NULL
, 0,
1414 static gint
*ett
[] = {
1421 proto_abis_om2000
= proto_register_protocol("Ericsson A-bis OML",
1425 proto_register_field_array(proto_abis_om2000
, hf
, array_length(hf
));
1427 proto_register_subtree_array(ett
, array_length(ett
));
1429 register_dissector("gsm_abis_om2000", dissect_abis_om2000
,