3 * Dissector for the Digital Enhanced Cordless Telecommunications
7 * - Andreas Schuler <andreas (A) schulerdev.de>
8 * - Matthias Wenzel <dect (A) mazzoo.de>
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
18 TODO (roughly in that order)
19 - Expand beyond full slot, 2-level modulation
20 - Make things stateful
21 - Once the capture format has stabilized, get rid of the Ethernet
22 hack and use a proper capture type.
28 #include <epan/packet.h>
29 #define ETHERTYPE_DECT 0x2323
31 #define DECT_PACKET_INFO_LEN 11
33 #define DECT_PACKET_PP 0
34 #define DECT_PACKET_FP 1
36 #define DECT_AFIELD_SIZE 8
37 #define DECT_AFIELD_TAIL_SIZE 5
38 #define DECT_BFIELD_DATA_SIZE 128
40 #define DECT_A_TA_MASK 0xE0
41 #define DECT_A_TA_SHIFT 5
42 #define DECT_A_BA_MASK 0x0E
43 #define DECT_A_BA_SHIFT 1
44 #define DECT_A_Q1_MASK 0x10
45 #define DECT_A_Q2_MASK 0x01
56 DECT_TA_MT_FIRST
= DECT_TA_PT
59 /* ETSI EN 300 175-3 V2.3.0 6.2.4 and Annex E */
60 /* scramble table with corrections by Jakub Hruska */
61 static const uint8_t scrt
[8][31]=
63 {0x3B, 0xCD, 0x21, 0x5D, 0x88, 0x65, 0xBD, 0x44, 0xEF, 0x34, 0x85, 0x76, 0x21, 0x96, 0xF5, 0x13, 0xBC, 0xD2, 0x15, 0xD8, 0x86, 0x5B, 0xD4, 0x4E, 0xF3, 0x48, 0x57, 0x62, 0x19, 0x6F, 0x51},
64 {0x32, 0xDE, 0xA2, 0x77, 0x9A, 0x42, 0xBB, 0x10, 0xCB, 0x7A, 0x89, 0xDE, 0x69, 0x0A, 0xEC, 0x43, 0x2D, 0xEA, 0x27, 0x79, 0xA4, 0x2B, 0xB1, 0x0C, 0xB7, 0xA8, 0x9D, 0xE6, 0x90, 0xAE, 0xC4},
65 {0x2D, 0xEA, 0x27, 0x79, 0xA4, 0x2B, 0xB1, 0x0C, 0xB7, 0xA8, 0x9D, 0xE6, 0x90, 0xAE, 0xC4, 0x32, 0xDE, 0xA2, 0x77, 0x9A, 0x42, 0xBB, 0x10, 0xCB, 0x7A, 0x89, 0xDE, 0x69, 0x0A, 0xEC, 0x43},
66 {0x27, 0x79, 0xA4, 0x2B, 0xB1, 0x0C, 0xB7, 0xA8, 0x9D, 0xE6, 0x90, 0xAE, 0xC4, 0x32, 0xDE, 0xA2, 0x77, 0x9A, 0x42, 0xBB, 0x10, 0xCB, 0x7A, 0x89, 0xDE, 0x69, 0x0A, 0xEC, 0x43, 0x2D, 0xEA},
67 {0x19, 0x6F, 0x51, 0x3B, 0xCD, 0x21, 0x5D, 0x88, 0x65, 0xBD, 0x44, 0xEF, 0x34, 0x85, 0x76, 0x21, 0x96, 0xF5, 0x13, 0xBC, 0xD2, 0x15, 0xD8, 0x86, 0x5B, 0xD4, 0x4E, 0xF3, 0x48, 0x57, 0x62},
68 {0x13, 0xBC, 0xD2, 0x15, 0xD8, 0x86, 0x5B, 0xD4, 0x4E, 0xF3, 0x48, 0x57, 0x62, 0x19, 0x6F, 0x51, 0x3B, 0xCD, 0x21, 0x5D, 0x88, 0x65, 0xBD, 0x44, 0xEF, 0x34, 0x85, 0x76, 0x21, 0x96, 0xF5},
69 {0x0C, 0xB7, 0xA8, 0x9D, 0xE6, 0x90, 0xAE, 0xC4, 0x32, 0xDE, 0xA2, 0x77, 0x9A, 0x42, 0xBB, 0x10, 0xCB, 0x7A, 0x89, 0xDE, 0x69, 0x0A, 0xEC, 0x43, 0x2D, 0xEA, 0x27, 0x79, 0xA4, 0x2B, 0xB1},
70 {0x79, 0xA4, 0x2B, 0xB1, 0x0C, 0xB7, 0xA8, 0x9D, 0xE6, 0x90, 0xAE, 0xC4, 0x32, 0xDE, 0xA2, 0x77, 0x9A, 0x42, 0xBB, 0x10, 0xCB, 0x7A, 0x89, 0xDE, 0x69, 0x0A, 0xEC, 0x43, 0x2D, 0xEA, 0x27}
73 void proto_register_dect (void);
74 void proto_reg_handoff_dect (void);
76 static dissector_handle_t dect_handle
;
78 static int proto_dect
;
82 static int ett_columns
;
83 static int ett_afield
;
87 static int ett_bfield
;
88 static int ett_bfdescrdata
;
90 static int hf_dect_transceivermode
;
91 static int hf_dect_preamble
;
92 static int hf_dect_type
;
93 static int hf_dect_channel
;
94 static int hf_dect_framenumber
;
95 static int hf_dect_rssi
;
96 static int hf_dect_slot
;
97 static int hf_dect_cc
;
98 static int hf_dect_cc_TA
;
99 static int hf_dect_cc_AField
;
100 static int hf_dect_cc_BField
;
101 static int hf_dect_A
;
102 static int hf_dect_A_Head
;
103 static int hf_dect_A_Head_TA_FP
;
104 static int hf_dect_A_Head_TA_PP
;
105 static int hf_dect_A_Head_Q1
;
106 static int hf_dect_A_Head_BA
;
107 static int hf_dect_A_Head_Q2
;
108 static int hf_dect_A_Tail
;
109 static int hf_dect_A_Tail_Nt
;
110 static int hf_dect_A_Tail_Qt_Qh
;
111 static int hf_dect_A_Tail_Qt_0_Sn
;
112 static int hf_dect_A_Tail_Qt_0_Nr
;
113 static int hf_dect_A_Tail_Qt_0_Sp
;
114 static int hf_dect_A_Tail_Qt_0_Esc
;
115 static int hf_dect_A_Tail_Qt_0_Txs
;
116 static int hf_dect_A_Tail_Qt_0_Mc
;
117 static int hf_dect_A_Tail_Qt_0_CA
;
118 static int hf_dect_A_Tail_Qt_0_Spr1
;
119 static int hf_dect_A_Tail_Qt_0_Cn
;
120 static int hf_dect_A_Tail_Qt_0_Spr2
;
121 static int hf_dect_A_Tail_Qt_0_PSCN
;
122 static int hf_dect_A_Tail_Qt_3_A12
;
123 static int hf_dect_A_Tail_Qt_3_A13
;
124 static int hf_dect_A_Tail_Qt_3_A14
;
125 static int hf_dect_A_Tail_Qt_3_A15
;
126 static int hf_dect_A_Tail_Qt_3_A16
;
127 static int hf_dect_A_Tail_Qt_3_A17
;
128 static int hf_dect_A_Tail_Qt_3_A18
;
129 static int hf_dect_A_Tail_Qt_3_A19
;
130 static int hf_dect_A_Tail_Qt_3_A20
;
131 static int hf_dect_A_Tail_Qt_3_A21
;
132 static int hf_dect_A_Tail_Qt_3_A22
;
133 static int hf_dect_A_Tail_Qt_3_A23
;
134 static int hf_dect_A_Tail_Qt_3_A24
;
135 static int hf_dect_A_Tail_Qt_3_A25
;
136 static int hf_dect_A_Tail_Qt_3_A26
;
137 static int hf_dect_A_Tail_Qt_3_A27
;
138 static int hf_dect_A_Tail_Qt_3_A28
;
139 static int hf_dect_A_Tail_Qt_3_A29
;
140 static int hf_dect_A_Tail_Qt_3_A30
;
141 static int hf_dect_A_Tail_Qt_3_A31
;
142 static int hf_dect_A_Tail_Qt_3_A32
;
143 static int hf_dect_A_Tail_Qt_3_A33
;
144 static int hf_dect_A_Tail_Qt_3_A34
;
145 static int hf_dect_A_Tail_Qt_3_A35
;
146 static int hf_dect_A_Tail_Qt_3_A36
;
147 static int hf_dect_A_Tail_Qt_3_A37
;
148 static int hf_dect_A_Tail_Qt_3_A38
;
149 static int hf_dect_A_Tail_Qt_3_A39
;
150 static int hf_dect_A_Tail_Qt_3_A40
;
151 static int hf_dect_A_Tail_Qt_3_A41
;
152 static int hf_dect_A_Tail_Qt_3_A42
;
153 static int hf_dect_A_Tail_Qt_3_A43
;
154 static int hf_dect_A_Tail_Qt_3_A44
;
155 static int hf_dect_A_Tail_Qt_3_A45
;
156 static int hf_dect_A_Tail_Qt_3_A46
;
157 static int hf_dect_A_Tail_Qt_3_A47
;
158 static int hf_dect_A_Tail_Qt_4_CRFPHops
;
159 static int hf_dect_A_Tail_Qt_4_CRFPEnc
;
160 static int hf_dect_A_Tail_Qt_4_REFHops
;
161 static int hf_dect_A_Tail_Qt_4_REPCap
;
162 static int hf_dect_A_Tail_Qt_4_Sync
;
163 static int hf_dect_A_Tail_Qt_4_A20
;
164 static int hf_dect_A_Tail_Qt_4_MACSusp
;
165 static int hf_dect_A_Tail_Qt_4_MACIpq
;
166 static int hf_dect_A_Tail_Qt_4_A23
;
167 static int hf_dect_A_Tail_Qt_4_A24
;
168 static int hf_dect_A_Tail_Qt_4_A25
;
169 static int hf_dect_A_Tail_Qt_4_A26
;
170 static int hf_dect_A_Tail_Qt_4_A27
;
171 static int hf_dect_A_Tail_Qt_4_A28
;
172 static int hf_dect_A_Tail_Qt_4_A29
;
173 static int hf_dect_A_Tail_Qt_4_A30
;
174 static int hf_dect_A_Tail_Qt_4_A31
;
175 static int hf_dect_A_Tail_Qt_4_A32
;
176 static int hf_dect_A_Tail_Qt_4_A33
;
177 static int hf_dect_A_Tail_Qt_4_A34
;
178 static int hf_dect_A_Tail_Qt_4_A35
;
179 static int hf_dect_A_Tail_Qt_4_A36
;
180 static int hf_dect_A_Tail_Qt_4_A37
;
181 static int hf_dect_A_Tail_Qt_4_A38
;
182 static int hf_dect_A_Tail_Qt_4_A39
;
183 static int hf_dect_A_Tail_Qt_4_A40
;
184 static int hf_dect_A_Tail_Qt_4_A41
;
185 static int hf_dect_A_Tail_Qt_4_A42
;
186 static int hf_dect_A_Tail_Qt_4_A43
;
187 static int hf_dect_A_Tail_Qt_4_A44
;
188 static int hf_dect_A_Tail_Qt_4_A45
;
189 static int hf_dect_A_Tail_Qt_4_A46
;
190 static int hf_dect_A_Tail_Qt_4_A47
;
191 static int hf_dect_A_Tail_Qt_6_Spare
;
192 static int hf_dect_A_Tail_Qt_6_Mfn
;
193 static int hf_dect_A_Tail_Mt_Mh
;
194 static int hf_dect_A_Tail_Mt_Mh_attr
;
195 static int hf_dect_A_Tail_Mt_Mh_fmid
;
196 static int hf_dect_A_Tail_Mt_Mh_pmid
;
197 static int hf_dect_A_Tail_Mt_BasicConCtrl
;
198 static int hf_dect_A_Tail_Mt_Encr_Cmd1
;
199 static int hf_dect_A_Tail_Mt_Encr_Cmd2
;
200 static int hf_dect_A_Tail_Pt_ExtFlag
;
201 static int hf_dect_A_Tail_Pt_SDU
;
202 static int hf_dect_A_Tail_Pt_RFPI
;
203 static int hf_dect_A_Tail_Pt_BsData
;
204 static int hf_dect_A_Tail_Pt_InfoType
;
205 static int hf_dect_A_Tail_Pt_SlotPairs
;
206 static int hf_dect_A_Tail_Pt_Fillbits
;
207 static int hf_dect_A_Tail_Pt_Bearer_Sn
;
208 static int hf_dect_A_Tail_Pt_Bearer_Cn
;
209 static int hf_dect_A_Tail_Pt_Bearer_Sp
;
210 static int hf_dect_A_RCRC
;
211 static int hf_dect_B
;
212 static int hf_dect_B_Data
;
213 static int hf_dect_B_DescrambledData
;
214 static int hf_dect_B_fn
;
215 static int hf_dect_B_XCRC
;
217 static const value_string transceiver_mode
[]=
224 /* ETSI EN 300 175-3 V2.3.0 7.1.2 */
225 static const value_string TA_vals_FP
[]=
227 {0, "Ct Next Data Packet"},
228 {1, "Ct First Data Packet"},
229 {2, "Nt Identities Information on Connectionless Bearer"},
230 {3, "Nt Identities Information"},
231 {4, "Qt Multiframe Synchronisation and System Information"},
233 {6, "Mt MAC Layer Control"},
234 {7, "Pt Paging Tail"},
238 /* ETSI EN 300 175-3 V2.3.0 7.1.2 */
239 static const value_string TA_vals_PP
[]=
241 {0, "Ct Next Data Packet"},
242 {1, "Ct First Data Packet"},
243 {2, "Nt Identities Information on Connectionless Bearer"},
244 {3, "Nt Identities Information"},
245 {4, "Qt Multiframe Synchronisation and System Information"},
247 {6, "Mt MAC Layer Control"},
248 {7, "Mt MAC Layer Control,first packet"},
252 /* ETSI EN 300 175-3 V2.3.0 7.1.4 */
253 static const value_string BA_vals
[]=
255 {0, "U-Type, In, SIn or Ip Packet No. 0 or No Valid Ip_error_detect Channel Data"},
256 {1, "U-Type, Ip_error_detect or Ip Packet No. 1 or SIn or No Valid In Channel Data"},
257 {2, "Double-Slot Required / E-Type, all Cf or CLf, Packet No. 0"},
258 {3, "E-Type, All Cf, Packet No. 1"},
259 {4, "Half-Slot Required / E-Type, not all Cf or CLf, Cf Packet No. 0"},
260 {5, "E-Type, not all Cf, Cf Packet No. 1"},
261 {6, "E-Type, All MAC control (unnumbered)"},
266 /* ETSI EN 300 175-3 V2.3.0 7.2.3.1 */
267 static const value_string QTHead_vals
[]=
269 {0, "Static System Info"},
270 {1, "Static System Info"},
271 {2, "Extended RF Carriers Part 1"},
272 {3, "Fixed Part Capabilities"},
273 {4, "Extended Fixed Part Capabilities"},
274 {5, "SARI List Contents"},
275 {6, "Multi-Frame No."},
278 {9, "Extended RF Carriers Part 2"},
280 {11, "Transmit Information"},
281 {12, "Extended Fixed Part Capabilities 2"},
288 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.2 */
289 static const value_string QTNormalReverse_vals
[]=
291 {0, "Normal RFP Transmit Half-Frame"},
292 {1, "Normal PP Transmit Half-Frame"},
296 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.3 */
297 static const value_string QTSlotNumber_vals
[]=
299 {0, "Slot Pair 0/12"},
300 {1, "Slot Pair 1/13"},
301 {2, "Slot Pair 2/14"},
302 {3, "Slot Pair 3/15"},
303 {4, "Slot Pair 4/16"},
304 {5, "Slot Pair 5/17"},
305 {6, "Slot Pair 6/18"},
306 {7, "Slot Pair 7/19"},
307 {8, "Slot Pair 8/20"},
308 {9, "Slot Pair 9/21"},
309 {10, "Slot Pair 10/22"},
310 {11, "Slot Pair 11/23"},
318 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.4 */
319 static const value_string QTStartPosition_vals
[]=
321 {0, "S-Field starts at Bit F0"},
322 {1, "Reserved for Future Use"},
323 {2, "S-Field starts at Bit F240"},
324 {3, "Reserved for Future Use"},
328 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.5 */
329 static const value_string QTEscape_vals
[]=
331 {0, "No QT Escape is broadcast"},
332 {1, "The QT Escape is broadcast"},
336 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.6 */
337 static const value_string QTTransceiver_vals
[]=
339 {0, "RFP has 1 Transceiver"},
340 {1, "RFP has 2 Transceiver"},
341 {2, "RFP has 3 Transceiver"},
342 {3, "RFP has 4 or more Transceiver"},
346 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.7 */
347 static const value_string QTExtendedCarrier_vals
[]=
349 {0, "No Extended RF Carrier Information Message"},
350 {1, "Extended RF Carrier Information Message shall be transmitted in the next Multiframe"},
354 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.9 */
355 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.11 */
356 static const value_string QTSpr_vals
[]=
365 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.10 */
366 static const value_string QTCarrierNumber_vals
[]=
378 {10, "RF Carrier 10"},
379 {11, "RF Carrier 11"},
380 {12, "RF Carrier 12"},
381 {13, "RF Carrier 13"},
382 {14, "RF Carrier 14"},
383 {15, "RF Carrier 15"},
384 {16, "RF Carrier 16"},
385 {17, "RF Carrier 17"},
386 {18, "RF Carrier 18"},
387 {19, "RF Carrier 19"},
388 {20, "RF Carrier 20"},
389 {21, "RF Carrier 21"},
390 {22, "RF Carrier 22"},
391 {23, "RF Carrier 23"},
392 {24, "RF Carrier 24"},
393 {25, "RF Carrier 25"},
394 {26, "RF Carrier 26"},
395 {27, "RF Carrier 27"},
396 {28, "RF Carrier 28"},
397 {29, "RF Carrier 29"},
398 {30, "RF Carrier 30"},
399 {31, "RF Carrier 31"},
400 {32, "RF Carrier 32"},
401 {33, "RF Carrier 33"},
402 {34, "RF Carrier 34"},
403 {35, "RF Carrier 35"},
404 {36, "RF Carrier 36"},
405 {37, "RF Carrier 37"},
406 {38, "RF Carrier 38"},
407 {39, "RF Carrier 39"},
408 {40, "RF Carrier 40"},
409 {41, "RF Carrier 41"},
410 {42, "RF Carrier 42"},
411 {43, "RF Carrier 43"},
412 {44, "RF Carrier 44"},
413 {45, "RF Carrier 45"},
414 {46, "RF Carrier 46"},
415 {47, "RF Carrier 47"},
416 {48, "RF Carrier 48"},
417 {49, "RF Carrier 49"},
418 {50, "RF Carrier 50"},
419 {51, "RF Carrier 51"},
420 {52, "RF Carrier 52"},
421 {53, "RF Carrier 53"},
422 {54, "RF Carrier 54"},
423 {55, "RF Carrier 55"},
424 {56, "RF Carrier 56"},
425 {57, "RF Carrier 57"},
426 {58, "RF Carrier 58"},
427 {59, "RF Carrier 59"},
428 {60, "RF Carrier 60"},
429 {61, "RF Carrier 61"},
430 {62, "RF Carrier 62"},
431 {63, "RF Carrier 63"},
435 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.12 */
436 static const value_string QTScanCarrierNum_vals
[]=
438 {0, "Primary Scan next on RF Carrier 0"},
439 {1, "Primary Scan next on RF Carrier 1"},
440 {2, "Primary Scan next on RF Carrier 2"},
441 {3, "Primary Scan next on RF Carrier 3"},
442 {4, "Primary Scan next on RF Carrier 4"},
443 {5, "Primary Scan next on RF Carrier 5"},
444 {6, "Primary Scan next on RF Carrier 6"},
445 {7, "Primary Scan next on RF Carrier 7"},
446 {8, "Primary Scan next on RF Carrier 8"},
447 {9, "Primary Scan next on RF Carrier 9"},
448 {10, "Primary Scan next on RF Carrier 10"},
449 {11, "Primary Scan next on RF Carrier 11"},
450 {12, "Primary Scan next on RF Carrier 12"},
451 {13, "Primary Scan next on RF Carrier 13"},
452 {14, "Primary Scan next on RF Carrier 14"},
453 {15, "Primary Scan next on RF Carrier 15"},
454 {16, "Primary Scan next on RF Carrier 16"},
455 {17, "Primary Scan next on RF Carrier 17"},
456 {18, "Primary Scan next on RF Carrier 18"},
457 {19, "Primary Scan next on RF Carrier 19"},
458 {20, "Primary Scan next on RF Carrier 20"},
459 {21, "Primary Scan next on RF Carrier 21"},
460 {22, "Primary Scan next on RF Carrier 22"},
461 {23, "Primary Scan next on RF Carrier 23"},
462 {24, "Primary Scan next on RF Carrier 24"},
463 {25, "Primary Scan next on RF Carrier 25"},
464 {26, "Primary Scan next on RF Carrier 26"},
465 {27, "Primary Scan next on RF Carrier 27"},
466 {28, "Primary Scan next on RF Carrier 28"},
467 {29, "Primary Scan next on RF Carrier 29"},
468 {30, "Primary Scan next on RF Carrier 30"},
469 {31, "Primary Scan next on RF Carrier 31"},
470 {32, "Primary Scan next on RF Carrier 32"},
471 {33, "Primary Scan next on RF Carrier 33"},
472 {34, "Primary Scan next on RF Carrier 34"},
473 {35, "Primary Scan next on RF Carrier 35"},
474 {36, "Primary Scan next on RF Carrier 36"},
475 {37, "Primary Scan next on RF Carrier 37"},
476 {38, "Primary Scan next on RF Carrier 38"},
477 {39, "Primary Scan next on RF Carrier 39"},
478 {40, "Primary Scan next on RF Carrier 40"},
479 {41, "Primary Scan next on RF Carrier 41"},
480 {42, "Primary Scan next on RF Carrier 42"},
481 {43, "Primary Scan next on RF Carrier 43"},
482 {44, "Primary Scan next on RF Carrier 44"},
483 {45, "Primary Scan next on RF Carrier 45"},
484 {46, "Primary Scan next on RF Carrier 46"},
485 {47, "Primary Scan next on RF Carrier 47"},
486 {48, "Primary Scan next on RF Carrier 48"},
487 {49, "Primary Scan next on RF Carrier 49"},
488 {50, "Primary Scan next on RF Carrier 50"},
489 {51, "Primary Scan next on RF Carrier 51"},
490 {52, "Primary Scan next on RF Carrier 52"},
491 {53, "Primary Scan next on RF Carrier 53"},
492 {54, "Primary Scan next on RF Carrier 54"},
493 {55, "Primary Scan next on RF Carrier 55"},
494 {56, "Primary Scan next on RF Carrier 56"},
495 {57, "Primary Scan next on RF Carrier 57"},
496 {58, "Primary Scan next on RF Carrier 58"},
497 {59, "Primary Scan next on RF Carrier 59"},
498 {60, "Primary Scan next on RF Carrier 60"},
499 {61, "Primary Scan next on RF Carrier 61"},
500 {62, "Primary Scan next on RF Carrier 62"},
501 {63, "Primary Scan next on RF Carrier 63"},
505 /* ETSI EN 300 175-3 V2.3.0 7.2.3.4.2 */
506 static const value_string Qt_A12_vals
[]=
508 {0, " Extended FP Info"},
509 {1, "Extended FP Info"},
513 static const value_string Qt_A13_vals
[]=
515 {0, " Double Duplex Bearer Connections"},
516 {1, "Double Duplex Bearer Connections"},
520 static const value_string Qt_A14_vals
[]=
527 static const value_string Qt_A15_vals
[]=
534 static const value_string Qt_A16_vals
[]=
541 static const value_string Qt_A17_vals
[]=
548 static const value_string Qt_A18_vals
[]=
550 {0, " Frequency Control"},
551 {1, "Frequency Control"},
555 static const value_string Qt_A19_vals
[]=
557 {0, " Page Repetition"},
558 {1, "Page Repetition"},
562 static const value_string Qt_A20_vals
[]=
564 {0, " C/O Setup on Dummy allowed"},
565 {1, "C/O Setup on Dummy allowed"},
569 static const value_string Qt_A21_vals
[]=
576 static const value_string Qt_A22_vals
[]=
578 {0, " C/L Downlink"},
583 static const value_string Qt_A23_vals
[]=
585 {0, " Basic A-Field Set-Up"},
586 {1, "Basic A-Field Set-Up"},
590 static const value_string Qt_A24_vals
[]=
592 {0, " Advanced A-Field Set-Up"},
593 {1, "Advanced A-Field Set-Up"},
597 static const value_string Qt_A25_vals
[]=
599 {0, " B-field Set-Up"},
600 {1, "B-field Set-Up"},
604 static const value_string Qt_A26_vals
[]=
611 static const value_string Qt_A27_vals
[]=
613 {0, " In Minimum Delay"},
614 {1, "In Minimum Delay"},
618 static const value_string Qt_A28_vals
[]=
620 {0, " In Normal Delay"},
621 {1, "In Normal Delay"},
625 static const value_string Qt_A29_vals
[]=
627 {0, " Ip Error Detection"},
628 {1, "Ip Error Detection"},
632 static const value_string Qt_A30_vals
[]=
634 {0, " Ip Error Correction"},
635 {1, "Ip Error Correction"},
639 static const value_string Qt_A31_vals
[]=
641 {0, " Multibearer Connections"},
642 {1, "Multibearer Connections"},
646 /* ETSI EN 300 175-5 V2.3.0 Annex F */
647 static const value_string Qt_A32_vals
[]=
649 {0, " ADPCM/G.726 Voice service"},
650 {1, "ADPCM/G.726 Voice service"},
654 static const value_string Qt_A33_vals
[]=
656 {0, " GAP basic speech"},
657 {1, "GAP basic speech"},
661 static const value_string Qt_A34_vals
[]=
663 {0, " Non-voice circuit switched service"},
664 {1, "Non-voice circuit switched service"},
668 static const value_string Qt_A35_vals
[]=
670 {0, " Non-voice packet switched service"},
671 {1, "Non-voice packet switched service"},
675 static const value_string Qt_A36_vals
[]=
677 {0, " Standard authentication required"},
678 {1, "Standard authentication required"},
682 static const value_string Qt_A37_vals
[]=
684 {0, " Standard ciphering supported"},
685 {1, "Standard ciphering supported"},
689 static const value_string Qt_A38_vals
[]=
691 {0, " Location registration supported"},
692 {1, "Location registration supported"},
696 static const value_string Qt_A39_vals
[]=
698 {0, " SIM services available"},
699 {1, "SIM services available"},
703 static const value_string Qt_A40_vals
[]=
705 {0, " Non-static Fixed Part (FP)"},
706 {1, "Non-static Fixed Part (FP)"},
710 static const value_string Qt_A41_vals
[]=
712 {0, " CISS services available"},
713 {1, "CISS services available"},
717 static const value_string Qt_A42_vals
[]=
719 {0, " CLMS service available"},
720 {1, "CLMS service available"},
724 static const value_string Qt_A43_vals
[]=
726 {0, " COMS service available"},
727 {1, "COMS service available"},
731 static const value_string Qt_A44_vals
[]=
733 {0, " Access rights requests supported"},
734 {1, "Access rights requests supported"},
738 static const value_string Qt_A45_vals
[]=
740 {0, " External handover supported"},
741 {1, "External handover supported"},
745 static const value_string Qt_A46_vals
[]=
747 {0, " Connection handover supported"},
748 {1, "Connection handover supported"},
752 static const value_string Qt_A47_vals
[]=
760 static const value_string Qt_EA20_vals
[]=
767 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.1 */
768 static const value_string Qt_CRFPHops_vals
[]=
770 {0, "1 CRFP is allowed"},
771 {1, "2 CRFP allowed in cascade"},
772 {2, "3 CRFP allowed in cascade"},
773 {3, "No CRFP allowed"},
777 static const value_string Qt_CRFPEnc_vals
[]=
779 {0, "CRFP encryption not supported"},
780 {1, "CRFP encryption supported"},
784 static const value_string Qt_REPHops_vals
[]=
786 {0, "REP not supported"},
787 {1, "1 REP is allowed"},
788 {2, "2 REP are allowed in cascade"},
789 {3, "3 REP are allowed in cascade"},
793 static const value_string Qt_REPCap_vals
[]=
795 {0, "REP interlacing not supported"},
796 {1, "REP interlacing supported"},
800 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.2 */
801 static const value_string Qt_Sync_vals
[]=
803 {0, "standard, see EN 300 175-2 [2], clauses 4.6 and 5.2"},
804 {1, "prolonged preamble, see EN 300 175-2 [2], annex C (see note)"},
810 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.3 */
811 static const value_string Qt_MACSusp_vals
[]=
813 {0, "Suspend and Resume not supported"},
814 {1, "Suspend and Resume supported"},
818 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.4 */
819 static const value_string Qt_MACIpq_vals
[]=
821 {0, "Ipq not supported"},
822 {1, "Ipq supported"},
826 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2 */
827 static const value_string Qt_EA23_vals
[]=
829 {0, " Extended Fixed Part Info 2"},
830 {1, "Extended Fixed Part Info 2"},
834 static const value_string Qt_EA24_vals
[]=
841 /* ETSI EN 300 175-5 V2.3.0 Annex F */
842 static const value_string Qt_EA25_vals
[]=
844 {0, " F-MMS Interworking profile supported"},
845 {1, "F-MMS Interworking profile supported"},
849 static const value_string Qt_EA26_vals
[]=
851 {0, " Basic ODAP supported"},
852 {1, "Basic ODAP supported"},
856 static const value_string Qt_EA27_vals
[]=
858 {0, " Generic Media Encapsulation transport (DPRS) supported"},
859 {1, "Generic Media Encapsulation transport (DPRS) supported"},
863 static const value_string Qt_EA28_vals
[]=
865 {0, " IP Roaming unrestricted supported"},
866 {1, "IP Roaming unrestricted supported"},
870 static const value_string Qt_EA29_vals
[]=
877 static const value_string Qt_EA30_vals
[]=
884 static const value_string Qt_EA31_vals
[]=
891 static const value_string Qt_EA32_vals
[]=
898 static const value_string Qt_EA33_vals
[]=
905 static const value_string Qt_EA34_vals
[]=
912 static const value_string Qt_EA35_vals
[]=
919 static const value_string Qt_EA36_vals
[]=
921 {0, " RAP Part 1 Profile"},
922 {1, "RAP Part 1 Profile"},
926 static const value_string Qt_EA37_vals
[]=
928 {0, " ISDN intermediate system"},
929 {1, "ISDN intermediate system"},
933 static const value_string Qt_EA38_vals
[]=
935 {0, " Synchronization to GPS achieved"},
936 {1, "Synchronization to GPS achieved"},
940 static const value_string Qt_EA39_vals
[]=
942 {0, " Location registration with TPUI allowed"},
943 {1, "Location registration with TPUI allowed"},
947 static const value_string Qt_EA40_vals
[]=
949 {0, " Emergency call supported"},
950 {1, "Emergency call supported"},
954 static const value_string Qt_EA41_vals
[]=
956 {0, " Asymmetric bearers supported"},
957 {1, "Asymmetric bearers supported"},
961 static const value_string Qt_EA42_vals
[]=
968 static const value_string Qt_EA43_vals
[]=
975 static const value_string Qt_EA44_vals
[]=
977 {0, " Data Service Profile D"},
978 {1, "Data Service Profile D"},
982 static const value_string Qt_EA45_vals
[]=
989 static const value_string Qt_EA46_vals
[]=
996 static const value_string Qt_EA47_vals
[]=
998 {0, " ISDN Data Services"},
999 {1, "ISDN Data Services"},
1003 /* ETSI EN 300 175-3 V2.3.0 7.2.5.1 */
1004 static const value_string MTHead_vals
[]=
1006 {0, "Basic Connection Control"},
1007 {1, "Advanced Connection Control"},
1008 {2, "MAC Layer Test Messages"},
1009 {3, "Quality Control"},
1010 {4, "Broadcast and Connectionless Services"},
1011 {5, "Encryption Control"},
1012 {6, "Tail for use with the first Transmission of a B-Field \"bearer request\" Message"},
1014 {8, "TARI Message"},
1015 {9, "REP Connection Control"},
1025 /* ETSI EN 300 175-3 V2.3.0 7.2.5.2 */
1026 static const value_string MTBasicConCtrl_vals
[]=
1028 {0, "Access Request"},
1029 {1, "Bearer Handover Request"},
1030 {2, "Connection Handover Request"},
1031 {3, "Unconfirmed Access Request"},
1032 {4, "Bearer Confirm"},
1034 {6, "Attributes T Request"},
1035 {7, "Attributes T Confirm"},
1047 /* ETSI EN 300 175-3 V2.3.0 7.2.5.7 */
1048 static const value_string MTEncrCmd1_vals
[]=
1050 {0, "Start Encryption"},
1051 {1, "Stop Encryption"},
1057 static const value_string MTEncrCmd2_vals
[]=
1066 /* ETSI EN 300 175-3 V2.3.0 7.2.4.2.2 */
1067 static const value_string PTExtFlag_vals
[]=
1069 {0, "Next normal Page in Frame 0"},
1070 {1, "Another Page in next Frame"},
1074 /* ETSI EN 300 175-3 V2.3.0 7.2.4.2.3 */
1075 static const value_string PTSDU_vals
[]=
1077 {0, "Zero Length Page"},
1080 {3, "MAC resume page"},
1081 {4, "Not the last 36 Bits of a Long Page"},
1082 {5, "The first 36 Bits of a Long Page"},
1083 {6, "The last 36 Bits of a Long Page"},
1084 {7, "All of a Long Page (first and last)"},
1088 /* ETSI EN 300 175-3 V2.3.0 7.2.4.3.1 */
1089 static const value_string PTInfoType_vals
[]=
1092 {1, "Blind Full Slot Information for Circuit Mode Service"},
1093 {2, "Other Bearer"},
1094 {3, "Recommended Other Bearer"},
1095 {4, "Good RFP Bearer"},
1096 {5, "Dummy or connectionless Bearer Position"},
1097 {6, "Extended Modulation Types"},
1099 {8, "Dummy or connectionless Bearer Marker"},
1100 {9, "Bearer Handover/Replacement Information"},
1101 {10, "RFP Status and Modulation Types"},
1102 {11, "Active Carriers"},
1103 {12, "Connectionless Bearer Position"},
1104 {13, "RFP Power Level"},
1105 {14, "Blind Double Slot/RFP-FP Interface Resource Information"},
1106 {15, "Blind Full Slot Information for Packet Mode Service"},
1111 /* ETSI EN 300 175-3 V2.3.0 7.2.4.3.10 */
1112 static const value_string PTRFPPower_vals
[]=
1135 static unsigned char
1136 dect_getbit(uint8_t *data
, int bit
)
1138 uint8_t byte
=data
[bit
/8];
1140 return (byte
>>bit
%8)&1;
1144 dect_setbit(uint8_t *data
, int bit
, uint8_t value
)
1147 data
[bit
/8]&=~(1<<(bit
%8));
1149 data
[bit
/8]|=(1<<(bit
%8));
1152 /* EN 300 175-3 V2.3.0 6.2.5.4 */
1154 calc_xcrc(uint8_t* data
, uint8_t length
)
1162 memset(bits
, 0, sizeof(bits
));
1163 for(y
=0;y
<=length
-4;y
++)
1165 dect_setbit(bits
, y
, dect_getbit(data
, y
+48*(1+(int)(y
/16))));
1201 /* EN 300 175-3 V2.3.0 6.2.5.2 */
1203 calc_rcrc(uint8_t* data
)
1205 uint16_t gp
=0x0589; /* 10000010110001001 without the leading 1 */
1211 crc
=data
[0]<<8|data
[1];
1220 while(!(crc
&0x8000))
1242 /* ETSI EN 300 175-3 V2.3.0 6.2.1.3 */
1244 dissect_bfield(bool dect_packet_type _U_
, uint8_t ba
,
1245 packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
, proto_tree
*DectTree
, proto_tree
*ColumnsTree
)
1247 uint8_t xcrc
/*, xcrclen*/;
1250 const char *bfield_str
;
1251 const char *bfield_short_str
;
1253 proto_item
*bfieldti
= NULL
;
1254 proto_tree
*BField
= NULL
;
1256 proto_item
*bfdescrdatati
= NULL
;
1257 proto_tree
*BFDescrData
= NULL
;
1259 uint8_t bfield_data
[DECT_BFIELD_DATA_SIZE
];
1260 unsigned bfield_length
= tvb_reported_length_remaining(tvb
, offset
);
1262 if (bfield_length
> DECT_BFIELD_DATA_SIZE
)
1263 bfield_length
= DECT_BFIELD_DATA_SIZE
;
1267 tvb_memcpy(tvb
, bfield_data
, offset
, bfield_length
);
1268 if (bfield_length
< DECT_BFIELD_DATA_SIZE
)
1269 memset(&bfield_data
[bfield_length
], 0, DECT_BFIELD_DATA_SIZE
- bfield_length
);
1272 memset(bfield_data
, 0, DECT_BFIELD_DATA_SIZE
);
1285 bfield_short_str
="Full Slot";
1286 bfield_str
="Full Slot (320 bit data, 4 bit xcrc)";
1292 bfield_short_str
="Double Slot";
1293 bfield_str
="Double Slot (800 bit data, 4 bit xcrc)";
1299 bfield_short_str
="Half Slot";
1300 bfield_str
="Half Slot (80 bit data, 4 bit xcrc)";
1307 bfield_short_str
="No B-Field";
1308 bfield_str
="No B-Field";
1312 proto_tree_add_string(ColumnsTree
, hf_dect_cc_BField
, tvb
, offset
, 1, bfield_short_str
);
1316 bfieldti
= proto_tree_add_item(DectTree
, hf_dect_B
, tvb
, offset
, blen
, ENC_NA
);
1317 BField
= proto_item_add_subtree(bfieldti
, ett_bfield
);
1319 proto_tree_add_none_format(BField
, hf_dect_B_Data
, tvb
, offset
, blen
, "%s", bfield_str
);
1321 bfdescrdatati
= proto_tree_add_item(BField
, hf_dect_B_DescrambledData
, tvb
, offset
, blen
, ENC_NA
);
1322 BFDescrData
= proto_item_add_subtree(bfdescrdatati
, ett_bfdescrdata
);
1325 start_offset
=offset
;
1327 if(blen
<=bfield_length
)
1333 uint16_t bytecount
=0;
1335 offset
=start_offset
;
1337 proto_tree_add_none_format(BFDescrData
, hf_dect_B_fn
, tvb
, offset
, 0, "Framenumber %u/%u", fn
, fn
+8);
1338 for(x
=0;x
<blen
;x
+=16)
1341 * XXX - should this just be an FTYPE_BYTES
1342 * field, and possibly just displayed as
1343 * "Data: N bytes" rather than giving all
1344 * the bytes of data?
1346 * No, it gives you the bytes in descrambled
1347 * form depending on the framenumber. Sometimes,
1348 * you doesn't know the real framenumber, so you need
1349 * the range of all possible descramblings. (a.schuler)
1351 wmem_strbuf_t
*string
;
1352 string
= wmem_strbuf_new(pinfo
->pool
, NULL
);
1358 wmem_strbuf_append_printf(string
,"%.2x ", bfield_data
[x
+y
]^scrt
[fn
][bytecount
%31]);
1361 proto_tree_add_none_format(BFDescrData
, hf_dect_B_Data
, tvb
, offset
,
1362 y
, "Data: %s", wmem_strbuf_get_str(string
));
1368 proto_tree_add_none_format(BField
, hf_dect_B_Data
, tvb
, offset
, 0, "Data too Short");
1371 xcrc
=calc_xcrc(bfield_data
, 83);
1375 if((unsigned)(blen
+1)<=bfield_length
)
1377 if(xcrc
!=(bfield_data
[40]&0xf0))
1378 /* XXX: pkt_bfield->Data[40]&0xf0 isn't really the Recv value?? */
1379 proto_tree_add_uint_format(bfieldti
, hf_dect_B_XCRC
, tvb
, offset
, 1, 0, "X-CRC Error (Calc:%.2x, Recv:%.2x)",xcrc
, bfield_data
[40]&0xf0);
1381 /* XXX: pkt_bfield->Data[40]&0xf0 isn't really the Recv value?? */
1382 proto_tree_add_uint_format(bfieldti
, hf_dect_B_XCRC
, tvb
, offset
, 1, 1, "X-CRC Match (Calc:%.2x, Recv:%.2x)", xcrc
, bfield_data
[40]&0xf0);
1385 proto_tree_add_uint_format(bfieldti
, hf_dect_B_XCRC
, tvb
, offset
, 1, 0, "No X-CRC logged (Calc:%.2x)", xcrc
);
1390 /* ETSI EN 300 175-3 V2.3.0 6.2.1.2 */
1392 dissect_afield(bool dect_packet_type
, uint8_t *ba
,
1393 packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
, proto_tree
*DectTree
, proto_tree
*ColumnsTree
)
1397 uint16_t computed_rcrc
;
1398 wmem_strbuf_t
*afield_str
;
1400 proto_item
*afieldti
= NULL
;
1401 proto_item
*aheadti
= NULL
;
1402 proto_item
*atailti
= NULL
;
1403 proto_tree
*AField
= NULL
;
1404 proto_tree
*AHead
= NULL
;
1405 proto_tree
*ATail
= NULL
;
1407 uint8_t header
, tail_0
, tail_1
, tail_2
, tail_3
, tail_4
;
1410 afield_str
= wmem_strbuf_new(pinfo
->pool
, NULL
);
1412 /************************** A-Field ***********************************/
1414 /* ETSI EN 300 175-3 V2.3.0 7.1.1, 7.2.1
1416 * | TA |Q1| BA |Q2| Tail | R-CRC |
1417 * +-----------------------+--------/ /--------+-------------+
1418 * |a0 a1 a2 a3 a4 a5 a6 a7|a8 | | | a47|a48 | a63|
1422 header
= tvb_get_uint8(tvb
, offset
+0);
1423 tail_0
= tvb_get_uint8(tvb
, offset
+1);
1424 tail_1
= tvb_get_uint8(tvb
, offset
+2);
1425 tail_2
= tvb_get_uint8(tvb
, offset
+3);
1426 tail_3
= tvb_get_uint8(tvb
, offset
+4);
1427 tail_4
= tvb_get_uint8(tvb
, offset
+5);
1428 rcrc
= tvb_get_ntohs(tvb
, offset
+6);
1430 ta
= (header
& DECT_A_TA_MASK
) >> DECT_A_TA_SHIFT
;
1431 *ba
= (header
& DECT_A_BA_MASK
) >> DECT_A_BA_SHIFT
;
1433 afieldti
= proto_tree_add_item(DectTree
, hf_dect_A
, tvb
, offset
, DECT_AFIELD_SIZE
, ENC_NA
);
1434 AField
= proto_item_add_subtree(afieldti
, ett_afield
);
1437 aheadti
= proto_tree_add_item(AField
, hf_dect_A_Head
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1438 AHead
= proto_item_add_subtree(aheadti
, ett_ahead
);
1440 if(dect_packet_type
==DECT_PACKET_FP
)
1441 proto_tree_add_item(AHead
, hf_dect_A_Head_TA_FP
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1443 proto_tree_add_item(AHead
, hf_dect_A_Head_TA_PP
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1445 proto_tree_add_item(AHead
, hf_dect_A_Head_Q1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1446 proto_tree_add_item(AHead
, hf_dect_A_Head_BA
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1447 proto_tree_add_item(AHead
, hf_dect_A_Head_Q2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1451 if(dect_packet_type
==DECT_PACKET_FP
)
1453 atailti
= proto_tree_add_none_format(afieldti
, hf_dect_A_Tail
, tvb
, offset
, 5,
1454 "FP-Tail: %s", val_to_str(ta
, TA_vals_FP
, "Error, please report: %d"));
1458 atailti
= proto_tree_add_none_format(afieldti
, hf_dect_A_Tail
, tvb
, offset
, 5,
1459 "PP-Tail: %s", val_to_str(ta
, TA_vals_PP
, "Error, please report: %d"));
1462 ATail
= proto_item_add_subtree(atailti
, ett_atail
);
1464 if((ta
==DECT_TA_CT0
)||(ta
==DECT_TA_CT1
))
1466 /* ETSI EN 300 175-3 V2.3.0 10.8.1.1.1 */
1467 proto_tree_add_string(ColumnsTree
, hf_dect_cc_TA
, tvb
, offset
, 1, "[Ct]");
1470 wmem_strbuf_append_printf(afield_str
,"C-Channel Next Data: %s",tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, 5));
1472 wmem_strbuf_append_printf(afield_str
,"C-Channel First Data: %s",tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, 5));
1474 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1476 else if((ta
==DECT_TA_NT
)||(ta
==DECT_TA_NT_CL
))
1478 /* ETSI EN 300 175-3 V2.3.0 7.2.2 */
1479 proto_tree_add_string(ColumnsTree
, hf_dect_cc_TA
, tvb
, offset
, 1, "[Nt]");
1481 wmem_strbuf_append_printf(afield_str
,"RFPI: %s",tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, 5));
1482 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1484 proto_tree_add_item(atailti
, hf_dect_A_Tail_Nt
, tvb
, offset
, 5, ENC_NA
);
1486 else if(ta
==DECT_TA_QT
)
1488 /* ETSI EN 300 175-3 V2.3.0 7.2.3 */
1489 proto_tree_add_string(ColumnsTree
, hf_dect_cc_TA
, tvb
, offset
, 1, "[Qt]");
1491 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_Qh
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1495 case 0: /* Static System Info */
1497 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2 */
1498 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Static System Info");
1500 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Nr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1501 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Sn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1504 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Sp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1505 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Esc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1506 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Txs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1507 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Mc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1509 proto_tree_add_none_format(ATail
, hf_dect_A_Tail_Qt_0_CA
, tvb
, offset
, 2, " Carrier%s%s%s%s%s%s%s%s%s%s available",
1510 (tail_1
&0x02)?" 0":"", (tail_1
&0x01)?" 1":"", (tail_2
&0x80)?" 2":"",
1511 (tail_2
&0x40)?" 3":"", (tail_2
&0x20)?" 4":"", (tail_2
&0x10)?" 5":"",
1512 (tail_2
&0x08)?" 6":"", (tail_2
&0x04)?" 7":"", (tail_2
&0x02)?" 8":"",
1513 (tail_2
&0x01)?" 9":"");
1516 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Spr1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1517 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Cn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1520 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_Spr2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1521 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_0_PSCN
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1523 /* due to addition further down */
1526 case 2: /* Extended RF Carriers Part 1 */
1527 /* ETSI EN 300 175-3 V2.3.0 7.2.3.3 */
1528 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Extended RF Carriers Part 1");
1531 case 3: /* Fixed Part Capabilities */
1533 static int * const cap1_flags
[] = {
1534 &hf_dect_A_Tail_Qt_3_A12
,
1535 &hf_dect_A_Tail_Qt_3_A13
,
1536 &hf_dect_A_Tail_Qt_3_A14
,
1537 &hf_dect_A_Tail_Qt_3_A15
,
1540 static int * const cap2_flags
[] = {
1541 &hf_dect_A_Tail_Qt_3_A16
,
1542 &hf_dect_A_Tail_Qt_3_A17
,
1543 &hf_dect_A_Tail_Qt_3_A18
,
1544 &hf_dect_A_Tail_Qt_3_A19
,
1545 &hf_dect_A_Tail_Qt_3_A20
,
1546 &hf_dect_A_Tail_Qt_3_A21
,
1547 &hf_dect_A_Tail_Qt_3_A22
,
1548 &hf_dect_A_Tail_Qt_3_A23
,
1551 static int * const cap3_flags
[] = {
1552 &hf_dect_A_Tail_Qt_3_A24
,
1553 &hf_dect_A_Tail_Qt_3_A25
,
1554 &hf_dect_A_Tail_Qt_3_A26
,
1555 &hf_dect_A_Tail_Qt_3_A27
,
1556 &hf_dect_A_Tail_Qt_3_A28
,
1557 &hf_dect_A_Tail_Qt_3_A29
,
1558 &hf_dect_A_Tail_Qt_3_A30
,
1559 &hf_dect_A_Tail_Qt_3_A31
,
1562 static int * const cap4_flags
[] = {
1563 &hf_dect_A_Tail_Qt_3_A32
,
1564 &hf_dect_A_Tail_Qt_3_A33
,
1565 &hf_dect_A_Tail_Qt_3_A34
,
1566 &hf_dect_A_Tail_Qt_3_A35
,
1567 &hf_dect_A_Tail_Qt_3_A36
,
1568 &hf_dect_A_Tail_Qt_3_A37
,
1569 &hf_dect_A_Tail_Qt_3_A38
,
1570 &hf_dect_A_Tail_Qt_3_A39
,
1574 static int * const cap5_flags
[] = {
1575 &hf_dect_A_Tail_Qt_3_A40
,
1576 &hf_dect_A_Tail_Qt_3_A41
,
1577 &hf_dect_A_Tail_Qt_3_A42
,
1578 &hf_dect_A_Tail_Qt_3_A43
,
1579 &hf_dect_A_Tail_Qt_3_A44
,
1580 &hf_dect_A_Tail_Qt_3_A45
,
1581 &hf_dect_A_Tail_Qt_3_A46
,
1582 &hf_dect_A_Tail_Qt_3_A47
,
1586 /* ETSI EN 300 175-3 V2.3.0 7.2.3.4 */
1587 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Fixed Part Capabilities");
1589 proto_tree_add_bitmask_list(ATail
, tvb
, offset
, 1, cap1_flags
, ENC_BIG_ENDIAN
);
1590 proto_tree_add_bitmask_list(ATail
, tvb
, offset
+1, 1, cap2_flags
, ENC_BIG_ENDIAN
);
1591 proto_tree_add_bitmask_list(ATail
, tvb
, offset
+2, 1, cap3_flags
, ENC_BIG_ENDIAN
);
1593 /* higher layer capabilities */
1594 proto_tree_add_bitmask_list(ATail
, tvb
, offset
+3, 1, cap4_flags
, ENC_BIG_ENDIAN
);
1595 proto_tree_add_bitmask_list(ATail
, tvb
, offset
+4, 1, cap5_flags
, ENC_BIG_ENDIAN
);
1599 case 4: /* Extended Fixed Part Capabilities */
1600 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5 */
1601 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Extended Fixed Part Capabilities");
1604 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_CRFPHops
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1605 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_CRFPEnc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1606 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_REFHops
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1609 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_REPCap
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1610 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_Sync
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1611 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A20
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1612 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_MACSusp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1613 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_MACIpq
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1614 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A23
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1618 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A24
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1620 /* higher layer capabilities */
1621 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A25
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1622 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A26
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1623 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A27
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1624 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A28
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1625 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A29
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1626 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A30
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1627 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A31
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1631 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A32
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1632 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A33
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1633 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A34
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1634 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A35
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1635 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A36
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1636 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A37
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1637 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A38
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1638 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A39
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1641 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A40
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1642 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A41
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1643 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A42
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1644 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A43
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1645 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A44
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1646 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A45
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1647 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A46
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1648 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_4_A47
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1651 /* due to addition further down */
1654 case 5: /* SARI List Contents */
1655 /* ETSI EN 300 175-3 V2.3.0 7.2.3.6 */
1656 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "SARI List Contents");
1659 case 6: /* Multi-Frame No */
1660 /* ETSI EN 300 175-3 V2.3.0 7.2.3.7 */
1661 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_6_Spare
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1664 wmem_strbuf_append_printf(afield_str
,"Multi-Frame No.: %s",tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, 3));
1665 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1667 proto_tree_add_item(ATail
, hf_dect_A_Tail_Qt_6_Mfn
, tvb
, offset
, 3, ENC_NA
);
1670 /* due to addition further down */
1673 case 7: /* Escape */
1674 /* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */
1675 wmem_strbuf_append_printf(afield_str
,"Escape Data: %s",tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, 5));
1676 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1678 case 8: /* Obsolete */
1679 /* ETSI EN 300 175-3 V2.3.0 7.2.3.1 */
1680 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Obsolete");
1682 case 9: /* Extended RF Carriers Part 2 */
1683 /* ETSI EN 300 175-3 V2.3.0 7.2.3.9 */
1684 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Extended RF Carriers Part 2");
1687 case 11: /* Transmit Information */
1688 /* ETSI EN 300 175-3 V2.3.0 7.2.3.10 */
1689 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Transmit Information");
1692 case 12: /* Extended Fixed Part Capabilities 2 */
1693 /* ETSI EN 300 175-3 V2.3.0 7.2.3.11 */
1694 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Extended Fixed Part Capabilities 2");
1697 case 10: /* Reserved */
1701 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Reserved");
1705 else if(ta
==DECT_TA_ESC
)
1707 /* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */
1708 /* Provide hook for escape message dissector */
1710 else if((ta
==DECT_TA_MT
)||((ta
==DECT_TA_MT_FIRST
)&&(dect_packet_type
==DECT_PACKET_PP
)))
1712 /* ETSI EN 300 175-3 V2.3.0 7.2.5 */
1713 proto_tree_add_string(ColumnsTree
, hf_dect_cc_TA
, tvb
, offset
, 1, "[Mt]");
1715 proto_tree_add_uint(ATail
, hf_dect_A_Tail_Mt_Mh
, tvb
, offset
, 1, tail_0
);
1719 case 0: /* Basic Connection Control */
1720 /* ETSI EN 300 175-3 V2.3.0 7.2.5.2 */
1721 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Basic Connection Control");
1722 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_BasicConCtrl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1725 if(((tail_0
& 0x0f)==6)||((tail_0
& 0x0f)==7))
1727 /* TODO See ETSI EN 300 175-3 V2.3.0 7.2.5.2.4 */
1728 proto_tree_add_none_format(ATail
, hf_dect_A_Tail_Mt_Mh_attr
, tvb
, offset
, 4, "More infos at ETSI EN 300 175-3 V2.3.0 7.2.5.2.4");
1733 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Mh_fmid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1736 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Mh_pmid
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1740 /* due to addition further down */
1743 case 1: /* Advanced Connection Control */
1744 /* ETSI EN 300 175-3 V2.3.0 7.2.5.3 */
1745 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Advanced Connection Control");
1747 case 2: /* MAC Layer Test Messages */
1748 /* ETSI EN 300 175-3 V2.3.0 7.2.5.4 */
1749 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "MAC Layer Test Messages");
1751 case 3: /* Quality Control */
1752 /* ETSI EN 300 175-3 V2.3.0 7.2.5.5 */
1753 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Quality Control");
1755 case 4: /* Broadcast and Connectionless Services */
1756 /* ETSI EN 300 175-3 V2.3.0 7.2.5.6 */
1757 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Broadcast and Connectionless Services");
1759 case 5: /* Encryption Control */
1760 /* ETSI EN 300 175-3 V2.3.0 7.2.5.7 */
1761 wmem_strbuf_append_printf(afield_str
,"Encryption Control: %s %s",
1762 val_to_str((tail_0
&0x0c)>>2, MTEncrCmd1_vals
, "Error, please report: %d"),
1763 val_to_str(tail_0
&0x03, MTEncrCmd2_vals
, "Error, please report: %d"));
1765 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1767 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Encr_Cmd1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1768 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Encr_Cmd2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1771 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Mh_fmid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1774 proto_tree_add_item(ATail
, hf_dect_A_Tail_Mt_Mh_pmid
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1777 /* due to addition further down */
1780 case 6: /* Tail for use with the first Transmission of a B-Field \"bearer request\" Message */
1781 /* ETSI EN 300 175-3 V2.3.0 7.2.5.8 */
1782 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Tail for use with the first Transmission of a B-Field \"bearer request\" Message");
1784 case 7: /* Escape */
1785 /* ETSI EN 300 175-3 V2.3.0 7.2.5.9 */
1786 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Escape");
1788 case 8: /* TARI Message */
1789 /* ETSI EN 300 175-3 V2.3.0 7.2.5.10 */
1790 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "TARI Message");
1792 case 9: /* REP Connection Control */
1793 /* ETSI EN 300 175-3 V2.3.0 7.2.5.11 */
1794 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "REP Connection Control");
1796 case 10: /* Reserved */
1802 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, "Reserved");
1806 else if((ta
==DECT_TA_PT
)&&(dect_packet_type
==DECT_PACKET_FP
))
1808 /* ETSI EN 300 175-3 V2.3.0 7.2.4 */
1809 proto_tree_add_string(ColumnsTree
, hf_dect_cc_TA
, tvb
, offset
, 1, "[Pt]");
1811 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_ExtFlag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1812 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_SDU
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1814 if(((tail_0
&0x70)>>4)&0xfe)
1815 wmem_strbuf_append_printf(afield_str
,"%s, ",val_to_str((tail_0
&0x70)>>4, PTSDU_vals
, "Error, please report: %d"));
1817 switch((tail_0
&0x70)>>4)
1819 case 0: /* Zero Length Page */
1820 case 1: /* Short Page */
1821 if(((tail_0
&0x70)>>4)==0)
1823 wmem_strbuf_append_printf(afield_str
,"RFPI: xxxxx%.1x%.2x%.2x, ", (tail_0
&0x0f), tail_1
, tail_2
);
1824 proto_tree_add_none_format(atailti
, hf_dect_A_Tail_Pt_RFPI
, tvb
, offset
, 3, "RFPI: xxxxx%.1x%.2x%.2x", (tail_0
&0x0f), tail_1
, tail_2
);
1827 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_InfoType
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1831 wmem_strbuf_append_printf(afield_str
,"Bs Data: %.1x%.2x%.2x, ", (tail_0
&0x0f), tail_1
, tail_2
);
1832 proto_tree_add_none_format(atailti
, hf_dect_A_Tail_Pt_BsData
, tvb
, offset
, 3, "Bs Data: %.1x%.2x%.2x", (tail_0
&0x0f), tail_1
, tail_2
);
1835 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_InfoType
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1838 wmem_strbuf_append_printf(afield_str
,"%s",val_to_str(tail_3
>>4, PTInfoType_vals
, "Error, please report: %d"));
1842 case 0: /* Fill Bits */
1843 proto_tree_add_none_format(ATail
, hf_dect_A_Tail_Pt_Fillbits
, tvb
, offset
, 2, "Fillbits: %.1x%.2x", tail_3
&0x0f, tail_4
);
1846 case 1: /* Blind Full Slot Information for Circuit Mode Service */
1849 case 7: /* Escape */
1852 case 8: /* Dummy or connectionless Bearer Marker */
1853 proto_tree_add_none_format(ATail
, hf_dect_A_Tail_Pt_SlotPairs
, tvb
, offset
, 2, " Slot-Pairs: %s%s%s%s%s%s%s%s%s%s%s%s available",
1854 (tail_3
&0x08)?" 0/12":"", (tail_3
&0x04)?" 1/13":"", (tail_3
&0x02)?" 2/14":"",
1855 (tail_3
&0x01)?" 3/15":"", (tail_4
&0x80)?" 4/16":"", (tail_4
&0x40)?" 5/17":"",
1856 (tail_4
&0x20)?" 6/18":"", (tail_4
&0x10)?" 7/19":"", (tail_4
&0x08)?" 8/20":"",
1857 (tail_4
&0x04)?" 9/21":"", (tail_4
&0x02)?" 10/22":"", (tail_4
&0x01)?" 11/23":"");
1861 case 2: /* Other Bearer */
1862 case 3: /* Recommended Other Bearer */
1863 case 4: /* Good RFP Bearer */
1864 case 5: /* Dummy or connectionless Bearer Position */
1865 case 12: /* Connectionless Bearer Position */
1866 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_Bearer_Sn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1869 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_Bearer_Sp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1870 proto_tree_add_item(ATail
, hf_dect_A_Tail_Pt_Bearer_Cn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1873 case 6: /* Extended Modulation Types */
1876 case 9: /* Bearer Handover/Replacement Information */
1879 case 10: /* RFP Status and Modulation Types */
1882 case 11: /* Active Carriers */
1885 case 13: /* RFP Power Level */
1888 case 14: /* Blind Double Slot/RFP-FP Interface Resource Information */
1891 case 15: /* Blind Full Slot Information for Packet Mode Service */
1895 /* due to addition further down */
1898 case 2: /* Full Page */
1899 wmem_strbuf_append_printf(afield_str
,"Full Page");
1901 case 3: /* MAC Resume Page */
1902 wmem_strbuf_append_printf(afield_str
,"MAC Resume Page");
1904 case 4: /* Not the Last 36 Bits of a Long Page */
1905 wmem_strbuf_append_printf(afield_str
,"Not the Last 36 Bits");
1907 case 5: /* The First 36 Bits of a Long Page */
1908 wmem_strbuf_append_printf(afield_str
,"The First 36 Bits");
1910 case 6: /* The Last 36 Bits of a Long Page */
1911 wmem_strbuf_append_printf(afield_str
,"The Last 36 Bits");
1913 case 7: /* All of a Long Page */
1914 wmem_strbuf_append_printf(afield_str
,"All of a Long Page");
1918 proto_tree_add_string(ColumnsTree
, hf_dect_cc_AField
, tvb
, offset
, 1, wmem_strbuf_get_str(afield_str
));
1924 /* ETSI EN 300 175-3 V2.3.0 6.2.5.1 */
1925 tvb_memcpy(tvb
, rcrcdat
, DECT_PACKET_INFO_LEN
, 6);
1928 computed_rcrc
=calc_rcrc(rcrcdat
);
1929 if(computed_rcrc
!=rcrc
)
1930 proto_tree_add_uint_format(afieldti
, hf_dect_A_RCRC
, tvb
, offset
, 2, 0, "R-CRC Error (Calc:%.4x, Recv:%.4x)", computed_rcrc
, rcrc
);
1932 proto_tree_add_uint_format(afieldti
, hf_dect_A_RCRC
, tvb
, offset
, 2, 1, "R-CRC Match (Calc:%.4x, Recv:%.4x)", computed_rcrc
, rcrc
);
1938 dissect_dect(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1940 proto_item
*ti
=NULL
;
1941 proto_item
*typeti
=NULL
;
1942 proto_tree
*DectTree
=NULL
;
1949 /************************** Custom Columns ****************************/
1950 proto_item
*columnstreeti
;
1951 proto_tree
*ColumnsTree
;
1953 col_set_str(pinfo
->cinfo
, COL_INFO
, "Use Custom Columns for Infos");
1955 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "DECT");
1957 pkt_len
=tvb_reported_length(tvb
);
1959 if(pkt_len
<=DECT_PACKET_INFO_LEN
)
1961 col_set_str(pinfo
->cinfo
, COL_INFO
, "No Data");
1962 return tvb_captured_length(tvb
);
1965 ti
=proto_tree_add_item(tree
, proto_dect
, tvb
, 0, -1, ENC_NA
);
1966 DectTree
=proto_item_add_subtree(ti
, ett_dect
);
1968 proto_tree_add_item(DectTree
, hf_dect_transceivermode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1971 proto_tree_add_item(DectTree
, hf_dect_channel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1974 proto_tree_add_item(DectTree
, hf_dect_slot
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1977 proto_tree_add_item(DectTree
, hf_dect_framenumber
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1980 proto_tree_add_item(DectTree
, hf_dect_rssi
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1983 proto_tree_add_item(DectTree
, hf_dect_preamble
, tvb
, offset
, 3, ENC_NA
);
1986 typeti
=proto_tree_add_item(DectTree
, hf_dect_type
, tvb
, offset
, 2, ENC_NA
);
1988 type
=tvb_get_ntohs(tvb
, offset
);
1991 columnstreeti
= proto_tree_add_item(DectTree
, hf_dect_cc
, tvb
, 0, 0, ENC_NA
);
1992 ColumnsTree
= proto_item_add_subtree(columnstreeti
, ett_afield
);
1996 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "DECT PP");
1997 proto_item_append_text(typeti
, " Phone Packet");
1998 dissect_afield(DECT_PACKET_PP
, &ba
, pinfo
, tvb
, offset
, DectTree
, ColumnsTree
);
1999 offset
+= DECT_AFIELD_SIZE
;
2000 dissect_bfield(DECT_PACKET_PP
, ba
, pinfo
, tvb
, offset
, DectTree
, ColumnsTree
);
2003 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "DECT RFP");
2004 proto_item_append_text(typeti
, " Station Packet");
2005 dissect_afield(DECT_PACKET_FP
, &ba
, pinfo
, tvb
, offset
, DectTree
, ColumnsTree
);
2006 offset
+= DECT_AFIELD_SIZE
;
2007 dissect_bfield(DECT_PACKET_FP
, ba
, pinfo
, tvb
, offset
, DectTree
, ColumnsTree
);
2010 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "DECT Unk");
2011 proto_item_append_text(typeti
, " Unknown Packet");
2014 return tvb_captured_length(tvb
);
2018 proto_register_dect(void)
2020 static hf_register_info hf
[]=
2022 { &hf_dect_transceivermode
,
2023 {"Transceiver-Mode", "dect.transceivermode", FT_UINT8
, BASE_HEX
, VALS(transceiver_mode
),
2027 {"Channel", "dect.channel", FT_UINT8
, BASE_DEC
, NULL
,
2030 { &hf_dect_framenumber
,
2031 {"Frame#", "dect.framenumber", FT_UINT16
, BASE_DEC
, NULL
,
2035 {"RSSI", "dect.rssi", FT_UINT8
, BASE_DEC
, NULL
,
2039 {"Slot", "dect.slot", FT_UINT16
, BASE_DEC
, NULL
,
2042 { &hf_dect_preamble
,
2043 {"Preamble", "dect.preamble", FT_BYTES
, BASE_NONE
, NULL
,
2047 {"Packet-Type", "dect.type", FT_BYTES
, BASE_NONE
, NULL
,
2051 /* **************** Custom Columns ***********************/
2054 {"Columns", "dect.cc", FT_NONE
, BASE_NONE
, NULL
,
2058 {"TA", "dect.cc.TA", FT_STRING
, BASE_NONE
, NULL
,
2061 { &hf_dect_cc_AField
,
2062 {"A-Field", "dect.cc.afield", FT_STRING
, BASE_NONE
, NULL
,
2065 { &hf_dect_cc_BField
,
2066 {"B-Field", "dect.cc.bfield", FT_STRING
, BASE_NONE
, NULL
,
2069 /* **************** A-Field ******************************/
2070 /* ***** Header ***** */
2072 {"A-Field", "dect.afield", FT_BYTES
, BASE_NONE
, NULL
,
2076 {"A-Field Header", "dect.afield.head", FT_UINT8
, BASE_HEX
, NULL
,
2079 { &hf_dect_A_Head_TA_FP
,
2080 {"TA", "dect.afield.head.TA", FT_UINT8
, BASE_DEC
, VALS(TA_vals_FP
),
2081 DECT_A_TA_MASK
, NULL
, HFILL
}},
2083 { &hf_dect_A_Head_TA_PP
,
2084 {"TA", "dect.afield.head.TA", FT_UINT8
, BASE_DEC
, VALS(TA_vals_PP
),
2085 DECT_A_TA_MASK
, NULL
, HFILL
}},
2087 { &hf_dect_A_Head_Q1
,
2088 {"Q1", "dect.afield.head.Q1", FT_UINT8
, BASE_DEC
, NULL
,
2089 DECT_A_Q1_MASK
, NULL
, HFILL
}},
2091 { &hf_dect_A_Head_BA
,
2092 {"BA", "dect.afield.head.BA", FT_UINT8
, BASE_DEC
, VALS(BA_vals
),
2093 DECT_A_BA_MASK
, NULL
, HFILL
}},
2095 { &hf_dect_A_Head_Q2
,
2096 {"Q2", "dect.afield.head.Q2", FT_UINT8
, BASE_DEC
, NULL
,
2097 DECT_A_Q2_MASK
, NULL
, HFILL
}},
2099 /* ***** Tail ***** */
2101 {"A-Field Tail", "dect.afield.tail", FT_NONE
, BASE_NONE
, NULL
,
2105 { &hf_dect_A_Tail_Nt
,
2106 {"RFPI", "dect.afield.tail.Nt", FT_BYTES
, BASE_NONE
, NULL
,
2107 0x0, "A-Field Tail: Nt/RFPI", HFILL
}},
2110 { &hf_dect_A_Tail_Qt_Qh
,
2111 {"Qh", "dect.afield.tail.Qt.Qh", FT_UINT8
, BASE_DEC
, VALS(QTHead_vals
),
2112 0xF0, NULL
, HFILL
}},
2114 /* Qt Static System Information */
2116 { &hf_dect_A_Tail_Qt_0_Nr
,
2117 {"NR", "dect.afield.tail.Qt.NR", FT_UINT8
, BASE_DEC
, VALS(QTNormalReverse_vals
),
2118 0x10, NULL
, HFILL
}},
2120 { &hf_dect_A_Tail_Qt_0_Sn
,
2121 {"SN", "dect.afield.tail.Qt.SN", FT_UINT8
, BASE_DEC
, VALS(QTSlotNumber_vals
),
2122 0x0F, NULL
, HFILL
}},
2125 { &hf_dect_A_Tail_Qt_0_Sp
,
2126 {"SP", "dect.afield.tail.Qt.SP", FT_UINT8
, BASE_DEC
, VALS(QTStartPosition_vals
),
2127 0xC0, NULL
, HFILL
}},
2129 { &hf_dect_A_Tail_Qt_0_Esc
,
2130 {"Esc", "dect.afield.tail.Qt.Esc", FT_UINT8
, BASE_DEC
, VALS(QTEscape_vals
),
2131 0x20, NULL
, HFILL
}},
2133 { &hf_dect_A_Tail_Qt_0_Txs
,
2134 {"Txs", "dect.afield.tail.Qt.Txs", FT_UINT8
, BASE_DEC
, VALS(QTTransceiver_vals
),
2135 0x18, NULL
, HFILL
}},
2137 { &hf_dect_A_Tail_Qt_0_Mc
,
2138 {"Mc", "dect.afield.tail.Qt.Mc", FT_UINT8
, BASE_DEC
, VALS(QTExtendedCarrier_vals
),
2139 0x04, NULL
, HFILL
}},
2142 { &hf_dect_A_Tail_Qt_0_CA
,
2143 {"CA", "dect.afield.tail.Qt.CA", FT_NONE
, BASE_NONE
, NULL
,
2147 { &hf_dect_A_Tail_Qt_0_Spr1
,
2148 {"Spr1", "dect.afield.tail.Qt.Spr1", FT_UINT8
, BASE_DEC
, VALS(QTSpr_vals
),
2149 0xC0, NULL
, HFILL
}},
2151 { &hf_dect_A_Tail_Qt_0_Cn
,
2152 {"CN", "dect.afield.tail.Qt.CN", FT_UINT8
, BASE_DEC
, VALS(QTCarrierNumber_vals
),
2153 0x3F, NULL
, HFILL
}},
2156 { &hf_dect_A_Tail_Qt_0_Spr2
,
2157 {"Spr2", "dect.afield.tail.Qt.Spr2", FT_UINT8
, BASE_DEC
, VALS(QTSpr_vals
),
2158 0xC0, NULL
, HFILL
}},
2160 { &hf_dect_A_Tail_Qt_0_PSCN
,
2161 {"PSCN", "dect.afield.tail.Qt.PSCN", FT_UINT8
, BASE_DEC
, VALS(QTScanCarrierNum_vals
),
2162 0x3F, NULL
, HFILL
}},
2164 /* Qt Fixed Part Capabilities */
2165 { &hf_dect_A_Tail_Qt_3_A12
,
2166 {"A12", "dect.afield.tail.Qt.Fp.A12", FT_UINT8
, BASE_DEC
, VALS(Qt_A12_vals
),
2167 0x08, NULL
, HFILL
}},
2169 { &hf_dect_A_Tail_Qt_3_A13
,
2170 {"A13", "dect.afield.tail.Qt.Fp.A13", FT_UINT8
, BASE_DEC
, VALS(Qt_A13_vals
),
2171 0x04, NULL
, HFILL
}},
2173 { &hf_dect_A_Tail_Qt_3_A14
,
2174 {"A14", "dect.afield.tail.Qt.Fp.A14", FT_UINT8
, BASE_DEC
, VALS(Qt_A14_vals
),
2175 0x02, NULL
, HFILL
}},
2177 { &hf_dect_A_Tail_Qt_3_A15
,
2178 {"A15", "dect.afield.tail.Qt.Fp.A15", FT_UINT8
, BASE_DEC
, VALS(Qt_A15_vals
),
2179 0x01, NULL
, HFILL
}},
2181 { &hf_dect_A_Tail_Qt_3_A16
,
2182 {"A16", "dect.afield.tail.Qt.Fp.A16", FT_UINT8
, BASE_DEC
, VALS(Qt_A16_vals
),
2183 0x80, NULL
, HFILL
}},
2185 { &hf_dect_A_Tail_Qt_3_A17
,
2186 {"A17", "dect.afield.tail.Qt.Fp.A17", FT_UINT8
, BASE_DEC
, VALS(Qt_A17_vals
),
2187 0x40, NULL
, HFILL
}},
2189 { &hf_dect_A_Tail_Qt_3_A18
,
2190 {"A18", "dect.afield.tail.Qt.Fp.A18", FT_UINT8
, BASE_DEC
, VALS(Qt_A18_vals
),
2191 0x20, NULL
, HFILL
}},
2193 { &hf_dect_A_Tail_Qt_3_A19
,
2194 {"A19", "dect.afield.tail.Qt.Fp.A19", FT_UINT8
, BASE_DEC
, VALS(Qt_A19_vals
),
2195 0x10, NULL
, HFILL
}},
2197 { &hf_dect_A_Tail_Qt_3_A20
,
2198 {"A20", "dect.afield.tail.Qt.Fp.A20", FT_UINT8
, BASE_DEC
, VALS(Qt_A20_vals
),
2199 0x08, NULL
, HFILL
}},
2201 { &hf_dect_A_Tail_Qt_3_A21
,
2202 {"A21", "dect.afield.tail.Qt.Fp.A21", FT_UINT8
, BASE_DEC
, VALS(Qt_A21_vals
),
2203 0x04, NULL
, HFILL
}},
2205 { &hf_dect_A_Tail_Qt_3_A22
,
2206 {"A22", "dect.afield.tail.Qt.Fp.A22", FT_UINT8
, BASE_DEC
, VALS(Qt_A22_vals
),
2207 0x02, NULL
, HFILL
}},
2209 { &hf_dect_A_Tail_Qt_3_A23
,
2210 {"A23", "dect.afield.tail.Qt.Fp.A23", FT_UINT8
, BASE_DEC
, VALS(Qt_A23_vals
),
2211 0x01, NULL
, HFILL
}},
2213 { &hf_dect_A_Tail_Qt_3_A24
,
2214 {"A24", "dect.afield.tail.Qt.Fp.A24", FT_UINT8
, BASE_DEC
, VALS(Qt_A24_vals
),
2215 0x80, NULL
, HFILL
}},
2217 { &hf_dect_A_Tail_Qt_3_A25
,
2218 {"A25", "dect.afield.tail.Qt.Fp.A25", FT_UINT8
, BASE_DEC
, VALS(Qt_A25_vals
),
2219 0x40, NULL
, HFILL
}},
2221 { &hf_dect_A_Tail_Qt_3_A26
,
2222 {"A26", "dect.afield.tail.Qt.Fp.A26", FT_UINT8
, BASE_DEC
, VALS(Qt_A26_vals
),
2223 0x20, NULL
, HFILL
}},
2225 { &hf_dect_A_Tail_Qt_3_A27
,
2226 {"A27", "dect.afield.tail.Qt.Fp.A27", FT_UINT8
, BASE_DEC
, VALS(Qt_A27_vals
),
2227 0x10, NULL
, HFILL
}},
2229 { &hf_dect_A_Tail_Qt_3_A28
,
2230 {"A28", "dect.afield.tail.Qt.Fp.A28", FT_UINT8
, BASE_DEC
, VALS(Qt_A28_vals
),
2231 0x08, NULL
, HFILL
}},
2233 { &hf_dect_A_Tail_Qt_3_A29
,
2234 {"A29", "dect.afield.tail.Qt.Fp.A29", FT_UINT8
, BASE_DEC
, VALS(Qt_A29_vals
),
2235 0x04, NULL
, HFILL
}},
2237 { &hf_dect_A_Tail_Qt_3_A30
,
2238 {"A30", "dect.afield.tail.Qt.Fp.A30", FT_UINT8
, BASE_DEC
, VALS(Qt_A30_vals
),
2239 0x02, NULL
, HFILL
}},
2241 { &hf_dect_A_Tail_Qt_3_A31
,
2242 {"A31", "dect.afield.tail.Qt.Fp.A31", FT_UINT8
, BASE_DEC
, VALS(Qt_A31_vals
),
2243 0x01, NULL
, HFILL
}},
2246 /* higher layer capabilities */
2247 { &hf_dect_A_Tail_Qt_3_A32
,
2248 {"A32", "dect.afield.tail.Qt.Fp.A32", FT_UINT8
, BASE_DEC
, VALS(Qt_A32_vals
),
2249 0x80, NULL
, HFILL
}},
2251 { &hf_dect_A_Tail_Qt_3_A33
,
2252 {"A33", "dect.afield.tail.Qt.Fp.A33", FT_UINT8
, BASE_DEC
, VALS(Qt_A33_vals
),
2253 0x40, NULL
, HFILL
}},
2255 { &hf_dect_A_Tail_Qt_3_A34
,
2256 {"A34", "dect.afield.tail.Qt.Fp.A34", FT_UINT8
, BASE_DEC
, VALS(Qt_A34_vals
),
2257 0x20, NULL
, HFILL
}},
2259 { &hf_dect_A_Tail_Qt_3_A35
,
2260 {"A35", "dect.afield.tail.Qt.Fp.A35", FT_UINT8
, BASE_DEC
, VALS(Qt_A35_vals
),
2261 0x10, NULL
, HFILL
}},
2263 { &hf_dect_A_Tail_Qt_3_A36
,
2264 {"A36", "dect.afield.tail.Qt.Fp.A36", FT_UINT8
, BASE_DEC
, VALS(Qt_A36_vals
),
2265 0x08, NULL
, HFILL
}},
2267 { &hf_dect_A_Tail_Qt_3_A37
,
2268 {"A37", "dect.afield.tail.Qt.Fp.A37", FT_UINT8
, BASE_DEC
, VALS(Qt_A37_vals
),
2269 0x04, NULL
, HFILL
}},
2271 { &hf_dect_A_Tail_Qt_3_A38
,
2272 {"A38", "dect.afield.tail.Qt.Fp.A38", FT_UINT8
, BASE_DEC
, VALS(Qt_A38_vals
),
2273 0x02, NULL
, HFILL
}},
2275 { &hf_dect_A_Tail_Qt_3_A39
,
2276 {"A39", "dect.afield.tail.Qt.Fp.A39", FT_UINT8
, BASE_DEC
, VALS(Qt_A39_vals
),
2277 0x01, NULL
, HFILL
}},
2279 { &hf_dect_A_Tail_Qt_3_A40
,
2280 {"A40", "dect.afield.tail.Qt.Fp.A40", FT_UINT8
, BASE_DEC
, VALS(Qt_A40_vals
),
2281 0x80, NULL
, HFILL
}},
2283 { &hf_dect_A_Tail_Qt_3_A41
,
2284 {"A41", "dect.afield.tail.Qt.Fp.A41", FT_UINT8
, BASE_DEC
, VALS(Qt_A41_vals
),
2285 0x40, NULL
, HFILL
}},
2287 { &hf_dect_A_Tail_Qt_3_A42
,
2288 {"A42", "dect.afield.tail.Qt.Fp.A42", FT_UINT8
, BASE_DEC
, VALS(Qt_A42_vals
),
2289 0x20, NULL
, HFILL
}},
2291 { &hf_dect_A_Tail_Qt_3_A43
,
2292 {"A43", "dect.afield.tail.Qt.Fp.A43", FT_UINT8
, BASE_DEC
, VALS(Qt_A43_vals
),
2293 0x10, NULL
, HFILL
}},
2295 { &hf_dect_A_Tail_Qt_3_A44
,
2296 {"A44", "dect.afield.tail.Qt.Fp.A44", FT_UINT8
, BASE_DEC
, VALS(Qt_A44_vals
),
2297 0x08, NULL
, HFILL
}},
2299 { &hf_dect_A_Tail_Qt_3_A45
,
2300 {"A45", "dect.afield.tail.Qt.Fp.A45", FT_UINT8
, BASE_DEC
, VALS(Qt_A45_vals
),
2301 0x04, NULL
, HFILL
}},
2303 { &hf_dect_A_Tail_Qt_3_A46
,
2304 {"A46", "dect.afield.tail.Qt.Fp.A46", FT_UINT8
, BASE_DEC
, VALS(Qt_A46_vals
),
2305 0x02, NULL
, HFILL
}},
2307 { &hf_dect_A_Tail_Qt_3_A47
,
2308 {"A47", "dect.afield.tail.Qt.Fp.A47", FT_UINT8
, BASE_DEC
, VALS(Qt_A47_vals
),
2309 0x01, NULL
, HFILL
}},
2311 /* Qt Extended Fixed Part Capabilities */
2313 { &hf_dect_A_Tail_Qt_4_CRFPHops
,
2314 {"CRFP Hops", "dect.afield.tail.Qt.Efp.CRFPHops", FT_UINT8
, BASE_DEC
, VALS(Qt_CRFPHops_vals
),
2315 0x0C, NULL
, HFILL
}},
2317 { &hf_dect_A_Tail_Qt_4_CRFPEnc
,
2318 {"CRFP Enc", "dect.afield.tail.Qt.Efp.CRFPEnc", FT_UINT8
, BASE_DEC
, VALS(Qt_CRFPEnc_vals
),
2319 0x02, NULL
, HFILL
}},
2321 { &hf_dect_A_Tail_Qt_4_REFHops
,
2322 {"REP Hops", "dect.afield.tail.Qt.Efp.REPHops", FT_UINT16
, BASE_DEC
, VALS(Qt_REPHops_vals
),
2323 0x0180, NULL
, HFILL
}},
2325 { &hf_dect_A_Tail_Qt_4_REPCap
,
2326 {"REP Cap.", "dect.afield.tail.Qt.Efp.REPCap", FT_UINT8
, BASE_DEC
, VALS(Qt_REPCap_vals
),
2327 0x40, NULL
, HFILL
}},
2329 { &hf_dect_A_Tail_Qt_4_Sync
,
2330 {"Sync", "dect.afield.tail.Qt.Efp.Sync", FT_UINT8
, BASE_DEC
, VALS(Qt_Sync_vals
),
2331 0x30, NULL
, HFILL
}},
2333 { &hf_dect_A_Tail_Qt_4_A20
,
2334 {"A20", "dect.afield.tail.Qt.Efp.A20", FT_UINT8
, BASE_DEC
, VALS(Qt_EA20_vals
),
2335 0x08, NULL
, HFILL
}},
2337 { &hf_dect_A_Tail_Qt_4_MACSusp
,
2338 {"MAC Suspend", "dect.afield.tail.Qt.Efp.MACSusp", FT_UINT8
, BASE_DEC
, VALS(Qt_MACSusp_vals
),
2339 0x04, NULL
, HFILL
}},
2341 { &hf_dect_A_Tail_Qt_4_MACIpq
,
2342 {"MAC Ipq", "dect.afield.tail.Qt.Efp.MACIpq", FT_UINT8
, BASE_DEC
, VALS(Qt_MACIpq_vals
),
2343 0x02, NULL
, HFILL
}},
2345 { &hf_dect_A_Tail_Qt_4_A23
,
2346 {"A23", "dect.afield.tail.Qt.Efp.A23", FT_UINT8
, BASE_DEC
, VALS(Qt_EA23_vals
),
2347 0x01, NULL
, HFILL
}},
2349 { &hf_dect_A_Tail_Qt_4_A24
,
2350 {"A24", "dect.afield.tail.Qt.Efp.A24", FT_UINT8
, BASE_DEC
, VALS(Qt_EA24_vals
),
2351 0x80, NULL
, HFILL
}},
2354 /* Higher Layer Capabilities */
2356 { &hf_dect_A_Tail_Qt_4_A25
,
2357 {"A25", "dect.afield.tail.Qt.Efp.A25", FT_UINT8
, BASE_DEC
, VALS(Qt_EA25_vals
),
2358 0x40, NULL
, HFILL
}},
2360 { &hf_dect_A_Tail_Qt_4_A26
,
2361 {"A26", "dect.afield.tail.Qt.Efp.A26", FT_UINT8
, BASE_DEC
, VALS(Qt_EA26_vals
),
2362 0x20, NULL
, HFILL
}},
2364 { &hf_dect_A_Tail_Qt_4_A27
,
2365 {"A27", "dect.afield.tail.Qt.Efp.A27", FT_UINT8
, BASE_DEC
, VALS(Qt_EA27_vals
),
2366 0x10, NULL
, HFILL
}},
2368 { &hf_dect_A_Tail_Qt_4_A28
,
2369 {"A28", "dect.afield.tail.Qt.Efp.A28", FT_UINT8
, BASE_DEC
, VALS(Qt_EA28_vals
),
2370 0x08, NULL
, HFILL
}},
2372 { &hf_dect_A_Tail_Qt_4_A29
,
2373 {"A29", "dect.afield.tail.Qt.Efp.A29", FT_UINT8
, BASE_DEC
, VALS(Qt_EA29_vals
),
2374 0x04, NULL
, HFILL
}},
2376 { &hf_dect_A_Tail_Qt_4_A30
,
2377 {"A30", "dect.afield.tail.Qt.Efp.A30", FT_UINT8
, BASE_DEC
, VALS(Qt_EA30_vals
),
2378 0x02, NULL
, HFILL
}},
2380 { &hf_dect_A_Tail_Qt_4_A31
,
2381 {"A31", "dect.afield.tail.Qt.Efp.A31", FT_UINT8
, BASE_DEC
, VALS(Qt_EA31_vals
),
2382 0x01, NULL
, HFILL
}},
2384 { &hf_dect_A_Tail_Qt_4_A32
,
2385 {"A32", "dect.afield.tail.Qt.Efp.A32", FT_UINT8
, BASE_DEC
, VALS(Qt_EA32_vals
),
2386 0x80, NULL
, HFILL
}},
2388 { &hf_dect_A_Tail_Qt_4_A33
,
2389 {"A33", "dect.afield.tail.Qt.Efp.A33", FT_UINT8
, BASE_DEC
, VALS(Qt_EA33_vals
),
2390 0x40, NULL
, HFILL
}},
2392 { &hf_dect_A_Tail_Qt_4_A34
,
2393 {"A34", "dect.afield.tail.Qt.Efp.A34", FT_UINT8
, BASE_DEC
, VALS(Qt_EA34_vals
),
2394 0x20, NULL
, HFILL
}},
2396 { &hf_dect_A_Tail_Qt_4_A35
,
2397 {"A35", "dect.afield.tail.Qt.Efp.A35", FT_UINT8
, BASE_DEC
, VALS(Qt_EA35_vals
),
2398 0x10, NULL
, HFILL
}},
2400 { &hf_dect_A_Tail_Qt_4_A36
,
2401 {"A36", "dect.afield.tail.Qt.Efp.A36", FT_UINT8
, BASE_DEC
, VALS(Qt_EA36_vals
),
2402 0x08, NULL
, HFILL
}},
2404 { &hf_dect_A_Tail_Qt_4_A37
,
2405 {"A37", "dect.afield.tail.Qt.Efp.A37", FT_UINT8
, BASE_DEC
, VALS(Qt_EA37_vals
),
2406 0x04, NULL
, HFILL
}},
2408 { &hf_dect_A_Tail_Qt_4_A38
,
2409 {"A38", "dect.afield.tail.Qt.Efp.A38", FT_UINT8
, BASE_DEC
, VALS(Qt_EA38_vals
),
2410 0x02, NULL
, HFILL
}},
2412 { &hf_dect_A_Tail_Qt_4_A39
,
2413 {"A39", "dect.afield.tail.Qt.Efp.A39", FT_UINT8
, BASE_DEC
, VALS(Qt_EA39_vals
),
2414 0x01, NULL
, HFILL
}},
2416 { &hf_dect_A_Tail_Qt_4_A40
,
2417 {"A40", "dect.afield.tail.Qt.Efp.A40", FT_UINT8
, BASE_DEC
, VALS(Qt_EA40_vals
),
2418 0x80, NULL
, HFILL
}},
2420 { &hf_dect_A_Tail_Qt_4_A41
,
2421 {"A41", "dect.afield.tail.Qt.Efp.A41", FT_UINT8
, BASE_DEC
, VALS(Qt_EA41_vals
),
2422 0x40, NULL
, HFILL
}},
2424 { &hf_dect_A_Tail_Qt_4_A42
,
2425 {"A42", "dect.afield.tail.Qt.Efp.A42", FT_UINT8
, BASE_DEC
, VALS(Qt_EA42_vals
),
2426 0x20, NULL
, HFILL
}},
2428 { &hf_dect_A_Tail_Qt_4_A43
,
2429 {"A43", "dect.afield.tail.Qt.Efp.A43", FT_UINT8
, BASE_DEC
, VALS(Qt_EA43_vals
),
2430 0x10, NULL
, HFILL
}},
2432 { &hf_dect_A_Tail_Qt_4_A44
,
2433 {"A44", "dect.afield.tail.Qt.Efp.A44", FT_UINT8
, BASE_DEC
, VALS(Qt_EA44_vals
),
2434 0x08, NULL
, HFILL
}},
2436 { &hf_dect_A_Tail_Qt_4_A45
,
2437 {"A45", "dect.afield.tail.Qt.Efp.A45", FT_UINT8
, BASE_DEC
, VALS(Qt_EA45_vals
),
2438 0x04, NULL
, HFILL
}},
2440 { &hf_dect_A_Tail_Qt_4_A46
,
2441 {"A46", "dect.afield.tail.Qt.Efp.A46", FT_UINT8
, BASE_DEC
, VALS(Qt_EA46_vals
),
2442 0x02, NULL
, HFILL
}},
2444 { &hf_dect_A_Tail_Qt_4_A47
,
2445 {"A47", "dect.afield.tail.Qt.Efp.A47", FT_UINT8
, BASE_DEC
, VALS(Qt_EA47_vals
),
2446 0x01, NULL
, HFILL
}},
2449 /* Qt Multiframe Number */
2450 { &hf_dect_A_Tail_Qt_6_Spare
,
2451 {"Spare Bits", "dect.afield.tail.Qt.Mfn.Spare", FT_UINT16
, BASE_HEX
, NULL
,
2452 0x0FFF, NULL
, HFILL
}},
2454 { &hf_dect_A_Tail_Qt_6_Mfn
,
2455 {"Multiframe Number", "dect.afield.tail.Qt.Mfn.Mfn", FT_BYTES
, BASE_NONE
, NULL
,
2460 { &hf_dect_A_Tail_Mt_Mh
,
2461 {"Mh", "dect.afield.tail.Mt.Mh", FT_UINT8
, BASE_DEC
, VALS(MTHead_vals
),
2462 0xF0, NULL
, HFILL
}},
2464 { &hf_dect_A_Tail_Mt_Mh_attr
,
2465 {"Mh", "dect.afield.tail.Mt.Mh.attr", FT_NONE
, BASE_NONE
, NULL
,
2468 { &hf_dect_A_Tail_Mt_Mh_fmid
,
2469 {"Mh/FMID", "dect.afield.tail.Mt.Mh.fmid", FT_UINT16
, BASE_HEX
, NULL
,
2470 0xFFF0, NULL
, HFILL
}},
2472 { &hf_dect_A_Tail_Mt_Mh_pmid
,
2473 {"Mh/PMID", "dect.afield.tail.Mt.Mh.pmid", FT_UINT24
, BASE_HEX
, NULL
,
2474 0x0FFFFF, NULL
, HFILL
}},
2476 /* Mt Basic Connection Control */
2477 { &hf_dect_A_Tail_Mt_BasicConCtrl
,
2478 {"Cmd", "dect.afield.tail.Mt.BasicConCtrl", FT_UINT8
, BASE_DEC
, VALS(MTBasicConCtrl_vals
),
2479 0x0F, NULL
, HFILL
}},
2481 /* Mt Encryption Control */
2482 { &hf_dect_A_Tail_Mt_Encr_Cmd1
,
2483 {"Cmd1", "dect.afield.tail.Mt.Encr.Cmd1", FT_UINT8
, BASE_DEC
, VALS(MTEncrCmd1_vals
),
2484 0x0C, NULL
, HFILL
}},
2486 { &hf_dect_A_Tail_Mt_Encr_Cmd2
,
2487 {"Cmd2", "dect.afield.tail.Mt.Encr.Cmd2", FT_UINT8
, BASE_DEC
, VALS(MTEncrCmd2_vals
),
2488 0x03, NULL
, HFILL
}},
2491 { &hf_dect_A_Tail_Pt_ExtFlag
,
2492 {"ExtFlag", "dect.afield.tail.Pt.ExtFlag", FT_UINT8
, BASE_DEC
, VALS(PTExtFlag_vals
),
2493 0x80, NULL
, HFILL
}},
2495 { &hf_dect_A_Tail_Pt_SDU
,
2496 {"Bs SDU", "dect.afield.tail.Pt.SDU", FT_UINT8
, BASE_DEC
, VALS(PTSDU_vals
),
2497 0x70, NULL
, HFILL
}},
2499 { &hf_dect_A_Tail_Pt_RFPI
,
2500 {"InfoType", "dect.afield.tail.Pt.RFPI", FT_NONE
, BASE_NONE
, NULL
,
2503 { &hf_dect_A_Tail_Pt_BsData
,
2504 {"Bs Data", "dect.afield.tail.Pt.BsData", FT_NONE
, BASE_NONE
, NULL
,
2507 { &hf_dect_A_Tail_Pt_InfoType
,
2508 {"InfoType", "dect.afield.tail.Pt.InfoType", FT_UINT8
, BASE_DEC
, VALS(PTInfoType_vals
),
2509 0xF0, NULL
, HFILL
}},
2511 { &hf_dect_A_Tail_Pt_Fillbits
,
2512 {"FillBits", "dect.afield.tail.Pt.FillBits", FT_NONE
, BASE_NONE
, NULL
,
2515 { &hf_dect_A_Tail_Pt_SlotPairs
,
2516 {"SlotPairs", "dect.afield.tail.Pt.SlotPairs", FT_NONE
, BASE_NONE
, NULL
,
2519 { &hf_dect_A_Tail_Pt_Bearer_Sn
,
2520 {"SN", "dect.afield.tail.Pt.SN", FT_UINT8
, BASE_DEC
, VALS(QTSlotNumber_vals
),
2521 0x0F, NULL
, HFILL
}},
2523 { &hf_dect_A_Tail_Pt_Bearer_Sp
,
2524 {"SP", "dect.afield.tail.Pt.SP", FT_UINT8
, BASE_DEC
, VALS(QTStartPosition_vals
),
2525 0xC0, NULL
, HFILL
}},
2527 { &hf_dect_A_Tail_Pt_Bearer_Cn
,
2528 {"CN", "dect.afield.tail.Pt.CN", FT_UINT8
, BASE_DEC
, VALS(QTCarrierNumber_vals
),
2529 0x3F, NULL
, HFILL
}},
2531 /* ***** R-CRC ***** */
2533 {"A-Field R-CRC", "dect.afield.rcrc", FT_UINT8
, BASE_DEC
, NULL
,
2536 /* ***************** B-Field *************************** */
2538 {"B-Field", "dect.bfield", FT_BYTES
, BASE_NONE
,
2539 0x0, 0x0, NULL
, HFILL
}},
2542 {"B-Field", "dect.bfield.data", FT_NONE
, BASE_NONE
, NULL
,
2545 { &hf_dect_B_DescrambledData
,
2546 {"Descrambled Data", "dect.bfield.descrdata", FT_NONE
, BASE_NONE
,
2547 0x0, 0x0, NULL
, HFILL
}},
2550 {"B-Field", "dect.bfield.framenumber", FT_NONE
, BASE_NONE
, NULL
,
2553 /* ***** X-CRC ***** */
2555 {"B-Field X-CRC", "dect.bfield.xcrc", FT_UINT8
, BASE_DEC
, NULL
,
2560 /* Setup protocol subtree array */
2573 proto_dect
=proto_register_protocol("DECT Protocol", "DECT", "dect");
2574 proto_register_field_array(proto_dect
, hf
, array_length(hf
));
2575 proto_register_subtree_array(ett
, array_length(ett
));
2577 dect_handle
= register_dissector("dect", dissect_dect
, proto_dect
);
2581 proto_reg_handoff_dect(void)
2583 dissector_add_uint("ethertype", ETHERTYPE_DECT
, dect_handle
);
2587 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2592 * indent-tabs-mode: t
2595 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2596 * :indentSize=8:tabSize=8:noTabs=false: