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 #include "net/quic/core/quic_protocol.h" | 5 #include "net/quic/core/quic_protocol.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 QuicPacketPublicHeader::QuicPacketPublicHeader( | 72 QuicPacketPublicHeader::QuicPacketPublicHeader( |
73 const QuicPacketPublicHeader& other) = default; | 73 const QuicPacketPublicHeader& other) = default; |
74 | 74 |
75 QuicPacketPublicHeader::~QuicPacketPublicHeader() {} | 75 QuicPacketPublicHeader::~QuicPacketPublicHeader() {} |
76 | 76 |
77 QuicPacketHeader::QuicPacketHeader() | 77 QuicPacketHeader::QuicPacketHeader() |
78 : packet_number(0), | 78 : packet_number(0), |
79 path_id(kDefaultPathId), | 79 path_id(kDefaultPathId), |
80 entropy_flag(false), | 80 entropy_flag(false), |
81 entropy_hash(0), | 81 entropy_hash(0) {} |
82 fec_flag(false) {} | |
83 | 82 |
84 QuicPacketHeader::QuicPacketHeader(const QuicPacketPublicHeader& header) | 83 QuicPacketHeader::QuicPacketHeader(const QuicPacketPublicHeader& header) |
85 : public_header(header), | 84 : public_header(header), |
86 packet_number(0), | 85 packet_number(0), |
87 path_id(kDefaultPathId), | 86 path_id(kDefaultPathId), |
88 entropy_flag(false), | 87 entropy_flag(false), |
89 entropy_hash(0), | 88 entropy_hash(0) {} |
90 fec_flag(false) {} | |
91 | 89 |
92 QuicPacketHeader::QuicPacketHeader(const QuicPacketHeader& other) = default; | 90 QuicPacketHeader::QuicPacketHeader(const QuicPacketHeader& other) = default; |
93 | 91 |
94 QuicPublicResetPacket::QuicPublicResetPacket() | 92 QuicPublicResetPacket::QuicPublicResetPacket() |
95 : nonce_proof(0), rejected_packet_number(0) {} | 93 : nonce_proof(0), rejected_packet_number(0) {} |
96 | 94 |
97 QuicPublicResetPacket::QuicPublicResetPacket( | 95 QuicPublicResetPacket::QuicPublicResetPacket( |
98 const QuicPacketPublicHeader& header) | 96 const QuicPacketPublicHeader& header) |
99 : public_header(header), nonce_proof(0), rejected_packet_number(0) {} | 97 : public_header(header), nonce_proof(0), rejected_packet_number(0) {} |
100 | 98 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 for (size_t i = 0; i < header.public_header.versions.size(); ++i) { | 295 for (size_t i = 0; i < header.public_header.versions.size(); ++i) { |
298 os << " "; | 296 os << " "; |
299 os << QuicVersionToString(header.public_header.versions[i]); | 297 os << QuicVersionToString(header.public_header.versions[i]); |
300 } | 298 } |
301 } | 299 } |
302 if (header.public_header.nonce != nullptr) { | 300 if (header.public_header.nonce != nullptr) { |
303 os << ", diversification_nonce: " | 301 os << ", diversification_nonce: " |
304 << QuicUtils::HexEncode(StringPiece(header.public_header.nonce->data(), | 302 << QuicUtils::HexEncode(StringPiece(header.public_header.nonce->data(), |
305 header.public_header.nonce->size())); | 303 header.public_header.nonce->size())); |
306 } | 304 } |
307 os << ", fec_flag: " << header.fec_flag | 305 os << ", entropy_flag: " << header.entropy_flag |
308 << ", entropy_flag: " << header.entropy_flag | |
309 << ", entropy hash: " << static_cast<int>(header.entropy_hash) | 306 << ", entropy hash: " << static_cast<int>(header.entropy_hash) |
310 << ", path_id: " << static_cast<int>(header.path_id) | 307 << ", path_id: " << static_cast<int>(header.path_id) |
311 << ", packet_number: " << header.packet_number << " }\n"; | 308 << ", packet_number: " << header.packet_number << " }\n"; |
312 return os; | 309 return os; |
313 } | 310 } |
314 | 311 |
315 bool IsAwaitingPacket(const QuicAckFrame& ack_frame, | 312 bool IsAwaitingPacket(const QuicAckFrame& ack_frame, |
316 QuicPacketNumber packet_number, | 313 QuicPacketNumber packet_number, |
317 QuicPacketNumber peer_least_packet_awaiting_ack) { | 314 QuicPacketNumber peer_least_packet_awaiting_ack) { |
318 if (ack_frame.missing) { | 315 if (ack_frame.missing) { |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 is_unackable(false), | 859 is_unackable(false), |
863 has_crypto_handshake(has_crypto_handshake), | 860 has_crypto_handshake(has_crypto_handshake), |
864 num_padding_bytes(num_padding_bytes), | 861 num_padding_bytes(num_padding_bytes), |
865 retransmission(0) {} | 862 retransmission(0) {} |
866 | 863 |
867 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 864 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; |
868 | 865 |
869 TransmissionInfo::~TransmissionInfo() {} | 866 TransmissionInfo::~TransmissionInfo() {} |
870 | 867 |
871 } // namespace net | 868 } // namespace net |
OLD | NEW |