Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-gsm_abis_om2000.c
blob12e549600d947d980fdd84ae5cf76644d8dcb7e4
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>
5 * This dissector is not 100% complete, i.e. there are a number of FIXMEs
6 * indicating where portions of the protocol are not dissected completely.
7 * However, even a partial protocol decode is much more useful than no protocol
8 * decode at all...
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include "config.h"
19 #include <epan/packet.h>
20 #include <epan/expert.h>
22 void proto_register_abis_om2000(void);
24 /* initialize the protocol and registered fields */
25 static int proto_abis_om2000;
27 static int hf_om2k_msg_code;
28 static int hf_om2k_mo_if;
29 static int hf_om2k_mo_class;
30 static int hf_om2k_mo_sub1;
31 static int hf_om2k_mo_sub2;
32 static int hf_om2k_mo_instance;
34 static int hf_om2k_aip;
35 static int hf_om2k_oip;
36 static int hf_om2k_comb;
37 static int hf_om2k_ts;
38 static int hf_om2k_hsn;
39 static int hf_om2k_maio;
40 static int hf_om2k_bsic;
41 static int hf_om2k_diversity;
42 static int hf_om2k_fn_offs;
43 static int hf_om2k_ext_range;
44 static int hf_om2k_irc;
45 static int hf_om2k_bs_pa_mfrms;
46 static int hf_om2k_bs_ag_blks_res;
47 static int hf_om2k_drx_dev_max;
48 static int hf_om2k_cr;
49 static int hf_om2k_ipt3;
50 static int hf_om2k_aop;
51 static int hf_om2k_t3105;
52 static int hf_om2k_ny1;
53 static int hf_om2k_cbi;
54 static int hf_om2k_tsc;
55 static int hf_om2k_icm;
56 static int hf_om2k_tta;
57 static int hf_om2k_icm_cr;
58 static int hf_om2k_lsc_fm;
59 static int hf_om2k_lsc_lsi;
60 static int hf_om2k_lsc_lsa;
61 static int hf_om2k_ls_ft;
62 static int hf_om2k_cst;
63 static int hf_om2k_ea;
64 static int hf_om2k_unknown_tag;
65 static int hf_om2k_unknown_val;
66 static int hf_om2k_nom_pwr;
67 static int hf_om2k_fill_mark;
68 static int hf_om2k_bcc;
69 static int hf_om2k_mo_state;
70 static int hf_om2k_la_state;
71 static int hf_om2k_tsn_state;
72 static int hf_om2k_bts_manuf;
73 static int hf_om2k_bts_gen;
74 static int hf_om2k_bts_rev;
75 static int hf_om2k_bts_var;
76 static int hf_om2k_brr;
77 static int hf_om2k_bfr;
78 static int hf_om2k_hwinfo_sig;
79 static int hf_om2k_capa_sig;
80 static int hf_om2k_file_rev;
81 static int hf_om2k_filerel_ilr;
82 static int hf_om2k_filerel_cur;
83 static int hf_om2k_filerel_other;
84 static int hf_om2k_cal_time;
85 static int hf_om2k_list_nr;
86 static int hf_om2k_list_nr_end;
87 static int hf_om2k_isl;
88 static int hf_om2k_isl_icp1;
89 static int hf_om2k_isl_icp2;
90 static int hf_om2k_isl_ci;
91 static int hf_om2k_conl;
92 static int hf_om2k_conl_nr_cgs;
93 static int hf_om2k_conl_nr_cps_cg;
94 static int hf_om2k_conl_ccp;
95 static int hf_om2k_conl_ci;
96 static int hf_om2k_conl_tag;
97 static int hf_om2k_conl_tei;
98 static int hf_om2k_tf_mode;
99 static int hf_om2k_tf_fs_offset;
100 static int hf_om2k_attr_id;
101 static int hf_om2k_attr_index;
102 static int hf_om2k_result_code;
103 static int hf_om2k_reason_code;
104 static int hf_om2k_iwd_type;
105 static int hf_om2k_iwd_gen_rev;
106 static int hf_om2k_trxc_list;
107 static int hf_om2k_max_allowed_power;
108 static int hf_om2k_max_allowed_num_trxcs;
109 static int hf_om2k_mctr_feat_sts_bitmap;
110 static int hf_om2k_config_type;
111 static int hf_om2k_jitter_size;
112 static int hf_om2k_packing_algo;
113 static int hf_om2k_power_bo_ctype_map;
114 static int hf_om2k_power_bo_priority;
115 static int hf_om2k_power_bo_value;
117 /* initialize the subtree pointers */
118 static int ett_om2000;
119 static int ett_om2k_mo;
120 static int ett_om2k_isl;
121 static int ett_om2k_conl;
122 static int ett_om2k_iwd;
124 static expert_field ei_om2k_not_performed;
125 static expert_field ei_om2k_reject;
126 static expert_field ei_om2k_nack;
127 static expert_field ei_om2k_ena_res_disabled;
129 static const value_string om2k_msgcode_vals[] = {
130 { 0x0000, "Abort SP Command" },
131 { 0x0002, "Abort SP Complete" },
132 { 0x0004, "Alarm Report ACK" },
133 { 0x0005, "Alarm Report NACK" },
134 { 0x0006, "Alarm Report" },
135 { 0x0008, "Alarm Status Request" },
136 { 0x000a, "Alarm Status Request Accept" },
137 { 0x000b, "Alarm Status Request Reject" },
138 { 0x000c, "Alarm Status Result ACK" },
139 { 0x000d, "Alarm Status Result NACK" },
140 { 0x000e, "Alarm Status Result" },
141 { 0x0010, "Calendar Time Response" },
142 { 0x0011, "Calendar Time Reject" },
143 { 0x0012, "Calendar Time Request" },
144 { 0x0014, "CON Configuration Request" },
145 { 0x0016, "CON Configuration Request Accept" },
146 { 0x0017, "CON Configuration Request Reject" },
147 { 0x0018, "CON Configuration Result ACK" },
148 { 0x0019, "CON Configuration Result NACK" },
149 { 0x001a, "CON Configuration Result" },
150 { 0x001c, "Connect Command" },
151 { 0x001e, "Connect Complete" },
152 { 0x001f, "Connect Reject" },
153 { 0x0028, "Disable Request" },
154 { 0x002a, "Disable Request Accept" },
155 { 0x002b, "Disable Request Reject" },
156 { 0x002c, "Disable Result ACK" },
157 { 0x002d, "Disable Result NACK" },
158 { 0x002e, "Disable Result" },
159 { 0x0030, "Disconnect Command" },
160 { 0x0032, "Disconnect Complete" },
161 { 0x0033, "Disconnect Reject" },
162 { 0x0034, "Enable Request" },
163 { 0x0036, "Enable Request Accept" },
164 { 0x0037, "Enable Request Reject" },
165 { 0x0038, "Enable Result ACK" },
166 { 0x0039, "Enable Result NACK" },
167 { 0x003a, "Enable Result" },
168 { 0x003c, "Escape Downlink Normal" },
169 { 0x003d, "Escape Downlink NACK" },
170 { 0x003e, "Escape Uplink Normal" },
171 { 0x003f, "Escape Uplink NACK" },
172 { 0x0040, "Fault Report ACK" },
173 { 0x0041, "Fault Report NACK" },
174 { 0x0042, "Fault Report" },
175 { 0x0044, "File Package End Command" },
176 { 0x0046, "File Package End Result" },
177 { 0x0047, "File Package End Reject" },
178 { 0x0048, "File Relation Request" },
179 { 0x004a, "File Relation Response" },
180 { 0x004b, "File Relation Request Reject" },
181 { 0x004c, "File Segment Transfer" },
182 { 0x004e, "File Segment Transfer Complete" },
183 { 0x004f, "File Segment Transfer Reject" },
184 { 0x0050, "HW Information Request" },
185 { 0x0052, "HW Information Request Accept" },
186 { 0x0053, "HW Information Request Reject" },
187 { 0x0054, "HW Information Result ACK" },
188 { 0x0055, "HW Information Result NACK" },
189 { 0x0056, "HW Information Result" },
190 { 0x0060, "IS Configuration Request" },
191 { 0x0062, "IS Configuration Request Accept" },
192 { 0x0063, "IS Configuration Request Reject" },
193 { 0x0064, "IS Configuration Result ACK" },
194 { 0x0065, "IS Configuration Result NACK" },
195 { 0x0066, "IS Configuration Result" },
196 { 0x0068, "Load Data End" },
197 { 0x006a, "Load Data End Result" },
198 { 0x006b, "Load Data End Reject" },
199 { 0x006c, "Load Data Init" },
200 { 0x006e, "Load Data Init Accept" },
201 { 0x006f, "Load Data Init Reject" },
202 { 0x0070, "Loop Control Command" },
203 { 0x0072, "Loop Control Complete" },
204 { 0x0073, "Loop Control Reject" },
205 { 0x0074, "Operational Information" },
206 { 0x0076, "Operational Information Accept" },
207 { 0x0077, "Operational Information Reject" },
208 { 0x0078, "Reset Command" },
209 { 0x007a, "Reset Complete" },
210 { 0x007b, "Reset Reject" },
211 { 0x007c, "RX Configuration Request" },
212 { 0x007e, "RX Configuration Request Accept" },
213 { 0x007f, "RX Configuration Request Reject" },
214 { 0x0080, "RX Configuration Result ACK" },
215 { 0x0081, "RX Configuration Result NACK" },
216 { 0x0082, "RX Configuration Result" },
217 { 0x0084, "Start Request" },
218 { 0x0086, "Start Request Accept" },
219 { 0x0087, "Start Request Reject" },
220 { 0x0088, "Start Result ACK" },
221 { 0x0089, "Start Result NACK" },
222 { 0x008a, "Start Result" },
223 { 0x008c, "Status Request" },
224 { 0x008e, "Status Response" },
225 { 0x008f, "Status Reject" },
226 { 0x0094, "Test Request" },
227 { 0x0096, "Test Request Accept" },
228 { 0x0097, "Test Request Reject" },
229 { 0x0098, "Test Result ACK" },
230 { 0x0099, "Test Result NACK" },
231 { 0x009a, "Test Result" },
232 { 0x00a0, "TF Configuration Request" },
233 { 0x00a2, "TF Configuration Request Accept" },
234 { 0x00a3, "TF Configuration Request Reject" },
235 { 0x00a4, "TF Configuration Result ACK" },
236 { 0x00a5, "TF Configuration Result NACK" },
237 { 0x00a6, "TF Configuration Result" },
238 { 0x00a8, "TS Configuration Request" },
239 { 0x00aa, "TS Configuration Request Accept" },
240 { 0x00ab, "TS Configuration Request Reject" },
241 { 0x00ac, "TS Configuration Result ACK" },
242 { 0x00ad, "TS Configuration Result NACK" },
243 { 0x00ae, "TS Configuration Result" },
244 { 0x00b0, "TX Configuration Request" },
245 { 0x00b2, "TX Configuration Request Accept" },
246 { 0x00b3, "TX Configuration Request Reject" },
247 { 0x00b4, "TX Configuration Result ACK" },
248 { 0x00b5, "TX Configuration Result NACK" },
249 { 0x00b6, "TX Configuration Result" },
250 { 0x00bc, "DIP Alarm Report ACK" },
251 { 0x00bd, "DIP Alarm Report NACK" },
252 { 0x00be, "DIP Alarm Report" },
253 { 0x00c0, "DIP Alarm Status Request" },
254 { 0x00c2, "DIP Alarm Status Response" },
255 { 0x00c3, "DIP Alarm Status Reject" },
256 { 0x00c4, "DIP Quality Report I ACK" },
257 { 0x00c5, "DIP Quality Report I NACK" },
258 { 0x00c6, "DIP Quality Report I" },
259 { 0x00c8, "DIP Quality Report II ACK" },
260 { 0x00c9, "DIP Quality Report II NACK" },
261 { 0x00ca, "DIP Quality Report II" },
262 { 0x00dc, "DP Configuration Request" },
263 { 0x00de, "DP Configuration Request Accept" },
264 { 0x00df, "DP Configuration Request Reject" },
265 { 0x00e0, "DP Configuration Result ACK" },
266 { 0x00e1, "DP Configuration Result NACK" },
267 { 0x00e2, "DP Configuration Result" },
268 { 0x00e4, "Capabilities HW Info Report ACK" },
269 { 0x00e5, "Capabilities HW Info Report NACK" },
270 { 0x00e6, "Capabilities HW Info Report" },
271 { 0x00e8, "Capabilities Request" },
272 { 0x00ea, "Capabilities Request Accept" },
273 { 0x00eb, "Capabilities Request Reject" },
274 { 0x00ec, "Capabilities Result ACK" },
275 { 0x00ed, "Capabilities Result NACK" },
276 { 0x00ee, "Capabilities Result" },
277 { 0x00f0, "FM Configuration Request" },
278 { 0x00f2, "FM Configuration Request Accept" },
279 { 0x00f3, "FM Configuration Request Reject" },
280 { 0x00f4, "FM Configuration Result ACK" },
281 { 0x00f5, "FM Configuration Result NACK" },
282 { 0x00f6, "FM Configuration Result" },
283 { 0x00f8, "FM Report Request" },
284 { 0x00fa, "FM Report Response" },
285 { 0x00fb, "FM Report Reject" },
286 { 0x00fc, "FM Start Command" },
287 { 0x00fe, "FM Start Complete" },
288 { 0x00ff, "FM Start Reject" },
289 { 0x0100, "FM Stop Command" },
290 { 0x0102, "FM Stop Complete" },
291 { 0x0103, "FM Stop Reject" },
292 { 0x0104, "Negotiation Request ACK" },
293 { 0x0105, "Negotiation Request NACK" },
294 { 0x0106, "Negotiation Request" },
295 { 0x0108, "BTS Initiated Request ACK" },
296 { 0x0109, "BTS Initiated Request NACK" },
297 { 0x010a, "BTS Initiated Request" },
298 { 0x010c, "Radio Channels Release Command" },
299 { 0x010e, "Radio Channels Release Complete" },
300 { 0x010f, "Radio Channels Release Reject" },
301 { 0x0118, "Feature Control Command" },
302 { 0x011a, "Feature Control Complete" },
303 { 0x011b, "Feature Control Reject" },
305 /* Observed with RBS6000 / DUG 20 */
306 { 0x012c, "MCTR Configuration Request" },
307 { 0x012e, "MCTR Configuration Request Accept" },
308 { 0x012f, "MCTR Configuration Request Reject" },
309 { 0x0130, "MCTR Configuration Result ACK" },
310 { 0x0131, "MCTR Configuration Result NACK" },
311 { 0x0132, "MCTR Configuration Result" },
313 { 0, NULL }
315 static value_string_ext om2k_msgcode_vals_ext = VALUE_STRING_EXT_INIT(om2k_msgcode_vals);
317 /* TS 12.21 Section 9.4: Attributes */
318 static const value_string om2k_attr_vals[] = {
319 { 0x00, "Accordance indication" },
320 { 0x01, "Alarm Id" },
321 { 0x02, "Alarm Data" },
322 { 0x03, "Alarm Severity" },
323 { 0x04, "Alarm Status" },
324 { 0x05, "Alarm Status Type" },
325 { 0x06, "BCC" },
326 { 0x07, "BS_AG_BKS_RES" },
327 { 0x09, "BSIC" },
328 { 0x0a, "BA_PA_MFRMS" },
329 { 0x0b, "CBCH Indicator" },
330 { 0x0c, "CCCH Options" },
331 { 0x0d, "Calendar Time" },
332 { 0x0f, "Channel Combination" },
333 { 0x10, "CON Connection List" },
334 { 0x11, "Data End Indication" },
335 { 0x12, "DRX_DEV_MAX" },
336 { 0x13, "End List Number" },
337 { 0x14, "External Condition Map Class 1" },
338 { 0x15, "External Condition Map Class 2" },
339 { 0x16, "File Relation Indication" },
340 { 0x17, "File Revision" },
341 { 0x18, "File Segment Data" },
342 { 0x19, "File Segment Length" },
343 { 0x1a, "File Segment Sequence Number" },
344 { 0x1b, "File Size" },
345 { 0x1c, "Filling Marker" },
346 { 0x1d, "FN Offset" },
347 { 0x1e, "Frequency List" },
348 { 0x1f, "Frequency Specifier RX" },
349 { 0x20, "Frequency Specifier TX" },
350 { 0x21, "HSN" },
351 { 0x22, "ICM Indicator" },
352 { 0x23, "Internal Fault Map Class 1A" },
353 { 0x24, "Internal Fault Map Class 1B" },
354 { 0x25, "Internal Fault Map Class 2A" },
355 { 0x26, "Internal Fault Map Class 2A Extension" },
356 { 0x27, "IS Connection List" },
357 { 0x28, "List Number" },
358 { 0x29, "File Package State Indication" },
359 { 0x2a, "Local Access State" },
360 { 0x2b, "MAIO" },
361 { 0x2c, "MO State" },
362 { 0x2d, "Ny1" },
363 { 0x2e, "Operational Information" },
364 { 0x2f, "Power" },
365 { 0x30, "RU Position Data" },
366 { 0x31, "Protocol Error" },
367 { 0x32, "Reason Code" },
368 { 0x33, "Receiver Diversity" },
369 { 0x34, "Replacement Unit Map" },
370 { 0x35, "Result Code" },
371 { 0x36, "RU Revision Data" },
372 { 0x38, "T3105" },
373 { 0x39, "Test Loop Setting" },
374 { 0x3a, "TF Mode" },
375 { 0x3b, "TF Compensation Value" },
376 { 0x3c, "Time Slot Number" },
377 { 0x3d, "TSC" },
378 { 0x3e, "RU Logical Id" },
379 { 0x3f, "RU Serial Number Data" },
380 { 0x40, "BTS Version" },
381 { 0x41, "OML IWD Version" },
382 { 0x42, "RWL IWD Version" },
383 { 0x43, "OML Function Map 1" },
384 { 0x44, "OML Function Map 2" },
385 { 0x45, "RSL Function Map 1" },
386 { 0x46, "RSL Function Map 2" },
387 { 0x47, "Extended Range Indicator" },
388 { 0x48, "Request Indicators" },
389 { 0x49, "DIP Alarm Condition Map" },
390 { 0x4a, "ES Incoming" },
391 { 0x4b, "ES Outgoing" },
392 { 0x4e, "SES Incoming" },
393 { 0x4f, "SES Outgoing" },
394 { 0x50, "Replacement Unit Map Extension" },
395 { 0x52, "UAS Incoming" },
396 { 0x53, "UAS Outgoing" },
397 { 0x58, "DF Incoming" },
398 { 0x5a, "DF Outgoing" },
399 { 0x5c, "SF" },
400 { 0x60, "S Bits Setting" },
401 { 0x61, "CRC-4 Use Option" },
402 { 0x62, "T Parameter" },
403 { 0x63, "N Parameter" },
404 { 0x64, "N1 Parameter" },
405 { 0x65, "N3 Parameter" },
406 { 0x66, "N4 Parameter" },
407 { 0x67, "P Parameter" },
408 { 0x68, "Q Parameter" },
409 { 0x69, "BI_Q1" },
410 { 0x6a, "BI_Q2" },
411 { 0x74, "ICM Boundary Parameters" },
412 { 0x77, "AFT" },
413 { 0x78, "AFT RAI" },
414 { 0x79, "Link Supervision Control" },
415 { 0x7a, "Link Supervision Filtering Time" },
416 { 0x7b, "Call Supervision Time" },
417 { 0x7c, "Interval Length UAS Incoming" },
418 { 0x7d, "Interval Length UAS Outgoing" },
419 { 0x7e, "ICM Channel Rate" },
420 { 0x7f, "Attribute Identifier" },
421 { 0x80, "FM Frequency List" },
422 { 0x81, "FM Frequency Report" },
423 { 0x82, "FM Percentile" },
424 { 0x83, "FM Clear Indication" },
425 { 0x84, "HW Info Signature" },
426 { 0x85, "MO Record" },
427 { 0x86, "TF Synchronisation Source" },
428 { 0x87, "TTA" },
429 { 0x88, "End Segment Number" },
430 { 0x89, "Segment Number" },
431 { 0x8a, "Capabilities Signature" },
432 { 0x8c, "File Relation List" },
433 { 0x90, "Negotiation Record I" },
434 { 0x91, "Negotiation Record II" },
435 { 0x92, "Encryption Algorithm" },
436 { 0x94, "Interference Rejection Combining" },
437 { 0x95, "Dedication Information" },
438 { 0x97, "Feature Code" },
439 { 0x98, "FS Offset" },
440 { 0x99, "ESB Timeslot" },
441 { 0x9a, "Master TG Instance" },
442 { 0x9b, "Master TX Chain Delay" },
443 { 0x9c, "External Condition Class 2 Extension" },
444 { 0x9d, "TSs MO State" },
445 { 0x9e, "Configuration Type" },
446 { 0x9f, "Jitter Size" },
447 { 0xa0, "Packing Algorithm" },
448 { 0xa8, "TRXC List" },
449 { 0xa9, "Maximum Allowed Power" },
450 { 0xaa, "Maximum Allowed Number of TRXCs" },
451 { 0xab, "MCTR Feature Status Bitmap" },
452 { 0xae, "Power Back-off Channel Type Map" },
453 { 0xaf, "Power Back-off Priority" },
454 { 0xb0, "Power Back-off Value" },
455 { 0, NULL }
457 static value_string_ext om2k_attr_vals_ext = VALUE_STRING_EXT_INIT(om2k_attr_vals);
459 static const value_string om2k_diversity_vals[] = {
460 { 0x01, "B receiver side" },
461 { 0x02, "A receiver side" },
462 { 0x03, "A+B receiver sides" },
463 { 0x04, "A+B+C+D receiver sides" },
464 { 0, NULL }
467 static const value_string om2k_oip_vals[] = {
468 { 0x00, "Not Operational" },
469 { 0x01, "Operational" },
470 { 0, NULL }
473 static const value_string om2k_aip_vals[] = {
474 { 0x00, "Data according to request" },
475 { 0x01, "Data not according to request" },
476 { 0x02, "Inconsistent MO data" },
477 { 0x03, "Capability constraint violation" },
478 { 0, NULL }
481 static const value_string om2k_comb_vals[] = {
482 { 0x03, "SDCCH/8 + SACCH/C8" },
483 { 0x04, "BCCH, non-combined" },
484 { 0x05, "BCCH, combined (SDCCH/4)" },
485 { 0x08, "TCH Type, unspecified" },
486 { 0, NULL }
489 static const value_string om2k_icmcr_vals[] = {
490 { 0x00, "ICM as per TCH/F" },
491 { 0x01, "ICM as per TCH/H(0 and 1)" },
492 { 0, NULL }
495 static const value_string om2k_ea_vals[] = {
496 { 0x00, "A5/1 and A5/2" },
497 { 0x01, "A5/2 only" },
498 { 0, NULL }
501 static const value_string om2k_fill_vals[] = {
502 { 0x00, "Filling" },
503 { 0x01, "No filling" },
504 { 0, NULL }
507 static const value_string om2k_mo_state_vals[] = {
508 { 0x00, "RESET" },
509 { 0x01, "STARTED" },
510 { 0x02, "ENABLED" },
511 { 0x03, "DISABLED" },
512 { 0, NULL }
515 static const value_string om2k_la_state_vals[] = {
516 { 0x00, "LOCALLY CONNECTED" },
517 { 0x01, "LOCALLY DISCONNECTED" },
518 { 0, NULL }
521 static const value_string filerel_state_vals[] = {
522 { 0x00, "Not known in current state (unknown file)" },
523 { 0x01, "allowed, already loaded" },
524 { 0x02, "allowed, not loaded" },
525 { 0x03, "not allowed" },
526 { 0, NULL }
529 static const value_string om2k_mo_class_short_vals[] = {
530 { 0x01, "TRXC" },
531 { 0x02, "TG" },
532 { 0x03, "TS" },
533 { 0x04, "TF" },
534 { 0x05, "IS" },
535 { 0x06, "CON" },
536 { 0x07, "DP" },
537 { 0x08, "MCTR" },
538 { 0x0a, "CF" },
539 { 0x0b, "TX" },
540 { 0x0c, "RX" },
541 { 0, NULL }
544 static const value_string om2k_mo_class_vals[] = {
545 { 0x01, "TRXC (TRX Controller)" },
546 { 0x02, "TG (TRX Group)" },
547 { 0x03, "TS (Timeslot)" },
548 { 0x04, "TF (Timing Function)" },
549 { 0x05, "IS (Interface Switch)" },
550 { 0x06, "CON (Concentrator)" },
551 { 0x07, "DP (Data Path)" },
552 { 0x08, "MCTR (Multi Carrier TRansceiver)" },
553 { 0x0a, "CF (Central Function)" },
554 { 0x0b, "TX (Transmitter)" },
555 { 0x0c, "RX (Receiver)" },
556 { 0, NULL }
559 static const value_string om2k_tf_mode_vals[] = {
560 { 0x00, "Master" },
561 { 0x01, "Standalone" },
562 { 0x02, "Slave" },
563 { 0xff, "Not defined" },
564 { 0, NULL }
567 static const value_string om2k_attr_id_vals[] = {
568 { 0x0005, "Alarm Status Type" },
569 { 0x0007, "Input BS_AG_BLKS_RES" },
570 { 0x001d, "Input FN Offset" },
571 { 0x002f, "Power GMSK" },
572 { 0x0033, "Receiver Diversity" },
573 { 0x0037, "Power 8-PSK" },
574 { 0x003a, "TF Mode" },
575 { 0x0043, "File Supported Functions OML I" },
576 { 0x0044, "File Supported Functions OML II" },
577 { 0x0045, "File Supported Functions RSL I" },
578 { 0x0046, "File Supported Functions RSL II" },
579 { 0x0047, "Input Extended Range" },
580 { 0x0086, "TF Synchronization Source" },
581 { 0x0101, "Alarm Information" },
582 { 0x0127, "ICPs Signaling" },
583 { 0x0143, "TG Supported Functions OML I" },
584 { 0x0144, "TG Supported Functions OML II" },
585 { 0x0145, "TG Supported Functions RSL I" },
586 { 0x0146, "TG Supported Functions RSL II" },
587 { 0x01ff, "ICPs IS" },
588 { 0x0227, "ICPs Traffic" },
589 { 0x0243, "TRXC Supported Functions OML I" },
590 { 0x0244, "TRXC Supported Functions OML II" },
591 { 0x0245, "TRXC Supported Functions RSL I" },
592 { 0x0246, "TRXC Supported Functions RSL II" },
593 { 0x02ff, "Cascadable" },
594 { 0x0327, "ICPs PCM" },
595 { 0x03ff, "TEI" },
596 { 0x041f, "ARFCN AB RX" },
597 { 0x0420, "ARFCN TX" },
598 { 0x0427, "ICPs CON" },
599 { 0x04ff, "TCH Capabilities" },
600 { 0x0527, "ICP Group" },
601 { 0x05ff, "Cascade downlink" },
602 { 0x0627, "ICP Group Capacity" },
603 { 0x07ff, "CRC-4 Option" },
604 { 0x0bff, "Hopping Type" },
605 { 0x0cff, "TRXC Domain" },
606 { 0x19ff, "Band AB RX" },
607 { 0x1aff, "Band TX" },
608 { 0x1bff, "TX Chain Delay" },
609 { 0, NULL }
612 static value_string_ext om2k_attr_id_vals_ext = VALUE_STRING_EXT_INIT(om2k_attr_id_vals);
614 static const value_string om2k_res_code_vals[] = {
615 { 0x02, "Wrong state or out of sequence" },
616 { 0x03, "File error" },
617 { 0x04, "Fault, unspecified" },
618 { 0x05, "Tuning fault" },
619 { 0x06, "Protocol error" },
620 { 0x07, "MO not connected" },
621 { 0x08, "Parameter error" },
622 { 0x09, "Operational function not supported" },
623 { 0x0a, "Local Access state LOCALLY DISCONNECTED" },
624 { 0, NULL }
627 static const value_string om2k_iwd_type_vals[] = {
628 { 0x00, "OML" },
629 { 0x01, "RSL" },
630 { 0x02, "GSL" },
631 { 0x03, "TRA" },
632 { 0, NULL }
635 static int
636 dissect_tss_mo_state(tvbuff_t *tvb, int offset, proto_tree *tree)
638 uint8_t tmp;
639 unsigned i = 0;
641 for (i = 0; i < 8; i+= 2) {
642 tmp = tvb_get_uint8(tvb, offset);
643 proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp & 0xf,
644 "Timeslot %u MO State: %s", i,
645 val_to_str(tmp & 0xf, om2k_mo_state_vals, "unknown (%02d)"));
646 proto_tree_add_uint_format(tree, hf_om2k_tsn_state, tvb, offset, 1, tmp >> 4,
647 "Timeslot %u MO State: %s", i+1,
648 val_to_str(tmp >> 4, om2k_mo_state_vals, "unknown (%02d)"));
649 offset++;
652 return 4;
656 static int
657 dissect_om2k_time(tvbuff_t *tvb, int offset, proto_tree *tree)
659 nstime_t tmptime;
660 time_t tval;
661 struct tm _time;
663 _time.tm_year = 100 + tvb_get_uint8(tvb, offset++);
664 _time.tm_mon = tvb_get_uint8(tvb, offset++) - 1;
665 _time.tm_mday = tvb_get_uint8(tvb, offset++);
666 _time.tm_hour = tvb_get_uint8(tvb, offset++);
667 _time.tm_min = tvb_get_uint8(tvb, offset++);
668 _time.tm_sec = tvb_get_uint8(tvb, offset++);
669 _time.tm_isdst = -1;
671 tval = mktime(&_time);
672 tmptime.secs = tval;
673 tmptime.nsecs = 0;
675 proto_tree_add_time(tree, hf_om2k_cal_time, tvb, offset, 6,
676 &tmptime);
677 return 6;
680 static int
681 dissect_om2k_attr_unkn(tvbuff_t *tvb, packet_info *pinfo, int offset, int len, int iei, proto_tree *tree)
683 proto_tree_add_bytes_format(tree, hf_om2k_unknown_val, tvb,
684 offset, len, NULL,
685 "%s: %s",
686 val_to_str_ext(iei, &om2k_attr_vals_ext, "0x%02x"),
687 tvb_bytes_to_str(pinfo->pool, tvb, offset, len));
688 return len;
691 static int
692 dissect_om2k_is_list(tvbuff_t *tvb, int base_offset, proto_tree *tree)
694 int offset = base_offset;
695 proto_item *ti;
696 proto_tree *isl_tree;
697 uint8_t len = tvb_get_uint8(tvb, offset++);
699 ti = proto_tree_add_item(tree, hf_om2k_isl, tvb, offset, len, ENC_NA);
700 isl_tree = proto_item_add_subtree(ti, ett_om2k_isl);
702 while (offset < base_offset + len) {
703 proto_tree_add_item(isl_tree, hf_om2k_isl_icp1, tvb,
704 offset, 2, ENC_BIG_ENDIAN);
705 offset += 2;
706 proto_tree_add_item(isl_tree, hf_om2k_isl_icp2, tvb,
707 offset, 2, ENC_BIG_ENDIAN);
708 offset += 2;
709 proto_tree_add_item(isl_tree, hf_om2k_isl_ci, tvb,
710 offset++, 1, ENC_BIG_ENDIAN);
712 return offset - base_offset;
715 static int
716 dissect_om2k_con_list(tvbuff_t *tvb, int base_offset, proto_tree *tree)
718 int offset = base_offset;
719 proto_item *ti;
720 proto_tree *conl_tree;
721 uint8_t len = tvb_get_uint8(tvb, offset++);
723 ti = proto_tree_add_item(tree, hf_om2k_conl, tvb, offset, len, ENC_NA);
724 conl_tree = proto_item_add_subtree(ti, ett_om2k_conl);
726 proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cgs, tvb,
727 offset++, 1, ENC_BIG_ENDIAN);
729 while (offset < base_offset + len) {
730 uint8_t nr_cps_cg = tvb_get_uint8(tvb, offset);
731 proto_tree_add_item(conl_tree, hf_om2k_conl_nr_cps_cg, tvb,
732 offset++, 1, ENC_BIG_ENDIAN);
733 while (nr_cps_cg--) {
734 proto_tree_add_item(conl_tree, hf_om2k_conl_ccp, tvb,
735 offset, 2, ENC_BIG_ENDIAN);
736 offset += 2;
737 proto_tree_add_item(conl_tree, hf_om2k_conl_ci, tvb,
738 offset++, 1, ENC_BIG_ENDIAN);
739 proto_tree_add_item(conl_tree, hf_om2k_conl_tag, tvb,
740 offset++, 1, ENC_BIG_ENDIAN);
741 proto_tree_add_item(conl_tree, hf_om2k_conl_tei, tvb,
742 offset++, 1, ENC_BIG_ENDIAN);
745 return offset - base_offset;
748 static int
749 dissect_om2k_negotiation_record1(tvbuff_t *tvb, int base_offset, proto_tree *tree)
751 int offset = base_offset;
752 uint8_t i;
753 uint8_t num_iwd = tvb_get_uint8(tvb, offset++);
755 for (i = 0; i < num_iwd; i++) {
756 uint8_t j;
757 proto_item *ti;
758 proto_tree *iwd_tree;
759 uint8_t num_vers = tvb_get_uint8(tvb, offset++);
761 ti = proto_tree_add_item(tree, hf_om2k_iwd_type, tvb, offset++, 1, ENC_NA);
762 iwd_tree = proto_item_add_subtree(ti, ett_om2k_iwd);
764 for (j = 0; j < num_vers; j++) {
765 proto_tree_add_item(iwd_tree, hf_om2k_iwd_gen_rev, tvb,
766 offset, 6, ENC_ASCII);
767 offset += 6;
770 return offset - base_offset;
773 static int
774 dissect_om2k_mo_record(tvbuff_t *tvb, packet_info *pinfo, int base_offset, int len, proto_tree *tree)
776 int offset = base_offset;
777 proto_tree_add_item(tree, hf_om2k_mo_class, tvb, offset++, 1, ENC_NA);
778 proto_tree_add_item(tree, hf_om2k_mo_instance, tvb, offset++, 1, ENC_NA);
780 while (offset < len) {
781 uint16_t attr_id;
782 uint8_t attr_len;
784 attr_id = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
785 offset += 2;
786 attr_len = tvb_get_uint8(tvb, offset++);
787 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, attr_len, attr_id, tree);
790 return offset - base_offset;
793 static int
794 dissect_om2k_negotiation_record2(tvbuff_t *tvb, int base_offset, proto_tree *tree)
796 int offset = base_offset;
797 uint8_t i;
798 uint8_t num_iwd = tvb_get_uint8(tvb, offset++);
800 for (i = 0; i < num_iwd; i++) {
801 proto_item *ti;
802 proto_tree *iwd_tree;
804 ti = proto_tree_add_item(tree, hf_om2k_iwd_type, tvb, offset++, 1, ENC_NA);
805 iwd_tree = proto_item_add_subtree(ti, ett_om2k_iwd);
807 proto_tree_add_item(iwd_tree, hf_om2k_iwd_gen_rev, tvb,
808 offset, 6, ENC_ASCII);
809 offset += 6;
811 return offset - base_offset;
816 static int
817 dissect_om2k_attrs(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, uint16_t msg_code)
819 while (tvb_reported_length_remaining(tvb, offset) > 0) {
820 uint8_t iei = tvb_get_uint8(tvb, offset++);
821 uint8_t len, tmp;
822 proto_item *ti;
824 switch (iei) {
825 case 0x00: /* Accordance Information */
826 tmp = tvb_get_uint8(tvb, offset);
827 ti = proto_tree_add_item(tree, hf_om2k_aip, tvb,
828 offset++, 1, ENC_BIG_ENDIAN);
829 if (tmp != 0x00)
830 expert_add_info(pinfo, ti, &ei_om2k_not_performed);
831 break;
832 case 0x06: /* BCC */
833 proto_tree_add_item(tree, hf_om2k_bcc, tvb,
834 offset++, 1, ENC_BIG_ENDIAN);
835 break;
836 case 0x07: /* BS_AG_BLKS_RES */
837 proto_tree_add_item(tree, hf_om2k_bs_ag_blks_res, tvb,
838 offset++, 1, ENC_BIG_ENDIAN);
839 break;
840 case 0x09: /* BSIC */
841 proto_tree_add_item(tree, hf_om2k_bsic, tvb,
842 offset++, 1, ENC_BIG_ENDIAN);
843 break;
844 case 0x0a: /* BS_PA_MFRMS */
845 proto_tree_add_item(tree, hf_om2k_bs_pa_mfrms, tvb,
846 offset++, 1, ENC_BIG_ENDIAN);
847 break;
848 case 0x0b: /* CBCH indicator */
849 proto_tree_add_item(tree, hf_om2k_cbi, tvb,
850 offset++, 1, ENC_BIG_ENDIAN);
851 break;
852 case 0x0c: /* CCCH Options */
853 proto_tree_add_item(tree, hf_om2k_cr, tvb,
854 offset, 1, ENC_BIG_ENDIAN);
855 proto_tree_add_item(tree, hf_om2k_ipt3, tvb,
856 offset, 1, ENC_BIG_ENDIAN);
857 proto_tree_add_item(tree, hf_om2k_aop, tvb,
858 offset, 1, ENC_BIG_ENDIAN);
859 offset++;
860 break;
861 case 0x0d: /* Calendar Time */
862 offset += dissect_om2k_time(tvb, offset, tree);
863 break;
864 case 0x0f: /* Combination */
865 proto_tree_add_item(tree, hf_om2k_comb, tvb,
866 offset++, 1, ENC_BIG_ENDIAN);
867 break;
868 case 0x10: /* CON Connection List */
869 offset += dissect_om2k_con_list(tvb, offset, tree);
870 break;
871 case 0x12: /* DRX_DEV_MAX */
872 proto_tree_add_item(tree, hf_om2k_drx_dev_max, tvb,
873 offset++, 1, ENC_BIG_ENDIAN);
874 break;
875 case 0x13: /* End List Number */
876 proto_tree_add_item(tree, hf_om2k_list_nr_end, tvb,
877 offset++, 1, ENC_BIG_ENDIAN);
878 break;
879 case 0x14: /* External Condition Map Class 1 */
880 /* FIXME */
881 case 0x15: /* External Condition Map Class 2 */
882 /* FIXME */
883 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 2, iei, tree);
884 break;
885 case 0x16: /* File Relation Indication */
886 proto_tree_add_item(tree, hf_om2k_filerel_ilr, tvb,
887 offset, 1, ENC_BIG_ENDIAN);
888 proto_tree_add_item(tree, hf_om2k_filerel_cur, tvb,
889 offset, 1, ENC_BIG_ENDIAN);
890 offset++;
891 proto_tree_add_item(tree, hf_om2k_filerel_other, tvb,
892 offset, 1, ENC_BIG_ENDIAN);
893 offset++;
894 break;
895 case 0x17: /* File Revision */
896 proto_tree_add_item(tree, hf_om2k_file_rev, tvb,
897 offset, 8, ENC_ASCII);
898 offset += 8;
899 break;
900 case 0x1c: /* Filling Marker */
901 proto_tree_add_item(tree, hf_om2k_fill_mark, tvb,
902 offset++, 1, ENC_BIG_ENDIAN);
903 break;
904 case 0x1d: /* FN Offset */
905 proto_tree_add_item(tree, hf_om2k_fn_offs, tvb,
906 offset, 2, ENC_BIG_ENDIAN);
907 offset += 2;
908 break;
909 case 0x1e: /* Frequency List */
910 len = tvb_get_uint8(tvb, offset++);
911 /* FIXME */
912 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, len, iei, tree);
913 break;
914 case 0x1f: /* Frequency Specifier Rx */
915 /* FIXME */
916 case 0x20: /* Frequency Specifier Rx */
917 /* FIXME */
918 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 2, iei, tree);
919 break;
920 case 0x21: /* HSN */
921 proto_tree_add_item(tree, hf_om2k_hsn, tvb,
922 offset++, 1, ENC_BIG_ENDIAN);
923 break;
924 case 0x22: /* ICM */
925 proto_tree_add_item(tree, hf_om2k_icm, tvb,
926 offset++, 1, ENC_BIG_ENDIAN);
927 break;
928 case 0x23: /* Internal Fault Map Class 1A */
929 /* FIXME */
930 case 0x24: /* Internal Fault Map Class 1B */
931 /* FIXME */
932 case 0x25: /* Internal Fault Map Class 2A */
933 /* FIXME */
934 case 0x26: /* Internal Fault Map Class 2A Ext */
935 /* FIXME */
936 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 6, iei, tree);
937 break;
938 case 0x27: /* IS Connection List */
939 offset += dissect_om2k_is_list(tvb, offset, tree);
940 break;
941 case 0x28: /* List Number */
942 proto_tree_add_item(tree, hf_om2k_list_nr, tvb,
943 offset++, 1, ENC_BIG_ENDIAN);
944 break;
945 case 0x2a: /* Local Access State */
946 proto_tree_add_item(tree, hf_om2k_la_state, tvb,
947 offset++, 1, ENC_BIG_ENDIAN);
948 break;
949 case 0x2b: /* MAIO */
950 proto_tree_add_item(tree, hf_om2k_maio, tvb,
951 offset++, 1, ENC_BIG_ENDIAN);
952 break;
953 case 0x2c: /* MO State */
954 tmp = tvb_get_uint8(tvb, offset);
955 ti = proto_tree_add_item(tree, hf_om2k_mo_state, tvb,
956 offset++, 1, ENC_BIG_ENDIAN);
957 if (msg_code == 0x3a && tmp != 0x02)
958 expert_add_info(pinfo, ti, &ei_om2k_ena_res_disabled);
959 break;
960 case 0x2d: /* Ny1 */
961 proto_tree_add_item(tree, hf_om2k_ny1, tvb,
962 offset++, 1, ENC_BIG_ENDIAN);
963 break;
964 case 0x2e: /* Operational Information */
965 proto_tree_add_item(tree, hf_om2k_oip, tvb,
966 offset++, 1, ENC_BIG_ENDIAN);
967 break;
968 case 0x2f: /* Nominal Power */
969 proto_tree_add_item(tree, hf_om2k_nom_pwr, tvb,
970 offset++, 1, ENC_BIG_ENDIAN);
971 break;
972 case 0x32: /* Reason Code */
973 proto_tree_add_item(tree, hf_om2k_reason_code, tvb,
974 offset++, 1, ENC_BIG_ENDIAN);
975 break;
976 case 0x33: /* Receiver Diversity */
977 proto_tree_add_item(tree, hf_om2k_diversity, tvb,
978 offset++, 1, ENC_BIG_ENDIAN);
979 break;
980 case 0x34: /* Replacement Unit Map */
981 /* FIXME */
982 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 6, iei, tree);
983 break;
984 case 0x35: /* Result Code */
985 proto_tree_add_item(tree, hf_om2k_result_code, tvb,
986 offset++, 1, ENC_BIG_ENDIAN);
987 break;
988 case 0x38: /* T3105 */
989 proto_tree_add_item(tree, hf_om2k_t3105, tvb,
990 offset++, 1, ENC_BIG_ENDIAN);
991 break;
992 case 0x3a: /* TF Mode */
993 proto_tree_add_item(tree, hf_om2k_tf_mode, tvb,
994 offset++, 1, ENC_BIG_ENDIAN);
995 break;
996 case 0x3c: /* TS Number */
997 proto_tree_add_item(tree, hf_om2k_ts, tvb,
998 offset++, 1, ENC_BIG_ENDIAN);
999 break;
1000 case 0x3d: /* TSC */
1001 proto_tree_add_item(tree, hf_om2k_tsc, tvb,
1002 offset++, 1, ENC_BIG_ENDIAN);
1003 break;
1004 case 0x40: /* BTS Version */
1005 proto_tree_add_item(tree, hf_om2k_bts_manuf, tvb,
1006 offset, 3, ENC_ASCII);
1007 offset += 3;
1008 proto_tree_add_item(tree, hf_om2k_bts_gen, tvb,
1009 offset, 3, ENC_ASCII);
1010 offset += 3;
1011 proto_tree_add_item(tree, hf_om2k_bts_rev, tvb,
1012 offset, 3, ENC_ASCII);
1013 offset += 3;
1014 proto_tree_add_item(tree, hf_om2k_bts_var, tvb,
1015 offset, 3, ENC_ASCII);
1016 offset += 3;
1017 break;
1018 case 0x43: /* OML Function Map 1 */
1019 case 0x44: /* OML Function Map 2 */
1020 case 0x45: /* RSL Function Map 1 */
1021 case 0x46: /* RSL Function Map 2 */
1022 len = tvb_get_uint8(tvb, offset++);
1023 /* FIXME */
1024 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, len, iei, tree);
1025 break;
1026 case 0x47: /* Ext Range */
1027 proto_tree_add_item(tree, hf_om2k_ext_range, tvb,
1028 offset++, 1, ENC_BIG_ENDIAN);
1029 break;
1030 case 0x48: /* Request Indicators */
1031 proto_tree_add_item(tree, hf_om2k_brr, tvb,
1032 offset, 1, ENC_BIG_ENDIAN);
1033 proto_tree_add_item(tree, hf_om2k_bfr, tvb,
1034 offset, 1, ENC_BIG_ENDIAN);
1035 offset++;
1036 break;
1037 case 0x50: /* Replacement Unit Map Extension */
1038 /* FIXME */
1039 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 6, iei, tree);
1040 break;
1041 case 0x74: /* ICM Boundary */
1042 /* FIXME */
1043 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 5, iei, tree);
1044 break;
1045 case 0x79: /* Link Supervision Control */
1046 proto_tree_add_item(tree, hf_om2k_lsc_fm, tvb,
1047 offset, 1, ENC_BIG_ENDIAN);
1048 proto_tree_add_item(tree, hf_om2k_lsc_lsi, tvb,
1049 offset, 1, ENC_BIG_ENDIAN);
1050 proto_tree_add_item(tree, hf_om2k_lsc_lsa, tvb,
1051 offset, 1, ENC_BIG_ENDIAN);
1052 offset++;
1053 break;
1054 case 0x7a: /* Link Supervision Control */
1055 proto_tree_add_item(tree, hf_om2k_ls_ft, tvb,
1056 offset++, 1, ENC_BIG_ENDIAN);
1057 break;
1058 case 0x7b: /* Call Supervision Time */
1059 proto_tree_add_item(tree, hf_om2k_cst, tvb,
1060 offset++, 1, ENC_BIG_ENDIAN);
1061 break;
1062 case 0x7e: /* ICM Channel Rate */
1063 proto_tree_add_item(tree, hf_om2k_icm_cr, tvb,
1064 offset++, 1, ENC_BIG_ENDIAN);
1065 break;
1066 case 0x7f: /* Attribute ID */
1067 proto_tree_add_item(tree, hf_om2k_attr_id, tvb,
1068 offset, 2, ENC_BIG_ENDIAN);
1069 proto_tree_add_item(tree, hf_om2k_attr_index, tvb,
1070 offset+2, 1, ENC_BIG_ENDIAN);
1071 offset += 3;
1072 break;
1073 case 0x84: /* HW Info Signature */
1074 proto_tree_add_item(tree, hf_om2k_hwinfo_sig, tvb,
1075 offset, 2, ENC_BIG_ENDIAN);
1076 offset += 2;
1077 break;
1078 case 0x85: /* MO Record */
1079 offset += dissect_om2k_mo_record(tvb, pinfo, offset, tvb_reported_length_remaining(tvb, offset), tree);
1080 break;
1081 case 0x87: /* TTA */
1082 proto_tree_add_item(tree, hf_om2k_tta, tvb,
1083 offset++, 1, ENC_BIG_ENDIAN);
1084 break;
1085 case 0x8a: /* Capabilities Signature */
1086 proto_tree_add_item(tree, hf_om2k_capa_sig, tvb,
1087 offset, 2, ENC_BIG_ENDIAN);
1088 offset += 2;
1089 break;
1090 case 0x90: /* Negotiation Record I */
1091 offset++; /* skip len field */
1092 offset += dissect_om2k_negotiation_record1(tvb, offset, tree);
1093 break;
1094 case 0x91: /* Negotiation Record II */
1095 offset++; /* skip len field */
1096 offset += dissect_om2k_negotiation_record2(tvb, offset, tree);
1097 break;
1098 case 0x92: /* Encryption Algorithm */
1099 proto_tree_add_item(tree, hf_om2k_ea, tvb,
1100 offset++, 1, ENC_BIG_ENDIAN);
1101 break;
1102 case 0x94: /* Interference Rejection Combining */
1103 proto_tree_add_item(tree, hf_om2k_irc, tvb,
1104 offset++, 1, ENC_BIG_ENDIAN);
1105 break;
1106 case 0x95: /* Dedication information */
1107 /* FIXME */
1108 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 3, iei, tree);
1109 break;
1110 case 0x98: /* FS Offset */
1111 proto_tree_add_item(tree, hf_om2k_tf_fs_offset, tvb,
1112 offset, 5, ENC_BIG_ENDIAN);
1113 offset += 5;
1114 break;
1115 case 0x9c: /* External Condition Class 2 Extension */
1116 /* FIXME */
1117 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 4, iei, tree);
1118 break;
1119 case 0x9d: /* TSs MO State */
1120 offset += dissect_tss_mo_state(tvb, offset, tree);
1121 break;
1122 case 0x9e: /* Configuration Type */
1123 proto_tree_add_item(tree, hf_om2k_config_type, tvb, offset++, 1, ENC_NA);
1124 break;
1125 case 0x9f: /* Jitter Size */
1126 proto_tree_add_item(tree, hf_om2k_jitter_size, tvb, offset++, 1, ENC_NA);
1127 break;
1128 case 0xa0: /* Packing Algorithm */
1129 proto_tree_add_item(tree, hf_om2k_packing_algo, tvb, offset++, 1, ENC_NA);
1130 break;
1131 case 0xa8: /* TRXC List (bitmap) */
1132 proto_tree_add_item(tree, hf_om2k_trxc_list, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1133 offset += 2;
1134 break;
1135 case 0xa9: /* Maximum Allowed Power */
1136 proto_tree_add_item(tree, hf_om2k_max_allowed_power, tvb, offset, 1, ENC_NA);
1137 offset += 1;
1138 break;
1139 case 0xaa: /* Maximum Allowed Number of TRXCs */
1140 proto_tree_add_item(tree, hf_om2k_max_allowed_num_trxcs, tvb, offset, 1, ENC_NA);
1141 offset += 1;
1142 break;
1143 case 0xab: /* MCTR Feature Status Bitmap */
1144 tmp = tvb_get_uint8(tvb, offset++);
1145 proto_tree_add_item(tree, hf_om2k_mctr_feat_sts_bitmap, tvb, offset, tmp, ENC_NA);
1146 offset += tmp;
1147 break;
1148 case 0xae: /* Power Back-Off Channel Type Map */
1149 tmp = tvb_get_uint8(tvb, offset++);
1150 proto_tree_add_item(tree, hf_om2k_power_bo_ctype_map, tvb, offset, tmp, ENC_NA);
1151 offset += tmp;
1152 break;
1153 case 0xaf: /* Power Back-Off Priority */
1154 tmp = tvb_get_uint8(tvb, offset++);
1155 proto_tree_add_item(tree, hf_om2k_power_bo_priority, tvb, offset, tmp, ENC_NA);
1156 offset += tmp;
1157 break;
1158 case 0xb0: /* Power Back-Off Value */
1159 tmp = tvb_get_uint8(tvb, offset++);
1160 proto_tree_add_item(tree, hf_om2k_power_bo_value, tvb, offset, tmp, ENC_NA);
1161 offset += tmp;
1162 break;
1163 case 0xa3:
1164 case 0xa5:
1165 case 0xa6:
1166 /* we don't know any of the above, but the
1167 * TLV structure is quite clear in the protocol
1168 * traces */
1169 tmp = tvb_get_uint8(tvb, offset++);
1170 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, tmp, iei, tree);
1171 break;
1172 case 0xb5: /* unknown 2-bytes fixed length attribute of TX Config */
1173 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 2, iei, tree);
1174 break;
1175 case 0xd2: /* unknown 6-bytes fixed length attribute of TRXC Fault Rep */
1176 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 6, iei, tree);
1177 break;
1178 case 0xac: /* unknown 58-bytes fixed length attribute of message type 0x0136 */
1179 offset += dissect_om2k_attr_unkn(tvb, pinfo, offset, 58, iei, tree);
1180 break;
1181 default:
1182 tmp = tvb_get_uint8(tvb, offset);
1183 proto_tree_add_uint_format(tree, hf_om2k_unknown_tag, tvb,
1184 offset-1, 1, tmp, "Tag %s: 0x%02x",
1185 val_to_str_ext(iei, &om2k_attr_vals_ext, "0x%02x"), tmp);
1186 offset++;
1187 break;
1191 return offset;
1194 static unsigned
1195 dissect_om2k_mo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1197 uint8_t mo_class = tvb_get_uint8(tvb, offset);
1198 uint8_t inst = tvb_get_uint8(tvb, offset+3);
1200 col_append_fstr(pinfo->cinfo, COL_INFO, ", (%-4s %u)",
1201 val_to_str(mo_class, om2k_mo_class_short_vals,
1202 "0x%02x"), inst);
1203 if (tree) {
1204 proto_item *ti;
1205 proto_tree *mo_tree;
1206 uint8_t sub1 = tvb_get_uint8(tvb, offset+1);
1207 uint8_t sub2 = tvb_get_uint8(tvb, offset+2);
1209 ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset,
1210 4, ENC_NA);
1211 mo_tree = proto_item_add_subtree(ti, ett_om2k_mo);
1212 proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset,
1213 1, ENC_BIG_ENDIAN);
1214 proto_tree_add_item(mo_tree, hf_om2k_mo_sub1, tvb, offset+1,
1215 1, ENC_BIG_ENDIAN);
1216 proto_tree_add_item(mo_tree, hf_om2k_mo_sub2, tvb, offset+2,
1217 1, ENC_BIG_ENDIAN);
1218 proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3,
1219 1, ENC_BIG_ENDIAN);
1220 proto_item_append_text(ti, ", Class: %s, Sub: %02x/%02x, Instance: %u",
1221 val_to_str(mo_class, om2k_mo_class_vals, "0x%02x"),
1222 sub1, sub2, inst);
1224 return 4;
1227 static int
1228 dissect_abis_om2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1230 proto_item *ti;
1231 proto_tree *om2k_tree;
1232 uint16_t msg_code;
1233 uint8_t tmp;
1234 const char *msgt_str;
1236 int offset;
1238 col_set_str(pinfo->cinfo, COL_PROTOCOL, "OM2000");
1239 /* Don't do col_clear() so this dissector can append to COL_INFO*/
1241 offset = 0;
1243 ti = proto_tree_add_item(tree, proto_abis_om2000,
1244 tvb, 0, -1, ENC_NA);
1245 om2k_tree = proto_item_add_subtree(ti, ett_om2000);
1247 msg_code = tvb_get_ntohs(tvb, offset);
1248 proto_tree_add_item(om2k_tree, hf_om2k_msg_code, tvb, offset,
1249 2, ENC_BIG_ENDIAN);
1250 offset += 2;
1252 offset += dissect_om2k_mo(tvb, offset, pinfo, om2k_tree); /* appends to COL_INFO */
1254 col_append_fstr(pinfo->cinfo, COL_INFO, " %s ",
1255 val_to_str_ext(msg_code, &om2k_msgcode_vals_ext,
1256 "unknown 0x%04x"));
1258 if (tree == NULL)
1259 return tvb_captured_length(tvb); /* No refs to COL_... beyond this point */
1261 msgt_str = val_to_str_ext(msg_code, &om2k_msgcode_vals_ext, "unknown 0x%04x");
1262 proto_item_append_text(ti, " %s ", msgt_str);
1264 switch (msg_code) {
1265 case 0x74: /* Operational Info */
1266 tmp = tvb_get_uint8(tvb, offset+1);
1267 proto_item_append_text(ti, ": %s",
1268 val_to_str(tmp, om2k_oip_vals,
1269 "unknown 0x%02x"));
1270 break;
1271 case 0x1A: /* CON Configuration Result */
1272 case 0x66: /* IS Configuration Result */
1273 case 0x82: /* RX Configuration Result */
1274 case 0xA6: /* TF Configuration Result */
1275 case 0xAE: /* TS Configuration Result */
1276 case 0xB6: /* TX Configuration Result */
1277 case 0xE2: /* DP Configuration Result */
1278 case 0xF6: /* DP Configuration Result */
1279 tmp = tvb_get_uint8(tvb, offset+1);
1280 proto_item_append_text(ti, ": %s",
1281 val_to_str(tmp, om2k_aip_vals,
1282 "unknown 0x%02x"));
1283 break;
1284 default:
1285 break;
1288 if (strstr(msgt_str, "Reject"))
1289 expert_add_info(pinfo, ti, &ei_om2k_reject);
1290 if (strstr(msgt_str, "NACK"))
1291 expert_add_info(pinfo, ti, &ei_om2k_nack);
1293 dissect_om2k_attrs(tvb, pinfo, offset, om2k_tree, msg_code);
1294 return tvb_captured_length(tvb);
1297 void
1298 proto_register_abis_om2000(void)
1300 static hf_register_info hf[] = {
1301 { &hf_om2k_msg_code,
1302 { "Message Code", "gsm_abis_om2000.msg_code",
1303 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &om2k_msgcode_vals_ext, 0,
1304 NULL, HFILL }
1306 { &hf_om2k_mo_if,
1307 { "MO Interface", "gsm_abis_om2000.mo_if",
1308 FT_BYTES, BASE_NONE, NULL, 0,
1309 NULL, HFILL }
1311 { &hf_om2k_mo_class,
1312 { "MO IF Class", "gsm_abis_om2000.mo_if.class",
1313 FT_UINT8, BASE_HEX, VALS(om2k_mo_class_vals), 0,
1314 NULL, HFILL }
1316 { &hf_om2k_mo_sub1,
1317 { "MO IF Sub 1", "gsm_abis_om2000.mo_if.sub1",
1318 FT_UINT8, BASE_HEX, NULL, 0,
1319 NULL, HFILL }
1321 { &hf_om2k_mo_sub2,
1322 { "MO IF Sub 2", "gsm_abis_om2000.mo_if.sub2",
1323 FT_UINT8, BASE_HEX, NULL, 0,
1324 NULL, HFILL }
1326 { &hf_om2k_mo_instance,
1327 { "MO IF Instance", "gsm_abis_om2000.mo_if.instance",
1328 FT_UINT8, BASE_DEC, NULL, 0,
1329 NULL, HFILL }
1331 { &hf_om2k_oip,
1332 { "OIP (Operational Info)", "gsm_abis_om2000.oip",
1333 FT_UINT8, BASE_HEX, VALS(om2k_oip_vals), 0,
1334 "Operational Information Parameter", HFILL }
1336 { &hf_om2k_aip,
1337 { "AIP (Accordance Info)", "gsm_abis_om2000.aip",
1338 FT_UINT8, BASE_HEX, VALS(om2k_aip_vals), 0,
1339 "Accordance Information Parameter", HFILL }
1341 { &hf_om2k_comb,
1342 { "Channel Combination", "gsm_abis_om2000.chan_comb",
1343 FT_UINT8, BASE_DEC, VALS(om2k_comb_vals), 0,
1344 "Logical Channel Combination", HFILL }
1346 { &hf_om2k_ts,
1347 { "Timeslot Number", "gsm_abis_om2000.ts",
1348 FT_UINT8, BASE_DEC, NULL, 0,
1349 NULL, HFILL }
1351 { &hf_om2k_hsn,
1352 { "HSN", "gsm_abis_om2000.hsn",
1353 FT_UINT8, BASE_DEC, NULL, 0,
1354 "Hopping Sequence Number", HFILL }
1356 { &hf_om2k_maio,
1357 { "MAIO", "gsm_abis_om2000.maio",
1358 FT_UINT8, BASE_DEC, NULL, 0,
1359 "Mobile Allocation Index Offset", HFILL }
1361 { &hf_om2k_bsic,
1362 { "BSIC", "gsm_abis_om2000.bsic",
1363 FT_UINT8, BASE_HEX, NULL, 0,
1364 "Base Station Identity Code", HFILL }
1366 { &hf_om2k_diversity,
1367 { "Receiver Diversity", "gsm_abis_om2000.diversity",
1368 FT_UINT8, BASE_HEX, VALS(om2k_diversity_vals), 0,
1369 NULL, HFILL }
1371 { &hf_om2k_fn_offs,
1372 { "FN Offset", "gsm_abis_om2000.fn_offset",
1373 FT_UINT16, BASE_DEC, NULL, 0,
1374 "GSM Frame Number Offset", HFILL }
1376 { &hf_om2k_ext_range,
1377 { "Extended Range", "gsm_abis_om2000.ext_range",
1378 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01' ? */
1379 NULL, HFILL }
1381 { &hf_om2k_irc,
1382 { "Interference Rejection Combining", "gsm_abis_om2000.irc",
1383 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1384 NULL, HFILL }
1386 { &hf_om2k_bs_pa_mfrms,
1387 { "BS_PA_MFRMS", "gsm_abis_om2000.bs_pa_mfrms",
1388 FT_UINT8, BASE_DEC, NULL, 0,
1389 NULL, HFILL }
1391 { &hf_om2k_bs_ag_blks_res,
1392 { "BS_AG_BLKS_RES", "gsm_abis_om2000.bs_ag_blks_res",
1393 FT_UINT8, BASE_DEC, NULL, 0,
1394 NULL, HFILL }
1396 { &hf_om2k_drx_dev_max,
1397 { "DRX_DEV_MAX", "gsm_abis_om2000.drx_dev_max",
1398 FT_UINT8, BASE_DEC, NULL, 0,
1399 NULL, HFILL }
1401 { &hf_om2k_cr,
1402 { "CCCH Repeat", "gsm_abis_om2000.ccch_repeat",
1403 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1404 NULL, HFILL }
1406 { &hf_om2k_ipt3,
1407 { "Inhibit Paging Request Type 3", "gsm_abis_om2000.ipt3",
1408 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x02,' ? */
1409 NULL, HFILL }
1411 { &hf_om2k_aop,
1412 { "Age Of Paging", "gsm_abis_om2000.aop",
1413 FT_UINT8, BASE_DEC, NULL, 0x3C, /* XXX: Verify bitmask */
1414 NULL, HFILL }
1416 { &hf_om2k_t3105,
1417 { "T3105 (in 10ms)", "gsm_abis_om2000.t3105",
1418 FT_UINT8, BASE_DEC, NULL, 0,
1419 NULL, HFILL }
1421 { &hf_om2k_ny1,
1422 { "Ny1", "gsm_abis_om2000.ny1",
1423 FT_UINT8, BASE_DEC, NULL, 0,
1424 NULL, HFILL }
1426 { &hf_om2k_cbi,
1427 { "CBCH Indicator", "gsm_abis_om2000.cbi",
1428 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1429 NULL, HFILL }
1431 { &hf_om2k_tsc,
1432 { "Training Sequence Code", "gsm_abis_om2000.tsc",
1433 FT_UINT8, BASE_DEC, NULL, 0,
1434 NULL, HFILL }
1436 { &hf_om2k_icm,
1437 { "Idle Channel Measurement", "gsm_abis_om2000.icm",
1438 FT_BOOLEAN, BASE_NONE, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x01,' ? */
1439 NULL, HFILL }
1441 { &hf_om2k_tta,
1442 { "Timer for Time Alignment", "gsm_abis_om2000.tta",
1443 FT_UINT8, BASE_DEC, NULL, 0,
1444 NULL, HFILL }
1446 { &hf_om2k_icm_cr,
1447 { "ICM Channel Rate", "gsm_abis_om2000.icm_cr",
1448 FT_UINT8, BASE_DEC, VALS(om2k_icmcr_vals), 0,
1449 NULL, HFILL }
1451 { &hf_om2k_lsc_fm,
1452 { "LSC Dummy Frequency Measurement", "gsm_abis_om2000.lsc.fm",
1453 FT_BOOLEAN, 8, NULL, 0x80,
1454 NULL, HFILL }
1456 { &hf_om2k_lsc_lsi,
1457 { "LSC Idle Channels", "gsm_abis_om2000.ls.lsi",
1458 FT_BOOLEAN, 8, NULL, 0x01,
1459 NULL, HFILL }
1461 { &hf_om2k_lsc_lsa,
1462 { "LSC Active Channels", "gsm_abis_om2000.ls.lsa",
1463 FT_BOOLEAN, 8, NULL, 0x02,
1464 NULL, HFILL }
1466 { &hf_om2k_ls_ft,
1467 { "Link Supervision Filtering Time (100ms)", "gsm_abis_om2000.ls_ft",
1468 FT_UINT8, BASE_DEC, NULL, 0,
1469 NULL, HFILL }
1471 { &hf_om2k_cst,
1472 { "Call Supervision Time (480ms)", "gsm_abis_om2000.cst",
1473 FT_UINT8, BASE_DEC, NULL, 0,
1474 NULL, HFILL }
1476 { &hf_om2k_ea,
1477 { "Encryption Algorithm", "gsm_abis_om2000.ea",
1478 FT_UINT8, BASE_DEC, VALS(om2k_ea_vals), 0,
1479 NULL, HFILL }
1481 { &hf_om2k_nom_pwr,
1482 { "Nominal Power (dBm)", "gsm_abis_om2000.pwr",
1483 FT_UINT8, BASE_DEC, NULL, 0,
1484 NULL, HFILL }
1486 { &hf_om2k_fill_mark,
1487 { "Filling Marker", "gsm_abis_om2000.filling",
1488 FT_UINT8, BASE_DEC, VALS(om2k_fill_vals), 0,
1489 NULL, HFILL }
1491 { &hf_om2k_bcc,
1492 { "BCC", "gsm_abis_om2000.bcc",
1493 FT_UINT8, BASE_DEC, NULL, 0,
1494 "Base Station Color Code", HFILL }
1496 { &hf_om2k_mo_state,
1497 { "MO State", "gsm_abis_om2000.mo_state",
1498 FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0,
1499 NULL, HFILL }
1501 { &hf_om2k_la_state,
1502 { "Local Access State", "gsm_abis_om2000.la_state",
1503 FT_UINT8, BASE_DEC, VALS(om2k_la_state_vals), 0,
1504 NULL, HFILL }
1506 { &hf_om2k_tsn_state,
1507 { "Time Slot N MO State", "gsm_abis_om2000.tsn_mo_state",
1508 FT_UINT8, BASE_DEC, VALS(om2k_mo_state_vals), 0,
1509 NULL, HFILL }
1511 { &hf_om2k_bts_manuf,
1512 { "BTS Manufacturer ID", "gsm_abis_om2000.bts_ver.manuf",
1513 FT_STRING, BASE_NONE, NULL, 0,
1514 NULL, HFILL }
1516 { &hf_om2k_bts_gen,
1517 { "BTS Generation", "gsm_abis_om2000.bts_ver.gen",
1518 FT_STRING, BASE_NONE, NULL, 0,
1519 NULL, HFILL }
1521 { &hf_om2k_bts_rev,
1522 { "BTS Revision", "gsm_abis_om2000.bts_ver.rev",
1523 FT_STRING, BASE_NONE, NULL, 0,
1524 NULL, HFILL }
1526 { &hf_om2k_bts_var,
1527 { "BTS Variant", "gsm_abis_om2000.bts_ver.variant",
1528 FT_STRING, BASE_NONE, NULL, 0,
1529 NULL, HFILL }
1531 { &hf_om2k_brr,
1532 { "BTS Requested Restart", "gsm_abis_om2000.brr",
1533 FT_BOOLEAN, 0x01, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x??,' ? */
1534 NULL, HFILL }
1536 { &hf_om2k_bfr,
1537 { "BTS Requested File Relation", "gsm_abis_om2000.bfr",
1538 FT_BOOLEAN, 0x01, NULL, 0, /* XXX: bitmask needed? 'FT_BOOLEAN, 8, NULL, 0x??,' ? */
1539 NULL, HFILL }
1541 { &hf_om2k_hwinfo_sig,
1542 { "HW Info Signature", "gsm_abis_om2000.hwinfo_sig",
1543 FT_UINT16, BASE_HEX, NULL, 0,
1544 NULL, HFILL }
1546 { &hf_om2k_capa_sig,
1547 { "Capabilities Signature", "gsm_abis_om2000.capa_sig",
1548 FT_UINT16, BASE_HEX, NULL, 0,
1549 NULL, HFILL }
1552 { &hf_om2k_unknown_tag,
1553 { "Unknown Tag", "gsm_abis_om2000.unknown.tag",
1554 FT_UINT8, BASE_HEX, NULL, 0,
1555 NULL, HFILL }
1557 { &hf_om2k_unknown_val,
1558 { "Unknown Value", "gsm_abis_om2000.unknown.val",
1559 FT_BYTES, BASE_NONE, NULL, 0,
1560 NULL, HFILL }
1563 { &hf_om2k_file_rev,
1564 { "File Revision", "gsm_abis_om2000.file_rev",
1565 FT_STRING, BASE_NONE, NULL, 0,
1566 NULL, HFILL }
1568 { &hf_om2k_filerel_ilr,
1569 { "Immediate Load Requested", "gsm_abis_om2000.filerel.ilr",
1570 FT_BOOLEAN, 8, NULL, 0x08,
1571 NULL, HFILL }
1573 { &hf_om2k_filerel_cur,
1574 { "Current State", "gsm_abis_om2000.filerel.cur",
1575 FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07,
1576 NULL, HFILL }
1578 { &hf_om2k_filerel_other,
1579 { "Other State", "gsm_abis_om2000.filerel.other",
1580 FT_UINT8, BASE_HEX, VALS(filerel_state_vals), 0x07,
1581 NULL, HFILL }
1583 { &hf_om2k_cal_time,
1584 { "Calendar Time", "gsm_abis_om2000.cal_time",
1585 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
1586 NULL, HFILL }
1588 { &hf_om2k_list_nr,
1589 { "List Number", "gsm_abis_om2000.list_nr",
1590 FT_UINT8, BASE_DEC, NULL, 0,
1591 NULL, HFILL }
1593 { &hf_om2k_list_nr_end,
1594 { "End List Number", "gsm_abis_om2000.list_nr_end",
1595 FT_UINT8, BASE_DEC, NULL, 0,
1596 NULL, HFILL }
1598 { &hf_om2k_isl,
1599 { "IS Connection List", "gsm_abis_om2000.is_list",
1600 FT_BYTES, BASE_NONE, NULL, 0,
1601 NULL, HFILL }
1603 { &hf_om2k_isl_icp1,
1604 { "ICP1", "gsm_abis_om2000.is_list.icp1",
1605 FT_UINT16, BASE_DEC, NULL, 0x07ff,
1606 NULL, HFILL }
1608 { &hf_om2k_isl_icp2,
1609 { "ICP2", "gsm_abis_om2000.is_list.icp2",
1610 FT_UINT16, BASE_DEC, NULL, 0x07ff,
1611 NULL, HFILL }
1613 { &hf_om2k_isl_ci,
1614 { "Contiguity Index", "gsm_abis_om2000.is_list.ci",
1615 FT_UINT8, BASE_DEC, NULL, 0,
1616 NULL, HFILL }
1618 { &hf_om2k_conl,
1619 { "Connection List", "gsm_abis_om2000.con_list",
1620 FT_BYTES, BASE_NONE, NULL, 0,
1621 NULL, HFILL }
1623 { &hf_om2k_conl_nr_cgs,
1624 { "Number of CGs", "gsm_abis_om2000.con_list.nr_cgs",
1625 FT_UINT8, BASE_DEC, NULL, 0x1f,
1626 "Number of Concentration Groups in the DE", HFILL }
1628 { &hf_om2k_conl_nr_cps_cg,
1629 { "Number of CPS in CG", "gsm_abis_om2000.con_list.nr_cps_cg",
1630 FT_UINT8, BASE_DEC, NULL, 0x1f,
1631 "Number of CPS in Concentration Group", HFILL }
1633 { &hf_om2k_conl_ccp,
1634 { "CON Connection Point", "gsm_abis_om2000.con_list.cpp",
1635 FT_UINT16, BASE_DEC, NULL, 0x07ff,
1636 NULL, HFILL }
1638 { &hf_om2k_conl_ci,
1639 { "Contiguity Index", "gsm_abis_om2000.con_list.ci",
1640 FT_UINT8, BASE_DEC, NULL, 0,
1641 NULL, HFILL }
1643 { &hf_om2k_conl_tag,
1644 { "Tag", "gsm_abis_om2000.con_list.tag",
1645 FT_UINT8, BASE_DEC, NULL, 0x1f,
1646 NULL, HFILL }
1648 { &hf_om2k_conl_tei,
1649 { "TEI", "gsm_abis_om2000.con_list.tei",
1650 FT_UINT8, BASE_DEC, NULL, 0,
1651 NULL, HFILL }
1653 { &hf_om2k_tf_mode,
1654 { "TF Mode", "gsm_abis_om2000.tf_mode",
1655 FT_UINT8, BASE_HEX, VALS(om2k_tf_mode_vals), 0,
1656 NULL, HFILL }
1658 { &hf_om2k_tf_fs_offset,
1659 { "TF FS Offset", "gsm_abis_om2000.tf_fs_offset",
1660 FT_UINT64, BASE_DEC, NULL, 0,
1661 NULL, HFILL }
1663 { &hf_om2k_attr_id,
1664 { "Attribute Identifier", "gsm_abis_om2000.attr_id",
1665 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &om2k_attr_id_vals_ext, 0,
1666 NULL, HFILL }
1668 { &hf_om2k_attr_index,
1669 { "Attribute Index", "gsm_abis_om2000.attr_index",
1670 FT_UINT8, BASE_DEC, NULL, 0,
1671 NULL, HFILL }
1673 { &hf_om2k_reason_code,
1674 { "Reason Code", "gsm_abis_om2000.reason_code",
1675 FT_UINT8, BASE_HEX, NULL, 0,
1676 NULL, HFILL }
1678 { &hf_om2k_result_code,
1679 { "Result Code", "gsm_abis_om2000.res_code",
1680 FT_UINT8, BASE_HEX, VALS(om2k_res_code_vals), 0,
1681 NULL, HFILL }
1683 { &hf_om2k_iwd_type,
1684 { "IWD", "gsm_abis_om2000.iwd_type",
1685 FT_UINT8, BASE_HEX, VALS(om2k_iwd_type_vals), 0,
1686 NULL, HFILL }
1688 { &hf_om2k_iwd_gen_rev,
1689 { "IWD Generation/Revision", "gsm_abis_om2000.iwd_gen_rev",
1690 FT_STRING, BASE_NONE, NULL, 0,
1691 NULL, HFILL }
1693 { &hf_om2k_trxc_list,
1694 { "TRXC List", "gsm_abis_om2000.trxc_list",
1695 FT_UINT16, BASE_HEX, NULL, 0xFFFF,
1696 NULL, HFILL }
1698 { &hf_om2k_max_allowed_power,
1699 { "Maximum allowed power", "gsm_abis_om2000.max_allowed_power",
1700 FT_UINT8, BASE_DEC, NULL, 0,
1701 NULL, HFILL }
1703 { &hf_om2k_max_allowed_num_trxcs,
1704 { "Maximum allowed number of TRXCs", "gsm_abis_om2000.max_allowed_num_trxcs",
1705 FT_UINT8, BASE_DEC, NULL, 0,
1706 NULL, HFILL }
1708 { &hf_om2k_mctr_feat_sts_bitmap,
1709 { "MCTR Feature status bitmap", "gsm_abis_om2000.mctr_feat_sts_bitmap",
1710 FT_BYTES, BASE_NONE, NULL, 0,
1711 NULL, HFILL }
1713 { &hf_om2k_config_type,
1714 { "Configuration Type", "gsm_abis_om2000.config_type",
1715 FT_BOOLEAN, 8, NULL, 0x01,
1716 NULL, HFILL }
1718 { &hf_om2k_jitter_size,
1719 { "Jitter Size", "gsm_abis_om2000.jitter_size",
1720 FT_UINT8, BASE_DEC, NULL, 0,
1721 NULL, HFILL }
1723 { &hf_om2k_packing_algo,
1724 { "Packing Algorithm", "gsm_abis_om2000.packing_algo",
1725 FT_UINT8, BASE_DEC, NULL, 0,
1726 NULL, HFILL }
1728 { &hf_om2k_power_bo_ctype_map,
1729 { "Power Back-Off Channel Type Map", "gsm_abis_om2000.power_bo_ctype_map",
1730 FT_BYTES, BASE_NONE, NULL, 0,
1731 NULL, HFILL }
1733 { &hf_om2k_power_bo_priority,
1734 { "Power Back-Off Priority", "gsm_abis_om2000.power_bo_priority",
1735 FT_BYTES, BASE_NONE, NULL, 0,
1736 NULL, HFILL }
1738 { &hf_om2k_power_bo_value,
1739 { "Power Back-Off Value", "gsm_abis_om2000.power_bo_value",
1740 FT_BYTES, BASE_NONE, NULL, 0,
1741 NULL, HFILL }
1744 static int *ett[] = {
1745 &ett_om2000,
1746 &ett_om2k_mo,
1747 &ett_om2k_isl,
1748 &ett_om2k_conl,
1749 &ett_om2k_iwd,
1751 static ei_register_info ei[] = {
1752 { &ei_om2k_not_performed,
1753 { "gsm_abis_om2000.not_performed", PI_RESPONSE_CODE, PI_WARN,
1754 "Operation not performed as per request", EXPFILL }
1756 { &ei_om2k_reject,
1757 { "gsm_abis_om2000.reject", PI_RESPONSE_CODE, PI_WARN,
1758 "Operation Rejected by RBS", EXPFILL }
1760 { &ei_om2k_nack,
1761 { "gsm_abis_om2000.nack", PI_RESPONSE_CODE, PI_ERROR,
1762 "Operation NACKed by peer", EXPFILL }
1764 { &ei_om2k_ena_res_disabled,
1765 { "gsm_abis_om2000.ena_res_disabled", PI_RESPONSE_CODE, PI_WARN,
1766 "Enable Result != Enabled", EXPFILL }
1770 expert_module_t *expert_om2000;
1772 proto_abis_om2000 = proto_register_protocol("Ericsson A-bis OML",
1773 "Ericsson OML",
1774 "gsm_abis_om2000");
1776 expert_om2000 = expert_register_protocol(proto_abis_om2000);
1777 expert_register_field_array(expert_om2000, ei, array_length(ei));
1778 proto_register_field_array(proto_abis_om2000, hf, array_length(hf));
1780 proto_register_subtree_array(ett, array_length(ett));
1782 register_dissector("gsm_abis_om2000", dissect_abis_om2000,
1783 proto_abis_om2000);
1787 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1789 * Local variables:
1790 * c-basic-offset: 8
1791 * tab-width: 8
1792 * indent-tabs-mode: t
1793 * End:
1795 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1796 * :indentSize=8:tabSize=8:noTabs=false: