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
15 #include <epan/packet.h>
16 #include <epan/etypes.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" },
47 static const value_string function_code_vals
[] = {
52 static const value_string class_type_vals
[] = {
56 static const value_string exclusive_to_host_vals
[] = {
60 static const value_string exclusive_to_host_ct_vals
[] = {
64 static const value_string error_vals
[] = {
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 */
135 csm_fc(uint16_t fc
, uint16_t ct
)
138 return val_to_str(ct
, class_type_vals
, "0x%04x");
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 */
148 csm_to_host(uint16_t fc
, uint16_t ct
)
151 return (try_val_to_str(ct
, exclusive_to_host_ct_vals
) != NULL
);
153 return (try_val_to_str(fc
, exclusive_to_host_vals
) != NULL
);
159 /* Code to actually dissect the packets */
161 dissect_csm_encaps(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
164 proto_tree
*csm_encaps_tree
= NULL
;
165 uint16_t function_code
, channel
, class_type
;
166 unsigned control
, type
, sequence
, length
;
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;
188 if (csm_to_host(function_code
, class_type
)) /* exclusive messages to host */
189 show_error_param
= false;
191 if (type
== CSM_ENCAPS_TYPE_RESPONSE
)
192 show_error_param
= true;
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)",
208 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
209 "--> ACK Ch: 0x%04X, Seq: %2d (From Host)",
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
);
218 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
219 "--> %-35s Ch: 0x%04X, Seq: %2d (From Host)",
220 str_function_name
, channel
, sequence
);
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
,
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
);
250 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_reserved
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
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
);
257 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param1
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
261 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param2
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
265 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param3
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
269 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param4
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
273 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param5
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
277 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param6
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
281 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param7
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
285 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param8
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
289 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param9
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
293 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param10
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
297 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param11
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
301 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param12
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
305 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param13
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
309 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param14
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
313 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param15
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
317 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param16
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
321 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param17
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
325 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param18
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
329 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param19
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
333 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param20
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
337 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param21
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
341 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param22
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
345 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param23
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
349 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param24
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
353 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param25
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
357 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param26
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
361 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param27
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
365 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param28
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
369 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param29
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
373 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param30
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
377 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param31
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
381 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param32
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
385 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param33
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
389 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param34
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
393 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param35
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
397 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param36
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
401 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param37
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
405 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param38
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
409 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param39
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
413 proto_tree_add_item(csm_encaps_tree
, hf_csm_encaps_param40
, tvb
, 12 + i
- 6, 2, ENC_LITTLE_ENDIAN
);
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
);
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
[] = {
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
);
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
734 * indent-tabs-mode: nil
737 * vi: set shiftwidth=4 tabstop=8 expandtab:
738 * :indentSize=4:tabSize=8:noTabs=true: