| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // clang-format off | 5 // clang-format off |
| 6 | 6 |
| 7 // Dumps out the decryptable contents of a QUIC packet in a human-readable way. | 7 // Dumps out the decryptable contents of a QUIC packet in a human-readable way. |
| 8 // If the packet is null encrypted, this will dump full packet contents. | 8 // If the packet is null encrypted, this will dump full packet contents. |
| 9 // Otherwise it will dump the public header, and fail with an error that the | 9 // Otherwise it will dump the public header, and fail with an error that the |
| 10 // packet is undecryptable. | 10 // packet is undecryptable. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 bool OnAckFrame(const QuicAckFrame& frame) override { | 112 bool OnAckFrame(const QuicAckFrame& frame) override { |
| 113 cerr << "OnAckFrame: " << frame; | 113 cerr << "OnAckFrame: " << frame; |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| 116 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override { | 116 bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override { |
| 117 cerr << "OnStopWaitingFrame: " << frame; | 117 cerr << "OnStopWaitingFrame: " << frame; |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| 120 bool OnPaddingFrame(const QuicPaddingFrame& frame) override { | 120 bool OnPaddingFrame(const QuicPaddingFrame& frame) override { |
| 121 cerr << "OnPaddingFrame"; | 121 cerr << "OnPaddingFrame: " << frame; |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 bool OnPingFrame(const QuicPingFrame& frame) override { | 124 bool OnPingFrame(const QuicPingFrame& frame) override { |
| 125 cerr << "OnPingFrame\n"; | 125 cerr << "OnPingFrame\n"; |
| 126 return true; | 126 return true; |
| 127 } | 127 } |
| 128 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override { | 128 bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override { |
| 129 cerr << "OnRstStreamFrame: " << frame; | 129 cerr << "OnRstStreamFrame: " << frame; |
| 130 return true; | 130 return true; |
| 131 } | 131 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 if (net::QuicVersionToString(version) == FLAGS_quic_version) { | 192 if (net::QuicVersionToString(version) == FLAGS_quic_version) { |
| 193 framer.set_version(version); | 193 framer.set_version(version); |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 net::QuicPacketPrinter visitor(&framer); | 197 net::QuicPacketPrinter visitor(&framer); |
| 198 framer.set_visitor(&visitor); | 198 framer.set_visitor(&visitor); |
| 199 net::QuicEncryptedPacket encrypted(hex.c_str(), hex.length()); | 199 net::QuicEncryptedPacket encrypted(hex.c_str(), hex.length()); |
| 200 return framer.ProcessPacket(encrypted); | 200 return framer.ProcessPacket(encrypted); |
| 201 } | 201 } |
| OLD | NEW |