Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: net/tools/quic/quic_packet_printer_bin.cc

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DCHECK_EQ(ENCRYPTION_NONE, level); 98 DCHECK_EQ(ENCRYPTION_NONE, level);
99 cerr << "OnDecryptedPacket\n"; 99 cerr << "OnDecryptedPacket\n";
100 } 100 }
101 bool OnPacketHeader(const QuicPacketHeader& header) override { 101 bool OnPacketHeader(const QuicPacketHeader& header) override {
102 cerr << "OnPacketHeader\n"; 102 cerr << "OnPacketHeader\n";
103 return true; 103 return true;
104 } 104 }
105 bool OnStreamFrame(const QuicStreamFrame& frame) override { 105 bool OnStreamFrame(const QuicStreamFrame& frame) override {
106 cerr << "OnStreamFrame: " << frame; 106 cerr << "OnStreamFrame: " << frame;
107 cerr << " data: { " 107 cerr << " data: { "
108 << QuicUtils::HexEncode(frame.frame_buffer, frame.frame_length) 108 << QuicUtils::HexEncode(frame.data_buffer, frame.data_length)
109 << " }\n"; 109 << " }\n";
110 return true; 110 return true;
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
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 }
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698