Wireshark-commits: [Wireshark-commits] master 9011ad1: wiretap: Add support for Busmaster log file

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 03 Aug 2019 15:46:16 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9011ad10303a99f1d4e6547ee39d33040fdb52d5
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

9011ad1 by Maksim Salau (maksim.salau@xxxxxxxxx):

    wiretap: Add support for Busmaster log file format
    
    Only CAN protocol is supported. Extra information available in J1939
    entries is ignored since the J1939 wireshark dissector works with
    raw CAN frames and makes no use of this extra information.
    The log format may also encapsulate LIN messages which are not
    supported by wireshark and thus are ignored.
    
    The only limitation is that relative timestamp format is not
    supported. If a file defines relative format of timestamps, packets
    are extracted, but timestamps are omitted, since random access deems
    impossible without reparsing the whole file up to the packet of
    interest. In order to support relative timestamps we need to parse
    the whole file at once on open and either dump into a temporary
    PCAP file or keep messages in a private list and provide access
    to them on read()/seek_read().
    
    The change also creates a separate header for CAN frame structure
    definitions which are used by several file readers (candump and
    busmaster for now).
    
    Bug: 15939
    Change-Id: I87c5555e4e5e1b142b9984b24544b2591d494fbc
    Reviewed-on: https://code.wireshark.org/review/34083
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  19488f3   QUIC: add field for the QUIC packet length
     add  9011ad1   wiretap: Add support for Busmaster log file format


Summary of changes:
 wiretap/CMakeLists.txt                  |   4 +
 wiretap/busmaster.c                     | 446 +++++++++++++++++++++++++++++++
 wiretap/{candump.h => busmaster.h}      |  12 +-
 wiretap/busmaster_parser.lemon          | 453 ++++++++++++++++++++++++++++++++
 wiretap/busmaster_priv.h                | 136 ++++++++++
 wiretap/busmaster_scanner.l             | 198 ++++++++++++++
 wiretap/candump_priv.h                  |  22 +-
 wiretap/file_access.c                   |   2 +
 wiretap/{candump_priv.h => socketcan.h} |  68 +----
 9 files changed, 1253 insertions(+), 88 deletions(-)
 create mode 100644 wiretap/busmaster.c
 copy wiretap/{candump.h => busmaster.h} (58%)
 create mode 100644 wiretap/busmaster_parser.lemon
 create mode 100644 wiretap/busmaster_priv.h
 create mode 100644 wiretap/busmaster_scanner.l
 copy wiretap/{candump_priv.h => socketcan.h} (50%)