aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dec-dnart.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-15 08:00:10 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-16 03:50:05 +0000
commitbbdd89b973353a0df1d98d884c38f3832670bfea (patch)
tree9b992f923f565af2fcab30902508a191de85ca53 /epan/dissectors/packet-dec-dnart.c
parent6012ba8f008bfba24fd44ce7a2a3055572453dce (diff)
create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48 Reviewed-on: https://code.wireshark.org/review/11850 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-dec-dnart.c')
-rw-r--r--epan/dissectors/packet-dec-dnart.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c
index ac7f38fb2d..157fe3a1d8 100644
--- a/epan/dissectors/packet-dec-dnart.c
+++ b/epan/dissectors/packet-dec-dnart.c
@@ -358,8 +358,8 @@ set_dnet_address(packet_info *pinfo, address *paddr_src, address *paddr_tgt)
}
}
-static void
-dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 padding_length;
guint8 forward;
@@ -522,7 +522,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tree, hf_dec_nsp_msgs, tvb, offset, 1, nsp_msg_type);
if (nsp_msg_type == NOP_MSG) {
/* Only test data in this msg */
- return;
+ return offset;
}
nsp_msg_tree = proto_item_add_subtree(ti_local, ett_dec_rt_nsp_msg);
/* Get past the nsp_msg_type */
@@ -532,7 +532,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (nsp_msg_type == CONN_ACK_MSG) {
col_set_str(pinfo->cinfo, COL_INFO, "NSP connect acknowledgement");
/* Done with this msg type */
- return;
+ return offset;
}
/* All other messages have a source node */
proto_tree_add_item(nsp_msg_tree, hf_dec_rt_src_node, tvb, offset, 2, ENC_LITTLE_ENDIAN);
@@ -544,6 +544,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset,
nsp_msg_type);
}
+ return tvb_captured_length(tvb);
}
static int
@@ -1479,7 +1480,7 @@ proto_reg_handoff_dec_rt(void)
{
dissector_handle_t dec_rt_handle;
- dec_rt_handle = create_dissector_handle(dissect_dec_rt,
+ dec_rt_handle = new_create_dissector_handle(dissect_dec_rt,
proto_dec_rt);
dissector_add_uint("ethertype", ETHERTYPE_DNA_RT, dec_rt_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_DNA_RT, dec_rt_handle);