| 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 <stdint.h> | 9 #include <stdint.h> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 enum QuicVersion { | 340 enum QuicVersion { |
| 341 // Special case to indicate unknown/unsupported QUIC version. | 341 // Special case to indicate unknown/unsupported QUIC version. |
| 342 QUIC_VERSION_UNSUPPORTED = 0, | 342 QUIC_VERSION_UNSUPPORTED = 0, |
| 343 | 343 |
| 344 QUIC_VERSION_25 = 25, // SPDY/4 header keys, and removal of error_details | 344 QUIC_VERSION_25 = 25, // SPDY/4 header keys, and removal of error_details |
| 345 // from QuicRstStreamFrame | 345 // from QuicRstStreamFrame |
| 346 QUIC_VERSION_26 = 26, // In CHLO, send XLCT tag containing hash of leaf cert | 346 QUIC_VERSION_26 = 26, // In CHLO, send XLCT tag containing hash of leaf cert |
| 347 QUIC_VERSION_27 = 27, // Sends a nonce in the SHLO. | 347 QUIC_VERSION_27 = 27, // Sends a nonce in the SHLO. |
| 348 QUIC_VERSION_28 = 28, // Receiver can refuse to create a requested stream. | 348 QUIC_VERSION_28 = 28, // Receiver can refuse to create a requested stream. |
| 349 QUIC_VERSION_29 = 29, // Server and client honor QUIC_STREAM_NO_ERROR. | 349 QUIC_VERSION_29 = 29, // Server and client honor QUIC_STREAM_NO_ERROR. |
| 350 QUIC_VERSION_30 = 30, // Add server side support of cert transparency. |
| 350 }; | 351 }; |
| 351 | 352 |
| 352 // This vector contains QUIC versions which we currently support. | 353 // This vector contains QUIC versions which we currently support. |
| 353 // This should be ordered such that the highest supported version is the first | 354 // This should be ordered such that the highest supported version is the first |
| 354 // element, with subsequent elements in descending order (versions can be | 355 // element, with subsequent elements in descending order (versions can be |
| 355 // skipped as necessary). | 356 // skipped as necessary). |
| 356 // | 357 // |
| 357 // IMPORTANT: if you are adding to this list, follow the instructions at | 358 // IMPORTANT: if you are adding to this list, follow the instructions at |
| 358 // http://sites/quic/adding-and-removing-versions | 359 // http://sites/quic/adding-and-removing-versions |
| 359 static const QuicVersion kSupportedQuicVersions[] = { | 360 static const QuicVersion kSupportedQuicVersions[] = { |
| 360 QUIC_VERSION_29, QUIC_VERSION_28, QUIC_VERSION_27, QUIC_VERSION_26, | 361 QUIC_VERSION_30, QUIC_VERSION_29, QUIC_VERSION_28, |
| 361 QUIC_VERSION_25}; | 362 QUIC_VERSION_27, QUIC_VERSION_26, QUIC_VERSION_25}; |
| 362 | 363 |
| 363 typedef std::vector<QuicVersion> QuicVersionVector; | 364 typedef std::vector<QuicVersion> QuicVersionVector; |
| 364 | 365 |
| 365 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 366 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 366 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 367 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 367 | 368 |
| 368 // QuicTag is written to and read from the wire, but we prefer to use | 369 // QuicTag is written to and read from the wire, but we prefer to use |
| 369 // the more readable QuicVersion at other levels. | 370 // the more readable QuicVersion at other levels. |
| 370 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 371 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
| 371 // if QuicVersion is unsupported. | 372 // if QuicVersion is unsupported. |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1239 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
| 1239 | 1240 |
| 1240 const struct iovec* iov; | 1241 const struct iovec* iov; |
| 1241 const int iov_count; | 1242 const int iov_count; |
| 1242 const size_t total_length; | 1243 const size_t total_length; |
| 1243 }; | 1244 }; |
| 1244 | 1245 |
| 1245 } // namespace net | 1246 } // namespace net |
| 1246 | 1247 |
| 1247 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1248 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |