HACK: 2nd try to match RowsetProperties
[wireshark-wip.git] / epan / dissectors / packet-rmt-lct.c
blob5b258ea4358781b58a77884d7787ab78b631d92e
1 /* packet-rmt-lct.c
2 * Reliable Multicast Transport (RMT)
3 * LCT Building Block dissector
4 * Copyright 2005, Stefano Pettini <spettini@users.sourceforge.net>
6 * Layered Coding Transport (LCT):
7 * -------------------------------
9 * Provides transport level support for reliable content delivery
10 * and stream delivery protocols. LCT is specifically designed to
11 * support protocols using IP multicast, but also provides support
12 * to protocols that use unicast. LCT is compatible with congestion
13 * control that provides multiple rate delivery to receivers and
14 * is also compatible with coding techniques that provide
15 * reliable delivery of content.
17 * References:
18 * RFC 3451, Layered Coding Transport (LCT) Building Block
20 * $Id$
22 * Wireshark - Network traffic analyzer
23 * By Gerald Combs <gerald@wireshark.org>
24 * Copyright 1998 Gerald Combs
26 * This program is free software; you can redistribute it and/or
27 * modify it under the terms of the GNU General Public License
28 * as published by the Free Software Foundation; either version 2
29 * of the License, or (at your option) any later version.
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
36 * You should have received a copy of the GNU General Public License
37 * along with this program; if not, write to the Free Software
38 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
41 #include "config.h"
43 #include <glib.h>
45 #include <epan/packet.h>
46 #include <epan/prefs.h>
47 #include <epan/strutil.h>
49 #include <math.h>
51 #include "packet-rmt-common.h"
53 #define LCT_SCT_FLAG 0x0008
54 #define LCT_ERT_FLAG 0x0004
55 #define LCT_CLOSE_SESSION_FLAG 0x0002
56 #define LCT_CLOSE_OBJECT_FLAG 0x0001
58 static int proto_rmt_lct = -1;
60 static int hf_version = -1;
61 static int hf_fsize_header = -1;
62 static int hf_fsize_cci = -1;
63 static int hf_fsize_tsi = -1;
64 static int hf_fsize_toi = -1;
65 static int hf_flags_header = -1;
66 static int hf_flags_sct_present = -1;
67 static int hf_flags_ert_present = -1;
68 static int hf_flags_close_session = -1;
69 static int hf_flags_close_object = -1;
70 static int hf_hlen = -1;
71 static int hf_codepoint = -1;
72 static int hf_cci = -1;
73 static int hf_tsi = -1;
74 static int hf_tsi16 = -1;
75 static int hf_tsi32 = -1;
76 static int hf_tsi48 = -1;
77 static int hf_toi = -1;
78 static int hf_toi16 = -1;
79 static int hf_toi32 = -1;
80 static int hf_toi48 = -1;
81 static int hf_toi64 = -1;
82 static int hf_toi_extended = -1;
83 static int hf_sct = -1;
84 static int hf_ert = -1;
85 static int hf_ext = -1;
86 static int hf_hec_type = -1;
87 static int hf_hec_len = -1;
88 static int hf_hec_data = -1;
89 static int hf_send_rate = -1;
90 static int hf_cenc = -1;
91 static int hf_flute_version = -1;
92 static int hf_fdt_instance_id = -1;
94 static int ett_main = -1;
95 static int ett_fsize = -1;
96 static int ett_flags = -1;
97 static int ett_ext = -1;
98 static int ett_ext_ext = -1;
100 /* Enumerated data types for LCT preferences */
101 const enum_val_t enum_lct_ext_192[] =
103 { "none", "Don't decode", LCT_PREFS_EXT_192_NONE },
104 { "flute", "Decode as FLUTE extension (EXT_FDT)", LCT_PREFS_EXT_192_FLUTE },
105 { NULL, NULL, 0 }
108 const enum_val_t enum_lct_ext_193[] =
110 { "none", "Don't decode", LCT_PREFS_EXT_193_NONE },
111 { "flute", "Decode as FLUTE extension (EXT_CENC)", LCT_PREFS_EXT_193_FLUTE },
112 { NULL, NULL, 0 }
115 static const value_string hec_type_vals[] = {
116 { 0, "EXT_NOP, No-Operation" },
117 { 1, "EXT_AUTH, Packet authentication" },
118 { 2, "EXT_CC, Congestion Control Feedback" },
119 { 64, "EXT_FTI, FEC Object Transmission Information" },
120 { 128, "EXT_RATE, Send Rate" },
121 { 192, "EXT_FDT, FDT Instance Header" },
122 { 193, "EXT_CENC, FDT Instance Content Encoding" },
124 { 0, NULL }
127 /* LCT helper functions */
128 /* ==================== */
130 static void lct_timestamp_parse(guint32 t, nstime_t* s)
132 s->secs = t / 1000;
133 s->nsecs = (t % 1000) * 1000000;
136 double rmt_decode_send_rate(guint16 send_rate )
138 double value;
140 value = (send_rate >> 4) * 10.0 / 4096.0 * pow(10.0, (send_rate & 0xf));
141 return value;
145 int lct_ext_decode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint offset, guint offset_max, lct_data_exchange_t *data_exchange,
146 int hfext, int ettext)
148 guint8 het;
149 guint i, count = 0;
150 guint length,
151 tmp_offset = offset,
152 start_offset = offset;
153 proto_item* ti;
154 proto_tree *hec_tree, *ext_tree;
156 /* Figure out the extention count */
157 while (tmp_offset < offset_max)
159 het = tvb_get_guint8(tvb, tmp_offset);
160 if (het <= 127)
162 length = tvb_get_guint8(tvb, tmp_offset+1)*4;
164 else
166 length = 4;
169 /* Prevents infinite loops */
170 if (length == 0)
171 break;
173 tmp_offset += length;
174 count++;
177 if (count == 0)
178 return 0;
180 ti = proto_tree_add_uint(tree, hfext, tvb, offset, tmp_offset - offset, count);
181 hec_tree = proto_item_add_subtree(ti, ettext);
183 for (i = 0; i < count; i++)
185 het = tvb_get_guint8(tvb, offset);
186 if (het <= 127)
188 length = tvb_get_guint8(tvb, offset+1)*4;
190 else
192 length = 4;
195 ti = proto_tree_add_item(hec_tree, hf_hec_type, tvb, offset, 1, ENC_BIG_ENDIAN);
196 ext_tree = proto_item_add_subtree(ti, ett_ext_ext);
197 proto_item_set_len(ti, length);
199 if (het <= 127)
201 proto_tree_add_item(ext_tree, hf_hec_len, tvb, offset+1, 1, ENC_BIG_ENDIAN);
204 switch (het)
206 case 0: /* EXT_NOP */
207 case 1: /* EXT_AUTH */
208 default:
209 proto_tree_add_item(ext_tree, hf_hec_data, tvb, offset+2, length-2, ENC_NA);
210 break;
212 case 3: /* EXT_CC RATE */
213 proto_tree_add_text(ext_tree, tvb, offset+2, 2,
214 "CC Sequence: %u", tvb_get_ntohs(tvb, offset+2));
215 proto_tree_add_text(ext_tree, tvb, offset+4, 1,
216 "CC Flags: 0x%x", tvb_get_guint8(tvb, offset+4));
217 proto_tree_add_text(ext_tree, tvb, offset+5, 1,
218 "CC RTT: %u", tvb_get_guint8(tvb, offset+5));
219 proto_tree_add_text(ext_tree, tvb, offset+6, 2,
220 "CC Loss: %g", tvb_get_ntohs(tvb, offset+6)/65535.0);
221 proto_tree_add_text(ext_tree, tvb, offset+8, 2,
222 "CC Rate: %u", tvb_get_ntohs(tvb, offset+8));
223 break;
225 case 64: /* EXT_FTI */
226 fec_decode_ext_fti(tvb, pinfo, ext_tree, offset,
227 (data_exchange == NULL) ? 0 : data_exchange->codepoint);
228 break;
230 case 128: /* EXT_RATE */
231 proto_tree_add_double(ext_tree, hf_send_rate, tvb, offset+2, 2,
232 rmt_decode_send_rate(tvb_get_ntohs(tvb, offset+2)));
233 break;
235 case 192: /* EXT_FDT */
236 if ((data_exchange != NULL) && (data_exchange->ext_192 == LCT_PREFS_EXT_192_FLUTE))
238 proto_tree_add_item(ext_tree, hf_flute_version, tvb, offset, 4, ENC_BIG_ENDIAN);
239 proto_tree_add_item(ext_tree, hf_fdt_instance_id, tvb, offset, 4, ENC_BIG_ENDIAN);
240 data_exchange->is_flute = TRUE;
242 break;
244 case 193: /* EXT_CENC */
245 if ((data_exchange != NULL) && (data_exchange->ext_193 == LCT_PREFS_EXT_193_FLUTE))
247 proto_tree_add_item(ext_tree, hf_cenc, tvb, offset+3, 1, ENC_BIG_ENDIAN);
249 break;
252 offset += length;
255 return offset-start_offset;
258 /* LCT exported functions */
259 /* ====================== */
261 /* Dissection */
262 /* ---------- */
264 /* Dissect an LCT header:
265 * l - ptr to the logical LCT packet representation to fill, and related wireshark stuffs
266 * f - ptr to the FEC infos to fill (EXT_FTI), and related wireshark stuffs
267 * tvb - buffer
268 * pinfo - packet info
269 * tree - tree where to add LCT header subtree
270 * offset - ptr to offset to use and update
274 0 1 2 3
275 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
276 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
277 | V | C | r |S| O |H|T|R|A|B| HDR_LEN | Codepoint (CP)|
278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
279 | Congestion Control Information (CCI, length = 32*(C+1) bits) |
280 | ... |
281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
282 | Transport Session Identifier (TSI, length = 32*S+16*H bits) |
283 | ... |
284 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
285 | Transport Object Identifier (TOI, length = 32*O+16*H bits) |
286 | ... |
287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
288 | Sender Current Time (SCT, if T = 1) |
289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
290 | Expected Residual Time (ERT, if R = 1) |
291 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
292 | Header Extensions (if applicable) |
293 | ... |
294 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
296 Figure 1 - Default LCT header format
299 static int
300 dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
302 int offset = 0;
303 guint16 buffer16;
304 lct_data_exchange_t *data_exchange = (lct_data_exchange_t*)data;
306 guint8 cci_size;
307 guint8 tsi_size;
308 guint8 toi_size;
309 guint64 tsi;
310 guint64 toi = 0;
311 guint16 hlen;
312 nstime_t tmp_time;
314 /* Set up structures needed to add the protocol subtree and manage it */
315 proto_item *ti;
316 proto_tree *lct_tree = tree, *lct_fsize_tree, *lct_flags_tree;
318 /* LCT fixed-size fields dissection */
319 /* -------------------------------- */
320 buffer16 = tvb_get_ntohs(tvb, offset);
322 cci_size = ((buffer16 & 0x0C00) >> 10) * 4 + 4;
323 tsi_size = ((buffer16 & 0x0080) >> 7) * 4 + ((buffer16 & 0x0010) >> 4) * 2;
324 toi_size = ((buffer16 & 0x0060) >> 5) * 4 + ((buffer16 & 0x0010) >> 4) * 2;
326 hlen = tvb_get_guint8(tvb, offset+2) * 4;
328 if (data_exchange != NULL)
330 data_exchange->codepoint = tvb_get_guint8(tvb, offset+3);
331 data_exchange->is_flute = FALSE;
334 if (tree)
336 /* Create the LCT subtree */
337 ti = proto_tree_add_item(tree, proto_rmt_lct, tvb, offset, hlen, ENC_NA);
338 lct_tree = proto_item_add_subtree(ti, ett_main);
340 /* Fill the LCT subtree */
341 proto_tree_add_item(lct_tree, hf_version, tvb, offset, 2, ENC_BIG_ENDIAN);
343 ti = proto_tree_add_item(lct_tree, hf_fsize_header, tvb, offset, 2, ENC_BIG_ENDIAN);
344 lct_fsize_tree = proto_item_add_subtree(ti, ett_fsize);
346 /* Fill the LCT fsize subtree */
347 proto_tree_add_uint(lct_fsize_tree, hf_fsize_cci, tvb, offset, 2, cci_size);
348 proto_tree_add_uint(lct_fsize_tree, hf_fsize_tsi, tvb, offset, 2, tsi_size);
349 proto_tree_add_uint(lct_fsize_tree, hf_fsize_toi, tvb, offset, 2, toi_size);
351 ti = proto_tree_add_item(lct_tree, hf_flags_header, tvb, offset, 2, ENC_BIG_ENDIAN);
352 lct_flags_tree = proto_item_add_subtree(ti, ett_flags);
354 /* Fill the LCT flags subtree */
355 proto_tree_add_item(lct_flags_tree, hf_flags_sct_present, tvb, offset, 2, ENC_BIG_ENDIAN);
356 proto_tree_add_item(lct_flags_tree, hf_flags_ert_present, tvb, offset, 2, ENC_BIG_ENDIAN);
357 proto_tree_add_item(lct_flags_tree, hf_flags_close_session, tvb, offset, 2, ENC_BIG_ENDIAN);
358 proto_tree_add_item(lct_flags_tree, hf_flags_close_object, tvb, offset, 2, ENC_BIG_ENDIAN);
360 proto_tree_add_uint(lct_tree, hf_hlen, tvb, offset+2, 1, hlen);
361 proto_tree_add_item(lct_tree, hf_codepoint, tvb, offset+3, 1, ENC_BIG_ENDIAN);
365 offset += 4;
367 /* LCT variable-size and optional fields dissection */
368 /* ------------------------------------------------ */
370 /* Congestion Control Information (CCI) */
371 if (cci_size > 0) {
372 proto_tree_add_item(lct_tree, hf_cci, tvb, offset, cci_size, ENC_NA);
373 offset += cci_size;
376 /* Transmission Session Identifier (TSI) */
377 if (tsi_size > 0) {
379 switch (tsi_size)
381 case 0:
382 proto_tree_add_uint(lct_tree, hf_tsi, tvb, offset, tsi_size, 0);
383 tsi = 0;
384 break;
386 case 2:
387 proto_tree_add_item(lct_tree, hf_tsi16, tvb, offset, tsi_size, ENC_BIG_ENDIAN);
388 tsi = tvb_get_ntohs(tvb, offset);
389 break;
391 case 4:
392 proto_tree_add_item(lct_tree, hf_tsi32, tvb, offset, tsi_size, ENC_BIG_ENDIAN);
393 tsi = tvb_get_ntohl(tvb, offset);
394 break;
396 case 6:
397 proto_tree_add_item(lct_tree, hf_tsi48, tvb, offset, tsi_size, ENC_BIG_ENDIAN);
398 tsi = tvb_get_ntoh64(tvb, offset) & G_GINT64_CONSTANT(0x0000FFFFFFFFFFFFU);
399 break;
400 default:
401 tsi = 0;
402 break;
405 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TSI: %" G_GINT64_MODIFIER "u", tsi);
406 offset += tsi_size;
409 /* Transmission Object Identifier (TOI) */
410 if (toi_size > 0) {
412 switch (toi_size)
414 case 0:
415 proto_tree_add_uint(lct_tree, hf_toi, tvb, offset, toi_size, 0);
416 toi = 0;
417 break;
419 case 2:
420 proto_tree_add_item(lct_tree, hf_toi16, tvb, offset, toi_size, ENC_BIG_ENDIAN);
421 toi = tvb_get_ntohs(tvb, offset);
422 break;
424 case 4:
425 proto_tree_add_item(lct_tree, hf_toi32, tvb, offset, toi_size, ENC_BIG_ENDIAN);
426 toi = tvb_get_ntohl(tvb, offset);
427 break;
429 case 6:
430 proto_tree_add_item(lct_tree, hf_toi48, tvb, offset, toi_size, ENC_BIG_ENDIAN);
431 toi = tvb_get_ntoh64(tvb, offset) & G_GINT64_CONSTANT(0x0000FFFFFFFFFFFFU);
432 break;
434 case 8:
435 proto_tree_add_item(lct_tree, hf_toi64, tvb, offset, toi_size, ENC_BIG_ENDIAN);
436 toi = tvb_get_ntoh64(tvb, offset);
437 break;
439 case 10:
440 proto_tree_add_item(lct_tree, hf_toi64, tvb, offset+2, 8, ENC_BIG_ENDIAN);
441 proto_tree_add_item(lct_tree, hf_toi_extended, tvb, offset, 2, ENC_BIG_ENDIAN);
442 break;
444 case 12:
445 proto_tree_add_item(lct_tree, hf_toi64, tvb, offset+4, 8, ENC_BIG_ENDIAN);
446 proto_tree_add_item(lct_tree, hf_toi_extended, tvb, offset, 4, ENC_BIG_ENDIAN);
447 break;
449 case 14:
450 proto_tree_add_item(lct_tree, hf_toi64, tvb, offset+6, 8, ENC_BIG_ENDIAN);
451 proto_tree_add_item(lct_tree, hf_toi_extended, tvb, offset, 6, ENC_BIG_ENDIAN);
452 break;
453 default:
454 break;
457 if (toi_size <= 8)
458 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: %" G_GINT64_MODIFIER "u", toi);
459 else
460 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_str(tvb, offset, toi_size));
461 offset += toi_size;
464 if (buffer16 & LCT_CLOSE_SESSION_FLAG)
465 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Close session");
467 if (buffer16 & LCT_CLOSE_OBJECT_FLAG)
468 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Close object");
470 /* Sender Current Time (SCT) */
471 if (buffer16 & LCT_SCT_FLAG) {
472 lct_timestamp_parse(tvb_get_ntohl(tvb, offset), &tmp_time);
473 proto_tree_add_time(lct_tree, hf_sct, tvb, offset, 4, &tmp_time);
474 offset += 4;
477 /* Expected Residual Time (ERT) */
478 if (buffer16 & LCT_ERT_FLAG) {
479 lct_timestamp_parse(tvb_get_ntohl(tvb, offset), &tmp_time);
480 proto_tree_add_time(lct_tree, hf_ert, tvb, offset, 4, &tmp_time);
481 offset += 4;
484 /* LCT header extensions, if applicable */
485 /* ------------------------------------ */
486 lct_ext_decode(lct_tree, tvb, pinfo, offset, hlen, data_exchange, hf_ext, ett_ext);
488 return hlen;
491 void
492 proto_register_rmt_lct(void)
494 static hf_register_info hf[] = {
495 { &hf_version,
496 { "Version", "rmt-lct.version", FT_UINT16, BASE_DEC, NULL, 0xF000, NULL, HFILL }},
497 { &hf_fsize_header,
498 { "Field size flags", "rmt-lct.fsize", FT_UINT16, BASE_HEX, NULL, 0x0FD0, NULL, HFILL }},
499 { &hf_fsize_cci,
500 { "Congestion Control Information field size", "rmt-lct.fsize.cci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
501 { &hf_fsize_tsi,
502 { "Transport Session Identifier field size", "rmt-lct.fsize.tsi", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
503 { &hf_fsize_toi,
504 { "Transport Object Identifier field size", "rmt-lct.fsize.toi", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
505 { &hf_flags_header,
506 { "Flags", "rmt-lct.flags", FT_UINT16, BASE_HEX, NULL, 0x001F, NULL, HFILL }},
507 { &hf_flags_sct_present,
508 { "Sender Current Time present flag", "rmt-lct.flags.sct_present", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LCT_SCT_FLAG, NULL, HFILL }},
509 { &hf_flags_ert_present,
510 { "Expected Residual Time present flag", "rmt-lct.flags.ert_present", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LCT_ERT_FLAG, NULL, HFILL }},
511 { &hf_flags_close_session,
512 { "Close Session flag", "rmt-lct.flags.close_session", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LCT_CLOSE_SESSION_FLAG, NULL, HFILL }},
513 { &hf_flags_close_object,
514 { "Close Object flag", "rmt-lct.flags.close_object", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LCT_CLOSE_OBJECT_FLAG, NULL, HFILL }},
515 { &hf_hlen,
516 { "Header length", "rmt-lct.hlen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
517 { &hf_codepoint,
518 { "Codepoint", "rmt-lct.codepoint", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
519 { &hf_cci,
520 { "Congestion Control Information", "rmt-lct.cci", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
521 { &hf_tsi,
522 { "Transport Session Identifier", "rmt-lct.tsi", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
523 { &hf_tsi16,
524 { "Transport Session Identifier", "rmt-lct.tsi", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
525 { &hf_tsi32,
526 { "Transport Session Identifier", "rmt-lct.tsi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
527 { &hf_tsi48,
528 { "Transport Session Identifier", "rmt-lct.tsi", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
529 { &hf_toi,
530 { "Transport Object Identifier", "rmt-lct.toi", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
531 { &hf_toi16,
532 { "Transport Object Identifier", "rmt-lct.toi", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
533 { &hf_toi32,
534 { "Transport Object Identifier", "rmt-lct.toi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
535 { &hf_toi48,
536 { "Transport Object Identifier", "rmt-lct.toi", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
537 { &hf_toi64,
538 { "Transport Object Identifier (up to 64 bits)", "rmt-lct.toi", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
539 { &hf_toi_extended,
540 { "Transport Object Identifier (bits 64-112)", "rmt-lct.toi_extended", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
541 { &hf_sct,
542 { "Sender Current Time", "rmt-lct.sct", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
543 { &hf_ert,
544 { "Expected Residual Time", "rmt-lct.ert", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
545 { &hf_ext,
546 { "Extension count", "rmt-lct.ext", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
547 { &hf_hec_type,
548 { "Header Extension Type (HET)", "rmt-lct.hec.type", FT_UINT8, BASE_DEC, VALS(hec_type_vals), 0x0, NULL, HFILL }},
549 { &hf_hec_len,
550 { "Header Extension Length (HEL)", "rmt-lct.hec.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
551 { &hf_hec_data,
552 { "Header Extension Data", "rmt-lct.hec.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
553 { &hf_send_rate,
554 { "Send Rate", "rmt-lct.send_rate", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
555 { &hf_cenc,
556 { "Content Encoding Algorithm (CENC)", "rmt-lct.cenc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
557 { &hf_flute_version,
558 { "FLUTE version (V)", "rmt-lct.flute_version", FT_UINT32, BASE_DEC, NULL, 0x00F00000, NULL, HFILL }},
559 { &hf_fdt_instance_id,
560 { "FDT Instance ID", "rmt-lct.fdt_instance_id", FT_UINT32, BASE_DEC, NULL, 0x000FFFFF, NULL, HFILL }},
563 /* Setup protocol subtree array */
564 static gint *ett[] = {
565 &ett_main,
566 &ett_fsize,
567 &ett_flags,
568 &ett_ext,
569 &ett_ext_ext
572 /* Register the protocol name and description */
573 proto_rmt_lct = proto_register_protocol("Layered Coding Transport", "RMT-LCT", "rmt-lct");
574 new_register_dissector("rmt-lct", dissect_lct, proto_rmt_lct);
576 /* Required function calls to register the header fields and subtrees used */
577 proto_register_field_array(proto_rmt_lct, hf, array_length(hf));
578 proto_register_subtree_array(ett, array_length(ett));
582 * Editor modelines - http://www.wireshark.org/tools/modelines.html
584 * Local variables:
585 * c-basic-offset: 4
586 * tab-width: 8
587 * indent-tabs-mode: nil
588 * End:
590 * ex: set shiftwidth=4 tabstop=8 expandtab:
591 * :indentSize=4:tabSize=8:noTabs=true: