aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/irda/packet-sir.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 15:11:44 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:39 +0000
commit159227a14b25b15b535ac95c85d8bc699317d45e (patch)
tree7d02f802790d5701a0cc5c40537538944b60bb63 /plugins/irda/packet-sir.c
parent28ea58251c04562cc0670e57bf073dc6966e73e6 (diff)
register_dissector -> new_register_dissector for plugins.
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: Ie98e071a7cb568c13c8958de56b1fc25a4ce2ce9 Reviewed-on: https://code.wireshark.org/review/11831 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/irda/packet-sir.c')
-rw-r--r--plugins/irda/packet-sir.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index 2c445da8f7..d1da1e5713 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -123,8 +123,8 @@ checksum_data(tvbuff_t *tvb, proto_tree *tree)
/** Dissects an SIR packet. */
-static void
-dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
+static int
+dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_)
{
gint offset = 0;
gint bof_offset;
@@ -140,7 +140,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
pinfo->desegment_offset = offset;
pinfo->desegment_len = 1;
}
- return;
+ return tvb_captured_length(tvb);
} else {
guint preamble_len = bof_offset - offset;
gint data_offset = bof_offset + 1;
@@ -171,6 +171,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
}
offset = eof_offset + 1;
}
+ return tvb_captured_length(tvb);
}
@@ -228,7 +229,7 @@ proto_register_irsir(void)
proto_sir = proto_register_protocol(
"Serial Infrared", "SIR", "sir");
- register_dissector("sir", dissect_sir, proto_sir);
+ new_register_dissector("sir", dissect_sir, proto_sir);
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(
proto_sir, hf_sir, array_length(hf_sir));