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-1.12 feabf6e: HTTP2: Backport to 1.12 * Add HPACK dec

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 11 Jul 2014 09:01:17 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=feabf6e05fbe63481fd91a49e94588d3718a1090
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

feabf6e by Alexis La Goutte (alexis.lagoutte@xxxxxxxxx):

    HTTP2: Backport to 1.12
    * Add HPACK decompression (add lib nghttp2)
    * Update to draft-13
    
    HTTP2: Showing decompressed headers
    
    Decode the HTTP/2 header block using nghttp2 HPACK decoder
    
    In this patch, We use nghttp2 HPACK decoder to decompress HTTP/2 header
    block.  To make HPACK decompressor work, we need to track down HTTP/2
    connection from the beginning.  If we see the HTTP/2 magic (connection
    preface), we initialize HPACK decompressor objects.  We actually use 2
    HPACK decompressor for both client and server.  HPACK decompressor
    objects are stored in hash tables using TCP stream index as a key.
    
    Most code by: Tatsuhiro Tsujikawa
    
    Signed-off-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Signed-off-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    
    Change-Id: Idb4dd4b0a200924820cb0b34db664cc37518168d
    Reviewed-on: https://code.wireshark.org/review/1527
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    
    Add nghttp2 lib (HPACK)
    
    Change-Id: I2a361951924045035a2a5d38f943e6b97c170f36
    Reviewed-on: https://code.wireshark.org/review/1623
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    
    NGHTTP2: fix typo (nghttp2_ent.h => nghttp2_net.h)
    
    Change-Id: I52d3c40794841614d55e88c9fe9cf2de43a0fa46
    Reviewed-on: https://code.wireshark.org/review/1897
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    
    NGHTTP2: fix -Wshadow about index with some old GCC release or Mac OS X buildbot
    
    (No problem with gcc-4.7 or gcc-4.8)
    
    Change-Id: Iae1f801abeb80429c08e93668133a9c5ac7977ef
    Reviewed-on: https://code.wireshark.org/review/1898
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    
    nghttp2: upgrade library to g4f7223e and add casts to please buildbots
    
    Change-Id: Ic412d4bfc56695cbcab709d42a6f31aa9e50c64e
    Reviewed-on: https://code.wireshark.org/review/1900
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    
    Fix /home/jmayer/work/wireshark/git/wsutil/nghttp2/nghttp2_hd.c:996:12: error: ‘check_index_range’ defined but not used [-Werror=unused-function]
     static int check_index_range(nghttp2_hd_context *context, size_t idx)
                ^
    cc1: all warnings being treated as errors
    
    Change-Id: Ie8e3fe12d339a689e0222eda501b253a7d6d923c
    Reviewed-on: https://code.wireshark.org/review/1912
    Reviewed-by: Jörg Mayer <jmayer@xxxxxxxxx>
    
    HTTP2: try to please OSX 10.6 x64 buildbot
    
    Change-Id: I79e7a619b5dadb68b70f8b057494cc970a655cc7
    Reviewed-on: https://code.wireshark.org/review/1903
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    
    Make this comple whether assertions are enabled or not.
    
    Make the check for a valid index range a macro, so the compiler doesn't
    whine if it's not used, but it's available if it *is* used.
    
    Change-Id: I3cee0460eacef23187c141458dc5ac7a7acbf7c8
    Reviewed-on: https://code.wireshark.org/review/1914
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    
    HTTP2 : Max value for type is now 0x0B (BLOCKED type), update the heuristic
    
    Change-Id: I8de7b63ca90803f8fc6333bbe43aeb94459e6363
    Reviewed-on: https://code.wireshark.org/review/1918
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    
    Dissect HTTP/2 draft-13
    
    Summary of changes since draft-12:
    
    * Pad High and Pad Low wereare replaced with single Pad Length field.
    * Padding was removed from CONTINUATION frame.
    * ALTSVC and BLOCKED frames were removed.
    * Per-frame compression and its associated SETTINGS flag were removed.
    * HPACK Huffman code table and static header table were updated.
    
    Change-Id: I9c4f05f8cd937bfadbb1b912f2b9ffb31e9c18d5
    Reviewed-on: https://code.wireshark.org/review/2615
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    
    Update libnghttp2 to latest master (add support for draft-13)
    
    Bug:10256
    Change-Id: I24275f1b67120f69cfd673f7e5598a50b3c7566f
    Reviewed-on: https://code.wireshark.org/review/2145
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    
    Moved nghttp2 to epan
    
    Cleaned up nghttp2 build
    
    Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
    Reviewed-on: https://code.wireshark.org/review/2937
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Tested-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-on: https://code.wireshark.org/review/2953
    

Actions performed:

    from  0ab474c   Avoid sign-extending bytes before handing them to <ctype.h> macros.
    adds  feabf6e   HTTP2: Backport to 1.12 * Add HPACK decompression (add lib nghttp2) * Update to draft-13


Summary of changes:
 configure.ac                            |    1 +
 epan/CMakeLists.txt                     |   20 +-
 epan/Makefile.am                        |    6 +-
 epan/Makefile.nmake                     |   24 +-
 epan/dissectors/packet-http2.c          |  579 +++-
 epan/{wmem => nghttp2}/Makefile.am      |   29 +-
 epan/{crypt => nghttp2}/Makefile.common |   46 +-
 epan/nghttp2/Makefile.nmake             |   44 +
 epan/nghttp2/README.nghttp2             |   30 +
 epan/nghttp2/nghttp2.h                  | 3068 ++++++++++++++++++
 epan/nghttp2/nghttp2_buf.c              |  476 +++
 epan/nghttp2/nghttp2_buf.h              |  371 +++
 epan/nghttp2/nghttp2_hd.c               | 2072 +++++++++++++
 epan/nghttp2/nghttp2_hd.h               |  353 +++
 epan/nghttp2/nghttp2_hd_huffman.c       |  207 ++
 epan/nghttp2/nghttp2_hd_huffman.h       |   74 +
 epan/nghttp2/nghttp2_hd_huffman_data.c  | 5152 +++++++++++++++++++++++++++++++
 epan/nghttp2/nghttp2_helper.c           |  409 +++
 epan/nghttp2/nghttp2_helper.h           |  134 +
 epan/nghttp2/nghttp2_int.h              |   50 +
 epan/nghttp2/nghttp2_net.h              |   44 +
 epan/nghttp2/nghttp2ver.h               |   42 +
 22 files changed, 13081 insertions(+), 150 deletions(-)
 copy epan/{wmem => nghttp2}/Makefile.am (76%)
 copy epan/{crypt => nghttp2}/Makefile.common (63%)
 create mode 100644 epan/nghttp2/Makefile.nmake
 create mode 100644 epan/nghttp2/README.nghttp2
 create mode 100644 epan/nghttp2/nghttp2.h
 create mode 100644 epan/nghttp2/nghttp2_buf.c
 create mode 100644 epan/nghttp2/nghttp2_buf.h
 create mode 100644 epan/nghttp2/nghttp2_hd.c
 create mode 100644 epan/nghttp2/nghttp2_hd.h
 create mode 100644 epan/nghttp2/nghttp2_hd_huffman.c
 create mode 100644 epan/nghttp2/nghttp2_hd_huffman.h
 create mode 100644 epan/nghttp2/nghttp2_hd_huffman_data.c
 create mode 100644 epan/nghttp2/nghttp2_helper.c
 create mode 100644 epan/nghttp2/nghttp2_helper.h
 create mode 100644 epan/nghttp2/nghttp2_int.h
 create mode 100644 epan/nghttp2/nghttp2_net.h
 create mode 100644 epan/nghttp2/nghttp2ver.h