Wireshark-commits: [Wireshark-commits] master 6d2ea73: Implement Export PDU for tshark

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 3 May 2016 10:18:26 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6d2ea733ddedf9850883a2dbec43069b92e129bf
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

6d2ea73 by AndersBroman (anders.broman@xxxxxxxxxxxx):

    Implement Export PDU for tshark
    
    This patch introduces the "-U tap_name[,filter]" tshark option and
    is similar to the "Export PDUs as file" option in Wireshark.
    
    Wireshark implements this feature by reopening a capture file, applying
    a tap and finally opening the temporary file. Since tshark knows
    in advance that a PDU export is needed, it can optimize by not creating
    the temporary file and perform the export at the first opportunity.
    
    This patch splits the opening/tapping functionality from error reporting
    since tshark does not need a temp file and has no dialogs.
    
    The capture file comment is now specified explicitly as there is no
    "current file" anymore if the tap is running without active file.
    
    TODO:
    
     - Review whether it is acceptable to overwrite save_file in tshark.
     - Add documentation (tshark manpage).
    
    Bug: 3444
    Change-Id: Ie159495d42c32c2ba7400f2991b7b8185b3fda09
    Reviewed-on: https://code.wireshark.org/review/5890
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  1489c9e   Decode OUI as Ethernet Vendor ID.
    adds  6d2ea73   Implement Export PDU for tshark


Summary of changes:
 tshark.c                    |   76 ++++++++++++++++++++++++++++-
 ui/CMakeLists.txt           |    1 +
 ui/Makefile.common          |    2 +
 ui/export_pdu_ui_utils.c    |  112 +++++++++++++++++++++++++++++++++++++++++++
 ui/export_pdu_ui_utils.h    |   43 +++++++++++++++++
 ui/gtk/export_pdu_dlg.c     |    1 +
 ui/qt/export_pdu_dialog.cpp |    1 +
 ui/tap_export_pdu.c         |   87 +++++++++++----------------------
 ui/tap_export_pdu.h         |   24 +++++++++-
 9 files changed, 286 insertions(+), 61 deletions(-)
 create mode 100644 ui/export_pdu_ui_utils.c
 create mode 100644 ui/export_pdu_ui_utils.h