Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-csm-encaps.c
blob45450e35e62f01898ab7d6380fd1d2ebc23371c8
1 /* packet-csm-encaps.c
2 * Routines for CSM_ENCAPS dissection
3 * Copyright 2005, Angelo Bannack <angelo.bannack@siemens.com>
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 2003 Gerald Combs
8 * Copied from packet-ans.c
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/etypes.h>
17 #include <epan/tfs.h>
19 #define OPCODE_NOOP 0x0000
20 #define OPCODE_CONTROL_PACKET 0x0001
21 #define OPCODE_RELIABLE_DATA 0x0002
23 #define CSM_ENCAPS_CTRL_ACK 0x80
24 #define CSM_ENCAPS_CTRL_ACK_SUPPRESS 0x40
25 #define CSM_ENCAPS_CTRL_ACK_TO_HOST 0x20
26 #define CSM_ENCAPS_CTRL_ENDIAN 0x01
28 #define CSM_ENCAPS_TYPE_CHANGE 0x00
29 #define CSM_ENCAPS_TYPE_QUERY 0x01
30 #define CSM_ENCAPS_TYPE_RESPONSE 0x02
31 #define CSM_ENCAPS_TYPE_INDICATION 0x03
32 #define CSM_ENCAPS_TYPE_QUERY_RESPONSE 0x04
33 #define CSM_ENCAPS_TYPE_INDICATION_RESPONSE 0x05
35 void proto_register_csm_encaps(void);
36 void proto_reg_handoff_csm_encaps(void);
38 static dissector_handle_t csm_encaps_handle;
40 static const value_string opcode_vals[] = {
41 { OPCODE_NOOP, "No Operation" },
42 { OPCODE_CONTROL_PACKET, "Control Packet" },
43 { OPCODE_RELIABLE_DATA, "Reliable Data Transfer" },
44 { 0, NULL }
47 static const value_string function_code_vals[] = {
48 {0x0000, " "},
49 { 0, NULL }
52 static const value_string class_type_vals[] = {
53 { 0, NULL }
56 static const value_string exclusive_to_host_vals[] = {
57 { 0, NULL }
60 static const value_string exclusive_to_host_ct_vals[] = {
61 { 0, NULL }
64 static const value_string error_vals[] = {
65 { 0, NULL }
68 /* Initialize the protocol and registered fields */
69 static int proto_csm_encaps;
71 static int hf_csm_encaps_opcode;
72 static int hf_csm_encaps_seq;
73 static int hf_csm_encaps_ctrl;
74 static int hf_csm_encaps_ctrl_endian;
75 static int hf_csm_encaps_ctrl_ack;
76 static int hf_csm_encaps_ctrl_ack_suppress;
77 static int hf_csm_encaps_channel;
78 static int hf_csm_encaps_index;
79 static int hf_csm_encaps_length;
80 static int hf_csm_encaps_class;
81 static int hf_csm_encaps_type;
82 static int hf_csm_encaps_function_code;
83 static int hf_csm_encaps_reserved;
84 static int hf_csm_encaps_param_error;
85 static int hf_csm_encaps_param1;
86 static int hf_csm_encaps_param2;
87 static int hf_csm_encaps_param3;
88 static int hf_csm_encaps_param4;
89 static int hf_csm_encaps_param5;
90 static int hf_csm_encaps_param6;
91 static int hf_csm_encaps_param7;
92 static int hf_csm_encaps_param8;
93 static int hf_csm_encaps_param9;
94 static int hf_csm_encaps_param10;
95 static int hf_csm_encaps_param11;
96 static int hf_csm_encaps_param12;
97 static int hf_csm_encaps_param13;
98 static int hf_csm_encaps_param14;
99 static int hf_csm_encaps_param15;
100 static int hf_csm_encaps_param16;
101 static int hf_csm_encaps_param17;
102 static int hf_csm_encaps_param18;
103 static int hf_csm_encaps_param19;
104 static int hf_csm_encaps_param20;
105 static int hf_csm_encaps_param21;
106 static int hf_csm_encaps_param22;
107 static int hf_csm_encaps_param23;
108 static int hf_csm_encaps_param24;
109 static int hf_csm_encaps_param25;
110 static int hf_csm_encaps_param26;
111 static int hf_csm_encaps_param27;
112 static int hf_csm_encaps_param28;
113 static int hf_csm_encaps_param29;
114 static int hf_csm_encaps_param30;
115 static int hf_csm_encaps_param31;
116 static int hf_csm_encaps_param32;
117 static int hf_csm_encaps_param33;
118 static int hf_csm_encaps_param34;
119 static int hf_csm_encaps_param35;
120 static int hf_csm_encaps_param36;
121 static int hf_csm_encaps_param37;
122 static int hf_csm_encaps_param38;
123 static int hf_csm_encaps_param39;
124 static int hf_csm_encaps_param40;
125 static int hf_csm_encaps_param;
128 /* Initialize the subtree pointers */
129 static int ett_csm_encaps;
130 static int ett_csm_encaps_control;
133 /* returns the command name */
134 static const char *
135 csm_fc(uint16_t fc, uint16_t ct)
137 if (fc == 0x0000) {
138 return val_to_str(ct, class_type_vals, "0x%04x");
139 } else {
140 return val_to_str(fc, function_code_vals, "0x%04x");
146 /* check to see if the message is an exclusive message send to host */
147 static bool
148 csm_to_host(uint16_t fc, uint16_t ct)
150 if (fc == 0x0000) {
151 return (try_val_to_str(ct, exclusive_to_host_ct_vals) != NULL);
152 } else {
153 return (try_val_to_str(fc, exclusive_to_host_vals) != NULL);
159 /* Code to actually dissect the packets */
160 static int
161 dissect_csm_encaps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
163 proto_item *ti;
164 proto_tree *csm_encaps_tree = NULL;
165 uint16_t function_code, channel, class_type;
166 unsigned control, type, sequence, length;
167 unsigned i;
168 bool show_error_param= false;
169 const char *str_function_name;
172 function_code = tvb_get_letohs(tvb, 10);
173 control = tvb_get_uint8(tvb, 3);
175 class_type = tvb_get_uint8(tvb, 9);
176 class_type = class_type<<8;
177 class_type|= tvb_get_uint8(tvb, 8);
179 type = tvb_get_uint8(tvb, 8);
180 sequence = tvb_get_uint8(tvb, 2);
181 length = tvb_get_uint8(tvb, 6);
182 channel = tvb_get_ntohs(tvb, 4);
185 if (CSM_ENCAPS_CTRL_ACK&control)
186 show_error_param= false;
187 else {
188 if (csm_to_host(function_code, class_type)) /* exclusive messages to host */
189 show_error_param= false;
190 else {
191 if (type == CSM_ENCAPS_TYPE_RESPONSE)
192 show_error_param= true;
193 else
194 show_error_param= false;
198 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CSM_ENCAPS");
200 col_clear(pinfo->cinfo, COL_INFO);
202 if (CSM_ENCAPS_CTRL_ACK&control) {
203 if (CSM_ENCAPS_CTRL_ACK_TO_HOST&control)
204 col_append_fstr(pinfo->cinfo, COL_INFO,
205 "<-- ACK Ch: 0x%04X, Seq: %2d (To Host)",
206 channel, sequence);
207 else
208 col_append_fstr(pinfo->cinfo, COL_INFO,
209 "--> ACK Ch: 0x%04X, Seq: %2d (From Host)",
210 channel, sequence);
211 } else {
212 str_function_name= csm_fc(function_code, class_type);
213 if ((type == CSM_ENCAPS_TYPE_RESPONSE) || (csm_to_host(function_code, class_type)))
214 col_append_fstr(pinfo->cinfo, COL_INFO,
215 "<-- %-35s Ch: 0x%04X, Seq: %2d (To Host)",
216 str_function_name, channel, sequence);
217 else
218 col_append_fstr(pinfo->cinfo, COL_INFO,
219 "--> %-35s Ch: 0x%04X, Seq: %2d (From Host)",
220 str_function_name, channel, sequence);
224 if (tree) {
225 static int * const control_flags[] = {
226 &hf_csm_encaps_ctrl_ack,
227 &hf_csm_encaps_ctrl_ack_suppress,
228 &hf_csm_encaps_ctrl_endian,
229 NULL
232 ti = proto_tree_add_item(tree, proto_csm_encaps, tvb, 0, -1, ENC_NA);
233 csm_encaps_tree = proto_item_add_subtree(ti, ett_csm_encaps);
235 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_opcode, tvb, 0, 2, ENC_BIG_ENDIAN);
236 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_seq, tvb, 2, 1, ENC_BIG_ENDIAN);
238 proto_tree_add_bitmask(tree, tvb, 3, hf_csm_encaps_ctrl, ett_csm_encaps_control, control_flags, ENC_NA);
240 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_channel, tvb, 4, 2, ENC_BIG_ENDIAN);
241 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_length, tvb, 6, 1, ENC_BIG_ENDIAN);
242 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_index, tvb, 7, 1, ENC_BIG_ENDIAN);
243 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_class, tvb, 9, 1, ENC_BIG_ENDIAN);
244 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_type, tvb, 8, 1, ENC_BIG_ENDIAN);
245 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_function_code, tvb, 10, 2, ENC_LITTLE_ENDIAN);
247 i = 6;
249 if (i < length) {
250 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_reserved, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
251 i += 2;
253 if (i < length) {
254 if (show_error_param)
255 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param_error, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
256 else
257 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param1, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
258 i += 2;
260 if (i < length) {
261 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param2, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
262 i += 2;
264 if (i < length) {
265 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param3, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
266 i += 2;
268 if (i < length) {
269 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param4, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
270 i += 2;
272 if (i < length) {
273 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param5, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
274 i += 2;
276 if (i < length) {
277 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param6, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
278 i += 2;
280 if (i < length) {
281 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param7, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
282 i += 2;
284 if (i < length) {
285 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param8, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
286 i += 2;
288 if (i < length) {
289 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param9, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
290 i += 2;
292 if (i < length) {
293 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param10, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
294 i += 2;
296 if (i < length) {
297 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param11, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
298 i += 2;
300 if (i < length) {
301 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param12, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
302 i += 2;
304 if (i < length) {
305 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param13, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
306 i += 2;
308 if (i < length) {
309 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param14, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
310 i += 2;
312 if (i < length) {
313 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param15, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
314 i += 2;
316 if (i < length) {
317 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param16, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
318 i += 2;
320 if (i < length) {
321 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param17, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
322 i += 2;
324 if (i < length) {
325 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param18, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
326 i += 2;
328 if (i < length) {
329 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param19, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
330 i += 2;
332 if (i < length) {
333 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param20, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
334 i += 2;
336 if (i < length) {
337 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param21, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
338 i += 2;
340 if (i < length) {
341 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param22, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
342 i += 2;
344 if (i < length) {
345 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param23, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
346 i += 2;
348 if (i < length) {
349 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param24, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
350 i += 2;
352 if (i < length) {
353 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param25, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
354 i += 2;
356 if (i < length) {
357 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param26, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
358 i += 2;
360 if (i < length) {
361 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param27, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
362 i += 2;
364 if (i < length) {
365 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param28, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
366 i += 2;
368 if (i < length) {
369 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param29, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
370 i += 2;
372 if (i < length) {
373 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param30, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
374 i += 2;
376 if (i < length) {
377 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param31, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
378 i += 2;
380 if (i < length) {
381 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param32, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
382 i += 2;
384 if (i < length) {
385 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param33, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
386 i += 2;
388 if (i < length) {
389 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param34, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
390 i += 2;
392 if (i < length) {
393 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param35, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
394 i += 2;
396 if (i < length) {
397 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param36, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
398 i += 2;
400 if (i < length) {
401 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param37, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
402 i += 2;
404 if (i < length) {
405 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param38, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
406 i += 2;
408 if (i < length) {
409 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param39, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
410 i += 2;
412 if (i < length) {
413 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param40, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
414 i += 2;
417 for (; i < length; i += 2)
418 proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param, tvb, 12 + i - 6, 2, ENC_LITTLE_ENDIAN);
420 return tvb_captured_length(tvb);
424 void
425 proto_register_csm_encaps(void)
427 static struct true_false_string control_endian_bit = {"Little Endian","Big Endian"};
428 static struct true_false_string control_ack_bit = {"ACK Packet", "Message Packet"};
429 static struct true_false_string control_ack_suppress_bit = {"ACK Suppressed", "ACK Required"};
431 static hf_register_info hf[] = {
432 { &hf_csm_encaps_opcode,
433 { "Opcode", "csm_encaps.opcode",
434 FT_UINT16, BASE_HEX, VALS(opcode_vals), 0,
435 "CSM_ENCAPS Opcode", HFILL }
437 { &hf_csm_encaps_seq,
438 { "Sequence Number", "csm_encaps.seq_num",
439 FT_UINT8, BASE_DEC, NULL, 0,
440 "CSM_ENCAPS Sequence Number", HFILL }
442 { &hf_csm_encaps_ctrl,
443 { "Control", "csm_encaps.ctrl",
444 FT_UINT8, BASE_HEX, NULL, 0,
445 "CSM_ENCAPS Control", HFILL }
447 { &hf_csm_encaps_ctrl_ack,
448 { "Packet Bit", "csm_encaps.ctrl.ack",
449 FT_BOOLEAN, 8, TFS(&control_ack_bit), CSM_ENCAPS_CTRL_ACK,
450 "Message Packet/ACK Packet", HFILL }
452 { &hf_csm_encaps_ctrl_ack_suppress,
453 { "ACK Suppress Bit", "csm_encaps.ctrl.ack_suppress",
454 FT_BOOLEAN, 8, TFS(&control_ack_suppress_bit), CSM_ENCAPS_CTRL_ACK_SUPPRESS,
455 "ACK Required/ACK Suppressed", HFILL }
457 { &hf_csm_encaps_ctrl_endian,
458 { "Endian Bit", "csm_encaps.ctrl.endian",
459 FT_BOOLEAN, 8, TFS(&control_endian_bit), CSM_ENCAPS_CTRL_ENDIAN,
460 "Little Endian/Big Endian", HFILL }
462 { &hf_csm_encaps_channel,
463 { "Channel Number", "csm_encaps.channel",
464 FT_UINT16, BASE_HEX, NULL, 0,
465 "CSM_ENCAPS Channel Number", HFILL }
467 { &hf_csm_encaps_index,
468 { "Index", "csm_encaps.index",
469 FT_UINT8, BASE_DEC, NULL, 0,
470 "CSM_ENCAPS Index", HFILL }
472 { &hf_csm_encaps_length,
473 { "Length", "csm_encaps.length",
474 FT_UINT8, BASE_DEC, NULL, 0,
475 "CSM_ENCAPS Length", HFILL }
477 { &hf_csm_encaps_class,
478 { "Class", "csm_encaps.class",
479 FT_UINT8, BASE_DEC, NULL, 0,
480 "CSM_ENCAPS Class", HFILL }
482 { &hf_csm_encaps_type,
483 { "Type", "csm_encaps.type",
484 FT_UINT8, BASE_DEC, NULL, 0,
485 "CSM_ENCAPS Type", HFILL }
487 { &hf_csm_encaps_function_code,
488 { "Function Code", "csm_encaps.function_code",
489 FT_UINT16, BASE_HEX, VALS(function_code_vals), 0,
490 "CSM_ENCAPS Function Code", HFILL }
492 { &hf_csm_encaps_reserved,
493 { "Reserved", "csm_encaps.reserved",
494 FT_UINT16, BASE_HEX, NULL, 0,
495 "CSM_ENCAPS Reserved", HFILL }
497 { &hf_csm_encaps_param_error,
498 { "Parameter 1", "csm_encaps.param1",
499 FT_UINT16, BASE_HEX, VALS(error_vals), 0,
500 "CSM_ENCAPS Parameter 1", HFILL }
502 { &hf_csm_encaps_param1,
503 { "Parameter 1", "csm_encaps.param1",
504 FT_UINT16, BASE_HEX, NULL, 0,
505 "CSM_ENCAPS Parameter 1", HFILL }
507 { &hf_csm_encaps_param2,
508 { "Parameter 2", "csm_encaps.param2",
509 FT_UINT16, BASE_HEX, NULL, 0,
510 "CSM_ENCAPS Parameter 2", HFILL }
512 { &hf_csm_encaps_param3,
513 { "Parameter 3", "csm_encaps.param3",
514 FT_UINT16, BASE_HEX, NULL, 0,
515 "CSM_ENCAPS Parameter 3", HFILL }
517 { &hf_csm_encaps_param4,
518 { "Parameter 4", "csm_encaps.param4",
519 FT_UINT16, BASE_HEX, NULL, 0,
520 "CSM_ENCAPS Parameter 4", HFILL }
522 { &hf_csm_encaps_param5,
523 { "Parameter 5", "csm_encaps.param5",
524 FT_UINT16, BASE_HEX, NULL, 0,
525 "CSM_ENCAPS Parameter 5", HFILL }
527 { &hf_csm_encaps_param6,
528 { "Parameter 6", "csm_encaps.param6",
529 FT_UINT16, BASE_HEX, NULL, 0,
530 "CSM_ENCAPS Parameter 6", HFILL }
532 { &hf_csm_encaps_param7,
533 { "Parameter 7", "csm_encaps.param7",
534 FT_UINT16, BASE_HEX, NULL, 0,
535 "CSM_ENCAPS Parameter 7", HFILL }
537 { &hf_csm_encaps_param8,
538 { "Parameter 8", "csm_encaps.param8",
539 FT_UINT16, BASE_HEX, NULL, 0,
540 "CSM_ENCAPS Parameter 8", HFILL }
542 { &hf_csm_encaps_param9,
543 { "Parameter 9", "csm_encaps.param9",
544 FT_UINT16, BASE_HEX, NULL, 0,
545 "CSM_ENCAPS Parameter 9", HFILL }
547 { &hf_csm_encaps_param10,
548 { "Parameter 10", "csm_encaps.param10",
549 FT_UINT16, BASE_HEX, NULL, 0,
550 "CSM_ENCAPS Parameter 10", HFILL }
552 { &hf_csm_encaps_param11,
553 { "Parameter 11", "csm_encaps.param11",
554 FT_UINT16, BASE_HEX, NULL, 0,
555 "CSM_ENCAPS Parameter 11", HFILL }
557 { &hf_csm_encaps_param12,
558 { "Parameter 12", "csm_encaps.param12",
559 FT_UINT16, BASE_HEX, NULL, 0,
560 "CSM_ENCAPS Parameter 12", HFILL }
562 { &hf_csm_encaps_param13,
563 { "Parameter 13", "csm_encaps.param13",
564 FT_UINT16, BASE_HEX, NULL, 0,
565 "CSM_ENCAPS Parameter 13", HFILL }
567 { &hf_csm_encaps_param14,
568 { "Parameter 14", "csm_encaps.param14",
569 FT_UINT16, BASE_HEX, NULL, 0,
570 "CSM_ENCAPS Parameter 14", HFILL }
572 { &hf_csm_encaps_param15,
573 { "Parameter 15", "csm_encaps.param15",
574 FT_UINT16, BASE_HEX, NULL, 0,
575 "CSM_ENCAPS Parameter 15", HFILL }
577 { &hf_csm_encaps_param16,
578 { "Parameter 16", "csm_encaps.param16",
579 FT_UINT16, BASE_HEX, NULL, 0,
580 "CSM_ENCAPS Parameter 16", HFILL }
582 { &hf_csm_encaps_param17,
583 { "Parameter 17", "csm_encaps.param17",
584 FT_UINT16, BASE_HEX, NULL, 0,
585 "CSM_ENCAPS Parameter 17", HFILL }
587 { &hf_csm_encaps_param18,
588 { "Parameter 18", "csm_encaps.param18",
589 FT_UINT16, BASE_HEX, NULL, 0,
590 "CSM_ENCAPS Parameter 18", HFILL }
592 { &hf_csm_encaps_param19,
593 { "Parameter 19", "csm_encaps.param19",
594 FT_UINT16, BASE_HEX, NULL, 0,
595 "CSM_ENCAPS Parameter 19", HFILL }
597 { &hf_csm_encaps_param20,
598 { "Parameter 20", "csm_encaps.param20",
599 FT_UINT16, BASE_HEX, NULL, 0,
600 "CSM_ENCAPS Parameter 20", HFILL }
602 { &hf_csm_encaps_param21,
603 { "Parameter 21", "csm_encaps.param21",
604 FT_UINT16, BASE_HEX, NULL, 0,
605 "CSM_ENCAPS Parameter 21", HFILL }
607 { &hf_csm_encaps_param22,
608 { "Parameter 22", "csm_encaps.param22",
609 FT_UINT16, BASE_HEX, NULL, 0,
610 "CSM_ENCAPS Parameter 22", HFILL }
612 { &hf_csm_encaps_param23,
613 { "Parameter 23", "csm_encaps.param23",
614 FT_UINT16, BASE_HEX, NULL, 0,
615 "CSM_ENCAPS Parameter 23", HFILL }
617 { &hf_csm_encaps_param24,
618 { "Parameter 24", "csm_encaps.param24",
619 FT_UINT16, BASE_HEX, NULL, 0,
620 "CSM_ENCAPS Parameter 24", HFILL }
622 { &hf_csm_encaps_param25,
623 { "Parameter 25", "csm_encaps.param25",
624 FT_UINT16, BASE_HEX, NULL, 0,
625 "CSM_ENCAPS Parameter 25", HFILL }
627 { &hf_csm_encaps_param26,
628 { "Parameter 26", "csm_encaps.param26",
629 FT_UINT16, BASE_HEX, NULL, 0,
630 "CSM_ENCAPS Parameter 26", HFILL }
632 { &hf_csm_encaps_param27,
633 { "Parameter 27", "csm_encaps.param27",
634 FT_UINT16, BASE_HEX, NULL, 0,
635 "CSM_ENCAPS Parameter 27", HFILL }
637 { &hf_csm_encaps_param28,
638 { "Parameter 28", "csm_encaps.param28",
639 FT_UINT16, BASE_HEX, NULL, 0,
640 "CSM_ENCAPS Parameter 28", HFILL }
642 { &hf_csm_encaps_param29,
643 { "Parameter 29", "csm_encaps.param29",
644 FT_UINT16, BASE_HEX, NULL, 0,
645 "CSM_ENCAPS Parameter 29", HFILL }
647 { &hf_csm_encaps_param30,
648 { "Parameter 30", "csm_encaps.param30",
649 FT_UINT16, BASE_HEX, NULL, 0,
650 "CSM_ENCAPS Parameter 30", HFILL }
652 { &hf_csm_encaps_param31,
653 { "Parameter 31", "csm_encaps.param31",
654 FT_UINT16, BASE_HEX, NULL, 0,
655 "CSM_ENCAPS Parameter 31", HFILL }
657 { &hf_csm_encaps_param32,
658 { "Parameter 32", "csm_encaps.param32",
659 FT_UINT16, BASE_HEX, NULL, 0,
660 "CSM_ENCAPS Parameter 32", HFILL }
662 { &hf_csm_encaps_param33,
663 { "Parameter 33", "csm_encaps.param33",
664 FT_UINT16, BASE_HEX, NULL, 0,
665 "CSM_ENCAPS Parameter 33", HFILL }
667 { &hf_csm_encaps_param34,
668 { "Parameter 34", "csm_encaps.param34",
669 FT_UINT16, BASE_HEX, NULL, 0,
670 "CSM_ENCAPS Parameter 34", HFILL }
672 { &hf_csm_encaps_param35,
673 { "Parameter 35", "csm_encaps.param35",
674 FT_UINT16, BASE_HEX, NULL, 0,
675 "CSM_ENCAPS Parameter 35", HFILL }
677 { &hf_csm_encaps_param36,
678 { "Parameter 36", "csm_encaps.param36",
679 FT_UINT16, BASE_HEX, NULL, 0,
680 "CSM_ENCAPS Parameter 36", HFILL }
682 { &hf_csm_encaps_param37,
683 { "Parameter 37", "csm_encaps.param37",
684 FT_UINT16, BASE_HEX, NULL, 0,
685 "CSM_ENCAPS Parameter 37", HFILL }
687 { &hf_csm_encaps_param38,
688 { "Parameter 38", "csm_encaps.param38",
689 FT_UINT16, BASE_HEX, NULL, 0,
690 "CSM_ENCAPS Parameter 38", HFILL }
692 { &hf_csm_encaps_param39,
693 { "Parameter 39", "csm_encaps.param39",
694 FT_UINT16, BASE_HEX, NULL, 0,
695 "CSM_ENCAPS Parameter 39", HFILL }
697 { &hf_csm_encaps_param40,
698 { "Parameter 40", "csm_encaps.param40",
699 FT_UINT16, BASE_HEX, NULL, 0,
700 "CSM_ENCAPS Parameter 40", HFILL }
702 { &hf_csm_encaps_param,
703 { "Parameter", "csm_encaps.param",
704 FT_UINT16, BASE_HEX, NULL, 0,
705 "CSM_ENCAPS Parameter", HFILL }
709 static int *ett[] = {
710 &ett_csm_encaps,
711 &ett_csm_encaps_control
714 proto_csm_encaps = proto_register_protocol("CSM_ENCAPS", "CSM_ENCAPS", "csm_encaps");
715 proto_register_field_array(proto_csm_encaps, hf, array_length(hf));
716 proto_register_subtree_array(ett, array_length(ett));
718 csm_encaps_handle = register_dissector("csm_encaps", dissect_csm_encaps, proto_csm_encaps);
722 void
723 proto_reg_handoff_csm_encaps(void)
725 dissector_add_uint("ethertype", ETHERTYPE_CSM_ENCAPS, csm_encaps_handle);
729 * Editor modelines - https://www.wireshark.org/tools/modelines.html
731 * Local variables:
732 * c-basic-offset: 4
733 * tab-width: 8
734 * indent-tabs-mode: nil
735 * End:
737 * vi: set shiftwidth=4 tabstop=8 expandtab:
738 * :indentSize=4:tabSize=8:noTabs=true: