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
3 // found in the LICENSE file.
5 #include "net/quic/quic_protocol.h"
7 #include "base/stl_util.h"
8 #include "net/quic/quic_utils.h"
10 using base::StringPiece
;
12 using std::numeric_limits
;
18 size_t GetPacketHeaderSize(const QuicPacketHeader
& header
) {
19 return GetPacketHeaderSize(header
.public_header
.connection_id_length
,
20 header
.public_header
.version_flag
,
21 header
.public_header
.sequence_number_length
,
22 header
.is_in_fec_group
);
25 size_t GetPacketHeaderSize(QuicConnectionIdLength connection_id_length
,
27 QuicSequenceNumberLength sequence_number_length
,
28 InFecGroup is_in_fec_group
) {
29 return kPublicFlagsSize
+ connection_id_length
+
30 (include_version
? kQuicVersionSize
: 0) + sequence_number_length
+
31 kPrivateFlagsSize
+ (is_in_fec_group
== IN_FEC_GROUP
? kFecGroupSize
: 0);
34 size_t GetStartOfFecProtectedData(
35 QuicConnectionIdLength connection_id_length
,
37 QuicSequenceNumberLength sequence_number_length
) {
38 return GetPacketHeaderSize(connection_id_length
,
40 sequence_number_length
,
44 size_t GetStartOfEncryptedData(
45 QuicConnectionIdLength connection_id_length
,
47 QuicSequenceNumberLength sequence_number_length
) {
48 // Don't include the fec size, since encryption starts before private flags.
49 return GetPacketHeaderSize(connection_id_length
,
51 sequence_number_length
,
52 NOT_IN_FEC_GROUP
) - kPrivateFlagsSize
;
55 QuicPacketPublicHeader::QuicPacketPublicHeader()
57 connection_id_length(PACKET_8BYTE_CONNECTION_ID
),
60 sequence_number_length(PACKET_6BYTE_SEQUENCE_NUMBER
) {
63 QuicPacketPublicHeader::QuicPacketPublicHeader(
64 const QuicPacketPublicHeader
& other
)
65 : connection_id(other
.connection_id
),
66 connection_id_length(other
.connection_id_length
),
67 reset_flag(other
.reset_flag
),
68 version_flag(other
.version_flag
),
69 sequence_number_length(other
.sequence_number_length
),
70 versions(other
.versions
) {
73 QuicPacketPublicHeader::~QuicPacketPublicHeader() {}
75 QuicPacketHeader::QuicPacketHeader()
79 packet_sequence_number(0),
80 is_in_fec_group(NOT_IN_FEC_GROUP
),
84 QuicPacketHeader::QuicPacketHeader(const QuicPacketPublicHeader
& header
)
85 : public_header(header
),
89 packet_sequence_number(0),
90 is_in_fec_group(NOT_IN_FEC_GROUP
),
94 QuicPublicResetPacket::QuicPublicResetPacket()
96 rejected_sequence_number(0) {}
98 QuicPublicResetPacket::QuicPublicResetPacket(
99 const QuicPacketPublicHeader
& header
)
100 : public_header(header
),
102 rejected_sequence_number(0) {}
104 QuicStreamFrame::QuicStreamFrame()
110 QuicStreamFrame::QuicStreamFrame(const QuicStreamFrame
& frame
)
111 : stream_id(frame
.stream_id
),
113 offset(frame
.offset
),
115 notifier(frame
.notifier
) {
118 QuicStreamFrame::QuicStreamFrame(QuicStreamId stream_id
,
120 QuicStreamOffset offset
,
122 : stream_id(stream_id
),
129 string
* QuicStreamFrame::GetDataAsString() const {
130 string
* data_string
= new string();
131 data_string
->reserve(data
.TotalBufferSize());
132 for (size_t i
= 0; i
< data
.Size(); ++i
) {
133 data_string
->append(static_cast<char*>(data
.iovec()[i
].iov_base
),
134 data
.iovec()[i
].iov_len
);
136 DCHECK_EQ(data_string
->size(), data
.TotalBufferSize());
140 uint32
MakeQuicTag(char a
, char b
, char c
, char d
) {
141 return static_cast<uint32
>(a
) |
142 static_cast<uint32
>(b
) << 8 |
143 static_cast<uint32
>(c
) << 16 |
144 static_cast<uint32
>(d
) << 24;
147 bool ContainsQuicTag(const QuicTagVector
& tag_vector
, QuicTag tag
) {
148 return std::find(tag_vector
.begin(), tag_vector
.end(), tag
)
152 QuicVersionVector
QuicSupportedVersions() {
153 QuicVersionVector supported_versions
;
154 for (size_t i
= 0; i
< arraysize(kSupportedQuicVersions
); ++i
) {
155 supported_versions
.push_back(kSupportedQuicVersions
[i
]);
157 return supported_versions
;
160 QuicTag
QuicVersionToQuicTag(const QuicVersion version
) {
162 case QUIC_VERSION_16
:
163 return MakeQuicTag('Q', '0', '1', '6');
164 case QUIC_VERSION_18
:
165 return MakeQuicTag('Q', '0', '1', '8');
166 case QUIC_VERSION_19
:
167 return MakeQuicTag('Q', '0', '1', '9');
168 case QUIC_VERSION_20
:
169 return MakeQuicTag('Q', '0', '2', '0');
170 case QUIC_VERSION_21
:
171 return MakeQuicTag('Q', '0', '2', '1');
173 // This shold be an ERROR because we should never attempt to convert an
174 // invalid QuicVersion to be written to the wire.
175 LOG(ERROR
) << "Unsupported QuicVersion: " << version
;
180 QuicVersion
QuicTagToQuicVersion(const QuicTag version_tag
) {
181 for (size_t i
= 0; i
< arraysize(kSupportedQuicVersions
); ++i
) {
182 if (version_tag
== QuicVersionToQuicTag(kSupportedQuicVersions
[i
])) {
183 return kSupportedQuicVersions
[i
];
186 // Reading from the client so this should not be considered an ERROR.
187 DVLOG(1) << "Unsupported QuicTag version: "
188 << QuicUtils::TagToString(version_tag
);
189 return QUIC_VERSION_UNSUPPORTED
;
192 #define RETURN_STRING_LITERAL(x) \
196 string
QuicVersionToString(const QuicVersion version
) {
198 RETURN_STRING_LITERAL(QUIC_VERSION_16
);
199 RETURN_STRING_LITERAL(QUIC_VERSION_18
);
200 RETURN_STRING_LITERAL(QUIC_VERSION_19
);
201 RETURN_STRING_LITERAL(QUIC_VERSION_20
);
202 RETURN_STRING_LITERAL(QUIC_VERSION_21
);
204 return "QUIC_VERSION_UNSUPPORTED";
208 string
QuicVersionVectorToString(const QuicVersionVector
& versions
) {
210 for (size_t i
= 0; i
< versions
.size(); ++i
) {
214 result
.append(QuicVersionToString(versions
[i
]));
219 ostream
& operator<<(ostream
& os
, const QuicPacketHeader
& header
) {
220 os
<< "{ connection_id: " << header
.public_header
.connection_id
221 << ", connection_id_length:" << header
.public_header
.connection_id_length
222 << ", sequence_number_length:"
223 << header
.public_header
.sequence_number_length
224 << ", reset_flag: " << header
.public_header
.reset_flag
225 << ", version_flag: " << header
.public_header
.version_flag
;
226 if (header
.public_header
.version_flag
) {
228 for (size_t i
= 0; i
< header
.public_header
.versions
.size(); ++i
) {
229 os
<< header
.public_header
.versions
[0] << " ";
232 os
<< ", fec_flag: " << header
.fec_flag
233 << ", entropy_flag: " << header
.entropy_flag
234 << ", entropy hash: " << static_cast<int>(header
.entropy_hash
)
235 << ", sequence_number: " << header
.packet_sequence_number
236 << ", is_in_fec_group:" << header
.is_in_fec_group
237 << ", fec_group: " << header
.fec_group
<< "}\n";
241 bool IsAwaitingPacket(const QuicAckFrame
& ack_frame
,
242 QuicPacketSequenceNumber sequence_number
) {
243 return sequence_number
> ack_frame
.largest_observed
||
244 ContainsKey(ack_frame
.missing_packets
, sequence_number
);
247 void InsertMissingPacketsBetween(QuicAckFrame
* ack_frame
,
248 QuicPacketSequenceNumber lower
,
249 QuicPacketSequenceNumber higher
) {
250 for (QuicPacketSequenceNumber i
= lower
; i
< higher
; ++i
) {
251 ack_frame
->missing_packets
.insert(i
);
255 QuicStopWaitingFrame::QuicStopWaitingFrame()
260 QuicStopWaitingFrame::~QuicStopWaitingFrame() {}
262 QuicAckFrame::QuicAckFrame()
265 delta_time_largest_observed(QuicTime::Delta::Infinite()),
266 is_truncated(false) {}
268 QuicAckFrame::~QuicAckFrame() {}
270 CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP()
271 : receive_window(0) {
274 CongestionFeedbackMessageTimestamp::CongestionFeedbackMessageTimestamp() {
277 CongestionFeedbackMessageTimestamp::~CongestionFeedbackMessageTimestamp() {}
279 QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP
) {}
281 QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {}
283 QuicRstStreamErrorCode
AdjustErrorForVersion(
284 QuicRstStreamErrorCode error_code
,
285 QuicVersion version
) {
286 switch (error_code
) {
287 case QUIC_RST_FLOW_CONTROL_ACCOUNTING
:
288 if (version
< QUIC_VERSION_18
) {
289 return QUIC_STREAM_NO_ERROR
;
298 QuicRstStreamFrame::QuicRstStreamFrame()
300 error_code(QUIC_STREAM_NO_ERROR
) {
303 QuicRstStreamFrame::QuicRstStreamFrame(QuicStreamId stream_id
,
304 QuicRstStreamErrorCode error_code
,
305 QuicStreamOffset bytes_written
)
306 : stream_id(stream_id
),
307 error_code(error_code
),
308 byte_offset(bytes_written
) {
309 DCHECK_LE(error_code
, numeric_limits
<uint8
>::max());
312 QuicConnectionCloseFrame::QuicConnectionCloseFrame()
313 : error_code(QUIC_NO_ERROR
) {
316 QuicFrame::QuicFrame() {}
318 QuicFrame::QuicFrame(QuicPaddingFrame
* padding_frame
)
319 : type(PADDING_FRAME
),
320 padding_frame(padding_frame
) {
323 QuicFrame::QuicFrame(QuicStreamFrame
* stream_frame
)
324 : type(STREAM_FRAME
),
325 stream_frame(stream_frame
) {
328 QuicFrame::QuicFrame(QuicAckFrame
* frame
)
333 QuicFrame::QuicFrame(QuicCongestionFeedbackFrame
* frame
)
334 : type(CONGESTION_FEEDBACK_FRAME
),
335 congestion_feedback_frame(frame
) {
338 QuicFrame::QuicFrame(QuicStopWaitingFrame
* frame
)
339 : type(STOP_WAITING_FRAME
),
340 stop_waiting_frame(frame
) {
343 QuicFrame::QuicFrame(QuicPingFrame
* frame
)
348 QuicFrame::QuicFrame(QuicRstStreamFrame
* frame
)
349 : type(RST_STREAM_FRAME
),
350 rst_stream_frame(frame
) {
353 QuicFrame::QuicFrame(QuicConnectionCloseFrame
* frame
)
354 : type(CONNECTION_CLOSE_FRAME
),
355 connection_close_frame(frame
) {
358 QuicFrame::QuicFrame(QuicGoAwayFrame
* frame
)
359 : type(GOAWAY_FRAME
),
360 goaway_frame(frame
) {
363 QuicFrame::QuicFrame(QuicWindowUpdateFrame
* frame
)
364 : type(WINDOW_UPDATE_FRAME
),
365 window_update_frame(frame
) {
368 QuicFrame::QuicFrame(QuicBlockedFrame
* frame
)
369 : type(BLOCKED_FRAME
),
370 blocked_frame(frame
) {
373 QuicFecData::QuicFecData() : fec_group(0) {}
375 ostream
& operator<<(ostream
& os
, const QuicStopWaitingFrame
& sent_info
) {
376 os
<< "entropy_hash: " << static_cast<int>(sent_info
.entropy_hash
)
377 << " least_unacked: " << sent_info
.least_unacked
;
381 ostream
& operator<<(ostream
& os
, const QuicAckFrame
& ack_frame
) {
382 os
<< "entropy_hash: " << static_cast<int>(ack_frame
.entropy_hash
)
383 << " is_truncated: " << ack_frame
.is_truncated
384 << " largest_observed: " << ack_frame
.largest_observed
385 << " delta_time_largest_observed: "
386 << ack_frame
.delta_time_largest_observed
.ToMicroseconds()
387 << " missing_packets: [ ";
388 for (SequenceNumberSet::const_iterator it
= ack_frame
.missing_packets
.begin();
389 it
!= ack_frame
.missing_packets
.end(); ++it
) {
392 os
<< " ] revived_packets: [ ";
393 for (SequenceNumberSet::const_iterator it
= ack_frame
.revived_packets
.begin();
394 it
!= ack_frame
.revived_packets
.end(); ++it
) {
401 ostream
& operator<<(ostream
& os
, const QuicFrame
& frame
) {
402 switch (frame
.type
) {
403 case PADDING_FRAME
: {
404 os
<< "type { PADDING_FRAME } ";
407 case RST_STREAM_FRAME
: {
408 os
<< "type { " << RST_STREAM_FRAME
<< " } " << *(frame
.rst_stream_frame
);
411 case CONNECTION_CLOSE_FRAME
: {
412 os
<< "type { CONNECTION_CLOSE_FRAME } "
413 << *(frame
.connection_close_frame
);
417 os
<< "type { GOAWAY_FRAME } " << *(frame
.goaway_frame
);
420 case WINDOW_UPDATE_FRAME
: {
421 os
<< "type { WINDOW_UPDATE_FRAME } " << *(frame
.window_update_frame
);
424 case BLOCKED_FRAME
: {
425 os
<< "type { BLOCKED_FRAME } " << *(frame
.blocked_frame
);
429 os
<< "type { STREAM_FRAME } " << *(frame
.stream_frame
);
433 os
<< "type { ACK_FRAME } " << *(frame
.ack_frame
);
436 case CONGESTION_FEEDBACK_FRAME
: {
437 os
<< "type { CONGESTION_FEEDBACK_FRAME } "
438 << *(frame
.congestion_feedback_frame
);
441 case STOP_WAITING_FRAME
: {
442 os
<< "type { STOP_WAITING_FRAME } " << *(frame
.stop_waiting_frame
);
446 os
<< "type { PING_FRAME } ";
450 LOG(ERROR
) << "Unknown frame type: " << frame
.type
;
457 ostream
& operator<<(ostream
& os
, const QuicRstStreamFrame
& rst_frame
) {
458 os
<< "stream_id { " << rst_frame
.stream_id
<< " } "
459 << "error_code { " << rst_frame
.error_code
<< " } "
460 << "error_details { " << rst_frame
.error_details
<< " }\n";
464 ostream
& operator<<(ostream
& os
,
465 const QuicConnectionCloseFrame
& connection_close_frame
) {
466 os
<< "error_code { " << connection_close_frame
.error_code
<< " } "
467 << "error_details { " << connection_close_frame
.error_details
<< " }\n";
471 ostream
& operator<<(ostream
& os
, const QuicGoAwayFrame
& goaway_frame
) {
472 os
<< "error_code { " << goaway_frame
.error_code
<< " } "
473 << "last_good_stream_id { " << goaway_frame
.last_good_stream_id
<< " } "
474 << "reason_phrase { " << goaway_frame
.reason_phrase
<< " }\n";
478 ostream
& operator<<(ostream
& os
,
479 const QuicWindowUpdateFrame
& window_update_frame
) {
480 os
<< "stream_id { " << window_update_frame
.stream_id
<< " } "
481 << "byte_offset { " << window_update_frame
.byte_offset
<< " }\n";
485 ostream
& operator<<(ostream
& os
, const QuicBlockedFrame
& blocked_frame
) {
486 os
<< "stream_id { " << blocked_frame
.stream_id
<< " }\n";
490 ostream
& operator<<(ostream
& os
, const QuicStreamFrame
& stream_frame
) {
491 os
<< "stream_id { " << stream_frame
.stream_id
<< " } "
492 << "fin { " << stream_frame
.fin
<< " } "
493 << "offset { " << stream_frame
.offset
<< " } "
495 << QuicUtils::StringToHexASCIIDump(*(stream_frame
.GetDataAsString()))
500 ostream
& operator<<(ostream
& os
,
501 const QuicCongestionFeedbackFrame
& congestion_frame
) {
502 os
<< "type: " << congestion_frame
.type
;
503 switch (congestion_frame
.type
) {
505 const CongestionFeedbackMessageTimestamp
& timestamp
=
506 congestion_frame
.timestamp
;
507 os
<< " received packets: [ ";
508 for (TimeMap::const_iterator it
= timestamp
.received_packet_times
.begin();
509 it
!= timestamp
.received_packet_times
.end(); ++it
) {
510 os
<< it
->first
<< "@" << it
->second
.ToDebuggingValue() << " ";
516 const CongestionFeedbackMessageTCP
& tcp
= congestion_frame
.tcp
;
517 os
<< " receive_window: " << tcp
.receive_window
;
524 QuicGoAwayFrame::QuicGoAwayFrame()
525 : error_code(QUIC_NO_ERROR
),
526 last_good_stream_id(0) {
529 QuicGoAwayFrame::QuicGoAwayFrame(QuicErrorCode error_code
,
530 QuicStreamId last_good_stream_id
,
531 const string
& reason
)
532 : error_code(error_code
),
533 last_good_stream_id(last_good_stream_id
),
534 reason_phrase(reason
) {
535 DCHECK_LE(error_code
, numeric_limits
<uint8
>::max());
538 QuicData::QuicData(const char* buffer
,
542 owns_buffer_(false) {
545 QuicData::QuicData(char* buffer
,
550 owns_buffer_(owns_buffer
) {
553 QuicData::~QuicData() {
555 delete [] const_cast<char*>(buffer_
);
559 QuicWindowUpdateFrame::QuicWindowUpdateFrame(QuicStreamId stream_id
,
560 QuicStreamOffset byte_offset
)
561 : stream_id(stream_id
),
562 byte_offset(byte_offset
) {}
564 QuicBlockedFrame::QuicBlockedFrame(QuicStreamId stream_id
)
565 : stream_id(stream_id
) {}
567 QuicPacket::QuicPacket(char* buffer
,
570 QuicConnectionIdLength connection_id_length
,
571 bool includes_version
,
572 QuicSequenceNumberLength sequence_number_length
,
574 : QuicData(buffer
, length
, owns_buffer
),
576 is_fec_packet_(is_fec_packet
),
577 connection_id_length_(connection_id_length
),
578 includes_version_(includes_version
),
579 sequence_number_length_(sequence_number_length
) {
582 QuicEncryptedPacket::QuicEncryptedPacket(const char* buffer
,
584 : QuicData(buffer
, length
) {
587 QuicEncryptedPacket::QuicEncryptedPacket(char* buffer
,
590 : QuicData(buffer
, length
, owns_buffer
) {
593 StringPiece
QuicPacket::FecProtectedData() const {
594 const size_t start_of_fec
= GetStartOfFecProtectedData(
595 connection_id_length_
, includes_version_
, sequence_number_length_
);
596 return StringPiece(data() + start_of_fec
, length() - start_of_fec
);
599 StringPiece
QuicPacket::AssociatedData() const {
601 data() + kStartOfHashData
,
602 GetStartOfEncryptedData(
603 connection_id_length_
, includes_version_
, sequence_number_length_
) -
607 StringPiece
QuicPacket::BeforePlaintext() const {
608 return StringPiece(data(), GetStartOfEncryptedData(connection_id_length_
,
610 sequence_number_length_
));
613 StringPiece
QuicPacket::Plaintext() const {
614 const size_t start_of_encrypted_data
=
615 GetStartOfEncryptedData(
616 connection_id_length_
, includes_version_
, sequence_number_length_
);
617 return StringPiece(data() + start_of_encrypted_data
,
618 length() - start_of_encrypted_data
);
621 RetransmittableFrames::RetransmittableFrames()
622 : encryption_level_(NUM_ENCRYPTION_LEVELS
) {
625 RetransmittableFrames::~RetransmittableFrames() {
626 for (QuicFrames::iterator it
= frames_
.begin(); it
!= frames_
.end(); ++it
) {
629 delete it
->padding_frame
;
632 delete it
->stream_frame
;
635 delete it
->ack_frame
;
637 case CONGESTION_FEEDBACK_FRAME
:
638 delete it
->congestion_feedback_frame
;
640 case STOP_WAITING_FRAME
:
641 delete it
->stop_waiting_frame
;
644 delete it
->ping_frame
;
646 case RST_STREAM_FRAME
:
647 delete it
->rst_stream_frame
;
649 case CONNECTION_CLOSE_FRAME
:
650 delete it
->connection_close_frame
;
653 delete it
->goaway_frame
;
655 case WINDOW_UPDATE_FRAME
:
656 delete it
->window_update_frame
;
659 delete it
->blocked_frame
;
661 case NUM_FRAME_TYPES
:
662 DCHECK(false) << "Cannot delete type: " << it
->type
;
665 STLDeleteElements(&stream_data_
);
668 const QuicFrame
& RetransmittableFrames::AddStreamFrame(
669 QuicStreamFrame
* stream_frame
) {
670 // Make an owned copy of the stream frame's data.
671 stream_data_
.push_back(stream_frame
->GetDataAsString());
672 // Ensure the stream frame's IOVector points to the owned copy of the data.
673 stream_frame
->data
.Clear();
674 stream_frame
->data
.Append(const_cast<char*>(stream_data_
.back()->data()),
675 stream_data_
.back()->size());
676 frames_
.push_back(QuicFrame(stream_frame
));
677 return frames_
.back();
680 const QuicFrame
& RetransmittableFrames::AddNonStreamFrame(
681 const QuicFrame
& frame
) {
682 DCHECK_NE(frame
.type
, STREAM_FRAME
);
683 frames_
.push_back(frame
);
684 return frames_
.back();
687 IsHandshake
RetransmittableFrames::HasCryptoHandshake() const {
688 for (size_t i
= 0; i
< frames().size(); ++i
) {
689 if (frames()[i
].type
== STREAM_FRAME
&&
690 frames()[i
].stream_frame
->stream_id
== kCryptoStreamId
) {
694 return NOT_HANDSHAKE
;
697 void RetransmittableFrames::set_encryption_level(EncryptionLevel level
) {
698 encryption_level_
= level
;
701 SerializedPacket::SerializedPacket(
702 QuicPacketSequenceNumber sequence_number
,
703 QuicSequenceNumberLength sequence_number_length
,
705 QuicPacketEntropyHash entropy_hash
,
706 RetransmittableFrames
* retransmittable_frames
)
707 : sequence_number(sequence_number
),
708 sequence_number_length(sequence_number_length
),
710 entropy_hash(entropy_hash
),
711 retransmittable_frames(retransmittable_frames
) {
714 SerializedPacket::~SerializedPacket() {}
716 QuicEncryptedPacket
* QuicEncryptedPacket::Clone() const {
717 char* buffer
= new char[this->length()];
718 memcpy(buffer
, this->data(), this->length());
719 return new QuicEncryptedPacket(buffer
, this->length(), true);
722 ostream
& operator<<(ostream
& os
, const QuicEncryptedPacket
& s
) {
723 os
<< s
.length() << "-byte data";
727 TransmissionInfo::TransmissionInfo()
728 : retransmittable_frames(NULL
),
729 sequence_number_length(PACKET_1BYTE_SEQUENCE_NUMBER
),
730 sent_time(QuicTime::Zero()),
733 transmission_type(NOT_RETRANSMISSION
),
734 all_transmissions(NULL
),
737 TransmissionInfo::TransmissionInfo(
738 RetransmittableFrames
* retransmittable_frames
,
739 QuicPacketSequenceNumber sequence_number
,
740 QuicSequenceNumberLength sequence_number_length
)
741 : retransmittable_frames(retransmittable_frames
),
742 sequence_number_length(sequence_number_length
),
743 sent_time(QuicTime::Zero()),
746 transmission_type(NOT_RETRANSMISSION
),
747 all_transmissions(new SequenceNumberSet
),
749 all_transmissions
->insert(sequence_number
);
752 TransmissionInfo::TransmissionInfo(
753 RetransmittableFrames
* retransmittable_frames
,
754 QuicPacketSequenceNumber sequence_number
,
755 QuicSequenceNumberLength sequence_number_length
,
756 TransmissionType transmission_type
,
757 SequenceNumberSet
* all_transmissions
)
758 : retransmittable_frames(retransmittable_frames
),
759 sequence_number_length(sequence_number_length
),
760 sent_time(QuicTime::Zero()),
763 transmission_type(transmission_type
),
764 all_transmissions(all_transmissions
),
766 all_transmissions
->insert(sequence_number
);