Wireshark-commits: [Wireshark-commits] master-1.12 2310c43: Allow wtap_read() and wtap_seek_read()
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 24 May 2014 19:13:15 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2310c4322161351d0fe2e96414369afae9c0a9a6
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

2310c43 by Guy Harris (guy@xxxxxxxxxxxx):

    Allow wtap_read() and wtap_seek_read() to return records other than packets.
    
    Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
    REC_TYPE_PACKET, for a record containing a packet, or
    REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific
    data.
    
    Modify code that reads packets to be able to handle non-packet records,
    even if that just means ignoring them.
    
    Rename some routines to indicate that they handle more than just
    packets.
    
    We don't yet have any libwiretap code that supplies records other than
    REC_TYPE_PACKET or that supporting writing records other than
    REC_TYPE_PACKET, or any code to support plugins for handling
    REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug
    8590.
    
    Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813
    Reviewed-on: https://code.wireshark.org/review/1773
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 6db77b000fe58173eeed23b91b32c92c681feda2)
    Reviewed-on: https://code.wireshark.org/review/1774
    

Actions performed:

    from  95a057a   Fix some whitespace issues.
    adds  2310c43   Allow wtap_read() and wtap_seek_read() to return records other than packets.


Summary of changes:
 capinfos.c                    |   40 +++++++++++++-------------
 editcap.c                     |    4 +++
 epan/epan.c                   |    4 +--
 epan/packet.c                 |    6 +++-
 epan/packet.h                 |    4 +--
 epan/wslua/make-init-lua.pl   |   10 +++++++
 epan/wslua/template-init.lua  |    3 ++
 epan/wslua/wslua_dumper.c     |    5 ++++
 epan/wslua/wslua_file.c       |   19 ++++++++++---
 file.c                        |   63 +++++++++++++++++++++--------------------
 file.h                        |   28 +++++++++---------
 proto_hier_stats.c            |   20 ++++++-------
 randpkt.c                     |    1 +
 test/lua/acme_file.lua        |    1 +
 test/lua/pcap_file.lua        |    6 ++--
 ui/gtk/capture_file_dlg.c     |    6 ++--
 ui/gtk/iax2_analysis.c        |   12 ++++----
 ui/gtk/main.c                 |    6 ++--
 ui/gtk/packet_list_store.c    |    6 ++--
 ui/gtk/packet_win.c           |    6 ++--
 ui/gtk/rlc_lte_graph.c        |    6 ++--
 ui/gtk/rtp_analysis.c         |   12 ++++----
 ui/gtk/sctp_assoc_analyse.c   |   14 ++++-----
 ui/qt/main_window.cpp         |    6 ++--
 ui/qt/packet_list.cpp         |    4 +--
 ui/qt/packet_list_model.cpp   |    6 ++--
 ui/tap-tcp-stream.c           |    6 ++--
 ui/tap_export_pdu.c           |    1 +
 ui/text_import.c              |    1 +
 wiretap/5views.c              |    7 +++++
 wiretap/aethra.c              |    1 +
 wiretap/ber.c                 |    1 +
 wiretap/btsnoop.c             |   13 +++++++++
 wiretap/camins.c              |    1 +
 wiretap/catapult_dct2000.c    |    7 +++++
 wiretap/commview.c            |    7 +++++
 wiretap/cosine.c              |    1 +
 wiretap/csids.c               |    1 +
 wiretap/daintree-sna.c        |    1 +
 wiretap/dbs-etherwatch.c      |    1 +
 wiretap/dct3trace.c           |    1 +
 wiretap/erf.c                 |    7 +++++
 wiretap/eyesdn.c              |    7 +++++
 wiretap/hcidump.c             |    1 +
 wiretap/i4btrace.c            |    1 +
 wiretap/ipfix.c               |    1 +
 wiretap/iptrace.c             |    2 ++
 wiretap/iseries.c             |    1 +
 wiretap/k12.c                 |    7 +++++
 wiretap/k12text.l             |    1 +
 wiretap/lanalyzer.c           |    9 +++++-
 wiretap/libpcap.c             |    7 +++++
 wiretap/logcat.c              |   13 +++++++++
 wiretap/mime_file.c           |    1 +
 wiretap/mp2t.c                |    2 ++
 wiretap/mpeg.c                |    2 ++
 wiretap/netmon.c              |    8 ++++++
 wiretap/netscaler.c           |   16 ++++++++++-
 wiretap/netscreen.c           |    1 +
 wiretap/nettl.c               |    9 +++++-
 wiretap/network_instruments.c |    7 +++++
 wiretap/netxray.c             |   13 +++++++++
 wiretap/ngsniffer.c           |    7 +++++
 wiretap/packetlogger.c        |    1 +
 wiretap/pcapng.c              |    8 ++++++
 wiretap/peekclassic.c         |    2 ++
 wiretap/peektagged.c          |    1 +
 wiretap/pppdump.c             |    3 +-
 wiretap/radcom.c              |    1 +
 wiretap/snoop.c               |    7 +++++
 wiretap/stanag4607.c          |    2 ++
 wiretap/tnef.c                |    1 +
 wiretap/toshiba.c             |    1 +
 wiretap/visual.c              |    7 +++++
 wiretap/vms.c                 |    1 +
 wiretap/vwr.c                 |    3 ++
 wiretap/wtap.c                |    4 ++-
 wiretap/wtap.h                |   16 +++++++++++
 78 files changed, 390 insertions(+), 139 deletions(-)