HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-fp_hint.c
blob7b89015b32962ebc4a09820c88197ca76db06a3b
1 /* Routines for UMTS FP Hint protocol disassembly
3 * $Id$
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "config.h"
26 #include <string.h>
28 #include <glib.h>
29 #include <epan/packet.h>
30 #include <epan/wmem/wmem.h>
31 #include <epan/conversation.h>
32 #include "packet-umts_fp.h"
33 #include "packet-umts_mac.h"
34 #include "packet-rlc.h"
36 static int proto_fp_hint = -1;
37 extern int proto_fp;
38 extern int proto_umts_mac;
39 extern int proto_rlc;
41 static int ett_fph = -1;
42 static int ett_fph_rb = -1;
43 static int ett_fph_ddi_entry = -1;
44 static int ett_fph_tf = -1;
46 static int hf_fph_frametype = -1;
47 static int hf_fph_channeltype = -1;
48 static int hf_fph_chcnt = -1;
49 static int hf_fph_dchid = -1;
50 static int hf_fph_urnti = -1;
51 static int hf_fph_rlcmode = -1;
52 static int hf_fph_content = -1;
53 static int hf_fph_rbid = -1;
54 static int hf_fph_ctmux = -1;
55 static int hf_fph_ciphered = -1;
56 static int hf_fph_deciphered = -1;
57 static int hf_fph_macdflowid = -1;
58 static int hf_fph_macehs = -1;
59 static int hf_fph_rb = -1;
60 static int hf_fph_ddi_entry = -1;
61 static int hf_fph_ddi_size = -1;
62 static int hf_fph_ddi_logical = -1;
63 static int hf_fph_ddi_value = -1;
64 static int hf_fph_tf = -1;
65 static int hf_fph_tf_n = -1;
66 static int hf_fph_tf_size = -1;
68 static dissector_handle_t data_handle;
69 static dissector_handle_t ethwithfcs_handle;
70 static dissector_handle_t atm_untrunc_handle;
72 enum fph_ctype {
73 FPH_CHANNEL_PCH,
74 FPH_CHANNEL_RACH,
75 FPH_CHANNEL_FACH,
76 FPH_CHANNEL_DCH,
77 FPH_CHANNEL_HSDSCH,
78 FPH_CHANNEL_EDCH
81 enum fph_frame {
82 FPH_FRAME_ATM_AAL2,
83 FPH_FRAME_ETHERNET
86 enum fph_pich {
87 FPH_PICH18,
88 FPH_PICH36,
89 FPH_PICH72,
90 FPH_PICH144
93 enum fph_content {
94 FPH_CONTENT_UNKNOWN,
95 FPH_CONTENT_DCCH,
96 FPH_CONTENT_PS_DTCH,
97 FPH_CONTENT_CS_DTCH
100 static const value_string fph_frametype_vals[] = {
101 { FPH_FRAME_ATM_AAL2, "ATM AAL2" },
102 { FPH_FRAME_ETHERNET, "Ethernet" },
103 { 0, NULL }
106 static const value_string fph_channeltype_vals[] = {
107 { FPH_CHANNEL_PCH, "PCH" },
108 { FPH_CHANNEL_RACH, "RACH" },
109 { FPH_CHANNEL_FACH, "FACH" },
110 { FPH_CHANNEL_DCH, "DCH" },
111 { FPH_CHANNEL_HSDSCH, "HSDSCH" },
112 { FPH_CHANNEL_EDCH, "E-DCH" },
113 { 0, NULL }
116 static const value_string fph_rlcmode_vals[] = {
117 { RLC_TM, "Transparent Mode" },
118 { RLC_UM, "Unacknowledged Mode" },
119 { RLC_AM, "Acknowledged Mode" },
120 { 0, NULL }
123 static const value_string fph_content_vals[] = {
124 { FPH_CONTENT_UNKNOWN, "Unknown" },
125 { FPH_CONTENT_DCCH, "DCCH" },
126 { FPH_CONTENT_PS_DTCH, "PS DTCH" },
127 { FPH_CONTENT_CS_DTCH, "PS DTCH" },
128 { 0, NULL }
131 static const true_false_string fph_ctmux_vals = {
132 "C/T Mux field present", "C/T Mux field not present"
135 static const true_false_string fph_ciphered_vals = {
136 "Ciphered", "Not ciphered"
139 static const true_false_string fph_deciphered_vals = {
140 "Deciphered", "Not deciphered"
143 static guint16 assign_rb_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, guint8 rbcnt, proto_tree *tree)
145 guint8 i = 0, next_byte;
146 guint8 rlc_mode, content, rb_id, ctmux, ciphered, deciphered;
147 guint32 urnti;
148 struct umts_mac_info *macinf;
149 struct rlc_info *rlcinf;
151 macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
152 rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
153 if (!macinf) {
154 macinf = wmem_new0(wmem_file_scope(), struct umts_mac_info);
155 p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf);
157 if (!rlcinf) {
158 rlcinf = wmem_new0(wmem_file_scope(), struct rlc_info);
159 p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf);
162 while (i < rbcnt) {
163 urnti = tvb_get_letohl(tvb, offset);
164 next_byte = tvb_get_guint8(tvb, offset + 4);
165 rlc_mode = next_byte & 0x3;
166 content = (next_byte >> 2) & 0x3;
167 rb_id = next_byte >> 4;
168 next_byte = tvb_get_guint8(tvb, offset + 5);
169 rb_id |= (next_byte & 0x01) << 4;
170 ctmux = (next_byte >> 1) & 0x1;
171 ciphered = (next_byte >> 2) & 0x1;
172 deciphered = (next_byte >> 3) & 0x1;
174 if (i >= MAX_RLC_CHANS) {
175 proto_tree_add_text(tree, tvb, offset, -1,
176 "Frame contains more Radio Bearers than currently supported (%u present, %u supported)",
177 rbcnt, MAX_RLC_CHANS);
178 return -1;
180 if (i >= MAX_MAC_FRAMES) {
181 proto_tree_add_text(tree, tvb, offset, -1,
182 "Frame contains more MAC Frames than currently supported (%u present, %u supported)",
183 rbcnt, MAX_MAC_FRAMES);
184 return -1;
187 rlcinf->mode[i] = rlc_mode;
188 rlcinf->rbid[i] = rb_id;
189 rlcinf->urnti[i] = urnti;
190 rlcinf->ciphered[i] = ciphered;
191 rlcinf->deciphered[i] = deciphered;
192 rlcinf->li_size[i] = RLC_LI_VARIABLE;
194 macinf->ctmux[i] = ctmux ? TRUE : FALSE;
195 switch (content) {
196 case FPH_CONTENT_DCCH:
197 macinf->content[i] = MAC_CONTENT_DCCH;
198 break;
199 case FPH_CONTENT_PS_DTCH:
200 macinf->content[i] = MAC_CONTENT_PS_DTCH;
201 break;
202 case FPH_CONTENT_CS_DTCH:
203 macinf->content[i] = MAC_CONTENT_CS_DTCH;
204 break;
205 default:
206 macinf->content[i] = MAC_CONTENT_UNKNOWN;
209 if (tree) {
210 proto_tree *subtree;
211 proto_item *pi;
213 pi = proto_tree_add_item(tree, hf_fph_rb, tvb, offset, 8, ENC_NA);
214 subtree = proto_item_add_subtree(pi, ett_fph_rb);
216 if (urnti)
217 proto_tree_add_uint(subtree, hf_fph_urnti, tvb, offset, 4, urnti);
218 proto_tree_add_bits_item(subtree, hf_fph_content, tvb, (offset+4)*8+4, 2, ENC_LITTLE_ENDIAN);
219 proto_tree_add_bits_item(subtree, hf_fph_rlcmode, tvb, (offset+4)*8+6, 2, ENC_LITTLE_ENDIAN);
220 proto_tree_add_item(subtree, hf_fph_rbid, tvb, (offset+4), 2, ENC_LITTLE_ENDIAN);
221 proto_tree_add_boolean(subtree, hf_fph_ctmux, tvb, offset+5, 1, ctmux);
222 proto_tree_add_boolean(subtree, hf_fph_ciphered, tvb, offset+5, 1, ciphered);
223 proto_tree_add_boolean(subtree, hf_fph_deciphered, tvb, offset+5, 1, deciphered);
225 offset += 8;
226 i++;
228 return offset;
231 static void assign_fph_pch(tvbuff_t *tvb, packet_info *pinfo _U_, guint16 offset, fp_info *fpi, proto_tree *tree _U_)
233 guint8 pich;
234 guint16 blkcnt, blksz;
235 const guint8 *hdr;
237 fpi->channel = CHANNEL_PCH;
239 hdr = tvb_get_ptr(tvb, offset, 4);
240 blkcnt = hdr[0] | ((hdr[1] & 0x01) << 8);
241 blksz = (hdr[1] >> 1) | ((hdr[2] & 0x3f) << 7);
242 pich = (hdr[2] >> 6) | ((hdr[3] & 0x01) << 2);
244 switch (pich) {
245 case FPH_PICH18:
246 fpi->paging_indications = 18;
247 break;
248 case FPH_PICH36:
249 fpi->paging_indications = 36;
250 break;
251 case FPH_PICH72:
252 fpi->paging_indications = 72;
253 break;
254 case FPH_PICH144:
255 fpi->paging_indications = 144;
256 break;
257 default:
258 fpi->paging_indications = 0;
260 fpi->num_chans = 1;
261 fpi->chan_tf_size[0] = blksz;
262 fpi->chan_num_tbs[0] = blkcnt;
265 static void assign_fph_rach(tvbuff_t *tvb, packet_info *pinfo _U_, guint16 offset, fp_info *fpi, proto_tree *tree)
267 const guint8 *hdr;
268 guint8 rbcnt;
269 guint16 blkcnt, blksz;
271 fpi->channel = CHANNEL_RACH_FDD;
273 hdr = tvb_get_ptr(tvb, offset, 4);
274 blkcnt = hdr[0] | ((hdr[1] & 0x01) << 8);
275 blksz = (hdr[1] >> 1) | ((hdr[2] & 0x3f) << 7);
277 fpi->num_chans = 1;
278 fpi->chan_tf_size[0] = blksz;
279 fpi->chan_num_tbs[0] = blkcnt;
281 offset += 4;
282 rbcnt = tvb_get_guint8(tvb, offset); offset++;
283 if (rbcnt > 0)
284 /*offset =*/ assign_rb_info(tvb, pinfo, offset, rbcnt, tree);
287 static void assign_fph_dch(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, fp_info *fpi, proto_tree *tree)
289 guint8 dch_id, rbcnt;
290 guint16 N, size;
291 guint32 cnt, i = 0;
292 const guint8 *hdr;
293 proto_tree *subtree;
294 proto_item *pi;
296 fpi->channel = CHANNEL_DCH;
297 cnt = tvb_get_guint8(tvb, offset); offset++;
299 if (tree)
300 proto_tree_add_uint(tree, hf_fph_chcnt, tvb, offset-1, 1, cnt);
302 fpi->num_chans = cnt;
303 fpi->dch_crc_present = 1;
304 while (i < cnt) {
305 pi = proto_tree_add_item(tree, hf_fph_tf, tvb, offset, 4, ENC_NA);
306 subtree = proto_item_add_subtree(pi, ett_fph_rb);
307 hdr = tvb_get_ptr(tvb, offset, 4);
308 dch_id = (hdr[0] & 0x1f) + 1;
310 N = ((hdr[1] & 0x3f)<<3) | (hdr[0] >> 5);
311 size = ((hdr[3] & 0x07)<<10) | (hdr[2] << 2) | ((hdr[1] & 0xc0)>>6);
312 size = size == 0x1fff ? 0 : size;
314 fpi->chan_tf_size[i] = size;
315 fpi->chan_num_tbs[i] = N;
317 if (subtree) {
318 proto_tree_add_uint(subtree, hf_fph_dchid, tvb, offset, 1, dch_id);
319 proto_tree_add_uint(subtree, hf_fph_tf_n, tvb, offset, 2, N);
320 if (size)
321 proto_tree_add_uint(subtree, hf_fph_tf_size, tvb, offset + 1, 3, size);
323 offset += 4;
324 if (i > MAX_FP_CHANS) {
325 proto_tree_add_text(tree, tvb, offset, -1,
326 "Frame contains more FP channels than currently supported (%u supported)",
327 MAX_FP_CHANS);
328 return;
330 i++;
332 rbcnt = tvb_get_guint8(tvb, offset); offset++;
333 if (rbcnt > 0)
334 /*offset =*/ assign_rb_info(tvb, pinfo, offset, rbcnt, tree);
337 static void assign_fph_fach(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, fp_info *fpi, proto_tree *tree)
339 const guint8 *hdr;
340 guint8 rbcnt;
341 guint16 blkcnt, blksz;
343 fpi->channel = CHANNEL_FACH_FDD;
345 hdr = tvb_get_ptr(tvb, offset, 4);
346 blkcnt = hdr[0] | ((hdr[1] & 0x01) << 8);
347 blksz = (hdr[1] >> 1) | ((hdr[2] & 0x3f) << 7);
349 fpi->num_chans = 1;
350 fpi->chan_tf_size[0] = blksz;
351 fpi->chan_num_tbs[0] = blkcnt;
353 offset += 4;
354 rbcnt = tvb_get_guint8(tvb, offset); offset++;
355 if (rbcnt > 0)
356 /*offset =*/ assign_rb_info(tvb, pinfo, offset, rbcnt, tree);
359 static void assign_fph_hsdsch(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, fp_info *fpi, proto_tree *tree)
361 guint8 rbcnt, hsdsch_info;
363 hsdsch_info = tvb_get_guint8(tvb, offset);
364 fpi->hsdsch_entity = hsdsch_info & 0x08 ? ehs : hs;
365 fpi->channel = CHANNEL_HSDSCH;
367 if (tree) {
368 proto_tree_add_bits_item(tree, hf_fph_macehs, tvb,
369 offset*8+4, 1, ENC_LITTLE_ENDIAN);
370 proto_tree_add_bits_item(tree, hf_fph_macdflowid, tvb,
371 offset*8+5, 3, ENC_LITTLE_ENDIAN);
374 offset++;
375 rbcnt = tvb_get_guint8(tvb, offset); offset++;
376 if (rbcnt > 0)
377 /*offset =*/ assign_rb_info(tvb, pinfo, offset, rbcnt, tree);
380 static void assign_fph_edch(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, fp_info *fpi, proto_tree *tree)
382 guint8 rbcnt, macdflow_id, maces_cnt, i = 0;
383 guint8 logical, ddi;
384 guint16 maces_size;
385 proto_item *pi;
386 proto_tree *subtree = NULL;
388 fpi->channel = CHANNEL_EDCH;
389 macdflow_id = tvb_get_guint8(tvb, offset);
391 if (tree) {
392 proto_tree_add_uint(tree, hf_fph_macdflowid, tvb, offset, 1, macdflow_id);
395 offset++;
396 maces_cnt = tvb_get_guint8(tvb, offset); offset++;
398 fpi->no_ddi_entries = maces_cnt;
399 while (i < maces_cnt) {
400 ddi = tvb_get_guint8(tvb, offset++);
401 logical = tvb_get_guint8(tvb, offset++);
402 maces_size = tvb_get_letohs(tvb, offset);
403 offset += 2;
404 fpi->edch_ddi[i] = ddi;
405 fpi->edch_macd_pdu_size[i] = maces_size;
406 if (tree) {
407 pi = proto_tree_add_item(tree, hf_fph_ddi_entry, tvb, offset - 4, 4, ENC_NA);
408 subtree = proto_item_add_subtree(pi, ett_fph_ddi_entry);
409 proto_tree_add_uint(subtree, hf_fph_ddi_value, tvb, offset - 4, 1, ddi);
410 proto_tree_add_uint(subtree, hf_fph_ddi_logical, tvb, offset - 3, 1, logical);
411 proto_tree_add_uint(subtree, hf_fph_ddi_size, tvb, offset - 2, 2, maces_size);
413 i++;
414 if (i >= MAX_EDCH_DDIS) {
415 proto_tree_add_text(tree, tvb, offset, -1,
416 "Frame contains more FP channels than currently supported (%u supported)",
417 MAX_FP_CHANS);
418 return;
423 rbcnt = tvb_get_guint8(tvb, offset); offset++;
424 if (rbcnt > 0)
425 /*offset =*/ assign_rb_info(tvb, pinfo, offset, rbcnt, tree);
428 static void attach_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, guint8 channel_type, guint8 frame_type, proto_tree *tree)
430 fp_info *fpi;
432 fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0);
433 if (!fpi) {
434 fpi = wmem_new0(wmem_file_scope(), fp_info);
435 p_add_proto_data(pinfo->fd, proto_fp, 0, fpi);
438 fpi->is_uplink = pinfo->p2p_dir == P2P_DIR_RECV;
439 /* TODO make this configurable */
440 fpi->release = 7;
441 fpi->release_year = 2008;
442 fpi->release_month = 9;
443 fpi->dch_crc_present = 1;
445 switch (frame_type) {
446 case FPH_FRAME_ATM_AAL2:
447 fpi->link_type = FP_Link_ATM;
448 break;
449 case FPH_FRAME_ETHERNET:
450 fpi->link_type = FP_Link_Ethernet;
451 break;
452 default:
453 fpi->link_type = FP_Link_Unknown;
456 /* at the moment, only IuB is supported */
457 fpi->iface_type = IuB_Interface;
458 /* at the moment, only FDD is supported */
459 fpi->division = Division_FDD;
461 switch (channel_type) {
462 case FPH_CHANNEL_PCH:
463 assign_fph_pch(tvb, pinfo, offset, fpi, tree);
464 break;
465 case FPH_CHANNEL_RACH:
466 assign_fph_rach(tvb, pinfo, offset, fpi, tree);
467 break;
468 case FPH_CHANNEL_FACH:
469 assign_fph_fach(tvb, pinfo, offset, fpi, tree);
470 break;
471 case FPH_CHANNEL_DCH:
472 assign_fph_dch(tvb, pinfo, offset, fpi, tree);
473 break;
474 case FPH_CHANNEL_HSDSCH:
475 assign_fph_hsdsch(tvb, pinfo, offset, fpi, tree);
476 break;
477 case FPH_CHANNEL_EDCH:
478 assign_fph_edch(tvb, pinfo, offset, fpi, tree);
479 break;
480 default:
481 fpi->channel = 0;
485 static void dissect_fp_hint(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
487 guint8 frame_type, channel_type;
488 guint16 hdrlen;
489 guint32 atm_hdr, aal2_ext;
490 tvbuff_t *next_tvb;
491 dissector_handle_t *next_dissector;
492 proto_item *ti;
493 proto_tree *fph_tree = NULL;
495 col_set_str(pinfo->cinfo, COL_PROTOCOL, "FP Hint");
497 hdrlen = tvb_get_letohs(tvb, 0);
498 frame_type = tvb_get_guint8(tvb, 2);
499 channel_type = tvb_get_guint8(tvb, 3);
501 if (tree) {
502 ti = proto_tree_add_item(tree, proto_fp_hint, tvb, 0, hdrlen, ENC_NA);
503 fph_tree = proto_item_add_subtree(ti, ett_fph);
504 proto_tree_add_uint(fph_tree, hf_fph_frametype, tvb, 2, 1, frame_type);
505 proto_tree_add_uint(fph_tree, hf_fph_channeltype, tvb, 3, 1, channel_type);
508 /* attach FP, MAC, RLC information */
509 attach_info(tvb, pinfo, 4, channel_type, frame_type, fph_tree);
510 switch (frame_type) {
511 case FPH_FRAME_ATM_AAL2:
512 aal2_ext = tvb_get_ntohl(tvb, hdrlen); hdrlen += 4;
513 atm_hdr = tvb_get_ntohl(tvb, hdrlen); hdrlen += 4;
514 memset(&pinfo->pseudo_header->atm, 0, sizeof(pinfo->pseudo_header->atm));
515 pinfo->pseudo_header->atm.aal = AAL_2;
516 /* pinfo->pseudo_header->atm.flags = pinfo->p2p_dir; */
517 pinfo->pseudo_header->atm.flags = ATM_AAL2_NOPHDR;
518 pinfo->pseudo_header->atm.vpi = ((atm_hdr & 0x0ff00000) >> 20);
519 pinfo->pseudo_header->atm.vci = ((atm_hdr & 0x000ffff0) >> 4);
520 pinfo->pseudo_header->atm.aal2_cid = aal2_ext & 0x000000ff;
521 pinfo->pseudo_header->atm.type = TRAF_UMTS_FP;
522 next_dissector = &atm_untrunc_handle;
523 break;
524 case FPH_FRAME_ETHERNET:
525 next_dissector = &ethwithfcs_handle;
526 break;
527 default:
528 next_dissector = &data_handle;
531 next_tvb = tvb_new_subset_remaining(tvb, hdrlen);
532 call_dissector(*next_dissector, next_tvb, pinfo, tree);
535 void
536 proto_register_fp_hint(void)
538 static hf_register_info hf[] = {
539 { &hf_fph_frametype, { "Frame Type", "fp_hint.frame_type", FT_UINT8, BASE_HEX, VALS(fph_frametype_vals), 0x0, NULL, HFILL } },
540 { &hf_fph_channeltype, { "Channel Type", "fp_hint.channel_type", FT_UINT8, BASE_HEX, VALS(fph_channeltype_vals), 0x0, NULL, HFILL } },
541 { &hf_fph_chcnt, { "Number of Channels", "fp_hint.num_chan", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
542 { &hf_fph_dchid, { "DCH ID", "fp_hint.dchid", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
543 { &hf_fph_macdflowid, { "MACd Flow ID", "fp_hint.macdflowid", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
544 { &hf_fph_macehs, { "MAC-ehs indicator", "fp_hint.mac_ehs", FT_BOOLEAN, BASE_NONE, NULL, 0, NULL, HFILL } },
545 /* traffic format details */
546 { &hf_fph_tf, { "Traffic Format", "fp_hint.tf", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
547 { &hf_fph_tf_n, { "N", "fp_hint.tf.n", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } },
548 { &hf_fph_tf_size, { "Size", "fp_hint.tf.size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } },
549 /* DDI information for E-DCH */
550 { &hf_fph_ddi_entry, { "DDI Entry", "fp_hint.ddi", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
551 { &hf_fph_ddi_value, { "DDI", "fp_hint.ddi.value", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
552 { &hf_fph_ddi_logical, { "Logical Channel ID", "fp_hint.ddi.logical", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
553 { &hf_fph_ddi_size, { "Size", "fp_hint.ddi.size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } },
554 /* radio bearer details */
555 { &hf_fph_rb, { "Radio Bearer", "fp_hint.rb", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
556 { &hf_fph_urnti, { "U-RNTI", "fp_hint.rb.urnti", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
557 { &hf_fph_content, { "Content", "fp_hint.rb.content", FT_UINT8, BASE_DEC, VALS(fph_content_vals), 0, NULL, HFILL } },
558 { &hf_fph_rlcmode, { "RLC Mode", "fp_hint.rb.rlc_mode", FT_UINT8, BASE_DEC, VALS(fph_rlcmode_vals), 0, NULL, HFILL } },
559 { &hf_fph_rbid, { "Radio Bearer ID", "fp_hint.rb.rbid", FT_UINT16, BASE_DEC, NULL, 0x01f0, NULL, HFILL } },
560 { &hf_fph_ctmux, { "C/T Mux", "fp_hint.rb.ctmux", FT_BOOLEAN, BASE_NONE, TFS(&fph_ctmux_vals), 0, "C/T Mux field", HFILL } },
561 { &hf_fph_ciphered, { "Ciphered", "fp_hint.rb.ciphered", FT_BOOLEAN, BASE_NONE, TFS(&fph_ciphered_vals), 0, "Ciphered flag", HFILL } },
562 { &hf_fph_deciphered, { "Deciphered", "fp_hint.rb.deciphered", FT_BOOLEAN, BASE_NONE, TFS(&fph_deciphered_vals), 0, "Deciphered flag", HFILL } }
565 static gint *ett[] = {
566 &ett_fph,
567 &ett_fph_rb,
568 &ett_fph_ddi_entry,
569 &ett_fph_tf
572 proto_fp_hint = proto_register_protocol("FP Hint", "FP Hint", "fp_hint");
573 register_dissector("fp_hint", dissect_fp_hint, proto_fp_hint);
575 proto_register_field_array(proto_fp_hint, hf, array_length(hf));
576 proto_register_subtree_array(ett, array_length(ett));
579 void
580 proto_reg_handoff_fp_hint(void)
582 atm_untrunc_handle = find_dissector("atm_untruncated");
583 data_handle = find_dissector("data");
584 ethwithfcs_handle = find_dissector("eth_withfcs");