aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-09-17 17:47:43 +0000
committerBill Meier <wmeier@newsguy.com>2012-09-17 17:47:43 +0000
commit8a82b7a361707d1dbc92f978eb74b504027d3405 (patch)
tree10397ecfae792851f9825c30d34869463f0aa354 /epan
parentb29ae79cf672d96b18c9e39bc34d70b3e8c5ca06 (diff)
Cleanup:
- fix two cases of potential infinite loop while dissecting; [for (guint8 i; i <= guint8 end; i++)] - col_...() fcns should not be called under 'if (tree)' - remove unneeded initializers; - move proto_reg_handoff...() to the end of the file as per convention; - remove some boilerplate comments; - use consistent indentation and whitespace style; - remove some trailing whitespace. svn path=/trunk/; revision=44950
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-clique-rm.c470
1 files changed, 234 insertions, 236 deletions
diff --git a/epan/dissectors/packet-clique-rm.c b/epan/dissectors/packet-clique-rm.c
index e664f54541..ddf4438f87 100644
--- a/epan/dissectors/packet-clique-rm.c
+++ b/epan/dissectors/packet-clique-rm.c
@@ -93,40 +93,40 @@ typedef enum {
#define IS_RELIABLE(type) (type >= FIRST_RELIABLE_PACKET)
static const value_string packet_type_vals[] = {
- { PACKET_TYPE_WHOIS_REQUEST, "Whois request" },
- { PACKET_TYPE_WHOIS_REPLY, "Whois reply" },
- { PACKET_TYPE_REPAIR_REQUEST, "Repair request"},
- { PACKET_TYPE_SESSION, "Session" },
- { PACKET_TYPE_DATA, "Data" },
- /* No data just acknowledgement */
- { PACKET_TYPE_NO_DATA, "No data" },
- /* Some nodes failed */
- { PACKET_TYPE_FAILURE, "Failure" },
- /* Start a joining attempt */
- { PACKET_TYPE_ATTEMPT_JOIN, "Attempt join" },
- /* The real join */
- { PACKET_TYPE_JOIN, "Join" },
- /* Leaving now, bye */
- { PACKET_TYPE_BYE, "Bye" },
-
- { 0, NULL }
+ { PACKET_TYPE_WHOIS_REQUEST, "Whois request" },
+ { PACKET_TYPE_WHOIS_REPLY, "Whois reply" },
+ { PACKET_TYPE_REPAIR_REQUEST, "Repair request"},
+ { PACKET_TYPE_SESSION, "Session" },
+ { PACKET_TYPE_DATA, "Data" },
+ /* No data just acknowledgement */
+ { PACKET_TYPE_NO_DATA, "No data" },
+ /* Some nodes failed */
+ { PACKET_TYPE_FAILURE, "Failure" },
+ /* Start a joining attempt */
+ { PACKET_TYPE_ATTEMPT_JOIN, "Attempt join" },
+ /* The real join */
+ { PACKET_TYPE_JOIN, "Join" },
+ /* Leaving now, bye */
+ { PACKET_TYPE_BYE, "Bye" },
+
+ { 0, NULL }
};
static void
-dissect_sender_array (proto_tree *clique_rm_tree, int hf_header, gint ett_header,
+dissect_sender_array(proto_tree *clique_rm_tree, int hf_header, gint ett_header,
int hf_header_sender, tvbuff_t *tvb, int offset)
{
- guint8 i, count;
- int len;
+ guint i, count;
+ int len;
proto_item *ti;
proto_tree *tree;
count = tvb_get_guint8(tvb, offset);
- len = 1 + 4 * count;
- ti = proto_tree_add_item(clique_rm_tree, hf_header, tvb, offset, 1, ENC_BIG_ENDIAN);
+ len = 1 + 4 * count;
+ ti = proto_tree_add_item(clique_rm_tree, hf_header, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_set_len(ti, len);
- tree = proto_item_add_subtree (ti, ett_header);
+ tree = proto_item_add_subtree(ti, ett_header);
offset++;
for (i = 1; i <= count; i++, offset += 4)
@@ -134,13 +134,13 @@ dissect_sender_array (proto_tree *clique_rm_tree, int hf_header, gint ett_header
}
static void
-dissect_data_packet (proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
+dissect_data_packet(proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
{
proto_item *ti;
proto_tree *tree;
- ti = proto_tree_add_text (clique_rm_tree, tvb, offset, -1, "Data");
- tree = proto_item_add_subtree (ti, ett_clique_rm_data);
+ ti = proto_tree_add_text(clique_rm_tree, tvb, offset, -1, "Data");
+ tree = proto_item_add_subtree(ti, ett_clique_rm_data);
proto_tree_add_item(tree, hf_clique_rm_data_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -158,30 +158,30 @@ dissect_data_packet (proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
}
static int
-dissect_depends (proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
+dissect_depends(proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
{
proto_item *ti, *depend_item;
proto_tree *tree, *depend_tree;
- guint8 i, count;
- int len;
+ guint i, count;
+ int len;
- count = tvb_get_guint8 (tvb, offset);
- len = 1 + count * 8;
+ count = tvb_get_guint8(tvb, offset);
+ len = 1 + count * 8;
ti = proto_tree_add_item(clique_rm_tree,
hf_clique_rm_depends, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_set_len(ti, len);
offset += 1;
- tree = proto_item_add_subtree (ti, ett_clique_rm_depends);
+ tree = proto_item_add_subtree(ti, ett_clique_rm_depends);
for (i = 1; i <= count; i++)
{
depend_item = proto_tree_add_text(tree, tvb, offset, 8, "Depend item %d", i);
depend_tree = proto_item_add_subtree(depend_item, ett_clique_rm_depends_item);
- proto_tree_add_item(depend_tree, hf_clique_rm_depend_sender,
+ proto_tree_add_item(depend_tree, hf_clique_rm_depend_sender,
tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(depend_tree, hf_clique_rm_depend_packet_id,
+ proto_tree_add_item(depend_tree, hf_clique_rm_depend_packet_id,
tvb, offset+4, 4, ENC_BIG_ENDIAN);
offset += 8;
}
@@ -191,55 +191,59 @@ dissect_depends (proto_tree *clique_rm_tree, tvbuff_t *tvb, int offset)
/* Code to actually dissect the packets */
static void
-dissect_reliable_packet (proto_tree *clique_rm_tree, guint8 type,
- tvbuff_t *tvb, int offset)
+dissect_reliable_packet(proto_tree *clique_rm_tree, guint8 type, tvbuff_t *tvb, int offset)
{
+ if (!clique_rm_tree)
+ return; /* no col_..() or expert...() calls in following */
+
proto_tree_add_item(clique_rm_tree, hf_clique_rm_packet_id, tvb, offset, 4,
ENC_BIG_ENDIAN);
offset += 4;
- offset += dissect_depends (clique_rm_tree, tvb, offset);
+ offset += dissect_depends(clique_rm_tree, tvb, offset);
switch (type)
{
- case PACKET_TYPE_DATA:
- dissect_data_packet (clique_rm_tree, tvb, offset);
- break;
- case PACKET_TYPE_NO_DATA:
- break;
- case PACKET_TYPE_FAILURE:
- dissect_sender_array (clique_rm_tree, hf_clique_rm_failures,
- ett_clique_rm_failures, hf_clique_rm_failures_senders, tvb, offset);
- break;
- case PACKET_TYPE_ATTEMPT_JOIN:
- dissect_sender_array (clique_rm_tree, hf_clique_rm_attempt_join,
- ett_clique_rm_attempt_join, hf_clique_rm_attempt_join_senders, tvb, offset);
- break;
- case PACKET_TYPE_JOIN:
- dissect_sender_array (clique_rm_tree, hf_clique_rm_join_failures,
- ett_clique_rm_join_failures, hf_clique_rm_join_failures_senders, tvb, offset);
- break;
- case PACKET_TYPE_BYE:
- break;
+ case PACKET_TYPE_DATA:
+ dissect_data_packet(clique_rm_tree, tvb, offset);
+ break;
+ case PACKET_TYPE_NO_DATA:
+ break;
+ case PACKET_TYPE_FAILURE:
+ dissect_sender_array(clique_rm_tree, hf_clique_rm_failures,
+ ett_clique_rm_failures, hf_clique_rm_failures_senders, tvb, offset);
+ break;
+ case PACKET_TYPE_ATTEMPT_JOIN:
+ dissect_sender_array(clique_rm_tree, hf_clique_rm_attempt_join,
+ ett_clique_rm_attempt_join, hf_clique_rm_attempt_join_senders, tvb, offset);
+ break;
+ case PACKET_TYPE_JOIN:
+ dissect_sender_array(clique_rm_tree, hf_clique_rm_join_failures,
+ ett_clique_rm_join_failures, hf_clique_rm_join_failures_senders, tvb, offset);
+ break;
+ case PACKET_TYPE_BYE:
+ break;
default:
break;
}
}
static void
-dissect_unreliable_packet (proto_tree *clique_rm_tree, guint8 type,
- tvbuff_t *tvb, int offset)
+dissect_unreliable_packet(proto_tree *clique_rm_tree, guint8 type, tvbuff_t *tvb, int offset)
{
- guint8 len;
+ guint len;
+
+ if (!clique_rm_tree)
+ return; /* no col_..() or expert...() calls in following */
- switch (type)
+ switch (type)
{
case PACKET_TYPE_WHOIS_REQUEST:
proto_tree_add_item(clique_rm_tree,
hf_clique_rm_whois_request_id, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PACKET_TYPE_WHOIS_REPLY:
- len = tvb_get_guint8 (tvb, offset);
+ len = tvb_get_guint8(tvb, offset);
proto_tree_add_item(clique_rm_tree,
hf_clique_rm_whois_reply_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -255,7 +259,7 @@ dissect_unreliable_packet (proto_tree *clique_rm_tree, guint8 type,
hf_clique_rm_repair_request_packet_id, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PACKET_TYPE_SESSION:
- dissect_depends (clique_rm_tree, tvb, offset);
+ dissect_depends(clique_rm_tree, tvb, offset);
break;
default:
break;
@@ -266,64 +270,61 @@ dissect_unreliable_packet (proto_tree *clique_rm_tree, guint8 type,
static gboolean
dissect_clique_rm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- guint8 version = 0;
- guint8 type = 0;
- int offset = 0;
+ proto_item *ti;
+ proto_tree *clique_rm_tree;
+ guint8 version;
+ guint8 type;
+ int offset = 0;
- if (tvb_length (tvb) < 12)
+ if (tvb_length(tvb) < 12)
return FALSE;
- if (tvb_strneql (tvb, offset, "Clique", 6))
+ if (tvb_strneql(tvb, offset, "Clique", 6))
return FALSE;
offset += 6;
- version = tvb_get_guint8 (tvb, offset);
+ version = tvb_get_guint8(tvb, offset);
if (version != 1)
return FALSE;
offset++;
- type = tvb_get_guint8 (tvb, offset);
+ type = tvb_get_guint8(tvb, offset);
offset++;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Clique-rm");
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
- val_to_str(type, packet_type_vals, "Unknown (0x%02x)"));
+ val_to_str(type, packet_type_vals, "Unknown (0x%02x)"));
- if (tree) {
- proto_item *ti = NULL;
- proto_tree *clique_rm_tree = NULL;
+ /* rewind back to just behind the prefix */
+ offset = 6;
- /* rewind back to just behind the prefix */
- offset = 6;
+ ti = proto_tree_add_item(tree, proto_clique_rm, tvb, 0, -1, ENC_NA);
+ clique_rm_tree = proto_item_add_subtree(ti, ett_clique_rm);
- ti = proto_tree_add_item(tree, proto_clique_rm, tvb, 0, -1, ENC_NA);
- clique_rm_tree = proto_item_add_subtree(ti, ett_clique_rm);
-
- proto_tree_add_item(clique_rm_tree, hf_clique_rm_version, tvb, offset, 1,
- ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(clique_rm_tree, hf_clique_rm_version, tvb, offset, 1,
+ ENC_BIG_ENDIAN);
+ offset++;
- proto_tree_add_item(clique_rm_tree, hf_clique_rm_type, tvb, offset, 1,
- ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(clique_rm_tree, hf_clique_rm_type, tvb, offset, 1,
+ ENC_BIG_ENDIAN);
+ offset++;
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, ", sender: 0x%x",
- tvb_get_ntohl (tvb, offset));
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", sender: 0x%x",
+ tvb_get_ntohl(tvb, offset));
- proto_tree_add_item(clique_rm_tree, hf_clique_rm_sender, tvb, offset,
- 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(clique_rm_tree, hf_clique_rm_sender, tvb, offset,
+ 4, ENC_BIG_ENDIAN);
+ offset += 4;
- if (IS_RELIABLE(type)) {
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, ", id: 0x%x",
- tvb_get_ntohl (tvb, offset));
+ if (IS_RELIABLE(type)) {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", id: 0x%x",
+ tvb_get_ntohl(tvb, offset));
- dissect_reliable_packet(clique_rm_tree, type, tvb, offset);
- } else {
- dissect_unreliable_packet(clique_rm_tree, type, tvb, offset);
- }
+ dissect_reliable_packet(clique_rm_tree, type, tvb, offset);
+ } else {
+ dissect_unreliable_packet(clique_rm_tree, type, tvb, offset);
}
return TRUE;
@@ -332,154 +333,151 @@ dissect_clique_rm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
/* Register the protocol with Wireshark */
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-void
-proto_reg_handoff_clique_rm(void)
-{
- heur_dissector_add("udp", dissect_clique_rm, proto_clique_rm);
-}
-
void
proto_register_clique_rm(void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
- { &hf_clique_rm_version,
- { "Version", "clique_rm.version",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_type,
- { "Type", "clique_rm.type",
- FT_UINT8, BASE_HEX, VALS(packet_type_vals), 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_sender,
- { "Sender", "clique_rm.sender",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_packet_id,
- { "Packet id", "clique_rm.packet_id",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_depends,
- { "Depends", "clique_rm.depends",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_depend_sender,
- { "Sender", "clique_rm.depends.sender",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_depend_packet_id,
- { "Packet id", "clique_rm.depends.packet_id",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_failures,
- { "Failures", "clique_rm.failures",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_failures_senders,
- { "Sender", "clique_rm.failures.sender",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_attempt_join,
- { "New attempt join senders", "clique_rm.attempt_join",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_attempt_join_senders,
- { "Sender", "clique_rm.attempt_join.sender",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_join_failures,
- { "Join failures", "clique_rm.join_failures",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_join_failures_senders,
- { "Sender", "clique_rm.join_failures.sender",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_data_flags,
- { "Data flags", "clique_rm.data.flags",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_data_size,
- { "Data total size", "clique_rm.data.size",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_data_stream_id,
- { "Data stream id", "clique_rm.data.stream_id",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_data_data,
- { "Raw data", "clique_rm.data.data",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_whois_request_id,
- { "Whois request id", "clique_rm.whois_request.id",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_whois_reply_name_length,
- { "Whois reply name length", "clique_rm.whois_reply.length",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_whois_reply_name,
- { "Whois reply name", "clique_rm.whois_reply.name",
- FT_STRINGZ, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_repair_request_sender_id,
- { "Repair request for sender",
- "clique_rm.repair_request.sender_id",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_clique_rm_repair_request_packet_id,
- { "Repair request for packet",
- "clique_rm.repair_request.packet_id",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- };
+ static hf_register_info hf[] = {
+ { &hf_clique_rm_version,
+ { "Version", "clique_rm.version",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_type,
+ { "Type", "clique_rm.type",
+ FT_UINT8, BASE_HEX, VALS(packet_type_vals), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_sender,
+ { "Sender", "clique_rm.sender",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_packet_id,
+ { "Packet id", "clique_rm.packet_id",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_depends,
+ { "Depends", "clique_rm.depends",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_depend_sender,
+ { "Sender", "clique_rm.depends.sender",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_depend_packet_id,
+ { "Packet id", "clique_rm.depends.packet_id",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_failures,
+ { "Failures", "clique_rm.failures",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_failures_senders,
+ { "Sender", "clique_rm.failures.sender",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_attempt_join,
+ { "New attempt join senders", "clique_rm.attempt_join",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_attempt_join_senders,
+ { "Sender", "clique_rm.attempt_join.sender",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_join_failures,
+ { "Join failures", "clique_rm.join_failures",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_join_failures_senders,
+ { "Sender", "clique_rm.join_failures.sender",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_data_flags,
+ { "Data flags", "clique_rm.data.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_data_size,
+ { "Data total size", "clique_rm.data.size",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_data_stream_id,
+ { "Data stream id", "clique_rm.data.stream_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_data_data,
+ { "Raw data", "clique_rm.data.data",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_whois_request_id,
+ { "Whois request id", "clique_rm.whois_request.id",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_whois_reply_name_length,
+ { "Whois reply name length", "clique_rm.whois_reply.length",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_whois_reply_name,
+ { "Whois reply name", "clique_rm.whois_reply.name",
+ FT_STRINGZ, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_repair_request_sender_id,
+ { "Repair request for sender",
+ "clique_rm.repair_request.sender_id",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_clique_rm_repair_request_packet_id,
+ { "Repair request for packet",
+ "clique_rm.repair_request.packet_id",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ };
/* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_clique_rm,
- &ett_clique_rm_depends,
- &ett_clique_rm_depends_item,
- &ett_clique_rm_data,
- &ett_clique_rm_failures,
- &ett_clique_rm_join_failures,
- &ett_clique_rm_attempt_join,
- &ett_clique_rm_join,
- };
+ static gint *ett[] = {
+ &ett_clique_rm,
+ &ett_clique_rm_depends,
+ &ett_clique_rm_depends_item,
+ &ett_clique_rm_data,
+ &ett_clique_rm_failures,
+ &ett_clique_rm_join_failures,
+ &ett_clique_rm_attempt_join,
+ &ett_clique_rm_join,
+ };
/* Register the protocol name and description */
- proto_clique_rm = proto_register_protocol(
- "Clique Reliable Multicast Protocol", "Clique-rm", "clique-rm");
+ proto_clique_rm = proto_register_protocol(
+ "Clique Reliable Multicast Protocol", "Clique-rm", "clique-rm");
/* Required function calls to register the header fields and subtrees used */
- proto_register_field_array(proto_clique_rm, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_clique_rm, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+}
+void
+proto_reg_handoff_clique_rm(void)
+{
+ heur_dissector_add("udp", dissect_clique_rm, proto_clique_rm);
}
+