aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http2.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-3/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-16HTTP2: Update to draft-16Alexis La Goutte1-3/+3
Also update HTTP Header Compression (to draft-10) No framing change on HTTP2 draft-16 Change-Id: I7f8ffd7ab37bc22fd6fbe156b0bf52543025e3a8 Reviewed-on: https://code.wireshark.org/review/5782 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-15/+15
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-30HTTP2: Update to draft-15Alexis La Goutte1-15/+19
* Add new error code (HTTP_1_1_REQUIRED) * Use hexa value for error code (like the spec) * Add reference to Alt-SVC spec Change-Id: Ifbcb32e97168440cb34f59740871b6c896e90461 Reviewed-on: https://code.wireshark.org/review/4992 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-19packet-http2.c: Do encoding-arg changes (all benign)Bill Meier1-23/+23
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Change-Id: I0885f7d110014cb8a7eba1c1892ed8d0852d076a Reviewed-on: https://code.wireshark.org/review/4187 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19packet-http2.c: Fix a very minor bugBill Meier1-1/+1
- incorrect fetch/display of hf_http2_push_promise_r field Change-Id: Iddf2db4807713017519b5abcbff3ba824b3624c6 Reviewed-on: https://code.wireshark.org/review/4186 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-13http2: C90 doesn't permit anonymous structs or unionsEvan Huus1-13/+13
Change-Id: I88d048e4012109957a0b5e7a2480faed9fbe9cc4 Reviewed-on: https://code.wireshark.org/review/3565 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-13http2: Add additional header decoding informationTatsuhiro Tsujikawa1-11/+250
This patch adds additional header decoding information, such as header encoding representation, including header table size update (HPACK draft-09, section 7). Previously when user clicks the decoded header info, it highlights wrong byte sequence in compressed pane. This patch fixes this and now clicking header will highlight the byte sequence it was decoded from. Change-Id: I611a34edef31640c59a1f8bbc26db1c42eb16ce2 Reviewed-on: https://code.wireshark.org/review/3407 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-03http2: Update to h2-14Tatsuhiro Tsujikawa1-49/+80
* Expand frame length field to 24 bits * Add new SETTINGS: - SETTINGS_MAX_FRAME_SIZE - SETTINGS_MAX_HEADER_LIST_SIZE * Update libnghttp2 HPACK * Remove END_SEGMENT flag Change-Id: I5906322ad5a4d61c963ed95fada9415e66e146da Reviewed-on: https://code.wireshark.org/review/3357 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-03HTTP2: Add a preference to enable/disable HTTP2 (weak) heuristicsAlexis La Goutte1-0/+24
By default, the heuristic is disabled Change-Id: I26ef23e8b153576a4fabd2e3324e830756e64bb7 Ping-Bug:10335 Ping-Bug:10310 Reviewed-on: https://code.wireshark.org/review/3350 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-16Fix assertion error when no header field was decompressedTatsuhiro Tsujikawa1-0/+4
bug: 10279 Change-Id: Ibf88b1622318692ccf3904aede5d964e6028bdc7 Reviewed-on: https://code.wireshark.org/review/3087 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09Moved nghttp2 to epanGraham Bloice1-1/+1
Cleaned up nghttp2 build Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d Reviewed-on: https://code.wireshark.org/review/2937 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08Enhance HTTP/2 HPACK header decompression handlingTatsuhiro Tsujikawa1-111/+255
Previously we just call HPACK decompressor when dessecting packets. This is fine for the first linear scan. But later same packet may be dissected more than once and their header block data will be fed into decompressor again. This makes header compression context out-of-sync because HPACK decompressor only works when data is fed linearly. This change fixes this issue by caching decompressed headers in the first linear scan. On random packet dissecting, they are just looked up. This change adds support of changing header table size by inspecting SETTINGS frame and tracking its SETTINGS ACK. Change-Id: I9c75c67f8677063e443f9b131740f3ee94ff8a63 Reviewed-on: https://code.wireshark.org/review/2616 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08Dissect HTTP/2 draft-13Tatsuhiro Tsujikawa1-91/+57
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@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-1/+1
Hopefully that name makes it clear what the routiner's purpose is, and will encourage people to use it rather than using dissector_add_uint() with a bogus integer value. Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8 Reviewed-on: https://code.wireshark.org/review/2483 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-02HTTP2 : Max value for type is now 0x0B (BLOCKED type), update the heuristicAlexis La Goutte1-2/+2
Change-Id: I8de7b63ca90803f8fc6333bbe43aeb94459e6363 Reviewed-on: https://code.wireshark.org/review/1918 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-31HTTP2: try to please OSX 10.6 x64 buildbotPascal Quantin1-8/+9
Change-Id: I79e7a619b5dadb68b70f8b057494cc970a655cc7 Reviewed-on: https://code.wireshark.org/review/1903 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-31HTTP2: Showing decompressed headersAlexis La Goutte1-8/+274
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@gmail.com> Signed-off-by: Pascal Quantin <pascal.quantin@gmail.com> Change-Id: Idb4dd4b0a200924820cb0b34db664cc37518168d Reviewed-on: https://code.wireshark.org/review/1527 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-13HTTP2 enhance display when priority flag is setAlexis La Goutte1-3/+16
* Add bitmask and fix length for exclusive flag * Add missing bitmask for stream dependency * Add fielder with calcultated weight value (weight+1, see spec for more information) Change-Id: I7a6e97be068a80caa7355f593d9497c431c681ed Reviewed-on: https://code.wireshark.org/review/1625 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-13Enhance HTTP2 dissectorAlexis La Goutte1-21/+78
* Add missing padding for CONTINUATION frame * Add filter for generated padding length * add unused flags Change-Id: I98ff759595d3018f11b6d3ec9ea298e92e032d73 Reviewed-on: https://code.wireshark.org/review/1604 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28tvb_reported_length_remaining() returns gintEvan Huus1-3/+3
not size_t, which was giving 64/32 conversion errors on some platforms Change-Id: Idf81dc98f8921a92840731d742d6e46a40e1387f Reviewed-on: https://code.wireshark.org/review/1405 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-27packet-http2: updated to http2 draft-12Daniel Stenberg1-192/+377
From Alexis La Goutte Fix warning found by pre-commit Partial-Bug: 10054 Change-Id: I976884a240a55bb2287a802d72668a2c845179c0 Reviewed-on: https://code.wireshark.org/review/1295 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-23correct http2 detectionMartin Kaiser1-3/+6
check the input tvb's length before doing tvb_get_guint8(tvb,2) reject a short packet, don't throw an exception svn path=/trunk/; revision=54376
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-12-15Upgrade to HTTP2 draft-09Alexis La Goutte1-26/+76
Add HTTP2 to Decode as svn path=/trunk/; revision=54131
2013-12-04Add also heuristic for HTTPAlexis La Goutte1-0/+1
svn path=/trunk/; revision=53781
2013-11-29Add HTTP2 heuristic when it is encapsulated in SSLAlexis La Goutte1-1/+14
the heuristic may be leak (only check if type > 10...) svn path=/trunk/; revision=53638
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-6/+6
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-08-30From me and Stephen Ludin via ↵Alexis La Goutte1-0/+867
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9042 Add HTTP2 Dissector Based on draft-ietf-httpbis-http2-06 TODO : * Support HTTP Header Compression (draft-ietf-httpbis-header-compression) * Enhance display of Data * Reassembling of continuation frame (and other frame) * Add same tap and ping/pong time response svn path=/trunk/; revision=51591