Wireshark-commits: [Wireshark-commits] master 1e80803: Support reading mixed-byte-order pcapng file
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 30 Apr 2020 08:02:22 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1e80803aa13bdcc6fde86e7f3a25dcd8c6d25fa9
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

1e80803 by Guy Harris (guy@xxxxxxxxxxxx):

    Support reading mixed-byte-order pcapng files.
    
    Move the byte order - and version - fields out of the per-file pcapng_t
    structure and put them in a per-section section_info_t structure that
    also contains the file offset of the SHB at the beginning of the
    section.
    
    Have a GArray of section_info_t structures pointed to by the pcapng_t
    structure; update it as Section Header Blocks are read sequentially,
    adding new structures.
    
    In the random read routine, search backwards through the array of
    section_info_t structures, looking for the first section where the SHB
    is at or before the offset from which we're reading.
    
    Change-Id: Iad06c8d1ff10595707b73f297f073803b5a0c8e5
    Ping-Bug: 15707
    Reviewed-on: https://code.wireshark.org/review/36981
    Petri-Dish: Guy Harris <gharris@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    

Actions performed:

    from  61d923d   bison/flex: comment why we ignore deprecated directive warning.
     add  1e80803   Support reading mixed-byte-order pcapng files.


Summary of changes:
 wiretap/pcapng.c | 267 +++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 192 insertions(+), 75 deletions(-)