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

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

Issue 180723003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unintialized memory error Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection_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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 virtual bool OnStreamFrame(const QuicStreamFrame& frame) = 0; 106 virtual bool OnStreamFrame(const QuicStreamFrame& frame) = 0;
107 107
108 // Called when a AckFrame has been parsed. If OnAckFrame returns false, 108 // Called when a AckFrame has been parsed. If OnAckFrame returns false,
109 // the framer will stop parsing the current packet. 109 // the framer will stop parsing the current packet.
110 virtual bool OnAckFrame(const QuicAckFrame& frame) = 0; 110 virtual bool OnAckFrame(const QuicAckFrame& frame) = 0;
111 111
112 // Called when a CongestionFeedbackFrame has been parsed. 112 // Called when a CongestionFeedbackFrame has been parsed.
113 virtual bool OnCongestionFeedbackFrame( 113 virtual bool OnCongestionFeedbackFrame(
114 const QuicCongestionFeedbackFrame& frame) = 0; 114 const QuicCongestionFeedbackFrame& frame) = 0;
115 115
116 // Called when a StopWaitingFrame has been parsed.
117 virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) = 0;
118
116 // Called when a RstStreamFrame has been parsed. 119 // Called when a RstStreamFrame has been parsed.
117 virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) = 0; 120 virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) = 0;
118 121
119 // Called when a ConnectionCloseFrame has been parsed. 122 // Called when a ConnectionCloseFrame has been parsed.
120 virtual bool OnConnectionCloseFrame( 123 virtual bool OnConnectionCloseFrame(
121 const QuicConnectionCloseFrame& frame) = 0; 124 const QuicConnectionCloseFrame& frame) = 0;
122 125
123 // Called when a GoAwayFrame has been parsed. 126 // Called when a GoAwayFrame has been parsed.
124 virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) = 0; 127 virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) = 0;
125 128
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Largest size in bytes of all stream frame fields without the payload. 244 // Largest size in bytes of all stream frame fields without the payload.
242 static size_t GetMinStreamFrameSize(QuicVersion version, 245 static size_t GetMinStreamFrameSize(QuicVersion version,
243 QuicStreamId stream_id, 246 QuicStreamId stream_id,
244 QuicStreamOffset offset, 247 QuicStreamOffset offset,
245 bool last_frame_in_packet); 248 bool last_frame_in_packet);
246 // Size in bytes of all ack frame fields without the missing packets. 249 // Size in bytes of all ack frame fields without the missing packets.
247 static size_t GetMinAckFrameSize( 250 static size_t GetMinAckFrameSize(
248 QuicVersion version, 251 QuicVersion version,
249 QuicSequenceNumberLength sequence_number_length, 252 QuicSequenceNumberLength sequence_number_length,
250 QuicSequenceNumberLength largest_observed_length); 253 QuicSequenceNumberLength largest_observed_length);
254 // Size in bytes of a stop waiting frame.
255 static size_t GetStopWaitingFrameSize(
256 QuicSequenceNumberLength sequence_number_length);
251 // Size in bytes of all reset stream frame without the error details. 257 // Size in bytes of all reset stream frame without the error details.
252 static size_t GetMinRstStreamFrameSize(QuicVersion quic_version); 258 static size_t GetMinRstStreamFrameSize(QuicVersion quic_version);
253 // Size in bytes of all connection close frame fields without the error 259 // Size in bytes of all connection close frame fields without the error
254 // details and the missing packets from the enclosed ack frame. 260 // details and the missing packets from the enclosed ack frame.
255 static size_t GetMinConnectionCloseFrameSize(); 261 static size_t GetMinConnectionCloseFrameSize();
256 // Size in bytes of all GoAway frame fields without the reason phrase. 262 // Size in bytes of all GoAway frame fields without the reason phrase.
257 static size_t GetMinGoAwayFrameSize(); 263 static size_t GetMinGoAwayFrameSize();
258 // Size in bytes of all WindowUpdate frame fields. 264 // Size in bytes of all WindowUpdate frame fields.
259 static size_t GetWindowUpdateFrameSize(); 265 static size_t GetWindowUpdateFrameSize();
260 // Size in bytes of all Blocked frame fields. 266 // Size in bytes of all Blocked frame fields.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 400
395 bool ProcessPacketSequenceNumber( 401 bool ProcessPacketSequenceNumber(
396 QuicSequenceNumberLength sequence_number_length, 402 QuicSequenceNumberLength sequence_number_length,
397 QuicPacketSequenceNumber* sequence_number); 403 QuicPacketSequenceNumber* sequence_number);
398 bool ProcessFrameData(const QuicPacketHeader& header); 404 bool ProcessFrameData(const QuicPacketHeader& header);
399 bool ProcessStreamFrame(uint8 frame_type, QuicStreamFrame* frame); 405 bool ProcessStreamFrame(uint8 frame_type, QuicStreamFrame* frame);
400 bool ProcessAckFrame(const QuicPacketHeader& header, 406 bool ProcessAckFrame(const QuicPacketHeader& header,
401 uint8 frame_type, 407 uint8 frame_type,
402 QuicAckFrame* frame); 408 QuicAckFrame* frame);
403 bool ProcessReceivedInfo(uint8 frame_type, ReceivedPacketInfo* received_info); 409 bool ProcessReceivedInfo(uint8 frame_type, ReceivedPacketInfo* received_info);
404 bool ProcessSentInfo(const QuicPacketHeader& public_header, 410 bool ProcessStopWaitingFrame(const QuicPacketHeader& public_header,
405 SentPacketInfo* sent_info); 411 QuicStopWaitingFrame* stop_waiting);
406 bool ProcessQuicCongestionFeedbackFrame( 412 bool ProcessQuicCongestionFeedbackFrame(
407 QuicCongestionFeedbackFrame* congestion_feedback); 413 QuicCongestionFeedbackFrame* congestion_feedback);
408 bool ProcessRstStreamFrame(QuicRstStreamFrame* frame); 414 bool ProcessRstStreamFrame(QuicRstStreamFrame* frame);
409 bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame); 415 bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame);
410 bool ProcessGoAwayFrame(QuicGoAwayFrame* frame); 416 bool ProcessGoAwayFrame(QuicGoAwayFrame* frame);
411 bool ProcessWindowUpdateFrame(QuicWindowUpdateFrame* frame); 417 bool ProcessWindowUpdateFrame(QuicWindowUpdateFrame* frame);
412 bool ProcessBlockedFrame(QuicBlockedFrame* frame); 418 bool ProcessBlockedFrame(QuicBlockedFrame* frame);
413 419
414 bool DecryptPayload(const QuicPacketHeader& header, 420 bool DecryptPayload(const QuicPacketHeader& header,
415 const QuicEncryptedPacket& packet); 421 const QuicEncryptedPacket& packet);
(...skipping 29 matching lines...) Expand all
445 QuicDataWriter* writer); 451 QuicDataWriter* writer);
446 bool AppendTypeByte(const QuicFrame& frame, 452 bool AppendTypeByte(const QuicFrame& frame,
447 bool last_frame_in_packet, 453 bool last_frame_in_packet,
448 QuicDataWriter* writer); 454 QuicDataWriter* writer);
449 bool AppendStreamFrame(const QuicStreamFrame& frame, 455 bool AppendStreamFrame(const QuicStreamFrame& frame,
450 bool last_frame_in_packet, 456 bool last_frame_in_packet,
451 QuicDataWriter* builder); 457 QuicDataWriter* builder);
452 bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header, 458 bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header,
453 const QuicAckFrame& frame, 459 const QuicAckFrame& frame,
454 QuicDataWriter* builder); 460 QuicDataWriter* builder);
455 bool AppendQuicCongestionFeedbackFrame( 461 bool AppendCongestionFeedbackFrame(const QuicCongestionFeedbackFrame& frame,
456 const QuicCongestionFeedbackFrame& frame, 462 QuicDataWriter* builder);
457 QuicDataWriter* builder); 463 bool AppendStopWaitingFrame(const QuicPacketHeader& header,
464 const QuicStopWaitingFrame& frame,
465 QuicDataWriter* builder);
458 bool AppendRstStreamFrame(const QuicRstStreamFrame& frame, 466 bool AppendRstStreamFrame(const QuicRstStreamFrame& frame,
459 QuicDataWriter* builder); 467 QuicDataWriter* builder);
460 bool AppendConnectionCloseFrame(const QuicConnectionCloseFrame& frame, 468 bool AppendConnectionCloseFrame(const QuicConnectionCloseFrame& frame,
461 QuicDataWriter* builder); 469 QuicDataWriter* builder);
462 bool AppendGoAwayFrame(const QuicGoAwayFrame& frame, QuicDataWriter* writer); 470 bool AppendGoAwayFrame(const QuicGoAwayFrame& frame, QuicDataWriter* writer);
463 bool AppendWindowUpdateFrame(const QuicWindowUpdateFrame& frame, 471 bool AppendWindowUpdateFrame(const QuicWindowUpdateFrame& frame,
464 QuicDataWriter* writer); 472 QuicDataWriter* writer);
465 bool AppendBlockedFrame(const QuicBlockedFrame& frame, 473 bool AppendBlockedFrame(const QuicBlockedFrame& frame,
466 QuicDataWriter* writer); 474 QuicDataWriter* writer);
467 475
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // The time this frames was created. Time written to the wire will be 518 // The time this frames was created. Time written to the wire will be
511 // written as a delta from this value. 519 // written as a delta from this value.
512 QuicTime creation_time_; 520 QuicTime creation_time_;
513 521
514 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 522 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
515 }; 523 };
516 524
517 } // namespace net 525 } // namespace net
518 526
519 #endif // NET_QUIC_QUIC_FRAMER_H_ 527 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698