2 * Routines for CSM_ENCAPS dissection
3 * Copyright 2005, Angelo Bannack <angelo.bannack@siemens.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 2003 Gerald Combs
10 * Copied from packet-ans.c
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.
32 #ifdef HAVE_SYS_TYPES_H
33 # include <sys/types.h>
36 #ifdef HAVE_NETINET_IN_H
37 # include <netinet/in.h>
42 #include <epan/packet.h>
45 #include <epan/etypes.h>
48 #define OPCODE_NOOP 0x0000
49 #define OPCODE_CONTROL_PACKET 0x0001
50 #define OPCODE_RELIABLE_DATA 0x0002
53 #define CSM_ENCAPS_CTRL_ACK 0x80
54 #define CSM_ENCAPS_CTRL_ACK_SUPPRESS 0x40
55 #define CSM_ENCAPS_CTRL_ACK_TO_HOST 0x20
56 #define CSM_ENCAPS_CTRL_ENDIAN 0x01
60 #define CSM_ENCAPS_TYPE_CHANGE 0x00
61 #define CSM_ENCAPS_TYPE_QUERY 0x01
62 #define CSM_ENCAPS_TYPE_RESPONSE 0x02
63 #define CSM_ENCAPS_TYPE_INDICATION 0x03
64 #define CSM_ENCAPS_TYPE_QUERY_RESPONSE 0x04
65 #define CSM_ENCAPS_TYPE_INDICATION_RESPONSE 0x05
68 static const value_string opcode_vals[] = {
69 { OPCODE_NOOP, "No Operation" },
70 { OPCODE_CONTROL_PACKET, "Control Packet" },
71 { OPCODE_RELIABLE_DATA, "Reliable Data Transfer" },
75 static const value_string function_code_vals[] = {
81 static const value_string class_type_vals[] = {
87 static const value_string exclusive_to_host_vals[] = {
91 static const value_string exclusive_to_host_ct_vals[] = {
96 static const value_string error_vals[] = {
102 /* Initialize the protocol and registered fields */
103 static int proto_csm_encaps = -1;
105 static int hf_csm_encaps_opcode = -1;
106 static int hf_csm_encaps_seq = -1;
107 static int hf_csm_encaps_ctrl = -1;
108 static int hf_csm_encaps_ctrl_endian = -1;
109 static int hf_csm_encaps_ctrl_ack = -1;
110 static int hf_csm_encaps_ctrl_ack_suppress = -1;
111 static int hf_csm_encaps_channel = -1;
112 static int hf_csm_encaps_index = -1;
113 static int hf_csm_encaps_length = -1;
114 static int hf_csm_encaps_class = -1;
115 static int hf_csm_encaps_type = -1;
116 static int hf_csm_encaps_function_code = -1;
117 static int hf_csm_encaps_reserved = -1;
118 static int hf_csm_encaps_param_error = -1;
119 static int hf_csm_encaps_param1 = -1;
120 static int hf_csm_encaps_param2 = -1;
121 static int hf_csm_encaps_param3 = -1;
122 static int hf_csm_encaps_param4 = -1;
123 static int hf_csm_encaps_param5 = -1;
124 static int hf_csm_encaps_param6 = -1;
125 static int hf_csm_encaps_param7 = -1;
126 static int hf_csm_encaps_param8 = -1;
127 static int hf_csm_encaps_param9 = -1;
128 static int hf_csm_encaps_param10 = -1;
129 static int hf_csm_encaps_param11 = -1;
130 static int hf_csm_encaps_param12 = -1;
131 static int hf_csm_encaps_param13 = -1;
132 static int hf_csm_encaps_param14 = -1;
133 static int hf_csm_encaps_param15 = -1;
134 static int hf_csm_encaps_param16 = -1;
135 static int hf_csm_encaps_param17 = -1;
136 static int hf_csm_encaps_param18 = -1;
137 static int hf_csm_encaps_param19 = -1;
138 static int hf_csm_encaps_param20 = -1;
139 static int hf_csm_encaps_param21 = -1;
140 static int hf_csm_encaps_param22 = -1;
141 static int hf_csm_encaps_param23 = -1;
142 static int hf_csm_encaps_param24 = -1;
143 static int hf_csm_encaps_param25 = -1;
144 static int hf_csm_encaps_param26 = -1;
145 static int hf_csm_encaps_param27 = -1;
146 static int hf_csm_encaps_param28 = -1;
147 static int hf_csm_encaps_param29 = -1;
148 static int hf_csm_encaps_param30 = -1;
149 static int hf_csm_encaps_param31 = -1;
150 static int hf_csm_encaps_param32 = -1;
151 static int hf_csm_encaps_param33 = -1;
152 static int hf_csm_encaps_param34 = -1;
153 static int hf_csm_encaps_param35 = -1;
154 static int hf_csm_encaps_param36 = -1;
155 static int hf_csm_encaps_param37 = -1;
156 static int hf_csm_encaps_param38 = -1;
157 static int hf_csm_encaps_param39 = -1;
158 static int hf_csm_encaps_param40 = -1;
159 static int hf_csm_encaps_param = -1;
162 /* Initialize the subtree pointers */
163 static gint ett_csm_encaps = -1;
164 static gint ett_csm_encaps_control = -1;
167 /* returns the command name */
169 csm_fc(guint16 fc, guint16 ct)
172 return g_strdup(val_to_str(ct, class_type_vals,
175 return g_strdup(val_to_str(fc, function_code_vals,
182 /* check to see if the message is an exclusive message send to host */
184 csm_to_host(guint16 fc, guint16 ct)
188 return (match_strval(ct, exclusive_to_host_ct_vals) != NULL);
192 return (match_strval(fc, exclusive_to_host_vals) != NULL);
198 /* Code to actually dissect the packets */
200 dissect_csm_encaps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
202 proto_item *ti, *subitem;
203 proto_tree *csm_encaps_tree = NULL;
204 proto_tree *csm_encaps_control_tree = NULL;
205 guint16 function_code, channel, class_type;
206 guint control, type, sequence, length;
208 gboolean show_error_param= FALSE;
209 gchar *str_function_name;
212 function_code = tvb_get_letohs(tvb, 10);
213 control = tvb_get_guint8(tvb, 3);
215 class_type= tvb_get_guint8(tvb, 9);
216 class_type= class_type<<8;
217 class_type|= tvb_get_guint8(tvb, 8);
219 type = tvb_get_guint8(tvb, 8);
220 sequence = tvb_get_guint8(tvb, 2);
221 length = tvb_get_guint8(tvb, 6);
222 channel = tvb_get_ntohs(tvb, 4);
225 if (CSM_ENCAPS_CTRL_ACK&control)
226 show_error_param= FALSE;
229 if (csm_to_host(function_code, class_type)) /* exclusive messages to host */
230 show_error_param= FALSE;
233 if (type == CSM_ENCAPS_TYPE_RESPONSE)
234 show_error_param= TRUE;
236 show_error_param= FALSE;
241 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CSM_ENCAPS");
243 col_clear(pinfo->cinfo, COL_INFO);
246 if (CSM_ENCAPS_CTRL_ACK&control)
248 if (CSM_ENCAPS_CTRL_ACK_TO_HOST&control)
249 col_append_fstr(pinfo->cinfo, COL_INFO, "<-- ACK Ch: 0x%04X, Seq: %2d (To Host)", channel, sequence);
251 col_append_fstr(pinfo->cinfo, COL_INFO, "--> ACK Ch: 0x%04X, Seq: %2d (From Host)", channel, sequence);
255 str_function_name= csm_fc(function_code, class_type);
256 if ((type == CSM_ENCAPS_TYPE_RESPONSE) || (csm_to_host(function_code, class_type)))
257 col_append_fstr(pinfo->cinfo, COL_INFO, "<-- %-35s Ch: 0x%04X, Seq: %2d (To Host)", str_function_name, channel, sequence);
259 col_append_fstr(pinfo->cinfo, COL_INFO, "--> %-35s Ch: 0x%04X, Seq: %2d (From Host)", str_function_name, channel, sequence);
260 g_free(str_function_name);
265 ti = proto_tree_add_item(tree, proto_csm_encaps, tvb, 0, -1, ENC_NA);
266 csm_encaps_tree = proto_item_add_subtree(ti, ett_csm_encaps);
271 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_opcode, tvb, 0, 2, ENC_BIG_ENDIAN);
272 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_seq, tvb, 2, 1, ENC_BIG_ENDIAN);
274 subitem = proto_tree_add_uint(csm_encaps_tree, hf_csm_encaps_ctrl, tvb, 3, 1, control);
275 csm_encaps_control_tree = proto_item_add_subtree(subitem, ett_csm_encaps_control);
277 proto_tree_add_boolean(csm_encaps_control_tree, hf_csm_encaps_ctrl_ack, tvb, 3, 1, control);
278 proto_tree_add_boolean(csm_encaps_control_tree, hf_csm_encaps_ctrl_ack_suppress, tvb, 3, 1, control);
279 proto_tree_add_boolean(csm_encaps_control_tree, hf_csm_encaps_ctrl_endian, tvb, 3, 1, control);
281 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_channel, tvb, 4, 2, ENC_BIG_ENDIAN);
282 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_length, tvb, 6, 1, ENC_BIG_ENDIAN);
283 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_index, tvb, 7, 1, ENC_BIG_ENDIAN);
284 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_class, tvb, 9, 1, ENC_BIG_ENDIAN);
285 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_type, tvb, 8, 1, ENC_BIG_ENDIAN);
286 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_function_code, tvb, 10, 2, ENC_LITTLE_ENDIAN);
290 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_reserved, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
293 if (show_error_param)
294 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param_error, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN);
296 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param1, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN);
299 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param2, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
300 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param3, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
301 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param4, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
302 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param5, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
303 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param6, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
304 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param7, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
305 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param8, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
306 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param9, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
307 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param10, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
308 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param11, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
309 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param12, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
310 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param13, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
311 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param14, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
312 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param15, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
313 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param16, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
314 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param17, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
315 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param18, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
316 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param19, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
317 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param20, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
318 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param21, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
319 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param22, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
320 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param23, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
321 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param24, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
322 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param25, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
323 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param26, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
324 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param27, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
325 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param28, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
326 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param29, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
327 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param30, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
328 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param31, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
329 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param32, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
330 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param33, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
331 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param34, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
332 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param35, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
333 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param36, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
334 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param37, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
335 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param38, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
336 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param39, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
337 if (i<length) proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param40, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN); i+=2;
339 for (; i<length; i+=2)
340 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN);
346 proto_register_csm_encaps(void)
348 static struct true_false_string control_endian_bit = {"Little Endian","Big Endian"};
349 static struct true_false_string control_ack_bit = {"ACK Packet", "Message Packet"};
350 static struct true_false_string control_ack_suppress_bit = {"ACK Suppressed", "ACK Required"};
353 static hf_register_info hf[] = {
354 { &hf_csm_encaps_opcode,
355 { "Opcode", "csm_encaps.opcode",
356 FT_UINT16, BASE_HEX, VALS(opcode_vals), 0,
357 "CSM_ENCAPS Opcode", HFILL }
359 { &hf_csm_encaps_seq,
360 { "Sequence Number", "csm_encaps.seq_num",
361 FT_UINT8, BASE_DEC, NULL, 0,
362 "CSM_ENCAPS Sequence Number", HFILL }
365 { &hf_csm_encaps_ctrl,
366 { "Control", "csm_encaps.ctrl",
367 FT_UINT8, BASE_HEX, NULL, 0,
368 "CSM_ENCAPS Control", HFILL }
371 { &hf_csm_encaps_ctrl_ack,
372 { "Packet Bit", "csm_encaps.ctrl.ack",
373 FT_BOOLEAN, 8, TFS(&control_ack_bit), CSM_ENCAPS_CTRL_ACK,
374 "Message Packet/ACK Packet", HFILL }
376 { &hf_csm_encaps_ctrl_ack_suppress,
377 { "ACK Suppress Bit", "csm_encaps.ctrl.ack_suppress",
378 FT_BOOLEAN, 8, TFS(&control_ack_suppress_bit), CSM_ENCAPS_CTRL_ACK_SUPPRESS,
379 "ACK Required/ACK Suppressed", HFILL }
381 { &hf_csm_encaps_ctrl_endian,
382 { "Endian Bit", "csm_encaps.ctrl.endian",
383 FT_BOOLEAN, 8, TFS(&control_endian_bit), CSM_ENCAPS_CTRL_ENDIAN,
384 "Little Endian/Big Endian", HFILL }
388 { &hf_csm_encaps_channel,
389 { "Channel Number", "csm_encaps.channel",
390 FT_UINT16, BASE_HEX, NULL, 0,
391 "CSM_ENCAPS Channel Number", HFILL }
393 { &hf_csm_encaps_index,
394 { "Index", "csm_encaps.index",
395 FT_UINT8, BASE_DEC, NULL, 0,
396 "CSM_ENCAPS Index", HFILL }
398 { &hf_csm_encaps_length,
399 { "Length", "csm_encaps.length",
400 FT_UINT8, BASE_DEC, NULL, 0,
401 "CSM_ENCAPS Length", HFILL }
403 { &hf_csm_encaps_class,
404 { "Class", "csm_encaps.class",
405 FT_UINT8, BASE_DEC, NULL, 0,
406 "CSM_ENCAPS Class", HFILL }
408 { &hf_csm_encaps_type,
409 { "Type", "csm_encaps.type",
410 FT_UINT8, BASE_DEC, NULL, 0,
411 "CSM_ENCAPS Type", HFILL }
413 { &hf_csm_encaps_function_code,
414 { "Function Code", "csm_encaps.function_code",
415 FT_UINT16, BASE_HEX, VALS(function_code_vals), 0,
416 "CSM_ENCAPS Function Code", HFILL }
418 { &hf_csm_encaps_reserved,
419 { "Reserved", "csm_encaps.reserved",
420 FT_UINT16, BASE_HEX, NULL, 0,
421 "CSM_ENCAPS Reserved", HFILL }
423 { &hf_csm_encaps_param_error,
424 { "Parameter 1", "csm_encaps.param1",
425 FT_UINT16, BASE_HEX, VALS(error_vals), 0,
426 "CSM_ENCAPS Parameter 1", HFILL }
428 { &hf_csm_encaps_param1,
429 { "Parameter 1", "csm_encaps.param1",
430 FT_UINT16, BASE_HEX, NULL, 0,
431 "CSM_ENCAPS Parameter 1", HFILL }
433 { &hf_csm_encaps_param2,
434 { "Parameter 2", "csm_encaps.param2",
435 FT_UINT16, BASE_HEX, NULL, 0,
436 "CSM_ENCAPS Parameter 2", HFILL }
438 { &hf_csm_encaps_param3,
439 { "Parameter 3", "csm_encaps.param3",
440 FT_UINT16, BASE_HEX, NULL, 0,
441 "CSM_ENCAPS Parameter 3", HFILL }
443 { &hf_csm_encaps_param4,
444 { "Parameter 4", "csm_encaps.param4",
445 FT_UINT16, BASE_HEX, NULL, 0,
446 "CSM_ENCAPS Parameter 4", HFILL }
448 { &hf_csm_encaps_param5,
449 { "Parameter 5", "csm_encaps.param5",
450 FT_UINT16, BASE_HEX, NULL, 0,
451 "CSM_ENCAPS Parameter 5", HFILL }
453 { &hf_csm_encaps_param6,
454 { "Parameter 6", "csm_encaps.param6",
455 FT_UINT16, BASE_HEX, NULL, 0,
456 "CSM_ENCAPS Parameter 6", HFILL }
458 { &hf_csm_encaps_param7,
459 { "Parameter 7", "csm_encaps.param7",
460 FT_UINT16, BASE_HEX, NULL, 0,
461 "CSM_ENCAPS Parameter 7", HFILL }
463 { &hf_csm_encaps_param8,
464 { "Parameter 8", "csm_encaps.param8",
465 FT_UINT16, BASE_HEX, NULL, 0,
466 "CSM_ENCAPS Parameter 8", HFILL }
468 { &hf_csm_encaps_param9,
469 { "Parameter 9", "csm_encaps.param9",
470 FT_UINT16, BASE_HEX, NULL, 0,
471 "CSM_ENCAPS Parameter 9", HFILL }
473 { &hf_csm_encaps_param10,
474 { "Parameter 10", "csm_encaps.param10",
475 FT_UINT16, BASE_HEX, NULL, 0,
476 "CSM_ENCAPS Parameter 10", HFILL }
478 { &hf_csm_encaps_param11,
479 { "Parameter 11", "csm_encaps.param11",
480 FT_UINT16, BASE_HEX, NULL, 0,
481 "CSM_ENCAPS Parameter 11", HFILL }
483 { &hf_csm_encaps_param12,
484 { "Parameter 12", "csm_encaps.param12",
485 FT_UINT16, BASE_HEX, NULL, 0,
486 "CSM_ENCAPS Parameter 12", HFILL }
488 { &hf_csm_encaps_param13,
489 { "Parameter 13", "csm_encaps.param13",
490 FT_UINT16, BASE_HEX, NULL, 0,
491 "CSM_ENCAPS Parameter 13", HFILL }
493 { &hf_csm_encaps_param14,
494 { "Parameter 14", "csm_encaps.param14",
495 FT_UINT16, BASE_HEX, NULL, 0,
496 "CSM_ENCAPS Parameter 14", HFILL }
498 { &hf_csm_encaps_param15,
499 { "Parameter 15", "csm_encaps.param15",
500 FT_UINT16, BASE_HEX, NULL, 0,
501 "CSM_ENCAPS Parameter 15", HFILL }
503 { &hf_csm_encaps_param16,
504 { "Parameter 16", "csm_encaps.param16",
505 FT_UINT16, BASE_HEX, NULL, 0,
506 "CSM_ENCAPS Parameter 16", HFILL }
508 { &hf_csm_encaps_param17,
509 { "Parameter 17", "csm_encaps.param17",
510 FT_UINT16, BASE_HEX, NULL, 0,
511 "CSM_ENCAPS Parameter 17", HFILL }
513 { &hf_csm_encaps_param18,
514 { "Parameter 18", "csm_encaps.param18",
515 FT_UINT16, BASE_HEX, NULL, 0,
516 "CSM_ENCAPS Parameter 18", HFILL }
518 { &hf_csm_encaps_param19,
519 { "Parameter 19", "csm_encaps.param19",
520 FT_UINT16, BASE_HEX, NULL, 0,
521 "CSM_ENCAPS Parameter 19", HFILL }
523 { &hf_csm_encaps_param20,
524 { "Parameter 20", "csm_encaps.param20",
525 FT_UINT16, BASE_HEX, NULL, 0,
526 "CSM_ENCAPS Parameter 20", HFILL }
528 { &hf_csm_encaps_param21,
529 { "Parameter 21", "csm_encaps.param21",
530 FT_UINT16, BASE_HEX, NULL, 0,
531 "CSM_ENCAPS Parameter 21", HFILL }
533 { &hf_csm_encaps_param22,
534 { "Parameter 22", "csm_encaps.param22",
535 FT_UINT16, BASE_HEX, NULL, 0,
536 "CSM_ENCAPS Parameter 22", HFILL }
538 { &hf_csm_encaps_param23,
539 { "Parameter 23", "csm_encaps.param23",
540 FT_UINT16, BASE_HEX, NULL, 0,
541 "CSM_ENCAPS Parameter 23", HFILL }
543 { &hf_csm_encaps_param24,
544 { "Parameter 24", "csm_encaps.param24",
545 FT_UINT16, BASE_HEX, NULL, 0,
546 "CSM_ENCAPS Parameter 24", HFILL }
548 { &hf_csm_encaps_param25,
549 { "Parameter 25", "csm_encaps.param25",
550 FT_UINT16, BASE_HEX, NULL, 0,
551 "CSM_ENCAPS Parameter 25", HFILL }
553 { &hf_csm_encaps_param26,
554 { "Parameter 26", "csm_encaps.param26",
555 FT_UINT16, BASE_HEX, NULL, 0,
556 "CSM_ENCAPS Parameter 26", HFILL }
558 { &hf_csm_encaps_param27,
559 { "Parameter 27", "csm_encaps.param27",
560 FT_UINT16, BASE_HEX, NULL, 0,
561 "CSM_ENCAPS Parameter 27", HFILL }
563 { &hf_csm_encaps_param28,
564 { "Parameter 28", "csm_encaps.param28",
565 FT_UINT16, BASE_HEX, NULL, 0,
566 "CSM_ENCAPS Parameter 28", HFILL }
568 { &hf_csm_encaps_param29,
569 { "Parameter 29", "csm_encaps.param29",
570 FT_UINT16, BASE_HEX, NULL, 0,
571 "CSM_ENCAPS Parameter 29", HFILL }
573 { &hf_csm_encaps_param30,
574 { "Parameter 30", "csm_encaps.param30",
575 FT_UINT16, BASE_HEX, NULL, 0,
576 "CSM_ENCAPS Parameter 30", HFILL }
578 { &hf_csm_encaps_param31,
579 { "Parameter 31", "csm_encaps.param31",
580 FT_UINT16, BASE_HEX, NULL, 0,
581 "CSM_ENCAPS Parameter 31", HFILL }
583 { &hf_csm_encaps_param32,
584 { "Parameter 32", "csm_encaps.param32",
585 FT_UINT16, BASE_HEX, NULL, 0,
586 "CSM_ENCAPS Parameter 32", HFILL }
588 { &hf_csm_encaps_param33,
589 { "Parameter 33", "csm_encaps.param33",
590 FT_UINT16, BASE_HEX, NULL, 0,
591 "CSM_ENCAPS Parameter 33", HFILL }
593 { &hf_csm_encaps_param34,
594 { "Parameter 34", "csm_encaps.param34",
595 FT_UINT16, BASE_HEX, NULL, 0,
596 "CSM_ENCAPS Parameter 34", HFILL }
598 { &hf_csm_encaps_param35,
599 { "Parameter 35", "csm_encaps.param35",
600 FT_UINT16, BASE_HEX, NULL, 0,
601 "CSM_ENCAPS Parameter 35", HFILL }
603 { &hf_csm_encaps_param36,
604 { "Parameter 36", "csm_encaps.param36",
605 FT_UINT16, BASE_HEX, NULL, 0,
606 "CSM_ENCAPS Parameter 36", HFILL }
608 { &hf_csm_encaps_param37,
609 { "Parameter 37", "csm_encaps.param37",
610 FT_UINT16, BASE_HEX, NULL, 0,
611 "CSM_ENCAPS Parameter 37", HFILL }
613 { &hf_csm_encaps_param38,
614 { "Parameter 38", "csm_encaps.param38",
615 FT_UINT16, BASE_HEX, NULL, 0,
616 "CSM_ENCAPS Parameter 38", HFILL }
618 { &hf_csm_encaps_param39,
619 { "Parameter 39", "csm_encaps.param39",
620 FT_UINT16, BASE_HEX, NULL, 0,
621 "CSM_ENCAPS Parameter 39", HFILL }
623 { &hf_csm_encaps_param40,
624 { "Parameter 40", "csm_encaps.param40",
625 FT_UINT16, BASE_HEX, NULL, 0,
626 "CSM_ENCAPS Parameter 40", HFILL }
628 { &hf_csm_encaps_param,
629 { "Parameter", "csm_encaps.param",
630 FT_UINT16, BASE_HEX, NULL, 0,
631 "CSM_ENCAPS Parameter", HFILL }
635 static gint *ett[] = {
637 &ett_csm_encaps_control
640 proto_csm_encaps = proto_register_protocol("CSM_ENCAPS", "CSM_ENCAPS", "csm_encaps");
641 proto_register_field_array(proto_csm_encaps, hf, array_length(hf));
642 proto_register_subtree_array(ett, array_length(ett));
648 proto_reg_handoff_csm_encaps(void)
650 dissector_handle_t csm_encaps_handle;
652 csm_encaps_handle = create_dissector_handle(dissect_csm_encaps, proto_csm_encaps);
653 dissector_add_uint("ethertype", ETHERTYPE_CSM_ENCAPS, csm_encaps_handle);