| 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 #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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void set_validate_flags(bool value) { validate_flags_ = value; } | 362 void set_validate_flags(bool value) { validate_flags_ = value; } |
| 363 | 363 |
| 364 Perspective perspective() const { return perspective_; } | 364 Perspective perspective() const { return perspective_; } |
| 365 | 365 |
| 366 static QuicPacketEntropyHash GetPacketEntropyHash( | 366 static QuicPacketEntropyHash GetPacketEntropyHash( |
| 367 const QuicPacketHeader& header); | 367 const QuicPacketHeader& header); |
| 368 | 368 |
| 369 // Called when a PATH_CLOSED frame has been sent/received on |path_id|. | 369 // Called when a PATH_CLOSED frame has been sent/received on |path_id|. |
| 370 void OnPathClosed(QuicPathId path_id); | 370 void OnPathClosed(QuicPathId path_id); |
| 371 | 371 |
| 372 QuicTag last_version_tag() { return last_version_tag_; } |
| 373 |
| 372 private: | 374 private: |
| 373 friend class test::QuicFramerPeer; | 375 friend class test::QuicFramerPeer; |
| 374 | 376 |
| 375 typedef std::map<QuicPacketNumber, uint8_t> NackRangeMap; | 377 typedef std::map<QuicPacketNumber, uint8_t> NackRangeMap; |
| 376 | 378 |
| 377 struct AckFrameInfo { | 379 struct AckFrameInfo { |
| 378 AckFrameInfo(); | 380 AckFrameInfo(); |
| 379 AckFrameInfo(const AckFrameInfo& other); | 381 AckFrameInfo(const AckFrameInfo& other); |
| 380 ~AckFrameInfo(); | 382 ~AckFrameInfo(); |
| 381 | 383 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 std::unordered_set<QuicPathId> closed_paths_; | 531 std::unordered_set<QuicPathId> closed_paths_; |
| 530 // Map mapping path id to packet number of last successfully decrypted/revived | 532 // Map mapping path id to packet number of last successfully decrypted/revived |
| 531 // received packet. | 533 // received packet. |
| 532 std::unordered_map<QuicPathId, QuicPacketNumber> last_packet_numbers_; | 534 std::unordered_map<QuicPathId, QuicPacketNumber> last_packet_numbers_; |
| 533 // Updated by ProcessPacketHeader when it succeeds. | 535 // Updated by ProcessPacketHeader when it succeeds. |
| 534 QuicPacketNumber last_packet_number_; | 536 QuicPacketNumber last_packet_number_; |
| 535 // The path on which last successfully decrypted/revived packet was received. | 537 // The path on which last successfully decrypted/revived packet was received. |
| 536 QuicPathId last_path_id_; | 538 QuicPathId last_path_id_; |
| 537 // Updated by WritePacketHeader. | 539 // Updated by WritePacketHeader. |
| 538 QuicConnectionId last_serialized_connection_id_; | 540 QuicConnectionId last_serialized_connection_id_; |
| 541 // The last QUIC version tag received. |
| 542 QuicTag last_version_tag_; |
| 539 // Version of the protocol being used. | 543 // Version of the protocol being used. |
| 540 QuicVersion quic_version_; | 544 QuicVersion quic_version_; |
| 541 // This vector contains QUIC versions which we currently support. | 545 // This vector contains QUIC versions which we currently support. |
| 542 // This should be ordered such that the highest supported version is the first | 546 // This should be ordered such that the highest supported version is the first |
| 543 // element, with subsequent elements in descending order (versions can be | 547 // element, with subsequent elements in descending order (versions can be |
| 544 // skipped as necessary). | 548 // skipped as necessary). |
| 545 QuicVersionVector supported_versions_; | 549 QuicVersionVector supported_versions_; |
| 546 // Primary decrypter used to decrypt packets during parsing. | 550 // Primary decrypter used to decrypt packets during parsing. |
| 547 scoped_ptr<QuicDecrypter> decrypter_; | 551 scoped_ptr<QuicDecrypter> decrypter_; |
| 548 // Alternative decrypter that can also be used to decrypt packets. | 552 // Alternative decrypter that can also be used to decrypt packets. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 568 // The time delta computed for the last timestamp frame. This is relative to | 572 // The time delta computed for the last timestamp frame. This is relative to |
| 569 // the creation_time. | 573 // the creation_time. |
| 570 QuicTime::Delta last_timestamp_; | 574 QuicTime::Delta last_timestamp_; |
| 571 | 575 |
| 572 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 576 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 573 }; | 577 }; |
| 574 | 578 |
| 575 } // namespace net | 579 } // namespace net |
| 576 | 580 |
| 577 #endif // NET_QUIC_QUIC_FRAMER_H_ | 581 #endif // NET_QUIC_QUIC_FRAMER_H_ |
| OLD | NEW |