diff options
Diffstat (limited to 'plugins/irda')
-rw-r--r-- | plugins/irda/packet-irda.c | 7 | ||||
-rw-r--r-- | plugins/irda/packet-sir.c | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c index f01af6271f..04f7f26116 100644 --- a/plugins/irda/packet-irda.c +++ b/plugins/irda/packet-irda.c @@ -1853,7 +1853,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) /* * Dissect IrDA protocol */ -static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) +static int dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, void* data _U_) { /* load the display labels */ pinfo->current_proto = "IrDA"; @@ -1862,11 +1862,12 @@ static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) if ((pinfo->pseudo_header->irda.pkttype & IRDA_CLASS_MASK) == IRDA_CLASS_LOG) { dissect_log(tvb, pinfo, root); - return; + return tvb_captured_length(tvb); } dissect_irlap(tvb, pinfo, root); + return tvb_captured_length(tvb); } @@ -2203,7 +2204,7 @@ void proto_register_irda(void) proto_ttp = proto_register_protocol("Tiny Transport Protocol", "TTP", "ttp"); /* Register the dissector */ - register_dissector("irda", dissect_irda, proto_irlap); + new_register_dissector("irda", dissect_irda, proto_irlap); /* Required function calls to register the header fields */ proto_register_field_array(proto_irlap, hf_lap, array_length(hf_lap)); 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)); |