aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-24 21:59:51 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-25 13:15:11 +0000
commitdcfea6a06ddf7adeafc8613efe74310251201789 (patch)
tree04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-lldp.c
parent479ab3bcdc8d79b27bfc99fcde073457f72126ac (diff)
create_dissector_handle -> new_create_dissector_handle
This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r--epan/dissectors/packet-lldp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index a359a7acf1..a3314bed05 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -3619,8 +3619,8 @@ dissect_lldp_unknown_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* Dissect LLDP packets */
-static void
-dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *lldp_tree = NULL;
@@ -3647,8 +3647,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (rtnValue < 0)
{
col_set_str(pinfo->cinfo, COL_INFO, "Invalid Chassis ID TLV");
-
- return;
+ return tvb_captured_length(tvb);
}
offset += rtnValue;
@@ -3661,8 +3660,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (rtnValue < 0)
{
col_set_str(pinfo->cinfo, COL_INFO, "Invalid Port ID TLV");
-
- return;
+ return tvb_captured_length(tvb);
}
offset += rtnValue;
@@ -3675,8 +3673,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (rtnValue < 0)
{
col_set_str(pinfo->cinfo, COL_INFO, "Invalid Time-to-Live TLV");
-
- return;
+ return tvb_captured_length(tvb);
}
offset += rtnValue;
@@ -3736,6 +3733,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += rtnValue;
}
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@@ -5059,7 +5057,7 @@ proto_reg_handoff_lldp(void)
{
dissector_handle_t lldp_handle;
- lldp_handle = create_dissector_handle(dissect_lldp,proto_lldp);
+ lldp_handle = new_create_dissector_handle(dissect_lldp,proto_lldp);
dissector_add_uint("ethertype", ETHERTYPE_LLDP, lldp_handle);
}