| 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_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
| 6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // The available versions of QUIC. Guaranteed that the integer value of the enum | 291 // The available versions of QUIC. Guaranteed that the integer value of the enum |
| 292 // will match the version number. | 292 // will match the version number. |
| 293 // When adding a new version to this enum you should add it to | 293 // When adding a new version to this enum you should add it to |
| 294 // kSupportedQuicVersions (if appropriate), and also add a new case to the | 294 // kSupportedQuicVersions (if appropriate), and also add a new case to the |
| 295 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and | 295 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and |
| 296 // QuicVersionToString. | 296 // QuicVersionToString. |
| 297 enum QuicVersion { | 297 enum QuicVersion { |
| 298 // Special case to indicate unknown/unsupported QUIC version. | 298 // Special case to indicate unknown/unsupported QUIC version. |
| 299 QUIC_VERSION_UNSUPPORTED = 0, | 299 QUIC_VERSION_UNSUPPORTED = 0, |
| 300 | 300 |
| 301 QUIC_VERSION_18 = 18, // PING frame. | |
| 302 QUIC_VERSION_19 = 19, // Connection level flow control. | 301 QUIC_VERSION_19 = 19, // Connection level flow control. |
| 303 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. | 302 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. |
| 304 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. | 303 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. |
| 305 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. | 304 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. |
| 306 }; | 305 }; |
| 307 | 306 |
| 308 // This vector contains QUIC versions which we currently support. | 307 // This vector contains QUIC versions which we currently support. |
| 309 // This should be ordered such that the highest supported version is the first | 308 // This should be ordered such that the highest supported version is the first |
| 310 // element, with subsequent elements in descending order (versions can be | 309 // element, with subsequent elements in descending order (versions can be |
| 311 // skipped as necessary). | 310 // skipped as necessary). |
| 312 // | 311 // |
| 313 // IMPORTANT: if you are adding to this list, follow the instructions at | 312 // IMPORTANT: if you are adding to this list, follow the instructions at |
| 314 // http://sites/quic/adding-and-removing-versions | 313 // http://sites/quic/adding-and-removing-versions |
| 315 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, | 314 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, |
| 316 QUIC_VERSION_22, | 315 QUIC_VERSION_22, |
| 317 QUIC_VERSION_21, | 316 QUIC_VERSION_21, |
| 318 QUIC_VERSION_19, | 317 QUIC_VERSION_19}; |
| 319 QUIC_VERSION_18}; | |
| 320 | 318 |
| 321 typedef std::vector<QuicVersion> QuicVersionVector; | 319 typedef std::vector<QuicVersion> QuicVersionVector; |
| 322 | 320 |
| 323 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 321 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 324 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 322 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 325 | 323 |
| 326 // QuicTag is written to and read from the wire, but we prefer to use | 324 // QuicTag is written to and read from the wire, but we prefer to use |
| 327 // the more readable QuicVersion at other levels. | 325 // the more readable QuicVersion at other levels. |
| 328 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 326 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
| 329 // if QuicVersion is unsupported. | 327 // if QuicVersion is unsupported. |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 SequenceNumberList* all_transmissions; | 1086 SequenceNumberList* all_transmissions; |
| 1089 // In flight packets have not been abandoned or lost. | 1087 // In flight packets have not been abandoned or lost. |
| 1090 bool in_flight; | 1088 bool in_flight; |
| 1091 // True if the packet can never be acked, so it can be removed. | 1089 // True if the packet can never be acked, so it can be removed. |
| 1092 bool is_unackable; | 1090 bool is_unackable; |
| 1093 }; | 1091 }; |
| 1094 | 1092 |
| 1095 } // namespace net | 1093 } // namespace net |
| 1096 | 1094 |
| 1097 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1095 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |