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 <map> | 10 #include <map> |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // QuicVersionToString. | 274 // QuicVersionToString. |
275 enum QuicVersion { | 275 enum QuicVersion { |
276 // Special case to indicate unknown/unsupported QUIC version. | 276 // Special case to indicate unknown/unsupported QUIC version. |
277 QUIC_VERSION_UNSUPPORTED = 0, | 277 QUIC_VERSION_UNSUPPORTED = 0, |
278 | 278 |
279 QUIC_VERSION_16 = 16, // STOP_WAITING frame. | 279 QUIC_VERSION_16 = 16, // STOP_WAITING frame. |
280 QUIC_VERSION_18 = 18, // PING frame. | 280 QUIC_VERSION_18 = 18, // PING frame. |
281 QUIC_VERSION_19 = 19, // Connection level flow control. | 281 QUIC_VERSION_19 = 19, // Connection level flow control. |
282 QUIC_VERSION_20 = 20, // Independent stream/connection flow control windows. | 282 QUIC_VERSION_20 = 20, // Independent stream/connection flow control windows. |
283 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. | 283 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. |
| 284 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. |
284 }; | 285 }; |
285 | 286 |
286 // This vector contains QUIC versions which we currently support. | 287 // This vector contains QUIC versions which we currently support. |
287 // This should be ordered such that the highest supported version is the first | 288 // This should be ordered such that the highest supported version is the first |
288 // element, with subsequent elements in descending order (versions can be | 289 // element, with subsequent elements in descending order (versions can be |
289 // skipped as necessary). | 290 // skipped as necessary). |
290 // | 291 // |
291 // IMPORTANT: if you are adding to this list, follow the instructions at | 292 // IMPORTANT: if you are adding to this list, follow the instructions at |
292 // http://sites/quic/adding-and-removing-versions | 293 // http://sites/quic/adding-and-removing-versions |
293 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_21, | 294 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_22, |
| 295 QUIC_VERSION_21, |
294 QUIC_VERSION_20, | 296 QUIC_VERSION_20, |
295 QUIC_VERSION_19, | 297 QUIC_VERSION_19, |
296 QUIC_VERSION_18, | 298 QUIC_VERSION_18, |
297 QUIC_VERSION_16}; | 299 QUIC_VERSION_16}; |
298 | 300 |
299 typedef std::vector<QuicVersion> QuicVersionVector; | 301 typedef std::vector<QuicVersion> QuicVersionVector; |
300 | 302 |
301 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 303 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
302 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 304 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
303 | 305 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 // Data was sent for a stream which did not exist. | 438 // Data was sent for a stream which did not exist. |
437 QUIC_PACKET_FOR_NONEXISTENT_STREAM = 15, | 439 QUIC_PACKET_FOR_NONEXISTENT_STREAM = 15, |
438 // The peer is going away. May be a client or server. | 440 // The peer is going away. May be a client or server. |
439 QUIC_PEER_GOING_AWAY = 16, | 441 QUIC_PEER_GOING_AWAY = 16, |
440 // A stream ID was invalid. | 442 // A stream ID was invalid. |
441 QUIC_INVALID_STREAM_ID = 17, | 443 QUIC_INVALID_STREAM_ID = 17, |
442 // A priority was invalid. | 444 // A priority was invalid. |
443 QUIC_INVALID_PRIORITY = 49, | 445 QUIC_INVALID_PRIORITY = 49, |
444 // Too many streams already open. | 446 // Too many streams already open. |
445 QUIC_TOO_MANY_OPEN_STREAMS = 18, | 447 QUIC_TOO_MANY_OPEN_STREAMS = 18, |
| 448 // The peer must send a FIN/RST for each stream, and has not been doing so. |
| 449 QUIC_TOO_MANY_UNFINISHED_STREAMS = 66, |
446 // Received public reset for this connection. | 450 // Received public reset for this connection. |
447 QUIC_PUBLIC_RESET = 19, | 451 QUIC_PUBLIC_RESET = 19, |
448 // Invalid protocol version. | 452 // Invalid protocol version. |
449 QUIC_INVALID_VERSION = 20, | 453 QUIC_INVALID_VERSION = 20, |
450 | 454 |
451 // deprecated: QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21 | 455 // deprecated: QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21 |
452 | 456 |
453 // The Header ID for a stream was too far from the previous. | 457 // The Header ID for a stream was too far from the previous. |
454 QUIC_INVALID_HEADER_ID = 22, | 458 QUIC_INVALID_HEADER_ID = 22, |
455 // Negotiable parameter received during handshake had invalid value. | 459 // Negotiable parameter received during handshake had invalid value. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // A handshake message arrived, but we are still validating the | 530 // A handshake message arrived, but we are still validating the |
527 // previous handshake message. | 531 // previous handshake message. |
528 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54, | 532 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54, |
529 // A server config update arrived before the handshake is complete. | 533 // A server config update arrived before the handshake is complete. |
530 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65, | 534 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65, |
531 // This connection involved a version negotiation which appears to have been | 535 // This connection involved a version negotiation which appears to have been |
532 // tampered with. | 536 // tampered with. |
533 QUIC_VERSION_NEGOTIATION_MISMATCH = 55, | 537 QUIC_VERSION_NEGOTIATION_MISMATCH = 55, |
534 | 538 |
535 // No error. Used as bound while iterating. | 539 // No error. Used as bound while iterating. |
536 QUIC_LAST_ERROR = 66, | 540 QUIC_LAST_ERROR = 67, |
537 }; | 541 }; |
538 | 542 |
539 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader { | 543 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader { |
540 QuicPacketPublicHeader(); | 544 QuicPacketPublicHeader(); |
541 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other); | 545 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other); |
542 ~QuicPacketPublicHeader(); | 546 ~QuicPacketPublicHeader(); |
543 | 547 |
544 // Universal header. All QuicPacket headers will have a connection_id and | 548 // Universal header. All QuicPacket headers will have a connection_id and |
545 // public flags. | 549 // public flags. |
546 QuicConnectionId connection_id; | 550 QuicConnectionId connection_id; |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 // Stores the sequence numbers of all transmissions of this packet. | 1060 // Stores the sequence numbers of all transmissions of this packet. |
1057 // Can never be null. | 1061 // Can never be null. |
1058 SequenceNumberSet* all_transmissions; | 1062 SequenceNumberSet* all_transmissions; |
1059 // In flight packets have not been abandoned or lost. | 1063 // In flight packets have not been abandoned or lost. |
1060 bool in_flight; | 1064 bool in_flight; |
1061 }; | 1065 }; |
1062 | 1066 |
1063 } // namespace net | 1067 } // namespace net |
1064 | 1068 |
1065 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1069 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |