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

Side by Side Diff: net/quic/quic_packet_generator.h

Issue 1904213002: QUIC: support diversified keys with version 33. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hkdf
Patch Set: Rebase 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/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.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 // Responsible for generating packets on behalf of a QuicConnection. 5 // Responsible for generating packets on behalf of a QuicConnection.
6 // Packets are serialized just-in-time. Control frames are queued. 6 // Packets are serialized just-in-time. Control frames are queued.
7 // Ack and Feedback frames will be requested from the Connection 7 // Ack and Feedback frames will be requested from the Connection
8 // just-in-time. When a packet needs to be sent, the Generator 8 // just-in-time. When a packet needs to be sent, the Generator
9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket() 9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket()
10 // 10 //
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void FlushAllQueuedFrames(); 113 void FlushAllQueuedFrames();
114 114
115 bool HasQueuedFrames() const; 115 bool HasQueuedFrames() const;
116 116
117 // Whether the pending packet has no frames in it at the moment. 117 // Whether the pending packet has no frames in it at the moment.
118 bool IsPendingPacketEmpty() const; 118 bool IsPendingPacketEmpty() const;
119 119
120 // Makes the framer not serialize the protocol version in sent packets. 120 // Makes the framer not serialize the protocol version in sent packets.
121 void StopSendingVersion(); 121 void StopSendingVersion();
122 122
123 // SetDiversificationNonce sets the nonce that will be sent in each public
124 // header of packets encrypted at the initial encryption level. Should only
125 // be called by servers.
126 void SetDiversificationNonce(const DiversificationNonce nonce);
127
123 // Creates a version negotiation packet which supports |supported_versions|. 128 // Creates a version negotiation packet which supports |supported_versions|.
124 // Caller owns the created packet. Also, sets the entropy hash of the 129 // Caller owns the created packet. Also, sets the entropy hash of the
125 // serialized packet to a random bool and returns that value as a member of 130 // serialized packet to a random bool and returns that value as a member of
126 // SerializedPacket. 131 // SerializedPacket.
127 QuicEncryptedPacket* SerializeVersionNegotiationPacket( 132 QuicEncryptedPacket* SerializeVersionNegotiationPacket(
128 const QuicVersionVector& supported_versions); 133 const QuicVersionVector& supported_versions);
129 134
130 // Re-serializes frames with the original packet's packet number length. 135 // Re-serializes frames with the original packet's packet number length.
131 // Used for retransmitting packets to ensure they aren't too long. 136 // Used for retransmitting packets to ensure they aren't too long.
132 void ReserializeAllFrames(const PendingRetransmission& retransmission, 137 void ReserializeAllFrames(const PendingRetransmission& retransmission,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // retransmitted. 207 // retransmitted.
203 QuicAckFrame pending_ack_frame_; 208 QuicAckFrame pending_ack_frame_;
204 QuicStopWaitingFrame pending_stop_waiting_frame_; 209 QuicStopWaitingFrame pending_stop_waiting_frame_;
205 210
206 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 211 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
207 }; 212 };
208 213
209 } // namespace net 214 } // namespace net
210 215
211 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 216 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698