2 * Reliable Multicast Transport (RMT)
3 * LCT Building Block function definitions
4 * Copyright 2005, Stefano Pettini <spettini@users.sourceforge.net>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef __PACKET_RMT_LCT__
28 #define __PACKET_RMT_LCT__
30 #include "packet-rmt-common.h"
31 #include "packet-rmt-fec.h"
33 /* Type definitions */
34 /* ================ */
36 /* Logical LCT header representation */
47 gboolean close_session;
48 gboolean close_object;
54 const guint8 *toi_extended;
63 /* LCT header field definitions */
73 int flags_sct_present;
74 int flags_ert_present;
75 int flags_close_session;
76 int flags_close_object;
101 #define LCT_PREFS_EXT_192_NONE 0
102 #define LCT_PREFS_EXT_192_FLUTE 1
104 #define LCT_PREFS_EXT_193_NONE 0
105 #define LCT_PREFS_EXT_193_FLUTE 1
109 gboolean codepoint_as_fec_encoding;
119 struct _lct_ett *ett;
120 struct _lct_prefs *prefs;
123 /* Macros to generate static arrays */
125 #define LCT_FIELD_ARRAY(base_structure, base_protocol) \
126 { &base_structure.header, \
127 { "Layered Coding Transport (LCT) header", base_protocol ".lct", FT_NONE, BASE_NONE, NULL, 0x0, "", HFILL }}, \
128 { &base_structure.version, \
129 { "Version", base_protocol ".lct.version", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}, \
130 { &base_structure.fsize_header, \
131 { "Field sizes (bytes)", base_protocol ".lct.fsize", FT_NONE, BASE_NONE, NULL, 0x0, "", HFILL }}, \
132 { &base_structure.fsize_cci, \
133 { "Congestion Control Information field size", base_protocol ".lct.fsize.cci", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}, \
134 { &base_structure.fsize_tsi, \
135 { "Transport Session Identifier field size", base_protocol ".lct.fsize.tsi", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}, \
136 { &base_structure.fsize_toi, \
137 { "Transport Object Identifier field size", base_protocol ".lct.fsize.toi", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}, \
138 { &base_structure.flags_header, \
139 { "Flags", base_protocol ".lct.flags", FT_NONE, BASE_NONE, NULL, 0x0, "", HFILL }}, \
140 { &base_structure.flags_sct_present, \
141 { "Sender Current Time present flag", base_protocol ".lct.flags.sct_present", FT_BOOLEAN, BASE_NONE, TFS(&boolean_set_notset), 0x0, "", HFILL }}, \
142 { &base_structure.flags_ert_present, \
143 { "Expected Residual Time present flag", base_protocol ".lct.flags.ert_present", FT_BOOLEAN, BASE_NONE, TFS(&boolean_set_notset), 0x0, "", HFILL }}, \
144 { &base_structure.flags_close_session, \
145 { "Close Session flag", base_protocol ".lct.flags.close_session", FT_BOOLEAN, BASE_NONE, TFS(&boolean_set_notset), 0x0, "", HFILL }}, \
146 { &base_structure.flags_close_object, \
147 { "Close Object flag", base_protocol ".lct.flags.close_object", FT_BOOLEAN, BASE_NONE, TFS(&boolean_set_notset), 0x0, "", HFILL }}, \
148 { &base_structure.hlen, \
149 { "Header length", base_protocol ".lct.hlen", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }}, \
150 { &base_structure.codepoint, \
151 { "Codepoint", base_protocol ".lct.codepoint", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}, \
152 { &base_structure.cci, \
153 { "Congestion Control Information", base_protocol ".lct.cci", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL }}, \
154 { &base_structure.tsi, \
155 { "Transport Session Identifier", base_protocol ".lct.tsi", FT_UINT64, BASE_DEC, NULL, 0x0, "", HFILL }}, \
156 { &base_structure.toi, \
157 { "Transport Object Identifier (up to 64 bites)", base_protocol ".lct.toi", FT_UINT64, BASE_DEC, NULL, 0x0, "", HFILL }}, \
158 { &base_structure.toi_extended, \
159 { "Transport Object Identifier (up to 112 bits)", base_protocol ".lct.toi_extended", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL }}, \
160 { &base_structure.sct, \
161 { "Sender Current Time", base_protocol ".lct.sct", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "", HFILL }}, \
162 { &base_structure.ert, \
163 { "Expected Residual Time", base_protocol ".lct.ert", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "", HFILL }}, \
164 { &base_structure.ext, \
165 { "Extension count", base_protocol ".lct.ext", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }}
167 #define LCT_SUBTREE_ARRAY(base_structure) \
168 &base_structure.main, \
169 &base_structure.fsize, \
170 &base_structure.flags, \
171 &base_structure.ext, \
172 &base_structure.ext_ext
174 /* LCT exported functions */
175 /* ====================== */
177 void lct_info_column(struct _lct *lct, packet_info *pinfo);
179 void lct_dissector(struct _lct_ptr l, struct _fec_ptr f, tvbuff_t *tvb, proto_tree *tree, guint *offset);
180 void lct_dissector_free(struct _lct *lct);
182 void lct_prefs_set_default(struct _lct_prefs *prefs);
183 void lct_prefs_register(struct _lct_prefs *prefs, module_t *module);
184 void lct_ext_decode(struct _ext *e, struct _lct_prefs *prefs, tvbuff_t *tvb, proto_tree *tree, gint ett, struct _fec_ptr f);