MSWSP: add ids for another unknown Property Set
[wireshark-wip.git] / epan / dissectors / packet-dect.c
blob63ffa3ed5fb3a231357da753d4fc4d5d35b3989a
1 /* packet-dect.c
3 * Dissector for the Digital Enhanced Cordless Telecommunications
4 * protocol.
6 * $Id$
8 * Copyright 2008-2009:
9 * - Andreas Schuler <andreas (A) schulerdev.de>
10 * - Matthias Wenzel <dect (A) mazzoo.de>
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 TODO (roughly in that order)
33 - Expand beyond full slot, 2-level modulation
34 - Make things stateful
35 - Once the capture format has stabilized, get rid of the Ethernet
36 hack and use a proper capture type.
39 #include "config.h"
41 #include <string.h>
43 #include <glib.h>
45 #include <epan/packet.h>
46 #include <epan/etypes.h>
47 #include <epan/wmem/wmem.h>
49 #define ETHERTYPE_DECT 0x2323
51 #define DECT_PACKET_INFO_LEN 11
53 #define DECT_PACKET_PP 0
54 #define DECT_PACKET_FP 1
56 #define DECT_AFIELD_SIZE 8
57 #define DECT_AFIELD_TAIL_SIZE 5
58 #define DECT_BFIELD_DATA_SIZE 128
60 #define DECT_A_TA_MASK 0xE0
61 #define DECT_A_TA_SHIFT 5
62 #define DECT_A_BA_MASK 0x0E
63 #define DECT_A_BA_SHIFT 1
64 #define DECT_A_Q1_MASK 0x10
65 #define DECT_A_Q2_MASK 0x01
67 enum {
68 DECT_TA_CT0 = 0,
69 DECT_TA_CT1,
70 DECT_TA_NT_CL,
71 DECT_TA_NT,
72 DECT_TA_QT,
73 DECT_TA_ESC,
74 DECT_TA_MT,
75 DECT_TA_PT,
76 DECT_TA_MT_FIRST = DECT_TA_PT
79 /* ETSI EN 300 175-3 V2.3.0 6.2.4 and Annex E */
80 /* scramble table with corrections by Jakub Hruska */
81 static const guint8 scrt[8][31]=
83 {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},
84 {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},
85 {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},
86 {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},
87 {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},
88 {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},
89 {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},
90 {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}
93 void proto_register_dect (void);
94 void proto_reg_handoff_dect (void);
96 static int proto_dect = -1;
99 static gint ett_dect = -1;
100 static gint ett_columns = -1;
101 static gint ett_afield = -1;
102 static gint ett_ahead = -1;
103 static gint ett_atail = -1;
104 static gint ett_aqt = -1;
105 static gint ett_bfield = -1;
106 static gint ett_bfdescrdata = -1;
108 static int hf_dect_transceivermode = -1;
109 static int hf_dect_preamble = -1;
110 static int hf_dect_type = -1;
111 static int hf_dect_channel = -1;
112 static int hf_dect_framenumber = -1;
113 static int hf_dect_rssi = -1;
114 static int hf_dect_slot = -1;
115 static int hf_dect_cc = -1;
116 static int hf_dect_cc_TA = -1;
117 static int hf_dect_cc_AField = -1;
118 static int hf_dect_cc_BField = -1;
119 static int hf_dect_A = -1;
120 static int hf_dect_A_Head = -1;
121 static int hf_dect_A_Head_TA_FP = -1;
122 static int hf_dect_A_Head_TA_PP = -1;
123 static int hf_dect_A_Head_Q1 = -1;
124 static int hf_dect_A_Head_BA = -1;
125 static int hf_dect_A_Head_Q2 = -1;
126 static int hf_dect_A_Tail = -1;
127 static int hf_dect_A_Tail_Nt = -1;
128 static int hf_dect_A_Tail_Qt_Qh = -1;
129 static int hf_dect_A_Tail_Qt_0_Sn = -1;
130 static int hf_dect_A_Tail_Qt_0_Nr = -1;
131 static int hf_dect_A_Tail_Qt_0_Sp = -1;
132 static int hf_dect_A_Tail_Qt_0_Esc = -1;
133 static int hf_dect_A_Tail_Qt_0_Txs = -1;
134 static int hf_dect_A_Tail_Qt_0_Mc = -1;
135 static int hf_dect_A_Tail_Qt_0_CA = -1;
136 static int hf_dect_A_Tail_Qt_0_Spr1 = -1;
137 static int hf_dect_A_Tail_Qt_0_Cn = -1;
138 static int hf_dect_A_Tail_Qt_0_Spr2 = -1;
139 static int hf_dect_A_Tail_Qt_0_PSCN = -1;
140 static int hf_dect_A_Tail_Qt_3_A12 = -1;
141 static int hf_dect_A_Tail_Qt_3_A13 = -1;
142 static int hf_dect_A_Tail_Qt_3_A14 = -1;
143 static int hf_dect_A_Tail_Qt_3_A15 = -1;
144 static int hf_dect_A_Tail_Qt_3_A16 = -1;
145 static int hf_dect_A_Tail_Qt_3_A17 = -1;
146 static int hf_dect_A_Tail_Qt_3_A18 = -1;
147 static int hf_dect_A_Tail_Qt_3_A19 = -1;
148 static int hf_dect_A_Tail_Qt_3_A20 = -1;
149 static int hf_dect_A_Tail_Qt_3_A21 = -1;
150 static int hf_dect_A_Tail_Qt_3_A22 = -1;
151 static int hf_dect_A_Tail_Qt_3_A23 = -1;
152 static int hf_dect_A_Tail_Qt_3_A24 = -1;
153 static int hf_dect_A_Tail_Qt_3_A25 = -1;
154 static int hf_dect_A_Tail_Qt_3_A26 = -1;
155 static int hf_dect_A_Tail_Qt_3_A27 = -1;
156 static int hf_dect_A_Tail_Qt_3_A28 = -1;
157 static int hf_dect_A_Tail_Qt_3_A29 = -1;
158 static int hf_dect_A_Tail_Qt_3_A30 = -1;
159 static int hf_dect_A_Tail_Qt_3_A31 = -1;
160 static int hf_dect_A_Tail_Qt_3_A32 = -1;
161 static int hf_dect_A_Tail_Qt_3_A33 = -1;
162 static int hf_dect_A_Tail_Qt_3_A34 = -1;
163 static int hf_dect_A_Tail_Qt_3_A35 = -1;
164 static int hf_dect_A_Tail_Qt_3_A36 = -1;
165 static int hf_dect_A_Tail_Qt_3_A37 = -1;
166 static int hf_dect_A_Tail_Qt_3_A38 = -1;
167 static int hf_dect_A_Tail_Qt_3_A39 = -1;
168 static int hf_dect_A_Tail_Qt_3_A40 = -1;
169 static int hf_dect_A_Tail_Qt_3_A41 = -1;
170 static int hf_dect_A_Tail_Qt_3_A42 = -1;
171 static int hf_dect_A_Tail_Qt_3_A43 = -1;
172 static int hf_dect_A_Tail_Qt_3_A44 = -1;
173 static int hf_dect_A_Tail_Qt_3_A45 = -1;
174 static int hf_dect_A_Tail_Qt_3_A46 = -1;
175 static int hf_dect_A_Tail_Qt_3_A47 = -1;
176 static int hf_dect_A_Tail_Qt_4_CRFPHops = -1;
177 static int hf_dect_A_Tail_Qt_4_CRFPEnc = -1;
178 static int hf_dect_A_Tail_Qt_4_REFHops = -1;
179 static int hf_dect_A_Tail_Qt_4_REPCap = -1;
180 static int hf_dect_A_Tail_Qt_4_Sync = -1;
181 static int hf_dect_A_Tail_Qt_4_A20 = -1;
182 static int hf_dect_A_Tail_Qt_4_MACSusp = -1;
183 static int hf_dect_A_Tail_Qt_4_MACIpq = -1;
184 static int hf_dect_A_Tail_Qt_4_A23 = -1;
185 static int hf_dect_A_Tail_Qt_4_A24 = -1;
186 static int hf_dect_A_Tail_Qt_4_A25 = -1;
187 static int hf_dect_A_Tail_Qt_4_A26 = -1;
188 static int hf_dect_A_Tail_Qt_4_A27 = -1;
189 static int hf_dect_A_Tail_Qt_4_A28 = -1;
190 static int hf_dect_A_Tail_Qt_4_A29 = -1;
191 static int hf_dect_A_Tail_Qt_4_A30 = -1;
192 static int hf_dect_A_Tail_Qt_4_A31 = -1;
193 static int hf_dect_A_Tail_Qt_4_A32 = -1;
194 static int hf_dect_A_Tail_Qt_4_A33 = -1;
195 static int hf_dect_A_Tail_Qt_4_A34 = -1;
196 static int hf_dect_A_Tail_Qt_4_A35 = -1;
197 static int hf_dect_A_Tail_Qt_4_A36 = -1;
198 static int hf_dect_A_Tail_Qt_4_A37 = -1;
199 static int hf_dect_A_Tail_Qt_4_A38 = -1;
200 static int hf_dect_A_Tail_Qt_4_A39 = -1;
201 static int hf_dect_A_Tail_Qt_4_A40 = -1;
202 static int hf_dect_A_Tail_Qt_4_A41 = -1;
203 static int hf_dect_A_Tail_Qt_4_A42 = -1;
204 static int hf_dect_A_Tail_Qt_4_A43 = -1;
205 static int hf_dect_A_Tail_Qt_4_A44 = -1;
206 static int hf_dect_A_Tail_Qt_4_A45 = -1;
207 static int hf_dect_A_Tail_Qt_4_A46 = -1;
208 static int hf_dect_A_Tail_Qt_4_A47 = -1;
209 static int hf_dect_A_Tail_Qt_6_Spare = -1;
210 static int hf_dect_A_Tail_Qt_6_Mfn = -1;
211 static int hf_dect_A_Tail_Mt_Mh = -1;
212 static int hf_dect_A_Tail_Mt_Mh_attr = -1;
213 static int hf_dect_A_Tail_Mt_Mh_fmid = -1;
214 static int hf_dect_A_Tail_Mt_Mh_pmid = -1;
215 static int hf_dect_A_Tail_Mt_BasicConCtrl = -1;
216 static int hf_dect_A_Tail_Mt_Encr_Cmd1 = -1;
217 static int hf_dect_A_Tail_Mt_Encr_Cmd2 = -1;
218 static int hf_dect_A_Tail_Pt_ExtFlag = -1;
219 static int hf_dect_A_Tail_Pt_SDU = -1;
220 static int hf_dect_A_Tail_Pt_RFPI = -1;
221 static int hf_dect_A_Tail_Pt_BsData = -1;
222 static int hf_dect_A_Tail_Pt_InfoType = -1;
223 static int hf_dect_A_Tail_Pt_SlotPairs = -1;
224 static int hf_dect_A_Tail_Pt_Fillbits = -1;
225 static int hf_dect_A_Tail_Pt_Bearer_Sn = -1;
226 static int hf_dect_A_Tail_Pt_Bearer_Cn = -1;
227 static int hf_dect_A_Tail_Pt_Bearer_Sp = -1;
228 static int hf_dect_A_RCRC = -1;
229 static int hf_dect_B = -1;
230 static int hf_dect_B_Data = -1;
231 static int hf_dect_B_DescrambledData = -1;
232 static int hf_dect_B_fn = -1;
233 static int hf_dect_B_XCRC = -1;
235 static const value_string tranceiver_mode[]=
237 {0, "Receive"},
238 {1, "Send"},
239 {0, NULL}
242 /* ETSI EN 300 175-3 V2.3.0 7.1.2 */
243 static const value_string TA_vals_FP[]=
245 {0, "Ct Next Data Packet"},
246 {1, "Ct First Data Packet"},
247 {2, "Nt Identities Information on Connectionless Bearer"},
248 {3, "Nt Identities Information"},
249 {4, "Qt Multiframe Synchronisation and System Information"},
250 {5, "Escape"},
251 {6, "Mt MAC Layer Control"},
252 {7, "Pt Paging Tail"},
253 {0, NULL}
256 /* ETSI EN 300 175-3 V2.3.0 7.1.2 */
257 static const value_string TA_vals_PP[]=
259 {0, "Ct Next Data Packet"},
260 {1, "Ct First Data Packet"},
261 {2, "Nt Identities Information on Connectionless Bearer"},
262 {3, "Nt Identities Information"},
263 {4, "Qt Multiframe Synchronisation and System Information"},
264 {5, "Escape"},
265 {6, "Mt MAC Layer Control"},
266 {7, "Mt MAC Layer Control,first packet"},
267 {0, NULL}
270 /* ETSI EN 300 175-3 V2.3.0 7.1.4 */
271 static const value_string BA_vals[]=
273 {0, "U-Type, In, SIn or Ip Packet No. 0 or No Valid Ip_error_detect Channel Data"},
274 {1, "U-Type, Ip_error_detect or Ip Packet No. 1 or SIn or No Valid In Channel Data"},
275 {2, "Double-Slot Required / E-Type, all Cf or CLf, Packet No. 0"},
276 {3, "E-Type, All Cf, Packet No. 1"},
277 {4, "Half-Slot Required / E-Type, not all Cf or CLf, Cf Packet No. 0"},
278 {5, "E-Type, not all Cf, Cf Packet No. 1"},
279 {6, "E-Type, All MAC control (unnumbered)"},
280 {7, "No B-Field"},
281 {0, NULL}
284 /* ETSI EN 300 175-3 V2.3.0 7.2.3.1 */
285 static const value_string QTHead_vals[]=
287 {0, "Static System Info"},
288 {1, "Static System Info"},
289 {2, "Extended RF Carriers Part 1"},
290 {3, "Fixed Part Capabilities"},
291 {4, "Extended Fixed Part Capabilities"},
292 {5, "SARI List Contents"},
293 {6, "Multi-Frame No."},
294 {7, "Escape"},
295 {8, "Obsolete"},
296 {9, "Extended RF Carriers Part 2"},
297 {10, "Reserved("},
298 {11, "Transmit Information"},
299 {12, "Extended Fixed Part Capabilities 2"},
300 {13, "Reserved"},
301 {14, "Reserved"},
302 {15, "Reserved"},
303 {0, NULL}
306 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.2 */
307 static const value_string QTNormalReverse_vals[]=
309 {0, "Normal RFP Transmit Half-Frame"},
310 {1, "Normal PP Transmit Half-Frame"},
311 {0, NULL}
314 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.3 */
315 static const value_string QTSlotNumber_vals[]=
317 {0, "Slot Pair 0/12"},
318 {1, "Slot Pair 1/13"},
319 {2, "Slot Pair 2/14"},
320 {3, "Slot Pair 3/15"},
321 {4, "Slot Pair 4/16"},
322 {5, "Slot Pair 5/17"},
323 {6, "Slot Pair 6/18"},
324 {7, "Slot Pair 7/19"},
325 {8, "Slot Pair 8/20"},
326 {9, "Slot Pair 9/21"},
327 {10, "Slot Pair 10/22"},
328 {11, "Slot Pair 11/23"},
329 {12, "Reserved"},
330 {13, "Reserved"},
331 {14, "Reserved"},
332 {15, "Reserved"},
333 {0, NULL}
336 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.4 */
337 static const value_string QTStartPosition_vals[]=
339 {0, "S-Field starts at Bit F0"},
340 {1, "Reserved for Future Use"},
341 {2, "S-Field starts at Bit F240"},
342 {3, "Reserved for Future Use"},
343 {0, NULL}
346 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.5 */
347 static const value_string QTEscape_vals[]=
349 {0, "No QT Escape is broadcast"},
350 {1, "The QT Escape is broadcast"},
351 {0, NULL}
354 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.6 */
355 static const value_string QTTranceiver_vals[]=
357 {0, "RFP has 1 Transceiver"},
358 {1, "RFP has 2 Transceiver"},
359 {2, "RFP has 3 Transceiver"},
360 {3, "RFP has 4 or more Transceiver"},
361 {0, NULL}
364 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.7 */
365 static const value_string QTExtendedCarrier_vals[]=
367 {0, "No Extended RF Carrier Information Message"},
368 {1, "Extended RF Carrier Information Message shall be transmitted in the next Multiframe"},
369 {0, NULL}
372 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.9 */
373 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.11 */
374 static const value_string QTSpr_vals[]=
376 {0, "OK"},
377 {1, "Reserved"},
378 {2, "Reserved"},
379 {3, "Reserved"},
380 {0, NULL}
383 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.10 */
384 static const value_string QTCarrierNumber_vals[]=
386 {0, "RF Carrier 0"},
387 {1, "RF Carrier 1"},
388 {2, "RF Carrier 2"},
389 {3, "RF Carrier 3"},
390 {4, "RF Carrier 4"},
391 {5, "RF Carrier 5"},
392 {6, "RF Carrier 6"},
393 {7, "RF Carrier 7"},
394 {8, "RF Carrier 8"},
395 {9, "RF Carrier 9"},
396 {10, "RF Carrier 10"},
397 {11, "RF Carrier 11"},
398 {12, "RF Carrier 12"},
399 {13, "RF Carrier 13"},
400 {14, "RF Carrier 14"},
401 {15, "RF Carrier 15"},
402 {16, "RF Carrier 16"},
403 {17, "RF Carrier 17"},
404 {18, "RF Carrier 18"},
405 {19, "RF Carrier 19"},
406 {20, "RF Carrier 20"},
407 {21, "RF Carrier 21"},
408 {22, "RF Carrier 22"},
409 {23, "RF Carrier 23"},
410 {24, "RF Carrier 24"},
411 {25, "RF Carrier 25"},
412 {26, "RF Carrier 26"},
413 {27, "RF Carrier 27"},
414 {28, "RF Carrier 28"},
415 {29, "RF Carrier 29"},
416 {30, "RF Carrier 30"},
417 {31, "RF Carrier 31"},
418 {32, "RF Carrier 32"},
419 {33, "RF Carrier 33"},
420 {34, "RF Carrier 34"},
421 {35, "RF Carrier 35"},
422 {36, "RF Carrier 36"},
423 {37, "RF Carrier 37"},
424 {38, "RF Carrier 38"},
425 {39, "RF Carrier 39"},
426 {40, "RF Carrier 40"},
427 {41, "RF Carrier 41"},
428 {42, "RF Carrier 42"},
429 {43, "RF Carrier 43"},
430 {44, "RF Carrier 44"},
431 {45, "RF Carrier 45"},
432 {46, "RF Carrier 46"},
433 {47, "RF Carrier 47"},
434 {48, "RF Carrier 48"},
435 {49, "RF Carrier 49"},
436 {50, "RF Carrier 50"},
437 {51, "RF Carrier 51"},
438 {52, "RF Carrier 52"},
439 {53, "RF Carrier 53"},
440 {54, "RF Carrier 54"},
441 {55, "RF Carrier 55"},
442 {56, "RF Carrier 56"},
443 {57, "RF Carrier 57"},
444 {58, "RF Carrier 58"},
445 {59, "RF Carrier 59"},
446 {60, "RF Carrier 60"},
447 {61, "RF Carrier 61"},
448 {62, "RF Carrier 62"},
449 {63, "RF Carrier 63"},
450 {0, NULL}
453 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2.12 */
454 static const value_string QTScanCarrierNum_vals[]=
456 {0, "Primary Scan next on RF Carrier 0"},
457 {1, "Primary Scan next on RF Carrier 1"},
458 {2, "Primary Scan next on RF Carrier 2"},
459 {3, "Primary Scan next on RF Carrier 3"},
460 {4, "Primary Scan next on RF Carrier 4"},
461 {5, "Primary Scan next on RF Carrier 5"},
462 {6, "Primary Scan next on RF Carrier 6"},
463 {7, "Primary Scan next on RF Carrier 7"},
464 {8, "Primary Scan next on RF Carrier 8"},
465 {9, "Primary Scan next on RF Carrier 9"},
466 {10, "Primary Scan next on RF Carrier 10"},
467 {11, "Primary Scan next on RF Carrier 11"},
468 {12, "Primary Scan next on RF Carrier 12"},
469 {13, "Primary Scan next on RF Carrier 13"},
470 {14, "Primary Scan next on RF Carrier 14"},
471 {15, "Primary Scan next on RF Carrier 15"},
472 {16, "Primary Scan next on RF Carrier 16"},
473 {17, "Primary Scan next on RF Carrier 17"},
474 {18, "Primary Scan next on RF Carrier 18"},
475 {19, "Primary Scan next on RF Carrier 19"},
476 {20, "Primary Scan next on RF Carrier 20"},
477 {21, "Primary Scan next on RF Carrier 21"},
478 {22, "Primary Scan next on RF Carrier 22"},
479 {23, "Primary Scan next on RF Carrier 23"},
480 {24, "Primary Scan next on RF Carrier 24"},
481 {25, "Primary Scan next on RF Carrier 25"},
482 {26, "Primary Scan next on RF Carrier 26"},
483 {27, "Primary Scan next on RF Carrier 27"},
484 {28, "Primary Scan next on RF Carrier 28"},
485 {29, "Primary Scan next on RF Carrier 29"},
486 {30, "Primary Scan next on RF Carrier 30"},
487 {31, "Primary Scan next on RF Carrier 31"},
488 {32, "Primary Scan next on RF Carrier 32"},
489 {33, "Primary Scan next on RF Carrier 33"},
490 {34, "Primary Scan next on RF Carrier 34"},
491 {35, "Primary Scan next on RF Carrier 35"},
492 {36, "Primary Scan next on RF Carrier 36"},
493 {37, "Primary Scan next on RF Carrier 37"},
494 {38, "Primary Scan next on RF Carrier 38"},
495 {39, "Primary Scan next on RF Carrier 39"},
496 {40, "Primary Scan next on RF Carrier 40"},
497 {41, "Primary Scan next on RF Carrier 41"},
498 {42, "Primary Scan next on RF Carrier 42"},
499 {43, "Primary Scan next on RF Carrier 43"},
500 {44, "Primary Scan next on RF Carrier 44"},
501 {45, "Primary Scan next on RF Carrier 45"},
502 {46, "Primary Scan next on RF Carrier 46"},
503 {47, "Primary Scan next on RF Carrier 47"},
504 {48, "Primary Scan next on RF Carrier 48"},
505 {49, "Primary Scan next on RF Carrier 49"},
506 {50, "Primary Scan next on RF Carrier 50"},
507 {51, "Primary Scan next on RF Carrier 51"},
508 {52, "Primary Scan next on RF Carrier 52"},
509 {53, "Primary Scan next on RF Carrier 53"},
510 {54, "Primary Scan next on RF Carrier 54"},
511 {55, "Primary Scan next on RF Carrier 55"},
512 {56, "Primary Scan next on RF Carrier 56"},
513 {57, "Primary Scan next on RF Carrier 57"},
514 {58, "Primary Scan next on RF Carrier 58"},
515 {59, "Primary Scan next on RF Carrier 59"},
516 {60, "Primary Scan next on RF Carrier 60"},
517 {61, "Primary Scan next on RF Carrier 61"},
518 {62, "Primary Scan next on RF Carrier 62"},
519 {63, "Primary Scan next on RF Carrier 63"},
520 {0, NULL}
523 /* ETSI EN 300 175-3 V2.3.0 7.2.3.4.2 */
524 static const value_string Qt_A12_vals[]=
526 {0, " Extended FP Info"},
527 {1, "Extended FP Info"},
528 {0, NULL}
531 static const value_string Qt_A13_vals[]=
533 {0, " Double Duplex Bearer Connections"},
534 {1, "Double Duplex Bearer Connections"},
535 {0, NULL}
538 static const value_string Qt_A14_vals[]=
540 {0, " Reserved"},
541 {1, "Reserved"},
542 {0, NULL}
545 static const value_string Qt_A15_vals[]=
547 {0, " Double Slot"},
548 {1, "Double Slot"},
549 {0, NULL}
552 static const value_string Qt_A16_vals[]=
554 {0, " Half Slot"},
555 {1, "Half Slot"},
556 {0, NULL}
559 static const value_string Qt_A17_vals[]=
561 {0, " Full Slot"},
562 {1, "Full Slot"},
563 {0, NULL}
566 static const value_string Qt_A18_vals[]=
568 {0, " Frequency Control"},
569 {1, "Frequency Control"},
570 {0, NULL}
573 static const value_string Qt_A19_vals[]=
575 {0, " Page Repetition"},
576 {1, "Page Repetition"},
577 {0, NULL}
580 static const value_string Qt_A20_vals[]=
582 {0, " C/O Setup on Dummy allowed"},
583 {1, "C/O Setup on Dummy allowed"},
584 {0, NULL}
587 static const value_string Qt_A21_vals[]=
589 {0, " C/L Uplink"},
590 {1, "C/L Uplink"},
591 {0, NULL}
594 static const value_string Qt_A22_vals[]=
596 {0, " C/L Downlink"},
597 {1, "C/L Downlink"},
598 {0, NULL}
601 static const value_string Qt_A23_vals[]=
603 {0, " Basic A-Field Set-Up"},
604 {1, "Basic A-Field Set-Up"},
605 {0, NULL}
608 static const value_string Qt_A24_vals[]=
610 {0, " Advanced A-Field Set-Up"},
611 {1, "Advanced A-Field Set-Up"},
612 {0, NULL}
615 static const value_string Qt_A25_vals[]=
617 {0, " B-field Set-Up"},
618 {1, "B-field Set-Up"},
619 {0, NULL}
622 static const value_string Qt_A26_vals[]=
624 {0, " Cf Messages"},
625 {1, "Cf Messages"},
626 {0, NULL}
629 static const value_string Qt_A27_vals[]=
631 {0, " In Minimum Delay"},
632 {1, "In Minimum Delay"},
633 {0, NULL}
636 static const value_string Qt_A28_vals[]=
638 {0, " In Normal Delay"},
639 {1, "In Normal Delay"},
640 {0, NULL}
643 static const value_string Qt_A29_vals[]=
645 {0, " Ip Error Detection"},
646 {1, "Ip Error Detection"},
647 {0, NULL}
650 static const value_string Qt_A30_vals[]=
652 {0, " Ip Error Correction"},
653 {1, "Ip Error Correction"},
654 {0, NULL}
657 static const value_string Qt_A31_vals[]=
659 {0, " Multibearer Connections"},
660 {1, "Multibearer Connections"},
661 {0, NULL}
664 /* ETSI EN 300 175-5 V2.3.0 Annex F */
665 static const value_string Qt_A32_vals[]=
667 {0, " ADPCM/G.726 Voice service"},
668 {1, "ADPCM/G.726 Voice service"},
669 {0, NULL}
672 static const value_string Qt_A33_vals[]=
674 {0, " GAP basic speech"},
675 {1, "GAP basic speech"},
676 {0, NULL}
679 static const value_string Qt_A34_vals[]=
681 {0, " Non-voice circuit switched service"},
682 {1, "Non-voice circuit switched service"},
683 {0, NULL}
686 static const value_string Qt_A35_vals[]=
688 {0, " Non-voice packet switched service"},
689 {1, "Non-voice packet switched service"},
690 {0, NULL}
693 static const value_string Qt_A36_vals[]=
695 {0, " Standard authentication required"},
696 {1, "Standard authentication required"},
697 {0, NULL}
700 static const value_string Qt_A37_vals[]=
702 {0, " Standard ciphering supported"},
703 {1, "Standard ciphering supported"},
704 {0, NULL}
707 static const value_string Qt_A38_vals[]=
709 {0, " Location registration supported"},
710 {1, "Location registration supported"},
711 {0, NULL}
714 static const value_string Qt_A39_vals[]=
716 {0, " SIM services available"},
717 {1, "SIM services available"},
718 {0, NULL}
721 static const value_string Qt_A40_vals[]=
723 {0, " Non-static Fixed Part (FP)"},
724 {1, "Non-static Fixed Part (FP)"},
725 {0, NULL}
728 static const value_string Qt_A41_vals[]=
730 {0, " CISS services available"},
731 {1, "CISS services available"},
732 {0, NULL}
735 static const value_string Qt_A42_vals[]=
737 {0, " CLMS service available"},
738 {1, "CLMS service available"},
739 {0, NULL}
742 static const value_string Qt_A43_vals[]=
744 {0, " COMS service available"},
745 {1, "COMS service available"},
746 {0, NULL}
749 static const value_string Qt_A44_vals[]=
751 {0, " Access rights requests supported"},
752 {1, "Access rights requests supported"},
753 {0, NULL}
756 static const value_string Qt_A45_vals[]=
758 {0, " External handover supported"},
759 {1, "External handover supported"},
760 {0, NULL}
763 static const value_string Qt_A46_vals[]=
765 {0, " Connection handover supported"},
766 {1, "Connection handover supported"},
767 {0, NULL}
770 static const value_string Qt_A47_vals[]=
772 {0, " Reserved"},
773 {1, "Reserved"},
774 {0, NULL}
778 static const value_string Qt_EA20_vals[]=
780 {0, " Reserved"},
781 {1, "Reserved"},
782 {0, NULL}
785 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.1 */
786 static const value_string Qt_CRFPHops_vals[]=
788 {0, "1 CRFP is allowed"},
789 {1, "2 CRFP allowed in cascade"},
790 {2, "3 CRFP allowed in cascade"},
791 {3, "No CRFP allowed"},
792 {0, NULL}
795 static const value_string Qt_CRFPEnc_vals[]=
797 {0, "CRFP encryption not supported"},
798 {1, "CRFP encryption supported"},
799 {0, NULL}
802 static const value_string Qt_REPHops_vals[]=
804 {0, "REP not supported"},
805 {1, "1 REP is allowed"},
806 {2, "2 REP are allowed in cascade"},
807 {3, "3 REP are allowed in cascade"},
808 {0, NULL}
811 static const value_string Qt_REPCap_vals[]=
813 {0, "REP interlacing not supported"},
814 {1, "REP interlacing supported"},
815 {0, NULL}
818 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.2 */
819 static const value_string Qt_Sync_vals[]=
821 {0, "standard, see EN 300 175-2 [2], clauses 4.6 and 5.2"},
822 {1, "prolonged preamble, see EN 300 175-2 [2], annex C (see note)"},
823 {2, "reserved"},
824 {3, "reserved"},
825 {0, NULL}
828 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.3 */
829 static const value_string Qt_MACSusp_vals[]=
831 {0, "Suspend and Resume not supported"},
832 {1, "Suspend and Resume supported"},
833 {0, NULL}
836 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2.4 */
837 static const value_string Qt_MACIpq_vals[]=
839 {0, "Ipq not supported"},
840 {1, "Ipq supported"},
841 {0, NULL}
844 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5.2 */
845 static const value_string Qt_EA23_vals[]=
847 {0, " Extended Fixed Part Info 2"},
848 {1, "Extended Fixed Part Info 2"},
849 {0, NULL}
852 static const value_string Qt_EA24_vals[]=
854 {0, " Unused"},
855 {1, "Unused"},
856 {0, NULL}
859 /* ETSI EN 300 175-5 V2.3.0 Annex F */
860 static const value_string Qt_EA25_vals[]=
862 {0, " F-MMS Interworking profile supported"},
863 {1, "F-MMS Interworking profile supported"},
864 {0, NULL}
867 static const value_string Qt_EA26_vals[]=
869 {0, " Basic ODAP supported"},
870 {1, "Basic ODAP supported"},
871 {0, NULL}
874 static const value_string Qt_EA27_vals[]=
876 {0, " Generic Media Encapsulation transport (DPRS) supported"},
877 {1, "Generic Media Encapsulation transport (DPRS) supported"},
878 {0, NULL}
881 static const value_string Qt_EA28_vals[]=
883 {0, " IP Roaming unrestricted supported"},
884 {1, "IP Roaming unrestricted supported"},
885 {0, NULL}
888 static const value_string Qt_EA29_vals[]=
890 {0, " Ethernet"},
891 {1, "Ethernet"},
892 {0, NULL}
895 static const value_string Qt_EA30_vals[]=
897 {0, " Token Ring"},
898 {1, "Token Ring"},
899 {0, NULL}
902 static const value_string Qt_EA31_vals[]=
904 {0, " IP"},
905 {1, "IP"},
906 {0, NULL}
909 static const value_string Qt_EA32_vals[]=
911 {0, " PPP"},
912 {1, "PPP"},
913 {0, NULL}
916 static const value_string Qt_EA33_vals[]=
918 {0, " V.24"},
919 {1, "V.24"},
920 {0, NULL}
923 static const value_string Qt_EA34_vals[]=
925 {0, " Reserved"},
926 {1, "Reserved"},
927 {0, NULL}
930 static const value_string Qt_EA35_vals[]=
932 {0, " Reserved"},
933 {1, "Reserved"},
934 {0, NULL}
937 static const value_string Qt_EA36_vals[]=
939 {0, " RAP Part 1 Profile"},
940 {1, "RAP Part 1 Profile"},
941 {0, NULL}
944 static const value_string Qt_EA37_vals[]=
946 {0, " ISDN intermediate system"},
947 {1, "ISDN intermediate system"},
948 {0, NULL}
951 static const value_string Qt_EA38_vals[]=
953 {0, " Synchronization to GPS achieved"},
954 {1, "Synchronization to GPS achieved"},
955 {0, NULL}
958 static const value_string Qt_EA39_vals[]=
960 {0, " Location registration with TPUI allowed"},
961 {1, "Location registration with TPUI allowed"},
962 {0, NULL}
965 static const value_string Qt_EA40_vals[]=
967 {0, " Emergency call supported"},
968 {1, "Emergency call supported"},
969 {0, NULL}
972 static const value_string Qt_EA41_vals[]=
974 {0, " Asymmetric bearers supported"},
975 {1, "Asymmetric bearers supported"},
976 {0, NULL}
979 static const value_string Qt_EA42_vals[]=
981 {0, " Reserved"},
982 {1, "Reserved"},
983 {0, NULL}
986 static const value_string Qt_EA43_vals[]=
988 {0, " LRMS"},
989 {1, "LRMS"},
990 {0, NULL}
993 static const value_string Qt_EA44_vals[]=
995 {0, " Data Service Profile D"},
996 {1, "Data Service Profile D"},
997 {0, NULL}
1000 static const value_string Qt_EA45_vals[]=
1002 {0, " DPRS Stream"},
1003 {1, "DPRS Stream"},
1004 {0, NULL}
1007 static const value_string Qt_EA46_vals[]=
1009 {0, " DPRS FREL"},
1010 {1, "DPRS FREL"},
1011 {0, NULL}
1014 static const value_string Qt_EA47_vals[]=
1016 {0, " ISDN Data Services"},
1017 {1, "ISDN Data Services"},
1018 {0, NULL}
1021 /* ETSI EN 300 175-3 V2.3.0 7.2.5.1 */
1022 static const value_string MTHead_vals[]=
1024 {0, "Basic Connection Control"},
1025 {1, "Advanced Connection Control"},
1026 {2, "MAC Layer Test Messages"},
1027 {3, "Quality Control"},
1028 {4, "Broadcast and Connectionless Services"},
1029 {5, "Encryption Control"},
1030 {6, "Tail for use with the first Transmission of a B-Field \"bearer request\" Message"},
1031 {7, "Escape"},
1032 {8, "TARI Message"},
1033 {9, "REP Connection Control"},
1034 {10, "Reserved"},
1035 {11, "Reserved"},
1036 {12, "Reserved"},
1037 {13, "Reserved"},
1038 {14, "Reserved"},
1039 {15, "Reserved"},
1040 {0, NULL}
1043 /* ETSI EN 300 175-3 V2.3.0 7.2.5.2 */
1044 static const value_string MTBasicConCtrl_vals[]=
1046 {0, "Access Request"},
1047 {1, "Bearer Handover Request"},
1048 {2, "Connection Handover Request"},
1049 {3, "Unconfirmed Access Request"},
1050 {4, "Bearer Confirm"},
1051 {5, "Wait"},
1052 {6, "Attributes T Request"},
1053 {7, "Attributes T Confirm"},
1054 {8, "Reserved"},
1055 {9, "Reserved"},
1056 {10, "Reserved"},
1057 {11, "Reserved"},
1058 {12, "Reserved"},
1059 {13, "Reserved"},
1060 {14, "Reserved"},
1061 {15, "Release"},
1062 {0, NULL}
1065 /* ETSI EN 300 175-3 V2.3.0 7.2.5.7 */
1066 static const value_string MTEncrCmd1_vals[]=
1068 {0, "Start Encryption"},
1069 {1, "Stop Encryption"},
1070 {2, "reserved"},
1071 {3, "reserved"},
1072 {0, NULL}
1075 static const value_string MTEncrCmd2_vals[]=
1077 {0, "Request"},
1078 {1, "Confirm"},
1079 {2, "Grant"},
1080 {3, "Reserved"},
1081 {0, NULL}
1084 /* ETSI EN 300 175-3 V2.3.0 7.2.4.2.2 */
1085 static const value_string PTExtFlag_vals[]=
1087 {0, "Next normal Page in Frame 0"},
1088 {1, "Another Page in next Frame"},
1089 {0, NULL}
1092 /* ETSI EN 300 175-3 V2.3.0 7.2.4.2.3 */
1093 static const value_string PTSDU_vals[]=
1095 {0, "Zero Length Page"},
1096 {1, "Short Page"},
1097 {2, "Full Page"},
1098 {3, "MAC resume page"},
1099 {4, "Not the last 36 Bits of a Long Page"},
1100 {5, "The first 36 Bits of a Long Page"},
1101 {6, "The last 36 Bits of a Long Page"},
1102 {7, "All of a Long Page (first and last)"},
1103 {0, NULL}
1106 /* ETSI EN 300 175-3 V2.3.0 7.2.4.3.1 */
1107 static const value_string PTInfoType_vals[]=
1109 {0, "Fill Bits"},
1110 {1, "Blind Full Slot Information for Circuit Mode Service"},
1111 {2, "Other Bearer"},
1112 {3, "Recommended Other Bearer"},
1113 {4, "Good RFP Bearer"},
1114 {5, "Dummy or connectionless Bearer Position"},
1115 {6, "Extended Modulation Types"},
1116 {7, "Escape"},
1117 {8, "Dummy or connectionless Bearer Marker"},
1118 {9, "Bearer Handover/Replacement Information"},
1119 {10, "RFP Status and Modulation Types"},
1120 {11, "Active Carriers"},
1121 {12, "Connectionless Bearer Position"},
1122 {13, "RFP Power Level"},
1123 {14, "Blind Double Slot/RFP-FP Interface Resource Information"},
1124 {15, "Blind Full Slot Information for Packet Mode Service"},
1125 {0, NULL}
1128 #if 0
1129 /* ETSI EN 300 175-3 V2.3.0 7.2.4.3.10 */
1130 static const value_string PTRFPPower_vals[]=
1132 {0, "0 dBm"},
1133 {1, "2 dBm"},
1134 {2, "4 dBm"},
1135 {3, "6 dBm"},
1136 {4, "8 dBm"},
1137 {5, "10 dBm"},
1138 {6, "12 dBm"},
1139 {7, "14 dBm"},
1140 {8, "16 dBm"},
1141 {9, "18 dBm"},
1142 {10, "20 dBm"},
1143 {11, "22 dBm"},
1144 {12, "24 dBm"},
1145 {13, "26 dBm"},
1146 {14, "28 dBm"},
1147 {15, "30 dBm"},
1148 {0, NULL}
1150 #endif
1153 static unsigned char
1154 dect_getbit(guint8 *data, int bit)
1156 guint8 byte=data[bit/8];
1158 return (byte>>bit%8)&1;
1161 static void
1162 dect_setbit(guint8 *data, int bit, guint8 value)
1164 if(!value)
1165 data[bit/8]&=~(1<<(bit%8));
1166 else
1167 data[bit/8]|=(1<<(bit%8));
1170 /* EN 300 175-3 V2.3.0 6.2.5.4 */
1171 static guint8
1172 calc_xcrc(guint8* data, guint8 length)
1174 guint8 bits[21];
1175 guint8 gp=0x1;
1176 guint8 crc;
1177 guint8 next;
1178 int y, x;
1180 memset(bits, 0, sizeof(bits));
1181 for(y=0;y<=length-4;y++)
1183 dect_setbit(bits, y, dect_getbit(data, y+48*(1+(int)(y/16))));
1185 length=10;
1186 crc=bits[0];
1187 y=0;
1188 while(y<length)
1190 if(y<(length-1))
1191 next=bits[y+1];
1192 else
1193 next=0;
1194 y++;
1195 x=0;
1196 while(x<8)
1198 while(!(crc&0x80))
1200 crc<<=1;
1201 crc|=!!(next&0x80);
1202 next<<=1;
1203 x++;
1204 if(x>7)
1205 break;
1207 if(x>7)
1208 break;
1209 crc<<=1;
1210 crc|=!!(next&0x80);
1211 next<<=1;
1212 x++;
1213 crc^=(gp<<4);
1216 return crc;
1219 /* EN 300 175-3 V2.3.0 6.2.5.2 */
1220 static guint16
1221 calc_rcrc(guint8* data)
1223 guint16 gp=0x0589; /* 10000010110001001 without the leading 1 */
1225 guint16 crc;
1226 guint8 next;
1227 int y, x;
1229 crc=data[0]<<8|data[1];
1230 y=0;
1231 while(y<6)
1233 next=data[2+y];
1234 y++;
1235 x=0;
1236 while(x<8)
1238 while(!(crc&0x8000))
1240 crc<<=1;
1241 crc|=!!(next&0x80);
1242 next<<=1;
1243 x++;
1244 if(x>7)
1245 break;
1247 if(x>7)
1248 break;
1249 crc<<=1;
1250 crc|=!!(next&0x80);
1251 next<<=1;
1252 x++;
1253 crc^=gp;
1256 crc^=1;
1257 return crc;
1260 /* ETSI EN 300 175-3 V2.3.0 6.2.1.3 */
1261 static gint
1262 dissect_bfield(gboolean dect_packet_type _U_, guint8 ba,
1263 packet_info *pinfo _U_, tvbuff_t *tvb, gint offset, proto_tree *DectTree, proto_tree *ColumnsTree)
1265 guint8 xcrc/*, xcrclen*/;
1266 guint16 blen;
1267 gint start_offset;
1268 const char *bfield_str;
1269 const char *bfield_short_str;
1271 proto_item *bfieldti = NULL;
1272 proto_tree *BField = NULL;
1274 proto_item *bfdescrdatati = NULL;
1275 proto_tree *BFDescrData = NULL;
1277 guint8 bfield_data[DECT_BFIELD_DATA_SIZE];
1278 guint bfield_length = tvb_length_remaining(tvb, offset);
1280 if (bfield_length > DECT_BFIELD_DATA_SIZE)
1281 bfield_length = DECT_BFIELD_DATA_SIZE;
1283 if (bfield_length)
1284 tvb_memcpy(tvb, bfield_data, offset, bfield_length);
1285 else
1286 memset(bfield_data, 0, DECT_BFIELD_DATA_SIZE);
1288 /* B-Field */
1289 switch(ba)
1291 case 0:
1292 case 1:
1293 case 3:
1294 case 5:
1295 case 6:
1296 blen=40;
1297 /*xcrclen=4;*/
1299 bfield_short_str="Full Slot";
1300 bfield_str="Full Slot (320 bit data, 4 bit xcrc)";
1301 break;
1302 case 2:
1303 blen=100;
1304 /*xcrclen=4;*/
1306 bfield_short_str="Double Slot";
1307 bfield_str="Double Slot (800 bit data, 4 bit xcrc)";
1308 break;
1309 case 4:
1310 blen=10;
1311 /*xcrclen=4;*/
1313 bfield_short_str="Half Slot";
1314 bfield_str="Half Slot (80 bit data, 4 bit xcrc)";
1315 break;
1316 case 7:
1317 default:
1318 blen=0;
1319 /*xcrclen=0;*/
1321 bfield_short_str="No B-Field";
1322 bfield_str="No B-Field";
1323 break;
1326 proto_tree_add_string(ColumnsTree, hf_dect_cc_BField, tvb, offset, 1, bfield_short_str);
1328 if(blen)
1330 bfieldti = proto_tree_add_item(DectTree, hf_dect_B, tvb, offset, blen, ENC_NA);
1331 BField = proto_item_add_subtree(bfieldti, ett_bfield);
1333 proto_tree_add_none_format(BField, hf_dect_B_Data, tvb, offset, blen, "%s", bfield_str);
1335 bfdescrdatati = proto_tree_add_item(BField, hf_dect_B_DescrambledData, tvb, offset, blen, ENC_NA);
1336 BFDescrData = proto_item_add_subtree(bfdescrdatati, ett_bfdescrdata);
1339 start_offset=offset;
1341 if(blen<=bfield_length)
1343 gint fn;
1344 guint16 x, y;
1345 for(fn=0;fn<8;fn++)
1347 guint16 bytecount=0;
1349 offset=start_offset;
1351 proto_tree_add_none_format(BFDescrData, hf_dect_B_fn, tvb, offset, 0, "Framenumber %u/%u", fn, fn+8);
1352 for(x=0;x<blen;x+=16)
1355 * XXX - should this just be an FTYPE_BYTES
1356 * field, and possibly just displayed as
1357 * "Data: N bytes" rather than giving all
1358 * the bytes of data?
1360 * No, it gives you the bytes in descrambled
1361 * form depending on the framenumber. Sometimes,
1362 * you doesn't know the real framenumber, so you need
1363 * the range of all possible descramblings. (a.schuler)
1365 wmem_strbuf_t *string;
1366 string = wmem_strbuf_new(wmem_packet_scope(), NULL);
1367 for(y=0;y<16;y++)
1369 if((x+y)>=blen)
1370 break;
1372 wmem_strbuf_append_printf(string,"%.2x ", bfield_data[x+y]^scrt[fn][bytecount%31]);
1373 bytecount++;
1375 proto_tree_add_none_format(BFDescrData, hf_dect_B_Data, tvb, offset,
1376 y, "Data: %s", wmem_strbuf_get_str(string));
1377 offset+=y;
1381 else
1382 proto_tree_add_none_format(BField, hf_dect_B_Data, tvb, offset, 0, "Data too Short");
1384 if(blen==40)
1385 xcrc=calc_xcrc(bfield_data, 83);
1386 else
1387 xcrc=0;
1389 if((unsigned)(blen+1)<=bfield_length)
1391 if(xcrc!=(bfield_data[40]&0xf0))
1392 /* XXX: pkt_bfield->Data[40]&0xf0 isn't really the Recv value?? */
1393 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);
1394 else
1395 /* XXX: pkt_bfield->Data[40]&0xf0 isn't really the Recv value?? */
1396 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);
1398 else
1399 proto_tree_add_uint_format(bfieldti, hf_dect_B_XCRC, tvb, offset, 1, 0, "No X-CRC logged (Calc:%.2x)", xcrc);
1401 return offset;
1404 /* ETSI EN 300 175-3 V2.3.0 6.2.1.2 */
1405 static void
1406 dissect_afield(gboolean dect_packet_type, guint8 *ba,
1407 packet_info *pinfo _U_, tvbuff_t *tvb, gint offset, proto_tree *DectTree, proto_tree *ColumnsTree)
1409 guint8 ta;
1410 guint8 rcrcdat[8];
1411 guint16 computed_rcrc;
1412 wmem_strbuf_t *afield_str;
1414 proto_item *afieldti = NULL;
1415 proto_item *aheadti = NULL;
1416 proto_item *atailti = NULL;
1417 proto_tree *AField = NULL;
1418 proto_tree *AHead = NULL;
1419 proto_tree *ATail = NULL;
1421 guint8 header, tail_0, tail_1, tail_2, tail_3, tail_4;
1422 guint16 rcrc;
1424 afield_str = wmem_strbuf_new(wmem_packet_scope(), NULL);
1426 /************************** A-Field ***********************************/
1428 /* ETSI EN 300 175-3 V2.3.0 7.1.1, 7.2.1
1430 * | TA |Q1| BA |Q2| Tail | R-CRC |
1431 * +-----------------------+--------/ /--------+-------------+
1432 * |a0 a1 a2 a3 a4 a5 a6 a7|a8 | | | a47|a48 | a63|
1435 /* A-Field */
1436 header = tvb_get_guint8(tvb, offset+0);
1437 tail_0 = tvb_get_guint8(tvb, offset+1);
1438 tail_1 = tvb_get_guint8(tvb, offset+2);
1439 tail_2 = tvb_get_guint8(tvb, offset+3);
1440 tail_3 = tvb_get_guint8(tvb, offset+4);
1441 tail_4 = tvb_get_guint8(tvb, offset+5);
1442 rcrc = tvb_get_ntohs(tvb, offset+6);
1444 ta = (header & DECT_A_TA_MASK) >> DECT_A_TA_SHIFT;
1445 *ba = (header & DECT_A_BA_MASK) >> DECT_A_BA_SHIFT;
1447 afieldti = proto_tree_add_item(DectTree, hf_dect_A, tvb, offset, DECT_AFIELD_SIZE, ENC_NA);
1448 AField = proto_item_add_subtree(afieldti, ett_afield);
1450 /* Header */
1451 aheadti = proto_tree_add_item(AField, hf_dect_A_Head, tvb, offset, 1, ENC_BIG_ENDIAN);
1452 AHead = proto_item_add_subtree(aheadti, ett_ahead);
1454 if(dect_packet_type==DECT_PACKET_FP)
1455 proto_tree_add_item(AHead, hf_dect_A_Head_TA_FP, tvb, offset, 1, ENC_BIG_ENDIAN);
1456 else
1457 proto_tree_add_item(AHead, hf_dect_A_Head_TA_PP, tvb, offset, 1, ENC_BIG_ENDIAN);
1459 proto_tree_add_item(AHead, hf_dect_A_Head_Q1, tvb, offset, 1, ENC_BIG_ENDIAN);
1460 proto_tree_add_item(AHead, hf_dect_A_Head_BA, tvb, offset, 1, ENC_BIG_ENDIAN);
1461 proto_tree_add_item(AHead, hf_dect_A_Head_Q2, tvb, offset, 1, ENC_BIG_ENDIAN);
1462 offset++;
1464 /* Tail */
1465 if(dect_packet_type==DECT_PACKET_FP)
1467 atailti = proto_tree_add_none_format(afieldti, hf_dect_A_Tail, tvb, offset, 5,
1468 "FP-Tail: %s", val_to_str(ta, TA_vals_FP, "Error, please report: %d"));
1470 else
1472 atailti = proto_tree_add_none_format(afieldti, hf_dect_A_Tail, tvb, offset, 5,
1473 "PP-Tail: %s", val_to_str(ta, TA_vals_PP, "Error, please report: %d"));
1476 ATail = proto_item_add_subtree(atailti, ett_atail);
1478 if((ta==DECT_TA_CT0)||(ta==DECT_TA_CT1))
1480 /* ETSI EN 300 175-3 V2.3.0 10.8.1.1.1 */
1481 proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Ct]");
1483 if(ta==DECT_TA_CT0)
1484 wmem_strbuf_append_printf(afield_str,"C-Channel Next Data: %s",tvb_bytes_to_str(tvb, offset, 5));
1485 else
1486 wmem_strbuf_append_printf(afield_str,"C-Channel First Data: %s",tvb_bytes_to_str(tvb, offset, 5));
1488 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1490 else if((ta==DECT_TA_NT)||(ta==DECT_TA_NT_CL))
1492 /* ETSI EN 300 175-3 V2.3.0 7.2.2 */
1493 proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Nt]");
1495 wmem_strbuf_append_printf(afield_str,"RFPI: %s",tvb_bytes_to_str(tvb, offset, 5));
1496 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1498 proto_tree_add_item(atailti, hf_dect_A_Tail_Nt, tvb, offset, 5, ENC_NA);
1500 else if(ta==DECT_TA_QT)
1502 /* ETSI EN 300 175-3 V2.3.0 7.2.3 */
1503 proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Qt]");
1505 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_Qh, tvb, offset, 1, ENC_BIG_ENDIAN);
1507 switch(tail_0>>4)
1509 case 0: /* Static System Info */
1510 case 1:
1511 /* ETSI EN 300 175-3 V2.3.0 7.2.3.2 */
1512 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Static System Info");
1514 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Nr, tvb, offset, 1, ENC_BIG_ENDIAN);
1515 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Sn, tvb, offset, 1, ENC_BIG_ENDIAN);
1516 offset++;
1518 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Sp, tvb, offset, 1, ENC_BIG_ENDIAN);
1519 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Esc, tvb, offset, 1, ENC_BIG_ENDIAN);
1520 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Txs, tvb, offset, 1, ENC_BIG_ENDIAN);
1521 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Mc, tvb, offset, 1, ENC_BIG_ENDIAN);
1523 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",
1524 (tail_1&0x02)?" 0":"", (tail_1&0x01)?" 1":"", (tail_2&0x80)?" 2":"",
1525 (tail_2&0x40)?" 3":"", (tail_2&0x20)?" 4":"", (tail_2&0x10)?" 5":"",
1526 (tail_2&0x08)?" 6":"", (tail_2&0x04)?" 7":"", (tail_2&0x02)?" 8":"",
1527 (tail_2&0x01)?" 9":"");
1528 offset+=2;
1530 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Spr1, tvb, offset, 1, ENC_BIG_ENDIAN);
1531 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Cn, tvb, offset, 1, ENC_BIG_ENDIAN);
1532 offset++;
1534 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Spr2, tvb, offset, 1, ENC_BIG_ENDIAN);
1535 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_PSCN, tvb, offset, 1, ENC_BIG_ENDIAN);
1536 offset++;
1537 /* due to addition further down */
1538 offset-=5;
1539 break;
1540 case 2: /* Extended RF Carriers Part 1 */
1541 /* ETSI EN 300 175-3 V2.3.0 7.2.3.3 */
1542 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Extended RF Carriers Part 1");
1543 /* TODO */
1544 break;
1545 case 3: /* Fixed Part Capabilities */
1546 /* ETSI EN 300 175-3 V2.3.0 7.2.3.4 */
1547 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Fixed Part Capabilities");
1549 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A12, tvb, offset, 1, ENC_BIG_ENDIAN);
1550 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A13, tvb, offset, 1, ENC_BIG_ENDIAN);
1551 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A14, tvb, offset, 1, ENC_BIG_ENDIAN);
1552 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A15, tvb, offset, 1, ENC_BIG_ENDIAN);
1553 offset++;
1555 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A16, tvb, offset, 1, ENC_BIG_ENDIAN);
1556 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A17, tvb, offset, 1, ENC_BIG_ENDIAN);
1557 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A18, tvb, offset, 1, ENC_BIG_ENDIAN);
1558 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A19, tvb, offset, 1, ENC_BIG_ENDIAN);
1559 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A20, tvb, offset, 1, ENC_BIG_ENDIAN);
1560 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A21, tvb, offset, 1, ENC_BIG_ENDIAN);
1561 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A22, tvb, offset, 1, ENC_BIG_ENDIAN);
1562 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A23, tvb, offset, 1, ENC_BIG_ENDIAN);
1563 offset++;
1565 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A24, tvb, offset, 1, ENC_BIG_ENDIAN);
1566 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A25, tvb, offset, 1, ENC_BIG_ENDIAN);
1567 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A26, tvb, offset, 1, ENC_BIG_ENDIAN);
1568 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A27, tvb, offset, 1, ENC_BIG_ENDIAN);
1569 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A28, tvb, offset, 1, ENC_BIG_ENDIAN);
1570 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A29, tvb, offset, 1, ENC_BIG_ENDIAN);
1571 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A30, tvb, offset, 1, ENC_BIG_ENDIAN);
1572 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A31, tvb, offset, 1, ENC_BIG_ENDIAN);
1573 offset++;
1576 /* higher layer capabilities */
1577 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A32, tvb, offset, 1, ENC_BIG_ENDIAN);
1578 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A33, tvb, offset, 1, ENC_BIG_ENDIAN);
1579 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A34, tvb, offset, 1, ENC_BIG_ENDIAN);
1580 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A35, tvb, offset, 1, ENC_BIG_ENDIAN);
1581 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A36, tvb, offset, 1, ENC_BIG_ENDIAN);
1582 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A37, tvb, offset, 1, ENC_BIG_ENDIAN);
1583 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A38, tvb, offset, 1, ENC_BIG_ENDIAN);
1584 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A39, tvb, offset, 1, ENC_BIG_ENDIAN);
1585 offset++;
1587 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A40, tvb, offset, 1, ENC_BIG_ENDIAN);
1588 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A41, tvb, offset, 1, ENC_BIG_ENDIAN);
1589 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A42, tvb, offset, 1, ENC_BIG_ENDIAN);
1590 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A43, tvb, offset, 1, ENC_BIG_ENDIAN);
1591 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A44, tvb, offset, 1, ENC_BIG_ENDIAN);
1592 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A45, tvb, offset, 1, ENC_BIG_ENDIAN);
1593 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A46, tvb, offset, 1, ENC_BIG_ENDIAN);
1594 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A47, tvb, offset, 1, ENC_BIG_ENDIAN);
1595 offset++;
1597 /* due to addition further down */
1598 offset-=5;
1599 break;
1600 case 4: /* Extended Fixed Part Capabilities */
1601 /* ETSI EN 300 175-3 V2.3.0 7.2.3.5 */
1602 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Extended Fixed Part Capabilities");
1605 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_CRFPHops, tvb, offset, 1, ENC_BIG_ENDIAN);
1606 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_CRFPEnc, tvb, offset, 1, ENC_BIG_ENDIAN);
1607 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_REFHops, tvb, offset, 2, ENC_BIG_ENDIAN);
1608 offset++;
1610 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_REPCap, tvb, offset, 1, ENC_BIG_ENDIAN);
1611 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_Sync, tvb, offset, 1, ENC_BIG_ENDIAN);
1612 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A20, tvb, offset, 1, ENC_BIG_ENDIAN);
1613 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_MACSusp, tvb, offset, 1, ENC_BIG_ENDIAN);
1614 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_MACIpq, tvb, offset, 1, ENC_BIG_ENDIAN);
1615 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A23, tvb, offset, 1, ENC_BIG_ENDIAN);
1616 offset++;
1619 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A24, tvb, offset, 1, ENC_BIG_ENDIAN);
1621 /* higher layer capabilities */
1622 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A25, tvb, offset, 1, ENC_BIG_ENDIAN);
1623 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A26, tvb, offset, 1, ENC_BIG_ENDIAN);
1624 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A27, tvb, offset, 1, ENC_BIG_ENDIAN);
1625 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A28, tvb, offset, 1, ENC_BIG_ENDIAN);
1626 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A29, tvb, offset, 1, ENC_BIG_ENDIAN);
1627 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A30, tvb, offset, 1, ENC_BIG_ENDIAN);
1628 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A31, tvb, offset, 1, ENC_BIG_ENDIAN);
1629 offset++;
1632 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A32, tvb, offset, 1, ENC_BIG_ENDIAN);
1633 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A33, tvb, offset, 1, ENC_BIG_ENDIAN);
1634 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A34, tvb, offset, 1, ENC_BIG_ENDIAN);
1635 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A35, tvb, offset, 1, ENC_BIG_ENDIAN);
1636 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A36, tvb, offset, 1, ENC_BIG_ENDIAN);
1637 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A37, tvb, offset, 1, ENC_BIG_ENDIAN);
1638 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A38, tvb, offset, 1, ENC_BIG_ENDIAN);
1639 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A39, tvb, offset, 1, ENC_BIG_ENDIAN);
1640 offset++;
1642 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A40, tvb, offset, 1, ENC_BIG_ENDIAN);
1643 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A41, tvb, offset, 1, ENC_BIG_ENDIAN);
1644 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A42, tvb, offset, 1, ENC_BIG_ENDIAN);
1645 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A43, tvb, offset, 1, ENC_BIG_ENDIAN);
1646 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A44, tvb, offset, 1, ENC_BIG_ENDIAN);
1647 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A45, tvb, offset, 1, ENC_BIG_ENDIAN);
1648 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A46, tvb, offset, 1, ENC_BIG_ENDIAN);
1649 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_A47, tvb, offset, 1, ENC_BIG_ENDIAN);
1650 offset++;
1652 /* due to addition further down */
1653 offset-=5;
1654 break;
1655 case 5: /* SARI List Contents */
1656 /* ETSI EN 300 175-3 V2.3.0 7.2.3.6 */
1657 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "SARI List Contents");
1658 /* TODO */
1659 break;
1660 case 6: /* Multi-Frame No */
1661 /* ETSI EN 300 175-3 V2.3.0 7.2.3.7 */
1662 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Spare, tvb, offset, 2, ENC_BIG_ENDIAN);
1663 offset+=2;
1665 wmem_strbuf_append_printf(afield_str,"Multi-Frame No.: %s",tvb_bytes_to_str(tvb, offset, 3));
1666 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1668 proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Mfn, tvb, offset, 3, ENC_NA);
1669 offset+=3;
1671 /* due to addition further down */
1672 offset-=5;
1673 break;
1674 case 7: /* Escape */
1675 /* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */
1676 wmem_strbuf_append_printf(afield_str,"Escape Data: %s",tvb_bytes_to_str(tvb, offset, 5));
1677 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1678 break;
1679 case 8: /* Obsolete */
1680 /* ETSI EN 300 175-3 V2.3.0 7.2.3.1 */
1681 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Obsolete");
1682 break;
1683 case 9: /* Extended RF Carriers Part 2 */
1684 /* ETSI EN 300 175-3 V2.3.0 7.2.3.9 */
1685 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Extended RF Carriers Part 2");
1686 /* TODO */
1687 break;
1688 case 11: /* Transmit Information */
1689 /* ETSI EN 300 175-3 V2.3.0 7.2.3.10 */
1690 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Transmit Information");
1691 /* TODO */
1692 break;
1693 case 12: /* Extended Fixed Part Capabilities 2 */
1694 /* ETSI EN 300 175-3 V2.3.0 7.2.3.11 */
1695 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Extended Fixed Part Capabilities 2");
1696 /* TODO */
1697 break;
1698 case 10: /* Reserved */
1699 case 13:
1700 case 14:
1701 case 15:
1702 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Reserved");
1703 break;
1706 else if(ta==DECT_TA_ESC)
1708 /* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */
1709 /* Provide hook for escape message dissector */
1711 else if((ta==DECT_TA_MT)||((ta==DECT_TA_MT_FIRST)&&(dect_packet_type==DECT_PACKET_PP)))
1713 /* ETSI EN 300 175-3 V2.3.0 7.2.5 */
1714 proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Mt]");
1716 proto_tree_add_uint(ATail, hf_dect_A_Tail_Mt_Mh, tvb, offset, 1, tail_0);
1718 switch(tail_0>>4)
1720 case 0: /* Basic Connection Control */
1721 /* ETSI EN 300 175-3 V2.3.0 7.2.5.2 */
1722 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Basic Connection Control");
1723 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_BasicConCtrl, tvb, offset, 1, ENC_BIG_ENDIAN);
1724 offset++;
1726 if(((tail_0 & 0x0f)==6)||((tail_0 & 0x0f)==7))
1728 /* TODO See ETSI EN 300 175-3 V2.3.0 7.2.5.2.4 */
1729 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");
1730 offset +=4;
1732 else
1734 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Mh_fmid, tvb, offset, 2, ENC_BIG_ENDIAN);
1735 offset++;
1737 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Mh_pmid, tvb, offset, 3, ENC_BIG_ENDIAN);
1738 offset+=3;
1741 /* due to addition further down */
1742 offset-=5;
1743 break;
1744 case 1: /* Advanced Connection Control */
1745 /* ETSI EN 300 175-3 V2.3.0 7.2.5.3 */
1746 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Advanced Connection Control");
1747 break;
1748 case 2: /* MAC Layer Test Messages */
1749 /* ETSI EN 300 175-3 V2.3.0 7.2.5.4 */
1750 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "MAC Layer Test Messages");
1751 break;
1752 case 3: /* Quality Control */
1753 /* ETSI EN 300 175-3 V2.3.0 7.2.5.5 */
1754 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Quality Control");
1755 break;
1756 case 4: /* Broadcast and Connectionless Services */
1757 /* ETSI EN 300 175-3 V2.3.0 7.2.5.6 */
1758 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Broadcast and Connectionless Services");
1759 break;
1760 case 5: /* Encryption Control */
1761 /* ETSI EN 300 175-3 V2.3.0 7.2.5.7 */
1762 wmem_strbuf_append_printf(afield_str,"Encryption Control: %s %s",
1763 val_to_str((tail_0&0x0c)>>2, MTEncrCmd1_vals, "Error, please report: %d"),
1764 val_to_str(tail_0&0x03, MTEncrCmd2_vals, "Error, please report: %d"));
1766 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1768 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Encr_Cmd1, tvb, offset, 1, ENC_BIG_ENDIAN);
1769 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Encr_Cmd2, tvb, offset, 1, ENC_BIG_ENDIAN);
1770 offset++;
1772 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Mh_fmid, tvb, offset, 2, ENC_BIG_ENDIAN);
1773 offset++;
1775 proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Mh_pmid, tvb, offset, 3, ENC_BIG_ENDIAN);
1776 offset+=3;
1778 /* due to addition further down */
1779 offset-=5;
1780 break;
1781 case 6: /* Tail for use with the first Transmission of a B-Field \"bearer request\" Message */
1782 /* ETSI EN 300 175-3 V2.3.0 7.2.5.8 */
1783 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 break;
1785 case 7: /* Escape */
1786 /* ETSI EN 300 175-3 V2.3.0 7.2.5.9 */
1787 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Escape");
1788 break;
1789 case 8: /* TARI Message */
1790 /* ETSI EN 300 175-3 V2.3.0 7.2.5.10 */
1791 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "TARI Message");
1792 break;
1793 case 9: /* REP Connection Control */
1794 /* ETSI EN 300 175-3 V2.3.0 7.2.5.11 */
1795 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "REP Connection Control");
1796 break;
1797 case 10: /* Reserved */
1798 case 11:
1799 case 12:
1800 case 13:
1801 case 14:
1802 case 15:
1803 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, "Reserved");
1804 break;
1807 else if((ta==DECT_TA_PT)&&(dect_packet_type==DECT_PACKET_FP))
1809 /* ETSI EN 300 175-3 V2.3.0 7.2.4 */
1810 proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Pt]");
1812 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_ExtFlag, tvb, offset, 1, ENC_BIG_ENDIAN);
1813 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_SDU, tvb, offset, 1, ENC_BIG_ENDIAN);
1815 if(((tail_0&0x70)>>4)&0xfe)
1816 wmem_strbuf_append_printf(afield_str,"%s, ",val_to_str((tail_0&0x70)>>4, PTSDU_vals, "Error, please report: %d"));
1818 switch((tail_0&0x70)>>4)
1820 case 0: /* Zero Length Page */
1821 case 1: /* Short Page */
1822 if(((tail_0&0x70)>>4)==0)
1824 wmem_strbuf_append_printf(afield_str,"RFPI: xxxxx%.1x%.2x%.2x, ", (tail_0&0x0f), tail_1, tail_2);
1825 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);
1826 offset+=3;
1828 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_InfoType, tvb, offset, 1, ENC_BIG_ENDIAN);
1830 else
1832 wmem_strbuf_append_printf(afield_str,"Bs Data: %.1x%.2x%.2x, ", (tail_0&0x0f), tail_1, tail_2);
1833 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);
1834 offset+=3;
1836 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_InfoType, tvb, offset, 1, ENC_BIG_ENDIAN);
1839 wmem_strbuf_append_printf(afield_str,"%s",val_to_str(tail_3>>4, PTInfoType_vals, "Error, please report: %d"));
1841 switch(tail_3>>4)
1843 case 0: /* Fill Bits */
1844 proto_tree_add_none_format(ATail, hf_dect_A_Tail_Pt_Fillbits, tvb, offset, 2, "Fillbits: %.1x%.2x", tail_3&0x0f, tail_4);
1845 offset+=2;
1846 break;
1847 case 1: /* Blind Full Slot Information for Circuit Mode Service */
1848 offset+=2;
1849 break;
1850 case 7: /* Escape */
1851 offset+=2;
1852 break;
1853 case 8: /* Dummy or connectionless Bearer Marker */
1854 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",
1855 (tail_3&0x08)?" 0/12":"", (tail_3&0x04)?" 1/13":"", (tail_3&0x02)?" 2/14":"",
1856 (tail_3&0x01)?" 3/15":"", (tail_4&0x80)?" 4/16":"", (tail_4&0x40)?" 5/17":"",
1857 (tail_4&0x20)?" 6/18":"", (tail_4&0x10)?" 7/19":"", (tail_4&0x08)?" 8/20":"",
1858 (tail_4&0x04)?" 9/21":"", (tail_4&0x02)?" 10/22":"", (tail_4&0x01)?" 11/23":"");
1860 offset+=2;
1861 break;
1862 case 2: /* Other Bearer */
1863 case 3: /* Recommended Other Bearer */
1864 case 4: /* Good RFP Bearer */
1865 case 5: /* Dummy or connectionless Bearer Position */
1866 case 12: /* Connectionless Bearer Position */
1867 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_Bearer_Sn, tvb, offset, 1, ENC_BIG_ENDIAN);
1868 offset++;
1870 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_Bearer_Sp, tvb, offset, 1, ENC_BIG_ENDIAN);
1871 proto_tree_add_item(ATail, hf_dect_A_Tail_Pt_Bearer_Cn, tvb, offset, 1, ENC_BIG_ENDIAN);
1872 offset++;
1873 break;
1874 case 6: /* Extended Modulation Types */
1875 offset+=2;
1876 break;
1877 case 9: /* Bearer Handover/Replacement Information */
1878 offset+=2;
1879 break;
1880 case 10: /* RFP Status and Modulation Types */
1881 offset+=2;
1882 break;
1883 case 11: /* Active Carriers */
1884 offset+=2;
1885 break;
1886 case 13: /* RFP Power Level */
1887 offset+=2;
1888 break;
1889 case 14: /* Blind Double Slot/RFP-FP Interface Resource Information */
1890 offset+=2;
1891 break;
1892 case 15: /* Blind Full Slot Information for Packet Mode Service */
1893 offset+=2;
1894 break;
1896 /* due to addition further down */
1897 offset-=5;
1898 break;
1899 case 2: /* Full Page */
1900 wmem_strbuf_append_printf(afield_str,"Full Page");
1901 break;
1902 case 3: /* MAC Resume Page */
1903 wmem_strbuf_append_printf(afield_str,"MAC Resume Page");
1904 break;
1905 case 4: /* Not the Last 36 Bits of a Long Page */
1906 wmem_strbuf_append_printf(afield_str,"Not the Last 36 Bits");
1907 break;
1908 case 5: /* The First 36 Bits of a Long Page */
1909 wmem_strbuf_append_printf(afield_str,"The First 36 Bits");
1910 break;
1911 case 6: /* The Last 36 Bits of a Long Page */
1912 wmem_strbuf_append_printf(afield_str,"The Last 36 Bits");
1913 break;
1914 case 7: /* All of a Long Page */
1915 wmem_strbuf_append_printf(afield_str,"All of a Long Page");
1916 break;
1919 proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
1922 offset+=5;
1924 /* R-CRC */
1925 /* ETSI EN 300 175-3 V2.3.0 6.2.5.1 */
1926 tvb_memcpy(tvb, rcrcdat, DECT_PACKET_INFO_LEN, 6);
1927 rcrcdat[6]=0;
1928 rcrcdat[7]=0;
1929 computed_rcrc=calc_rcrc(rcrcdat);
1930 if(computed_rcrc!=rcrc)
1931 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 else
1933 proto_tree_add_uint_format(afieldti, hf_dect_A_RCRC, tvb, offset, 2, 1, "R-CRC Match (Calc:%.4x, Recv:%.4x)", computed_rcrc, rcrc);
1935 /*offset+=2;*/
1938 static void
1939 dissect_dect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1941 proto_item *ti =NULL;
1942 proto_item *typeti =NULL;
1943 proto_tree *DectTree =NULL;
1944 gint offset =0;
1946 guint16 type;
1947 guint pkt_len;
1948 guint8 ba;
1950 /************************** Custom Columns ****************************/
1951 proto_item *columnstreeti;
1952 proto_tree *ColumnsTree;
1954 col_set_str(pinfo->cinfo, COL_INFO, "Use Custom Columns for Infos");
1956 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DECT");
1958 pkt_len=tvb_length(tvb);
1960 if(pkt_len<=DECT_PACKET_INFO_LEN)
1962 col_set_str(pinfo->cinfo, COL_INFO, "No Data");
1963 return;
1966 ti=proto_tree_add_item(tree, proto_dect, tvb, 0, -1, ENC_NA);
1967 DectTree=proto_item_add_subtree(ti, ett_dect);
1969 proto_tree_add_item(DectTree, hf_dect_transceivermode, tvb, offset, 1, ENC_BIG_ENDIAN);
1970 offset++;
1972 proto_tree_add_item(DectTree, hf_dect_channel, tvb, offset, 1, ENC_BIG_ENDIAN);
1973 offset++;
1975 proto_tree_add_item(DectTree, hf_dect_slot, tvb, offset, 2, ENC_BIG_ENDIAN);
1976 offset+=2;
1978 proto_tree_add_item(DectTree, hf_dect_framenumber, tvb, offset, 1, ENC_BIG_ENDIAN);
1979 offset++;
1981 proto_tree_add_item(DectTree, hf_dect_rssi, tvb, offset, 1, ENC_BIG_ENDIAN);
1982 offset++;
1984 proto_tree_add_item(DectTree, hf_dect_preamble, tvb, offset, 3, ENC_NA);
1985 offset+=3;
1987 typeti=proto_tree_add_item(DectTree, hf_dect_type, tvb, offset, 2, ENC_NA);
1989 type=tvb_get_ntohs(tvb, offset);
1990 offset+=2;
1992 columnstreeti = proto_tree_add_item(DectTree, hf_dect_cc, tvb, 0, 0, ENC_NA);
1993 ColumnsTree = proto_item_add_subtree(columnstreeti, ett_afield);
1995 switch(type) {
1996 case 0x1675:
1997 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DECT PP");
1998 proto_item_append_text(typeti, " Phone Packet");
1999 dissect_afield(DECT_PACKET_PP, &ba, pinfo, tvb, offset, DectTree, ColumnsTree);
2000 offset += DECT_AFIELD_SIZE;
2001 dissect_bfield(DECT_PACKET_PP, ba, pinfo, tvb, offset, DectTree, ColumnsTree);
2002 break;
2003 case 0xe98a:
2004 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DECT RFP");
2005 proto_item_append_text(typeti, " Station Packet");
2006 dissect_afield(DECT_PACKET_FP, &ba, pinfo, tvb, offset, DectTree, ColumnsTree);
2007 offset += DECT_AFIELD_SIZE;
2008 dissect_bfield(DECT_PACKET_FP, ba, pinfo, tvb, offset, DectTree, ColumnsTree);
2009 break;
2010 default:
2011 col_set_str(pinfo->cinfo, COL_PROTOCOL, "DECT Unk");
2012 proto_item_append_text(typeti, " Unknown Packet");
2013 break;
2017 void
2018 proto_register_dect(void)
2020 static hf_register_info hf[]=
2022 { &hf_dect_transceivermode,
2023 {"Tranceiver-Mode", "dect.tranceivermode", FT_UINT8, BASE_HEX, VALS(tranceiver_mode),
2024 0x0, NULL, HFILL}},
2026 { &hf_dect_channel,
2027 {"Channel", "dect.channel", FT_UINT8, BASE_DEC, NULL,
2028 0x0, NULL, HFILL}},
2030 { &hf_dect_framenumber,
2031 {"Frame#", "dect.framenumber", FT_UINT16, BASE_DEC, NULL,
2032 0x0, NULL, HFILL}},
2034 { &hf_dect_rssi,
2035 {"RSSI", "dect.rssi", FT_UINT8, BASE_DEC, NULL,
2036 0x0, NULL, HFILL}},
2038 { &hf_dect_slot,
2039 {"Slot", "dect.slot", FT_UINT16, BASE_DEC, NULL,
2040 0x0, NULL, HFILL}},
2042 { &hf_dect_preamble,
2043 {"Preamble", "dect.preamble", FT_BYTES, BASE_NONE, NULL,
2044 0x0, NULL, HFILL}},
2046 { &hf_dect_type,
2047 {"Packet-Type", "dect.type", FT_BYTES, BASE_NONE, NULL,
2048 0x0, NULL, HFILL}},
2051 /* **************** Custom Columns ***********************/
2053 { &hf_dect_cc,
2054 {"Columns", "dect.cc", FT_NONE, BASE_NONE, NULL,
2055 0x0, NULL, HFILL}},
2057 { &hf_dect_cc_TA,
2058 {"TA", "dect.cc.TA", FT_STRING, BASE_NONE, NULL,
2059 0x0, NULL, HFILL}},
2061 { &hf_dect_cc_AField,
2062 {"A-Field", "dect.cc.afield", FT_STRING, BASE_NONE, NULL,
2063 0x0, NULL, HFILL}},
2065 { &hf_dect_cc_BField,
2066 {"B-Field", "dect.cc.bfield", FT_STRING, BASE_NONE, NULL,
2067 0x0, NULL, HFILL}},
2069 /* **************** A-Field ******************************/
2070 /* ***** Header ***** */
2071 { &hf_dect_A,
2072 {"A-Field", "dect.afield", FT_BYTES, BASE_NONE, NULL,
2073 0x0, NULL, HFILL}},
2075 { &hf_dect_A_Head,
2076 {"A-Field Header", "dect.afield.head", FT_UINT8, BASE_HEX, NULL,
2077 0x0, NULL, HFILL}},
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 ***** */
2100 { &hf_dect_A_Tail,
2101 {"A-Field Tail", "dect.afield.tail", FT_NONE, BASE_NONE, NULL,
2102 0x0, NULL, HFILL}},
2104 /* Nt */
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}},
2109 /* Qt */
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 */
2115 /* Byte 0 */
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}},
2124 /* Byte 1 */
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(QTTranceiver_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}},
2141 /* Byte 2 */
2142 { &hf_dect_A_Tail_Qt_0_CA,
2143 {"CA", "dect.afield.tail.Qt.CA", FT_NONE, BASE_NONE, NULL,
2144 0x0, NULL, HFILL}},
2146 /* Byte 3 */
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}},
2155 /* Byte 4 */
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,
2456 0x0, NULL, HFILL}},
2459 /* Mt */
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,
2466 0x0, NULL, HFILL}},
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}},
2490 /* Pt */
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,
2501 0x0, NULL, HFILL}},
2503 { &hf_dect_A_Tail_Pt_BsData,
2504 {"Bs Data", "dect.afield.tail.Pt.BsData", FT_NONE, BASE_NONE, NULL,
2505 0x0, NULL, HFILL}},
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,
2513 0x0, NULL, HFILL}},
2515 { &hf_dect_A_Tail_Pt_SlotPairs,
2516 {"SlotPairs", "dect.afield.tail.Pt.SlotPairs", FT_NONE, BASE_NONE, NULL,
2517 0x0, NULL, HFILL}},
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 ***** */
2532 { &hf_dect_A_RCRC,
2533 {"A-Field R-CRC", "dect.afield.rcrc", FT_UINT8, BASE_DEC, NULL,
2534 0x0, NULL, HFILL}},
2536 /* ***************** B-Field *************************** */
2537 { &hf_dect_B,
2538 {"B-Field", "dect.bfield", FT_BYTES, BASE_NONE,
2539 0x0, 0x0, NULL, HFILL}},
2541 { &hf_dect_B_Data,
2542 {"B-Field", "dect.bfield.data", FT_NONE, BASE_NONE, NULL,
2543 0x0, NULL, HFILL}},
2545 { &hf_dect_B_DescrambledData,
2546 {"Descrambled Data", "dect.bfield.descrdata", FT_NONE, BASE_NONE,
2547 0x0, 0x0, NULL, HFILL}},
2549 { &hf_dect_B_fn,
2550 {"B-Field", "dect.bfield.framenumber", FT_NONE, BASE_NONE, NULL,
2551 0x0, NULL, HFILL}},
2553 /* ***** X-CRC ***** */
2554 { &hf_dect_B_XCRC,
2555 {"B-Field X-CRC", "dect.bfield.xcrc", FT_UINT8, BASE_DEC, NULL,
2556 0x0, NULL, HFILL}}
2560 /* Setup protocol subtree array */
2561 static gint *ett[]=
2563 &ett_dect,
2564 &ett_columns,
2565 &ett_ahead,
2566 &ett_afield,
2567 &ett_atail,
2568 &ett_aqt,
2569 &ett_bfield,
2570 &ett_bfdescrdata
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));
2578 void
2579 proto_reg_handoff_dect(void)
2581 dissector_handle_t dect_handle;
2583 dect_handle = create_dissector_handle(dissect_dect, proto_dect);
2584 dissector_add_uint("ethertype", ETHERTYPE_DECT , dect_handle);