Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-corosync-totemsrp.c
blobe60f3cc4c5748c6bed28aaacfdb07bc0607e6f1e
1 /* packet-corosync-totemsrp.c
2 * Dissectors for totem single ring protocol implemented in corosync cluster engine
3 * Copyright 2007 2009 2010 2014 Masatake YAMATO <yamato@redhat.com>
4 * Copyright (c) 2010 2014 Red Hat, Inc.
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 /* Fields description are taken from
15 Y.AMIR, L.E.MOSER, P.M.MELLIAR-SMITH, D.A.AGARWAL, P.CIARFELLA.
16 "The Totem Single-Ring Ordering and Membership Protocol"*/
19 * NOTE: the source code at www.corosync.org looks as if it will not
20 * work with multiple OSes in a cluster if it uses IPv6, as it appears
21 * to use the OS's AF_ values in packets, and the value of AF_INET6
22 * is ***NOT*** the same in all OSes.
24 * (It'll work with IPv4, because AF_INET came out of 4.2BSD and
25 * most if not all OSes just picked up BSD's value of 2.)
27 * So we just check for all the AF_INET6 values we know about.
29 * We get the AF_ values from epan/aftypes.h, *not* from the OS
30 * we happen to be built for.
33 # include "config.h"
35 #include <epan/packet.h>
36 #include <epan/aftypes.h>
39 * Utilities for subdissectors of corosync_totemsrp.
41 struct corosync_totemsrp_info {
42 unsigned encoding;
43 unsigned nodeid;
46 /* Forward declaration we need below */
47 void proto_register_corosync_totemsrp(void);
48 void proto_reg_handoff_corosync_totemsrp(void);
50 /* Initialize the protocol and registered fields */
51 static int proto_corosync_totemsrp;
53 static heur_dissector_list_t heur_subdissector_list;
55 /* fields for struct message_header */
56 static int hf_corosync_totemsrp_message_header_type;
57 static int hf_corosync_totemsrp_message_header_encapsulated;
58 static int hf_corosync_totemsrp_message_header_endian_detector;
59 static int hf_corosync_totemsrp_message_header_nodeid;
61 /* fields for struct orf_token */
62 static int hf_corosync_totemsrp_orf_token;
63 static int hf_corosync_totemsrp_orf_token_seq;
64 static int hf_corosync_totemsrp_orf_token_token_seq;
65 static int hf_corosync_totemsrp_orf_token_aru;
66 static int hf_corosync_totemsrp_orf_token_aru_addr;
67 static int hf_corosync_totemsrp_orf_token_backlog;
68 static int hf_corosync_totemsrp_orf_token_fcc;
69 static int hf_corosync_totemsrp_orf_token_retrnas_flg;
70 static int hf_corosync_totemsrp_orf_token_rtr_list_entries;
72 /* field for struct memb_ring_id */
73 static int hf_corosync_totemsrp_memb_ring_id;
74 static int hf_corosync_totemsrp_memb_ring_id_seq;
76 /* field for struct totem_ip_address */
77 static int hf_corosync_totemsrp_ip_address;
78 static int hf_corosync_totemsrp_ip_address_nodeid;
79 static int hf_corosync_totemsrp_ip_address_family;
80 static int hf_corosync_totemsrp_ip_address_addr;
81 static int hf_corosync_totemsrp_ip_address_addr4;
82 static int hf_corosync_totemsrp_ip_address_addr4_padding;
83 static int hf_corosync_totemsrp_ip_address_addr6;
85 /* field of struct mcast */
86 static int hf_corosync_totemsrp_mcast;
87 static int hf_corosync_totemsrp_mcast_seq;
88 static int hf_corosync_totemsrp_mcast_this_seqno;
89 static int hf_corosync_totemsrp_mcast_node_id;
90 static int hf_corosync_totemsrp_mcast_system_from;
91 static int hf_corosync_totemsrp_mcast_guarantee;
93 /* field of struct memb_merge_detect */
94 static int hf_corosync_totemsrp_memb_merge_detect;
96 /* field of struct struct srp_addr */
97 static int hf_corosync_totemsrp_srp_addr;
99 /* field of struct rtr_item */
100 static int hf_corosync_totemsrp_rtr_item;
101 static int hf_corosync_totemsrp_rtr_item_seq;
103 /* field of struct memb_join */
104 static int hf_corosync_totemsrp_memb_join;
105 static int hf_corosync_totemsrp_memb_join_proc_list_entries;
106 static int hf_corosync_totemsrp_memb_join_failed_list_entries;
107 static int hf_corosync_totemsrp_memb_join_ring_seq;
109 /* field of struct memb_commit_token */
110 static int hf_corosync_totemsrp_memb_commit_token;
111 static int hf_corosync_totemsrp_memb_commit_token_token_seq;
112 static int hf_corosync_totemsrp_memb_commit_token_retrans_flg;
113 static int hf_corosync_totemsrp_memb_commit_token_memb_index;
114 static int hf_corosync_totemsrp_memb_commit_token_addr_entries;
116 /* field of struct memb_commit_token_memb_entry */
117 static int hf_corosync_totemsrp_memb_commit_token_memb_entry;
118 static int hf_corosync_totemsrp_memb_commit_token_memb_entry_aru;
119 static int hf_corosync_totemsrp_memb_commit_token_memb_entry_high_delivered;
120 static int hf_corosync_totemsrp_memb_commit_token_memb_entry_received_flg;
122 /* field of struct token_hold_cancel */
123 static int hf_corosync_totemsrp_token_hold_cancel;
125 /* Initialize the subtree pointers */
126 static int ett_corosync_totemsrp;
127 static int ett_corosync_totemsrp_orf_token;
128 static int ett_corosync_totemsrp_memb_ring_id;
129 static int ett_corosync_totemsrp_ip_address;
130 static int ett_corosync_totemsrp_mcast;
131 static int ett_corosync_totemsrp_memb_merge_detect;
132 static int ett_corosync_totemsrp_srp_addr;
133 static int ett_corosync_totemsrp_rtr_item;
134 static int ett_corosync_totemsrp_memb_join;
135 static int ett_corosync_totemsrp_memb_commit_token;
136 static int ett_corosync_totemsrp_memb_commit_token_memb_entry;
137 static int ett_corosync_totemsrp_token_hold_cancel;
138 static int ett_corosync_totemsrp_memb_join_proc_list;
139 static int ett_corosync_totemsrp_memb_join_failed_list;
143 * Value strings
145 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_ORF_TOKEN 0
146 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_MCAST 1
147 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_MERGE_DETECT 2
148 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_JOIN 3
149 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_COMMIT_TOKEN 4
150 #define COROSYNC_TOTEMSRP_MESSAGE_TYPE_TOKEN_HOLD_CANCEL 5
152 static const value_string corosync_totemsrp_message_header_type[] = {
153 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_ORF_TOKEN, "orf" },
154 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_MCAST, "mcast" },
155 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_MERGE_DETECT, "merge rings" },
156 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_JOIN, "join message" },
157 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_COMMIT_TOKEN, "commit token" },
158 { COROSYNC_TOTEMSRP_MESSAGE_TYPE_TOKEN_HOLD_CANCEL, "cancel" },
159 { 0, NULL }
162 #define COROSYNC_TOTEMSRP_MESSAGE_ENCAPSULATED 1
163 #define COROSYNC_TOTEMSRP_MESSAGE_NOT_ENCAPSULATED 2
165 static const value_string corosync_totemsrp_message_header_encapsulated[] = {
166 { 0, "not mcast message" },
167 { COROSYNC_TOTEMSRP_MESSAGE_ENCAPSULATED, "encapsulated" },
168 { COROSYNC_TOTEMSRP_MESSAGE_NOT_ENCAPSULATED, "not encapsulated" },
169 { 0, NULL }
173 static const value_string corosync_totemsrp_ip_address_family[] = {
174 { COMMON_AF_INET, "AF_INET" },
175 { BSD_AF_INET6_BSD, "AF_INET6 (most BSD)" },
176 { BSD_AF_INET6_FREEBSD, "AF_INET6 (FreeBSD)" },
177 { BSD_AF_INET6_DARWIN, "AF_INET6 (macOS and iOS)" },
178 { LINUX_AF_INET6, "AF_INET6 (Linux)" },
179 { SOLARIS_AF_INET6, "AF_INET6 (Solaris)" },
180 { WINSOCK_AF_INET6, "AF_INET6 (Windows)" },
181 { 0, NULL }
184 static uint16_t
185 corosync_totemsrp_get_uint16(tvbuff_t* tvb, int offset, const unsigned encoding)
187 if (encoding == ENC_LITTLE_ENDIAN)
188 return tvb_get_letohs(tvb, offset);
190 return tvb_get_ntohs(tvb, offset);
194 static uint32_t
195 corosync_totemsrp_get_uint32(tvbuff_t* tvb, int offset, const unsigned encoding)
197 if (encoding == ENC_LITTLE_ENDIAN)
198 return tvb_get_letohl(tvb, offset);
200 return tvb_get_ntohl(tvb, offset);
203 static uint64_t
204 corosync_totemsrp_get_uint64(tvbuff_t* tvb, int offset, const unsigned encoding)
206 if (encoding == ENC_LITTLE_ENDIAN)
207 return tvb_get_letoh64(tvb, offset);
209 return tvb_get_ntoh64(tvb, offset);
213 #define COROSYNC_TOTEMSRP_SRP_ADDR_INTERFACE_MAX 2
215 static int dissect_corosync_totemsrp0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
216 bool encapsulated);
219 static int
220 dissect_corosync_totemsrp_ip_address(tvbuff_t *tvb,
221 packet_info *pinfo _U_,
222 proto_tree *parent_tree,
223 unsigned length _U_, int offset,
224 const unsigned encoding,
225 bool print_interface,
226 unsigned interface,
227 unsigned *nodeid)
229 uint16_t family;
230 unsigned nid;
231 int original_offset = offset;
232 proto_tree *tree;
233 proto_item *item;
234 int len;
236 nid = corosync_totemsrp_get_uint32(tvb, offset, encoding);
237 if (nodeid)
238 *nodeid = nid;
239 family = corosync_totemsrp_get_uint16(tvb, offset + 4, encoding);
241 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_ip_address, tvb, offset,
242 -1, ENC_NA);
243 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_ip_address);
245 proto_item_append_text(item, " (");
246 if (print_interface)
247 proto_item_append_text(item, "interface: %u; ", interface);
249 proto_tree_add_item(tree, hf_corosync_totemsrp_ip_address_nodeid,
250 tvb, offset, 4, encoding);
251 proto_item_append_text(item, "node: %u)", nid);
252 offset += 4;
254 proto_tree_add_item(tree, hf_corosync_totemsrp_ip_address_family,
255 tvb, offset, 2, encoding);
256 offset += 2;
258 switch (family)
260 case COMMON_AF_INET:
261 len = 4;
262 proto_tree_add_item(tree, hf_corosync_totemsrp_ip_address_addr4, tvb, offset, len, ENC_BIG_ENDIAN);
263 break;
264 case BSD_AF_INET6_BSD:
265 case BSD_AF_INET6_FREEBSD:
266 case BSD_AF_INET6_DARWIN:
267 case LINUX_AF_INET6:
268 case SOLARIS_AF_INET6:
269 case WINSOCK_AF_INET6:
270 len = sizeof(ws_in6_addr);
271 proto_tree_add_item(tree, hf_corosync_totemsrp_ip_address_addr6, tvb, offset, len, ENC_NA);
272 break;
273 default:
274 len = sizeof(ws_in6_addr);
275 proto_tree_add_item(tree, hf_corosync_totemsrp_ip_address_addr, tvb, offset, len, ENC_NA);
276 break;
279 offset += len;
281 if (len != sizeof(ws_in6_addr)) {
282 int padding_len;
284 padding_len = (int)(sizeof(ws_in6_addr) - len);
285 proto_tree_add_item (tree, hf_corosync_totemsrp_ip_address_addr4_padding,
286 tvb, offset, padding_len, ENC_NA);
287 offset += padding_len;
290 proto_item_set_len(item, offset - original_offset);
291 return offset - original_offset;
294 static int
295 dissect_corosync_totemsrp_memb_ring_id(tvbuff_t *tvb,
296 packet_info *pinfo, proto_tree *parent_tree,
297 unsigned length, int offset,
298 const unsigned encoding,
299 unsigned *node_id,
300 uint64_t *ring_id)
302 int original_offset = offset;
303 proto_tree *tree;
304 proto_item *item;
305 uint64_t rid;
306 unsigned nid;
308 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_memb_ring_id, tvb, offset,
309 -1, encoding);
310 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_memb_ring_id);
312 offset += dissect_corosync_totemsrp_ip_address(tvb, pinfo, tree,
313 length, offset,
314 encoding,
315 false, -1,
316 &nid);
318 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_ring_id_seq,
319 tvb, offset, 8, encoding);
320 rid = corosync_totemsrp_get_uint64(tvb, offset, encoding);
321 offset += 8;
323 proto_item_append_text(item, " (ring: %" PRIu64 ")", rid);
325 if (node_id)
326 *node_id = nid;
327 if (ring_id)
328 *ring_id = rid;
330 proto_item_set_len(item, offset - original_offset);
331 return offset - original_offset;
334 static int
335 dissect_corosync_totemsrp_rtr_list(tvbuff_t *tvb,
336 packet_info *pinfo, proto_tree *parent_tree,
337 unsigned length, int offset,
338 const unsigned encoding)
340 int original_offset = offset;
341 proto_tree *tree;
342 proto_item *item;
344 unsigned node_id;
345 uint64_t ring_id;
346 uint32_t seq;
348 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_rtr_item, tvb, offset,
349 -1, ENC_NA);
350 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_rtr_item);
352 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
353 length, offset,
354 encoding,
355 &node_id,
356 &ring_id);
358 proto_tree_add_item(tree, hf_corosync_totemsrp_rtr_item_seq,
359 tvb, offset, 4, encoding);
361 seq = corosync_totemsrp_get_uint32(tvb, offset, encoding);
362 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u seq: %u)",
363 ring_id, node_id, seq);
364 offset += 4;
366 proto_item_set_len(item, offset - original_offset);
367 return (offset - original_offset);
370 static int
371 dissect_corosync_totemsrp_orf_token(tvbuff_t *tvb,
372 packet_info *pinfo, proto_tree *parent_tree,
373 unsigned length, int offset,
374 const unsigned encoding)
376 int original_offset = offset;
377 uint32_t rtr_list_entries = 0, seq, aru, i;
378 proto_tree *tree;
379 proto_item *item;
380 unsigned node_id;
381 uint64_t ring_id;
383 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_orf_token,
384 tvb, offset, -1, ENC_NA);
385 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_orf_token);
387 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_seq,
388 tvb, offset, 4, encoding);
389 offset += 4;
391 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_token_seq,
392 tvb, offset, 4, encoding);
393 seq = corosync_totemsrp_get_uint32(tvb, offset, encoding);
394 offset += 4;
396 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_aru,
397 tvb, offset, 4, encoding);
398 aru = corosync_totemsrp_get_uint32(tvb, offset, encoding);
399 offset += 4;
401 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_aru_addr,
402 tvb, offset, 4, encoding);
403 offset += 4;
405 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
406 length, offset,
407 encoding,
408 &node_id,
409 &ring_id);
411 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_backlog,
412 tvb, offset, 4, encoding);
413 offset += 4;
415 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_fcc,
416 tvb, offset, 4, encoding);
417 offset += 4;
419 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_retrnas_flg,
420 tvb, offset, 4, encoding);
421 offset += 4;
423 proto_tree_add_item(tree, hf_corosync_totemsrp_orf_token_rtr_list_entries,
424 tvb, offset, 4, encoding);
425 rtr_list_entries = corosync_totemsrp_get_uint32(tvb, offset, encoding);
426 offset += 4;
428 for (i = 0; i < rtr_list_entries; i++) {
429 offset += dissect_corosync_totemsrp_rtr_list(tvb, pinfo,
430 tree,
431 length, offset,
432 encoding);
435 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u nrtr: %d seq: %d au: %u)",
436 ring_id, node_id, rtr_list_entries, seq, aru);
438 proto_item_set_len(item, offset - original_offset);
439 return offset - original_offset;
442 static int
443 dissect_corosync_totemsrp_srp_addr(tvbuff_t *tvb,
444 packet_info *pinfo, proto_tree *parent_tree,
445 unsigned length, int offset,
446 int hf,
447 const unsigned encoding)
449 int original_offset = offset;
450 proto_tree *tree;
451 proto_item *item;
452 unsigned nodeid;
454 item = proto_tree_add_item(parent_tree, hf? hf: hf_corosync_totemsrp_srp_addr, tvb, offset,
455 -1, encoding);
456 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_srp_addr);
458 offset += dissect_corosync_totemsrp_ip_address(tvb, pinfo, tree,
459 length, offset,
460 encoding,
461 true, 0,
462 &nodeid);
463 proto_item_append_text(item, " (node: %u)", nodeid);
465 offset += dissect_corosync_totemsrp_ip_address(tvb, pinfo, tree,
466 length, offset,
467 encoding,
468 true, 1,
469 NULL);
471 proto_item_set_len(item, offset - original_offset);
472 return (offset - original_offset);
475 static int
476 // NOLINTNEXTLINE(misc-no-recursion)
477 dissect_corosync_totemsrp_mcast(tvbuff_t *tvb,
478 packet_info *pinfo, proto_tree *tree,
479 unsigned length, int offset,
480 uint8_t message_header__encapsulated,
481 const unsigned encoding, proto_tree *parent_tree,
482 struct corosync_totemsrp_info *totemsrp_info)
484 int original_offset = offset;
485 proto_tree *mcast_tree;
487 proto_item *item;
488 unsigned node_id;
489 uint64_t ring_id;
490 tvbuff_t *next_tvb;
492 heur_dtbl_entry_t *hdtbl_entry = NULL;
494 item = proto_tree_add_item(tree, hf_corosync_totemsrp_mcast, tvb, offset,
495 -1, encoding);
496 mcast_tree = proto_item_add_subtree(item, ett_corosync_totemsrp_mcast);
498 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, mcast_tree,
499 length, offset,
500 hf_corosync_totemsrp_mcast_system_from,
501 encoding);
503 proto_tree_add_item(mcast_tree, hf_corosync_totemsrp_mcast_seq,
504 tvb, offset, 4, encoding);
505 offset += 4;
507 proto_tree_add_item(mcast_tree, hf_corosync_totemsrp_mcast_this_seqno,
508 tvb, offset, 4, encoding);
509 offset += 4;
511 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, mcast_tree,
512 length, offset,
513 encoding,
514 &node_id,
515 &ring_id);
517 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u)",
518 ring_id, node_id);
520 proto_tree_add_item(tree, hf_corosync_totemsrp_mcast_node_id,
521 tvb, offset, 4, encoding);
522 offset += 4;
524 proto_tree_add_item(tree, hf_corosync_totemsrp_mcast_guarantee,
525 tvb, offset, 4, encoding);
526 offset += 4;
528 next_tvb = tvb_new_subset_remaining(tvb, offset);
530 if (message_header__encapsulated == COROSYNC_TOTEMSRP_MESSAGE_ENCAPSULATED)
532 offset += dissect_corosync_totemsrp0(next_tvb, pinfo, tree, true);
534 else
536 if (dissector_try_heuristic(heur_subdissector_list,
537 next_tvb,
538 pinfo,
539 parent_tree,
540 &hdtbl_entry,
541 totemsrp_info))
542 offset = length;
545 proto_item_set_len(item, offset - original_offset);
546 return (offset - original_offset);
550 static int
551 dissect_corosync_totemsrp_memb_merge_detect(tvbuff_t *tvb,
552 packet_info *pinfo, proto_tree *parent_tree,
553 unsigned length, int offset,
554 const unsigned encoding)
556 int original_offset = offset;
557 proto_tree *tree;
558 proto_item *item;
559 unsigned node_id;
560 uint64_t ring_id;
562 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_memb_merge_detect, tvb, offset,
563 -1, ENC_NA);
564 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_memb_merge_detect);
566 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, tree,
567 length, offset,
569 encoding);
571 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
572 length, offset,
573 encoding,
574 &node_id,
575 &ring_id);
577 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u)",
578 ring_id, node_id);
580 proto_item_set_len(item, offset - original_offset);
581 return (offset - original_offset);
584 static int
585 dissect_corosync_totemsrp_memb_join(tvbuff_t *tvb,
586 packet_info *pinfo, proto_tree *parent_tree,
587 unsigned length, int offset,
588 const unsigned encoding)
590 int original_offset = offset;
591 proto_tree *tree;
592 proto_item *item;
594 uint32_t proc_list_entries;
595 proto_tree *proc_tree;
597 uint32_t failed_list_entries;
598 proto_tree *failed_tree;
599 proto_item *failed_item;
601 unsigned i;
603 proto_item *proc_item;
605 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_memb_join, tvb, offset,
606 -1, encoding);
607 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_memb_join);
610 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, tree,
611 length, offset,
613 encoding);
615 proc_item = proto_tree_add_item(tree, hf_corosync_totemsrp_memb_join_proc_list_entries,
616 tvb, offset, 4, encoding);
617 proc_list_entries = corosync_totemsrp_get_uint32(tvb, offset, encoding);
618 offset += 4;
620 failed_item = proto_tree_add_item(tree, hf_corosync_totemsrp_memb_join_failed_list_entries,
621 tvb, offset, 4, encoding);
622 failed_list_entries = corosync_totemsrp_get_uint32(tvb, offset, encoding);
623 offset += 4;
625 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_join_ring_seq,
626 tvb, offset, 8, encoding);
627 offset += 8;
629 proc_tree = proto_item_add_subtree(proc_item, ett_corosync_totemsrp_memb_join_proc_list);
631 proto_item_append_text(item, " (nprocs: %u nfailed: %u)",
632 proc_list_entries, failed_list_entries);
634 for (i = 0; i < proc_list_entries; i++) {
635 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, proc_tree,
636 length, offset,
638 encoding);
641 failed_tree = proto_item_add_subtree(failed_item,
642 ett_corosync_totemsrp_memb_join_failed_list);
644 for (i = 0; i < failed_list_entries; i++) {
645 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, failed_tree,
646 length, offset,
648 encoding);
651 proto_item_set_len(item, offset - original_offset);
652 return (offset - original_offset);
655 static int
656 dissect_corosync_totemsrp_memb_commit_token_memb_entry(tvbuff_t *tvb,
657 packet_info *pinfo,
658 proto_tree *parent_tree,
659 unsigned length, int offset,
660 const unsigned encoding,
661 unsigned *node_id,
662 uint64_t *ring_id)
664 int original_offset = offset;
666 proto_tree *tree;
667 proto_item *item;
669 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_memb_commit_token_memb_entry,
670 tvb, offset, -1, encoding);
671 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_memb_commit_token_memb_entry);
674 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
675 length, offset,
676 encoding,
677 node_id,
678 ring_id);
680 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_memb_entry_aru,
681 tvb, offset, 4, encoding);
682 offset += 4;
684 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_memb_entry_high_delivered,
685 tvb, offset, 4, encoding);
686 offset += 4;
688 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_memb_entry_received_flg,
689 tvb, offset, 4, encoding);
690 offset += 4;
692 proto_item_set_len(item, offset - original_offset);
693 return (offset - original_offset);
696 static int
697 dissect_corosync_totemsrp_memb_commit_token(tvbuff_t *tvb,
698 packet_info *pinfo, proto_tree *parent_tree,
699 unsigned length, int offset,
700 const unsigned encoding)
702 int original_offset = offset;
703 proto_tree *tree;
704 proto_item *item;
706 uint32_t i, addr_entries;
708 uint32_t seq;
709 unsigned node_id;
710 uint64_t ring_id;
712 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_memb_commit_token,
713 tvb, offset, -1, ENC_NA);
714 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_memb_commit_token);
716 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_token_seq,
717 tvb, offset, 4, encoding);
718 seq = corosync_totemsrp_get_uint32(tvb, offset, encoding);
719 offset += 4;
721 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
722 length, offset,
723 encoding,
724 &node_id,
725 &ring_id);
727 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_retrans_flg,
728 tvb, offset, 4, encoding);
729 offset += 4;
731 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_memb_index,
732 tvb, offset, 4, encoding);
733 offset += 4;
735 proto_tree_add_item(tree, hf_corosync_totemsrp_memb_commit_token_addr_entries,
736 tvb, offset, 4, encoding);
737 addr_entries = corosync_totemsrp_get_uint32(tvb, offset, encoding);
738 offset += 4;
740 for (i = 0; i < addr_entries; i++) {
741 offset += dissect_corosync_totemsrp_srp_addr(tvb, pinfo, tree,
742 length, offset,
744 encoding);
747 for (i = 0; i < addr_entries; i++) {
748 offset += dissect_corosync_totemsrp_memb_commit_token_memb_entry(tvb, pinfo, tree,
749 length, offset,
750 encoding,
751 NULL,
752 NULL);
755 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u seq: %u entries: %u)",
756 ring_id, node_id, seq, addr_entries);
758 proto_item_set_len(item, offset - original_offset);
759 return (offset - original_offset);
762 static int
763 dissect_corosync_totemsrp_token_hold_cancel(tvbuff_t *tvb,
764 packet_info *pinfo, proto_tree *parent_tree,
765 unsigned length, int offset,
766 const unsigned encoding)
768 int original_offset = offset;
769 proto_tree *tree;
770 proto_item *item;
771 unsigned node_id;
772 uint64_t ring_id;
774 item = proto_tree_add_item(parent_tree, hf_corosync_totemsrp_token_hold_cancel, tvb, offset,
775 -1, ENC_NA);
776 tree = proto_item_add_subtree(item, ett_corosync_totemsrp_token_hold_cancel);
778 offset += dissect_corosync_totemsrp_memb_ring_id(tvb, pinfo, tree,
779 length, offset,
780 encoding,
781 &node_id,
782 &ring_id);
784 proto_item_append_text(item, " (ring: %" PRIu64 " node: %u)",
785 ring_id, node_id);
787 proto_item_set_len(item, offset - original_offset);
788 return (offset - original_offset);
791 static int
792 dissect_corosync_totemsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
794 return dissect_corosync_totemsrp0(tvb, pinfo, parent_tree, false);
797 #define COROSYNC_TOTEMSRP_TEST_LITTLE_ENDIAN 0x22FF
798 #define COROSYNC_TOTEMSRP_TEST_BIG_ENDIAN 0xFF22
800 static int
801 // NOLINTNEXTLINE(misc-no-recursion)
802 dissect_corosync_totemsrp0(tvbuff_t *tvb,
803 packet_info *pinfo, proto_tree *tree,
804 bool encapsulated)
806 proto_item *item;
807 unsigned length;
808 int offset = 0;
809 uint16_t endian_test;
810 proto_tree *corosync_tree;
812 uint8_t message_header__type;
813 uint8_t message_header__encapsulated;
815 unsigned encoding;
816 struct corosync_totemsrp_info info;
818 /* Check that there's enough data */
819 length = tvb_reported_length(tvb);
820 if (length < 1 + 1 + 2 + 4)
821 return 0;
823 /* message header */
824 message_header__type = tvb_get_uint8(tvb, 0);
825 if (message_header__type > 5)
826 return 0;
828 message_header__encapsulated = tvb_get_uint8(tvb, 1);
830 /* message_header -- byte order checking */
831 endian_test = tvb_get_ntohs(tvb, 2);
832 if (endian_test == COROSYNC_TOTEMSRP_TEST_LITTLE_ENDIAN)
833 encoding = ENC_LITTLE_ENDIAN;
834 else if (endian_test == COROSYNC_TOTEMSRP_TEST_BIG_ENDIAN)
835 encoding = ENC_BIG_ENDIAN;
836 else
837 return 0;
839 if (encapsulated == false)
841 col_set_str(pinfo->cinfo, COL_PROTOCOL, "COROSYNC/TOTEMSRP");
842 col_set_str(pinfo->cinfo, COL_INFO,
843 ((message_header__type == COROSYNC_TOTEMSRP_MESSAGE_TYPE_MCAST)
844 && (message_header__encapsulated == COROSYNC_TOTEMSRP_MESSAGE_ENCAPSULATED))?
845 "ENCAPSULATED":
846 val_to_str_const(message_header__type,
847 corosync_totemsrp_message_header_type,
848 "Unknown"));
851 item = proto_tree_add_item(tree, proto_corosync_totemsrp, tvb, offset, -1, ENC_NA);
852 corosync_tree = proto_item_add_subtree(item, ett_corosync_totemsrp);
854 proto_tree_add_item(corosync_tree, hf_corosync_totemsrp_message_header_type,
855 tvb, offset, 1, ENC_NA);
856 offset += 1;
858 proto_tree_add_item(corosync_tree, hf_corosync_totemsrp_message_header_encapsulated,
859 tvb, offset, 1, ENC_NA);
860 offset += 1;
862 proto_tree_add_item(corosync_tree, hf_corosync_totemsrp_message_header_endian_detector,
863 tvb, offset, 2, encoding);
864 offset += 2;
866 proto_tree_add_item(corosync_tree,
867 hf_corosync_totemsrp_message_header_nodeid,
868 tvb, offset, 4, encoding);
869 info.encoding = encoding;
870 info.nodeid = corosync_totemsrp_get_uint32(tvb, offset, encoding);
871 offset += 4;
873 increment_dissection_depth(pinfo);
874 switch (message_header__type) {
875 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_ORF_TOKEN:
876 dissect_corosync_totemsrp_orf_token(tvb, pinfo, corosync_tree, length, offset, encoding);
877 break;
878 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_MCAST:
879 dissect_corosync_totemsrp_mcast(tvb, pinfo, corosync_tree, length, offset,
880 message_header__encapsulated,
881 encoding, tree, &info);
882 break;
883 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_MERGE_DETECT:
884 dissect_corosync_totemsrp_memb_merge_detect(tvb, pinfo, corosync_tree, length, offset,
885 encoding);
886 break;
887 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_JOIN:
888 dissect_corosync_totemsrp_memb_join(tvb, pinfo, corosync_tree, length, offset,
889 encoding);
890 break;
891 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_MEMB_COMMIT_TOKEN:
892 dissect_corosync_totemsrp_memb_commit_token(tvb, pinfo, corosync_tree, length, offset,
893 encoding);
894 break;
895 case COROSYNC_TOTEMSRP_MESSAGE_TYPE_TOKEN_HOLD_CANCEL:
896 dissect_corosync_totemsrp_token_hold_cancel(tvb, pinfo, corosync_tree, length, offset,
897 encoding);
898 break;
899 default:
900 break;
902 decrement_dissection_depth(pinfo);
904 return length;
907 void
908 proto_register_corosync_totemsrp(void)
910 static hf_register_info hf[] = {
911 /* message_header */
912 { &hf_corosync_totemsrp_message_header_type,
913 { "Type", "corosync_totemsrp.message_header.type",
914 FT_INT8, BASE_DEC, VALS(corosync_totemsrp_message_header_type), 0x0,
915 NULL, HFILL }},
916 { &hf_corosync_totemsrp_message_header_encapsulated,
917 { "Encapsulated", "corosync_totemsrp.message_header.encapsulated",
918 FT_INT8, BASE_DEC, VALS(corosync_totemsrp_message_header_encapsulated), 0x0,
919 NULL, HFILL }},
920 { &hf_corosync_totemsrp_message_header_endian_detector,
921 { "Endian detector", "corosync_totemsrp.message_header.endian_detector",
922 FT_UINT16, BASE_HEX, NULL, 0x0,
923 NULL, HFILL }},
924 { &hf_corosync_totemsrp_message_header_nodeid,
925 { "Node ID", "corosync_totemsrp.message_header.nodeid",
926 FT_UINT32, BASE_DEC, NULL, 0x0,
927 NULL, HFILL }},
929 /* orf_token */
930 { &hf_corosync_totemsrp_orf_token,
931 { "Ordering, Reliability, Flow (ORF) control Token", "corosync_totemsrp.orf_token",
932 FT_NONE, BASE_NONE, NULL, 0x0,
933 NULL, HFILL }},
934 { &hf_corosync_totemsrp_orf_token_seq,
935 { "Sequence number allowing recognition of redundant copies of the token", "corosync_totemsrp.orf_token.seq",
936 FT_UINT32, BASE_DEC, NULL, 0x0,
937 NULL, HFILL }},
938 { &hf_corosync_totemsrp_orf_token_token_seq,
939 { "The largest sequence number", "corosync_totemsrp.orf_token.seq",
940 FT_UINT32, BASE_DEC, NULL, 0x0,
941 "The largest sequence number of any message "
942 "that has been broadcast on the ring"
943 "[1]" ,
944 HFILL }},
945 { &hf_corosync_totemsrp_orf_token_aru,
946 { "Sequence number all received up to", "corosync_totemsrp.orf_token.aru",
947 FT_UINT32, BASE_DEC, NULL, 0x0,
948 NULL, HFILL }},
949 { &hf_corosync_totemsrp_orf_token_aru_addr,
950 { "ID of node setting ARU", "corosync_totemsrp.orf_token.aru_addr",
951 FT_UINT32, BASE_DEC, NULL, 0x0,
952 NULL, HFILL }},
953 { &hf_corosync_totemsrp_orf_token_backlog,
954 { "Backlog", "corosync_totemsrp.orf_token.backlog",
955 FT_UINT32, BASE_DEC, NULL, 0x0,
956 "The sum of the number of new message waiting to be transmitted by each processor on the ring "
957 "at the time at which that processor forwarded the token during the previous rotation"
958 "[1]",
959 HFILL }},
960 { &hf_corosync_totemsrp_orf_token_fcc,
961 { "FCC",
962 "corosync_totemsrp.orf_token.fcc",
963 FT_UINT32, BASE_DEC, NULL, 0x0,
964 "A count of the number of messages broadcast by all processors "
965 "during the previous rotation of the token"
966 "[1]",
967 HFILL }},
968 { &hf_corosync_totemsrp_orf_token_retrnas_flg,
969 { "Retransmission flag", "corosync_totemsrp.orf_token.retrans_flg",
970 FT_INT32, BASE_DEC, NULL, 0x0,
971 NULL, HFILL }},
972 { &hf_corosync_totemsrp_orf_token_rtr_list_entries,
973 { "The number of retransmission list entries", "corosync_totemsrp.orf_token.rtr_list_entries",
974 FT_INT32, BASE_DEC, NULL, 0x0,
975 NULL, HFILL }},
977 /* memb_ring_id */
978 { &hf_corosync_totemsrp_memb_ring_id,
979 { "Member ring id", "corosync_totemsrp.memb_ring_id",
980 FT_NONE, BASE_NONE, NULL, 0x0,
981 NULL, HFILL }},
982 { &hf_corosync_totemsrp_memb_ring_id_seq,
983 { "Sequence in member ring id", "corosync_totemsrp.memb_ring_id.seq",
984 FT_UINT64, BASE_DEC, NULL, 0x0,
985 NULL, HFILL }},
987 /* totem_ip_address */
988 { &hf_corosync_totemsrp_ip_address,
989 { "Node IP address", "corosync_totemsrp.ip_address",
990 FT_NONE, BASE_NONE, NULL, 0x0,
991 NULL, HFILL }},
992 { &hf_corosync_totemsrp_ip_address_nodeid,
993 { "Node ID", "corosync_totemsrp.ip_address.nodeid",
994 FT_UINT32, BASE_DEC, NULL, 0x0,
995 NULL, HFILL }},
996 { &hf_corosync_totemsrp_ip_address_family,
997 { "Address family", "corosync_totemsrp.ip_address.family",
998 FT_UINT16, BASE_DEC, VALS(corosync_totemsrp_ip_address_family), 0x0,
999 NULL, HFILL }},
1000 { &hf_corosync_totemsrp_ip_address_addr,
1001 { "Address", "corosync_totemsrp.ip_address.addr",
1002 FT_BYTES, BASE_NONE, NULL, 0x0,
1003 NULL, HFILL }},
1004 { &hf_corosync_totemsrp_ip_address_addr4,
1005 { "Address", "corosync_totemsrp.ip_address.addr4",
1006 FT_IPv4, BASE_NONE, NULL, 0x0,
1007 NULL, HFILL }},
1008 { &hf_corosync_totemsrp_ip_address_addr4_padding,
1009 { "Address padding", "corosync_totemsrp.ip_address.addr4_padding",
1010 FT_BYTES, BASE_NONE, NULL, 0x0,
1011 NULL, HFILL }},
1012 { &hf_corosync_totemsrp_ip_address_addr6,
1013 { "Address", "corosync_totemsrp.ip_address.addr6",
1014 FT_IPv6, BASE_NONE, NULL, 0x0,
1015 NULL, HFILL }},
1017 /* mcast */
1018 { &hf_corosync_totemsrp_mcast,
1019 { "ring ordered multicast message", "corosync_totemsrp.mcast",
1020 FT_NONE, BASE_NONE, NULL, 0x0,
1021 NULL, HFILL }},
1022 { &hf_corosync_totemsrp_mcast_seq,
1023 {"Multicast sequence number", "corosync_totemsrp.mcast.seq",
1024 FT_UINT32, BASE_DEC, NULL, 0x0,
1025 NULL, HFILL }},
1026 { &hf_corosync_totemsrp_mcast_this_seqno,
1027 {"This Sequence number", "corosync_totemsrp.mcast.this_seqno",
1028 FT_INT32, BASE_DEC, NULL, 0x0,
1029 NULL, HFILL }},
1030 { &hf_corosync_totemsrp_mcast_node_id,
1031 {"Node id(unused?)", "corosync_totemsrp.mcast.node_id",
1032 FT_UINT32, BASE_DEC, NULL, 0x0,
1033 NULL, HFILL }},
1034 { &hf_corosync_totemsrp_mcast_system_from,
1035 {"System from address", "corosync_totemsrp.mcast.system_from",
1036 FT_NONE, BASE_NONE, NULL, 0x0,
1037 NULL, HFILL }},
1039 { &hf_corosync_totemsrp_mcast_guarantee,
1040 {"Guarantee", "corosync_totemsrp.mcast.guarantee",
1041 FT_INT32, BASE_DEC, NULL, 0x0,
1042 NULL, HFILL }},
1044 /* memb_merge_detect */
1045 { &hf_corosync_totemsrp_memb_merge_detect,
1046 { "Merge rings if there are available rings", "corosync_totemsrp.memb_merge_detect",
1047 FT_NONE, BASE_NONE, NULL, 0x0,
1048 NULL, HFILL }},
1050 /* srp_addr */
1051 { &hf_corosync_totemsrp_srp_addr,
1052 {"Single Ring Protocol Address", "corosync_totemsrp.srp_addr",
1053 FT_NONE, BASE_NONE, NULL, 0x0,
1054 NULL, HFILL }},
1056 /* rtr_item */
1057 { &hf_corosync_totemsrp_rtr_item,
1058 {"Retransmission Item", "corosync_totemsrp.rtr_item",
1059 FT_NONE, BASE_NONE, NULL, 0x0,
1060 NULL, HFILL }},
1061 { &hf_corosync_totemsrp_rtr_item_seq,
1062 {"Sequence of Retransmission Item", "corosync_totemsrp.rtr_item.seq",
1063 FT_UINT32, BASE_DEC, NULL, 0x0,
1064 NULL, HFILL }},
1066 /* memb_join */
1067 { &hf_corosync_totemsrp_memb_join,
1068 {"Membership join message", "corosync_totemsrp.memb_join",
1069 FT_NONE, BASE_NONE, NULL, 0x0,
1070 NULL, HFILL}},
1071 { &hf_corosync_totemsrp_memb_join_proc_list_entries,
1072 {"The number of processor list entries", "corosync_totemsrp.memb_join.proc_list_entries",
1073 FT_UINT32, BASE_DEC, NULL, 0x0,
1074 NULL, HFILL}},
1075 { &hf_corosync_totemsrp_memb_join_failed_list_entries,
1076 {"The number of failed list entries", "corosync_totemsrp.memb_join.failed_list_entries",
1077 FT_UINT32, BASE_DEC, NULL, 0x0,
1078 NULL, HFILL}},
1079 { &hf_corosync_totemsrp_memb_join_ring_seq,
1080 {"Ring sequence number", "corosync_totemsrp.memb_join.ring_seq",
1081 FT_UINT64, BASE_DEC, NULL, 0x0,
1082 NULL, HFILL}},
1084 /* memb_commit_token */
1085 { &hf_corosync_totemsrp_memb_commit_token,
1086 {"Membership commit token", "corosync_totemsrp.memb_commit_token",
1087 FT_NONE, BASE_NONE, NULL, 0x0,
1088 NULL, HFILL}},
1089 { &hf_corosync_totemsrp_memb_commit_token_token_seq,
1090 {"Token sequence", "corosync_totemsrp.memb_commit_token.token_seq",
1091 FT_UINT32, BASE_DEC, NULL, 0x0,
1092 NULL, HFILL}},
1093 { &hf_corosync_totemsrp_memb_commit_token_retrans_flg,
1094 {"Retransmission flag", "corosync_totemsrp.memb_commit_token.retrans_flg",
1095 FT_UINT32, BASE_DEC, NULL, 0x0,
1096 NULL, HFILL}},
1097 { &hf_corosync_totemsrp_memb_commit_token_memb_index,
1098 {"Member index", "corosync_totemsrp.memb_commit_token.memb_index",
1099 FT_INT32, BASE_DEC, NULL, 0x0,
1100 NULL, HFILL}},
1101 { &hf_corosync_totemsrp_memb_commit_token_addr_entries,
1102 {"The number of address entries", "corosync_totemsrp.memb_commit_token.addr_entries",
1103 FT_INT32, BASE_DEC, NULL, 0x0,
1104 NULL, HFILL}},
1106 /* memb_commit_token_memb_entry */
1107 { &hf_corosync_totemsrp_memb_commit_token_memb_entry,
1108 { "Membership entry", "corosync_totemsrp.memb_commit_token_memb_entry",
1109 FT_NONE, BASE_NONE, NULL, 0x0,
1110 NULL, HFILL}},
1111 { &hf_corosync_totemsrp_memb_commit_token_memb_entry_aru,
1112 {"Sequence number all received up to", "corosync_totemsrp.memb_commit_token_memb_entry.aru",
1113 FT_UINT32, BASE_DEC, NULL, 0x0,
1114 NULL, HFILL}},
1115 { &hf_corosync_totemsrp_memb_commit_token_memb_entry_high_delivered,
1116 {"High delivered", "corosync_totemsrp.memb_commit_token_memb_entry.high_delivered",
1117 FT_UINT32, BASE_DEC, NULL, 0x0,
1118 NULL, HFILL}},
1119 { &hf_corosync_totemsrp_memb_commit_token_memb_entry_received_flg,
1120 {"Received flag", "corosync_totemsrp.memb_commit_token_memb_entry.received_flg",
1121 FT_UINT32, BASE_DEC, NULL, 0x0,
1122 NULL, HFILL}},
1124 /* token_hold_cancel */
1125 { &hf_corosync_totemsrp_token_hold_cancel,
1126 {"Hold cancel token", "corosync_totemsrp.token_hold_cancel",
1127 FT_NONE, BASE_NONE, NULL, 0x0,
1128 NULL, HFILL}},
1131 static int *ett[] = {
1132 &ett_corosync_totemsrp,
1133 &ett_corosync_totemsrp_orf_token,
1134 &ett_corosync_totemsrp_memb_ring_id,
1135 &ett_corosync_totemsrp_ip_address,
1136 &ett_corosync_totemsrp_mcast,
1137 &ett_corosync_totemsrp_memb_merge_detect,
1138 &ett_corosync_totemsrp_srp_addr,
1139 &ett_corosync_totemsrp_rtr_item,
1140 &ett_corosync_totemsrp_memb_join,
1141 &ett_corosync_totemsrp_memb_commit_token,
1142 &ett_corosync_totemsrp_memb_commit_token_memb_entry,
1143 &ett_corosync_totemsrp_token_hold_cancel,
1144 &ett_corosync_totemsrp_memb_join_proc_list,
1145 &ett_corosync_totemsrp_memb_join_failed_list
1149 proto_corosync_totemsrp = proto_register_protocol("Totem Single Ring Protocol implemented in Corosync Cluster Engine",
1150 "COROSYNC/TOTEMSRP", "corosync_totemsrp");
1151 proto_register_field_array(proto_corosync_totemsrp, hf, array_length(hf));
1152 proto_register_subtree_array(ett, array_length(ett));
1154 heur_subdissector_list = register_heur_dissector_list_with_description("corosync_totemsrp.mcast", "COROSYNC/TOTEMSRP multicast data", proto_corosync_totemsrp);
1156 register_dissector( "corosync_totemsrp", dissect_corosync_totemsrp, proto_corosync_totemsrp);
1159 void
1160 proto_reg_handoff_corosync_totemsrp(void)
1162 /* Nothing to be done.
1163 dissect_corosync_totemsrp is directly called from corosync_totemnet dissector. */
1168 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1170 * Local variables:
1171 * c-basic-offset: 2
1172 * tab-width: 8
1173 * indent-tabs-mode: nil
1174 * End:
1176 * vi: set shiftwidth=2 tabstop=8 expandtab:
1177 * :indentSize=2:tabSize=8:noTabs=true: