| Index: net/quic/quic_protocol.cc
|
| diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
|
| index c3259ff7996d139396f82b36deee7ece6cafd0b9..612cd8b196dfc760b854969545ef379d386a9c3b 100644
|
| --- a/net/quic/quic_protocol.cc
|
| +++ b/net/quic/quic_protocol.cc
|
| @@ -268,28 +268,29 @@ ostream& operator<<(ostream& os, const Perspective& s) {
|
|
|
| ostream& operator<<(ostream& os, const QuicPacketHeader& header) {
|
| os << "{ connection_id: " << header.public_header.connection_id
|
| - << ", connection_id_length:" << header.public_header.connection_id_length
|
| - << ", packet_number_length:" << header.public_header.packet_number_length
|
| + << ", connection_id_length: " << header.public_header.connection_id_length
|
| + << ", packet_number_length: " << header.public_header.packet_number_length
|
| << ", multipath_flag: " << header.public_header.multipath_flag
|
| << ", reset_flag: " << header.public_header.reset_flag
|
| << ", version_flag: " << header.public_header.version_flag;
|
| if (header.public_header.version_flag) {
|
| - os << " version: ";
|
| + os << ", version:";
|
| for (size_t i = 0; i < header.public_header.versions.size(); ++i) {
|
| - os << header.public_header.versions[i] << " ";
|
| + os << " ";
|
| + os << header.public_header.versions[i];
|
| }
|
| }
|
| if (header.public_header.nonce != nullptr) {
|
| os << ", diversification_nonce: "
|
| - << QuicUtils::HexEncode(*header.public_header.nonce);
|
| + << net::QuicUtils::HexDecode(*header.public_header.nonce);
|
| }
|
| os << ", fec_flag: " << header.fec_flag
|
| << ", entropy_flag: " << header.entropy_flag
|
| << ", entropy hash: " << static_cast<int>(header.entropy_hash)
|
| - << ", path_id: " << header.path_id
|
| + << ", path_id: " << static_cast<int>(header.path_id)
|
| << ", packet_number: " << header.packet_number
|
| - << ", is_in_fec_group:" << header.is_in_fec_group
|
| - << ", fec_group: " << header.fec_group << "}\n";
|
| + << ", is_in_fec_group: " << header.is_in_fec_group
|
| + << ", fec_group: " << header.fec_group << " }\n";
|
| return os;
|
| }
|
|
|
| @@ -377,8 +378,8 @@ QuicFrame::QuicFrame(QuicPathCloseFrame* frame)
|
| : type(PATH_CLOSE_FRAME), path_close_frame(frame) {}
|
|
|
| ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) {
|
| - os << "entropy_hash: " << static_cast<int>(sent_info.entropy_hash)
|
| - << " least_unacked: " << sent_info.least_unacked << "\n";
|
| + os << "{ entropy_hash: " << static_cast<int>(sent_info.entropy_hash)
|
| + << ", least_unacked: " << sent_info.least_unacked << " }\n";
|
| return os;
|
| }
|
|
|
| @@ -560,24 +561,24 @@ ostream& operator<<(ostream& os, const PacketNumberQueue& q) {
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
|
| - os << "entropy_hash: " << static_cast<int>(ack_frame.entropy_hash)
|
| - << " largest_observed: " << ack_frame.largest_observed
|
| - << " ack_delay_time: " << ack_frame.ack_delay_time.ToMicroseconds()
|
| - << " packets: [ " << ack_frame.packets
|
| - << " ] is_truncated: " << ack_frame.is_truncated
|
| - << " received_packets: [ ";
|
| + os << "{ entropy_hash: " << static_cast<int>(ack_frame.entropy_hash)
|
| + << ", largest_observed: " << ack_frame.largest_observed
|
| + << ", ack_delay_time: " << ack_frame.ack_delay_time.ToMicroseconds()
|
| + << ", packets: [ " << ack_frame.packets << " ]"
|
| + << ", is_truncated: " << ack_frame.is_truncated
|
| + << ", received_packets: [ ";
|
| for (const std::pair<QuicPacketNumber, QuicTime>& p :
|
| ack_frame.received_packet_times) {
|
| os << p.first << " at " << p.second.ToDebuggingValue() << " ";
|
| }
|
| - os << " ]\n";
|
| + os << " ] }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicFrame& frame) {
|
| switch (frame.type) {
|
| case PADDING_FRAME: {
|
| - os << "type { PADDING_FRAME } ";
|
| + os << "type { PADDING_FRAME } " << frame.padding_frame;
|
| break;
|
| }
|
| case RST_STREAM_FRAME: {
|
| @@ -633,48 +634,52 @@ ostream& operator<<(ostream& os, const QuicFrame& frame) {
|
| return os;
|
| }
|
|
|
| +ostream& operator<<(ostream& os, const QuicPaddingFrame& padding_frame) {
|
| + os << "{ num_padding_bytes: " << padding_frame.num_padding_bytes << " }\n";
|
| + return os;
|
| +}
|
| +
|
| ostream& operator<<(ostream& os, const QuicRstStreamFrame& rst_frame) {
|
| - os << "stream_id { " << rst_frame.stream_id << " } "
|
| - << "error_code { " << rst_frame.error_code << " }\n";
|
| + os << "{ stream_id: " << rst_frame.stream_id
|
| + << ", error_code: " << rst_frame.error_code << " }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os,
|
| const QuicConnectionCloseFrame& connection_close_frame) {
|
| - os << "error_code { " << connection_close_frame.error_code << " } "
|
| - << "error_details { " << connection_close_frame.error_details << " }\n";
|
| + os << "{ error_code: " << connection_close_frame.error_code
|
| + << ", error_details: '" << connection_close_frame.error_details << "' }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicGoAwayFrame& goaway_frame) {
|
| - os << "error_code { " << goaway_frame.error_code << " } "
|
| - << "last_good_stream_id { " << goaway_frame.last_good_stream_id << " } "
|
| - << "reason_phrase { " << goaway_frame.reason_phrase << " }\n";
|
| + os << "{ error_code: " << goaway_frame.error_code
|
| + << ", last_good_stream_id: " << goaway_frame.last_good_stream_id
|
| + << ", reason_phrase: '" << goaway_frame.reason_phrase << "' }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os,
|
| const QuicWindowUpdateFrame& window_update_frame) {
|
| - os << "stream_id { " << window_update_frame.stream_id << " } "
|
| - << "byte_offset { " << window_update_frame.byte_offset << " }\n";
|
| + os << "{ stream_id: " << window_update_frame.stream_id
|
| + << ", byte_offset: " << window_update_frame.byte_offset << " }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicBlockedFrame& blocked_frame) {
|
| - os << "stream_id { " << blocked_frame.stream_id << " }\n";
|
| + os << "{ stream_id: " << blocked_frame.stream_id << " }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicPathCloseFrame& path_close_frame) {
|
| - os << "path_id { " << path_close_frame.path_id << " }\n";
|
| + os << "{ path_id: " << static_cast<int>(path_close_frame.path_id) << " }\n";
|
| return os;
|
| }
|
|
|
| ostream& operator<<(ostream& os, const QuicStreamFrame& stream_frame) {
|
| - os << "stream_id { " << stream_frame.stream_id << " } "
|
| - << "fin { " << stream_frame.fin << " } "
|
| - << "offset { " << stream_frame.offset << " } "
|
| - << "length { " << stream_frame.data_length << " }\n";
|
| + os << "{ stream_id: " << stream_frame.stream_id
|
| + << ", fin: " << stream_frame.fin << ", offset: " << stream_frame.offset
|
| + << ", length: " << stream_frame.data_length << " }\n";
|
| return os;
|
| }
|
|
|
|
|