| 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. |
| 11 // | 11 // |
| 12 // Usage: quic_packet_printer server|client <hex dump of packet> | 12 // Usage: quic_packet_printer server|client <hex dump of packet> |
| 13 // | 13 // |
| 14 // Example input: | 14 // Example input: |
| 15 // quic_packet_printer server 0c6b810308320f24c004a939a38a2e3fd6ca589917f200400 | 15 // quic_packet_printer server 0c6b810308320f24c004a939a38a2e3fd6ca589917f200400 |
| 16 // 201b80b0100501c0700060003023d0000001c00556e656e637279707465642073747265616d2 | 16 // 201b80b0100501c0700060003023d0000001c00556e656e637279707465642073747265616d2 |
| 17 // 064617461207365656e | 17 // 064617461207365656e |
| 18 // | 18 // |
| 19 // Example output: | 19 // Example output: |
| 20 // OnPacket | 20 // OnPacket |
| 21 // OnUnauthenticatedPublicHeader | 21 // OnUnauthenticatedPublicHeader |
| 22 // OnUnauthenticatedHeader: { connection_id: 13845207862000976235, | 22 // OnUnauthenticatedHeader: { connection_id: 13845207862000976235, |
| 23 // connection_id_length:8, packet_number_length:1, multipath_flag: 0, | 23 // connection_id_length:8, packet_number_length:1, multipath_flag: 0, |
| 24 // reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, | 24 // reset_flag: 0, version_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: , |
| 25 // entropy hash: 0, path_id: , packet_number: 4, is_in_fec_group:0, | 25 // packet_number: 4} |
| 26 // fec_group: 0} | |
| 27 // OnDecryptedPacket | 26 // OnDecryptedPacket |
| 28 // OnPacketHeader | 27 // OnPacketHeader |
| 29 // OnAckFrame: entropy_hash: 2 largest_observed: 1 ack_delay_time: 3000 | 28 // OnAckFrame: entropy_hash: 2 largest_observed: 1 ack_delay_time: 3000 |
| 30 // missing_packets: [ ] is_truncated: 0 received_packets: [ 1 at 466016 ] | 29 // missing_packets: [ ] is_truncated: 0 received_packets: [ 1 at 466016 ] |
| 31 // OnStopWaitingFrame | 30 // OnStopWaitingFrame |
| 32 // OnConnectionCloseFrame: error_code { 61 } error_details { Unencrypted stream | 31 // OnConnectionCloseFrame: error_code { 61 } error_details { Unencrypted stream |
| 33 // data seen } | 32 // data seen } |
| 34 | 33 |
| 35 // clang-format on | 34 // clang-format on |
| 36 | 35 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (net::QuicVersionToString(version) == FLAGS_quic_version) { | 192 if (net::QuicVersionToString(version) == FLAGS_quic_version) { |
| 194 framer.set_version(version); | 193 framer.set_version(version); |
| 195 } | 194 } |
| 196 } | 195 } |
| 197 } | 196 } |
| 198 net::QuicPacketPrinter visitor(&framer); | 197 net::QuicPacketPrinter visitor(&framer); |
| 199 framer.set_visitor(&visitor); | 198 framer.set_visitor(&visitor); |
| 200 net::QuicEncryptedPacket encrypted(hex.c_str(), hex.length()); | 199 net::QuicEncryptedPacket encrypted(hex.c_str(), hex.length()); |
| 201 return framer.ProcessPacket(encrypted); | 200 return framer.ProcessPacket(encrypted); |
| 202 } | 201 } |
| OLD | NEW |