aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pktap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-pktap.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-pktap.c')
-rw-r--r--epan/dissectors/packet-pktap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-pktap.c b/epan/dissectors/packet-pktap.c
index 6825cdb629..f1a3e95f97 100644
--- a/epan/dissectors/packet-pktap.c
+++ b/epan/dissectors/packet-pktap.c
@@ -127,8 +127,8 @@ capture_pktap(const guchar *pd, int len, packet_counts *ld)
ld->other++;
}
-static void
-dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_tree *pktap_tree = NULL;
proto_item *ti = NULL;
@@ -151,7 +151,7 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pkt_len < MIN_PKTAP_HDR_LEN) {
proto_tree_add_expert(tree, pinfo, &ei_pktap_hdrlen_too_short,
tvb, offset, 4);
- return;
+ return tvb_captured_length(tvb);
}
offset += 4;
@@ -205,6 +205,7 @@ dissect_pktap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissector_try_uint(wtap_encap_dissector_table,
wtap_pcap_encap_to_wtap_encap(dlt), next_tvb, pinfo, tree);
}
+ return tvb_captured_length(tvb);
}
void
@@ -277,7 +278,7 @@ proto_register_pktap(void)
expert_pktap = expert_register_protocol(proto_pktap);
expert_register_field_array(expert_pktap, ei, array_length(ei));
- pktap_handle = register_dissector("pktap", dissect_pktap, proto_pktap);
+ pktap_handle = new_register_dissector("pktap", dissect_pktap, proto_pktap);
}
void