wireshark/wsutil/nghttp2
Alexis La Goutte 3686713e7c 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@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-05 07:11:21 +00:00
..
nghttp2 Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
Makefile.am
Makefile.common NGHTTP2: Add missing nghttp2_int.h (need by make dist...) 2014-05-31 14:53:57 +00:00
Makefile.nmake
nghttp2_buf.c Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_buf.h
nghttp2_hd.c Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_hd.h Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_hd_huffman.c Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_hd_huffman.h Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_hd_huffman_data.c Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_helper.c
nghttp2_helper.h Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00
nghttp2_int.h
nghttp2_net.h
README.nghttp2 Update libnghttp2 to latest master (add support for draft-13) 2014-07-05 07:11:21 +00:00

Code from nghttp2 library ( https://github.com/tatsuhiro-t/nghttp2)
Thanks for Tatsuhiro Tsujikawa for permission to use nghttp2 lib.

Update library from source

download (clone) last release of nghttp2
and in folder wsutil/nghttp2 copy following file

cp ../../../nghttp2/lib/nghttp2_buf.[ch] .
cp ../../../nghttp2/lib/nghttp2_hd*.[ch] .
cp ../../../nghttp2/lib/nghttp2_helper.[ch] .
cp ../../../nghttp2/lib/nghttp2_int.h .
cp ../../../nghttp2/lib/nghttp2_net.h .
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2.h nghttp2/
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2ver.h nghttp2/

Change path to nghttp2.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2.h>/<wsutil\/nghttp2\/nghttp2\/nghttp2.h>/g'  {} \;

Change path to nghttp2ver.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2ver.h>/<wsutil\/nghttp2\/nghttp2\/nghttp2ver.h>/g'  {} \;

Fix c++-compat error

in nghttp2/nghttp2_helper.h remove check for CONFIG.H

in nghttp2/nghttp2/nghttp2.h

Add on the top
#include "ws_symbol_export.h"
#include "config.h"

Replace

#include <stdint.h>

By

#ifdef __WIN32__

typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#else
#include <stdint.h>
#endif

and export (WS_DLL_PUBLIC) following function :
nghttp2_hd_inflate_new
nghttp2_hd_inflate_del
nghttp2_hd_inflate_change_table_size
nghttp2_hd_inflate_hd
nghttp2_hd_inflate_end_headers