URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=40e0e5d282daf3b21bc614a64e4e16e289f65768
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
40e0e5d by Maksim Salau (maksim.salau@xxxxxxxxx):
wiretap: candump: Don't generate a temporary PCAP file
It's preferable to parse text files and generate packets on demand,
rather than generate a temporary PCAP file and dump all available
packets into it.
Parsing on the fly has a benefit of handling damaged files up to the
point of damage, while the approach with a temporary file doesn't
allow either to report that the original file is damaged or perform
conversion in the first place.
This version works faster than the previous one.
Command:
time ./run/tshark -r ./candump-2019-07-01_111120.log.gz > /dev/null
The test file is attached to the bug 15889
The current version:
real 0m0,597s
user 0m0,533s
sys 0m0,118s
The previous version:
real 0m2,176s
user 0m1,966s
sys 0m0,100s
Bug: 15889
Change-Id: I862ce47752531c2e9d9459f5d865c1fc08f32fea
Reviewed-on: https://code.wireshark.org/review/34007
Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from c43bd0d Clean up the handling of the "friendly name".
add 40e0e5d wiretap: candump: Don't generate a temporary PCAP file
Summary of changes:
wiretap/candump.c | 311 +++++++++++++++----------------------------
wiretap/candump_parser.lemon | 55 ++++----
wiretap/candump_priv.h | 9 +-
wiretap/candump_scanner.l | 22 +--
4 files changed, 149 insertions(+), 248 deletions(-)