Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-commits: [Wireshark-commits] master 7b13a3b: Allow pcapng interface options to be availab

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 20 Mar 2014 09:54:04 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7b13a3b0f6a5617e0e352f87cc5a20afea226aa8
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

7b13a3b by Christopher Kilgour (techie@xxxxxxxxxxxxxxx):

    Allow pcapng interface options to be available to dissectors.
    
    Interface options[1], and more generally pcapng options[2], are useful
    information that can provide improved dissector output.
    
    Prior to this change, only certain pcapng interface options were interpreted
    and made available to dissectors, e.g. the interface name or description.
    This change augments the situation by providing epan_get_interface_option( ),
    which returns an array of byte arrays if the option code exists
    (otherwise NULL).  Each element of the array is a byte buffer containing
    the raw data of the option.  An array-of-buffers is used because pcapng
    allows for multiple instances of the same option to be present in the file.
    All interface options found in a pcapng file are thus made available to the
    dissector.
    
    The implementation also provides infrastructure to collect options from
    other pcapng blocks such as the section header.  Currently these options
    are discarded, but could be retained in the future to support more features.
    
    [1] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionidb
    [2] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionopt
    
    Change-Id: I944b6f0f03dde9b8e7d1348b76acde6f9d312f37
    Reviewed-on: https://code.wireshark.org/review/331
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  f65513291 the entries for file types with magic numbers are 0...heuristic_open_routine_idx-1
    adds  7b13a3b   Allow pcapng interface options to be available to dissectors.


Summary of changes:
 cfile.c          |   23 ++++++++++--
 cfile.h          |    2 ++
 epan/epan-int.h  |    2 ++
 epan/epan.c      |    9 +++++
 epan/epan.h      |    5 +--
 file.c           |    1 +
 wiretap/pcapng.c |  106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 wiretap/wtap.c   |    3 ++
 wiretap/wtap.h   |    1 +
 9 files changed, 148 insertions(+), 4 deletions(-)