Wireshark-commits: [Wireshark-commits] master 2d41b15: Add a "failed" return for tap packet routine
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 01 Jan 2019 05:03:49 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2d41b15495e245d9292ba42dd3954bdebc9f3290 Submitter: "Guy Harris <guy@xxxxxxxxxxxx>" Changed: branch: master Repository: wireshark Commits: 2d41b15 by Guy Harris (guy@xxxxxxxxxxxx): Add a "failed" return for tap packet routines. This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx> Actions performed: from ba589a4 Move some command-line-oriented routines from wsutil to ui. add 2d41b15 Add a "failed" return for tap packet routines. Summary of changes: doc/README.tapping | 17 +-- .../asn1/ansi_map/packet-ansi_map-template.c | 6 +- epan/dissectors/asn1/camel/packet-camel-template.c | 10 +- .../asn1/gsm_map/packet-gsm_map-template.c | 4 +- epan/dissectors/asn1/h225/packet-h225-template.c | 18 ++-- epan/dissectors/asn1/ldap/packet-ldap-template.c | 10 +- epan/dissectors/packet-afp.c | 6 +- epan/dissectors/packet-ancp.c | 4 +- epan/dissectors/packet-ansi_a.c | 16 +-- epan/dissectors/packet-ansi_map.c | 6 +- epan/dissectors/packet-bacapp.c | 16 +-- epan/dissectors/packet-bluetooth.c | 8 +- epan/dissectors/packet-camel.c | 10 +- epan/dissectors/packet-collectd.c | 6 +- epan/dissectors/packet-dcerpc.c | 14 +-- epan/dissectors/packet-dcm.c | 6 +- epan/dissectors/packet-dhcp.c | 6 +- epan/dissectors/packet-diameter.c | 6 +- epan/dissectors/packet-dns.c | 4 +- epan/dissectors/packet-eth.c | 8 +- epan/dissectors/packet-f5ethtrailer.c | 53 ++++----- epan/dissectors/packet-f5ethtrailer.h | 8 +- epan/dissectors/packet-fc.c | 16 +-- epan/dissectors/packet-fddi.c | 8 +- epan/dissectors/packet-frame.c | 6 +- epan/dissectors/packet-gsm_a_common.c | 30 +++--- epan/dissectors/packet-gsm_map.c | 4 +- epan/dissectors/packet-gsm_osmux.c | 6 +- epan/dissectors/packet-gtp.c | 10 +- epan/dissectors/packet-h225.c | 18 ++-- epan/dissectors/packet-hartip.c | 6 +- epan/dissectors/packet-hpfeeds.c | 4 +- epan/dissectors/packet-http.c | 28 ++--- epan/dissectors/packet-http2.c | 4 +- epan/dissectors/packet-icmp.c | 6 +- epan/dissectors/packet-icmpv6.c | 6 +- epan/dissectors/packet-ieee80211.c | 8 +- epan/dissectors/packet-imf.c | 6 +- epan/dissectors/packet-ip.c | 8 +- epan/dissectors/packet-ipv6.c | 8 +- epan/dissectors/packet-ipx.c | 8 +- epan/dissectors/packet-isup.c | 4 +- epan/dissectors/packet-jxta.c | 8 +- epan/dissectors/packet-lbmc.c | 6 +- epan/dissectors/packet-lbmr.c | 60 +++++------ epan/dissectors/packet-ldap.c | 10 +- epan/dissectors/packet-megaco.c | 8 +- epan/dissectors/packet-mgcp.c | 6 +- epan/dissectors/packet-mtp3.c | 6 +- epan/dissectors/packet-ncp.c | 14 +-- epan/dissectors/packet-radius.c | 6 +- epan/dissectors/packet-rpc.c | 16 +-- epan/dissectors/packet-rsvp.c | 8 +- epan/dissectors/packet-rtsp.c | 4 +- epan/dissectors/packet-sametime.c | 4 +- epan/dissectors/packet-scsi.c | 10 +- epan/dissectors/packet-sctp.c | 8 +- epan/dissectors/packet-sip.c | 6 +- epan/dissectors/packet-sll.c | 8 +- epan/dissectors/packet-smb-sidsnooping.c | 40 +++---- epan/dissectors/packet-smb.c | 12 +-- epan/dissectors/packet-smb2.c | 12 +-- epan/dissectors/packet-smpp.c | 4 +- epan/dissectors/packet-tcp.c | 24 ++--- epan/dissectors/packet-tftp.c | 4 +- epan/dissectors/packet-tls.c | 6 +- epan/dissectors/packet-tr.c | 8 +- epan/dissectors/packet-ucp.c | 4 +- epan/dissectors/packet-udp.c | 8 +- epan/dissectors/packet-usb.c | 8 +- epan/dissectors/packet-wsp.c | 4 +- epan/follow.c | 10 +- epan/follow.h | 10 +- epan/stats_tree.c | 4 +- epan/stats_tree.h | 8 +- epan/stats_tree_priv.h | 2 +- epan/tap.c | 48 ++++++++- epan/tap.h | 11 +- epan/wslua/wslua_listener.c | 11 +- plugins/epan/stats_tree/pinfo_stats_tree.c | 43 ++++---- rawshark.c | 6 +- sharkd_session.c | 25 +++-- ui/cli/tap-camelsrt.c | 10 +- ui/cli/tap-diameter-avp.c | 6 +- ui/cli/tap-expert.c | 10 +- ui/cli/tap-gsm_astat.c | 8 +- ui/cli/tap-httpstat.c | 10 +- ui/cli/tap-icmpstat.c | 14 +-- ui/cli/tap-icmpv6stat.c | 14 +-- ui/cli/tap-iostat.c | 4 +- ui/cli/tap-macltestat.c | 26 ++--- ui/cli/tap-protocolinfo.c | 8 +- ui/cli/tap-protohierstat.c | 10 +- ui/cli/tap-rlcltestat.c | 12 +-- ui/cli/tap-rpcprogs.c | 6 +- ... 53 lines suppressed ...
- Prev by Date: [Wireshark-commits] master ba589a4: Move some command-line-oriented routines from wsutil to ui.
- Next by Date: [Wireshark-commits] master 2f25e04: krb5: fix parsing of PA-S4U-X509-USER in AS-REQ
- Previous by thread: [Wireshark-commits] master ba589a4: Move some command-line-oriented routines from wsutil to ui.
- Next by thread: [Wireshark-commits] master 2f25e04: krb5: fix parsing of PA-S4U-X509-USER in AS-REQ
- Index(es):