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

Side by Side Diff: net/quic/quic_framer.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_crypto_server_stream_test.cc ('k') | net/quic/quic_framer.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 #ifndef NET_QUIC_QUIC_FRAMER_H_ 5 #ifndef NET_QUIC_QUIC_FRAMER_H_
6 #define NET_QUIC_QUIC_FRAMER_H_ 6 #define NET_QUIC_QUIC_FRAMER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 bool last_frame_in_packet, 257 bool last_frame_in_packet,
258 QuicPacketNumberLength packet_number_length); 258 QuicPacketNumberLength packet_number_length);
259 259
260 // Returns the associated data from the encrypted packet |encrypted| as a 260 // Returns the associated data from the encrypted packet |encrypted| as a
261 // stringpiece. 261 // stringpiece.
262 static base::StringPiece GetAssociatedDataFromEncryptedPacket( 262 static base::StringPiece GetAssociatedDataFromEncryptedPacket(
263 const QuicEncryptedPacket& encrypted, 263 const QuicEncryptedPacket& encrypted,
264 QuicConnectionIdLength connection_id_length, 264 QuicConnectionIdLength connection_id_length,
265 bool includes_version, 265 bool includes_version,
266 bool includes_path_id, 266 bool includes_path_id,
267 bool includes_diversification_nonce,
267 QuicPacketNumberLength packet_number_length); 268 QuicPacketNumberLength packet_number_length);
268 269
269 // Serializes a packet containing |frames| into |buffer|. 270 // Serializes a packet containing |frames| into |buffer|.
270 // Returns the length of the packet, which must not be longer than 271 // Returns the length of the packet, which must not be longer than
271 // |packet_length|. Returns 0 if it fails to serialize. 272 // |packet_length|. Returns 0 if it fails to serialize.
272 size_t BuildDataPacket(const QuicPacketHeader& header, 273 size_t BuildDataPacket(const QuicPacketHeader& header,
273 const QuicFrames& frames, 274 const QuicFrames& frames,
274 char* buffer, 275 char* buffer,
275 size_t packet_length); 276 size_t packet_length);
276 277
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // connection or the entity that initiated it. 548 // connection or the entity that initiated it.
548 Perspective perspective_; 549 Perspective perspective_;
549 // If false, skip validation that the public flags are set to legal values. 550 // If false, skip validation that the public flags are set to legal values.
550 bool validate_flags_; 551 bool validate_flags_;
551 // The time this framer was created. Time written to the wire will be 552 // The time this framer was created. Time written to the wire will be
552 // written as a delta from this value. 553 // written as a delta from this value.
553 QuicTime creation_time_; 554 QuicTime creation_time_;
554 // The time delta computed for the last timestamp frame. This is relative to 555 // The time delta computed for the last timestamp frame. This is relative to
555 // the creation_time. 556 // the creation_time.
556 QuicTime::Delta last_timestamp_; 557 QuicTime::Delta last_timestamp_;
558 // The diversification nonce from the last received packet.
559 DiversificationNonce last_nonce_;
557 560
558 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 561 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
559 }; 562 };
560 563
561 } // namespace net 564 } // namespace net
562 565
563 #endif // NET_QUIC_QUIC_FRAMER_H_ 566 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698