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

Side by Side Diff: trunk/src/net/quic/quic_protocol.h

Issue 15018013: Revert 198736 "Land Recent QUIC changes" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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
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_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 20 matching lines...) Expand all
31 31
32 typedef uint64 QuicGuid; 32 typedef uint64 QuicGuid;
33 typedef uint32 QuicStreamId; 33 typedef uint32 QuicStreamId;
34 typedef uint64 QuicStreamOffset; 34 typedef uint64 QuicStreamOffset;
35 typedef uint64 QuicPacketSequenceNumber; 35 typedef uint64 QuicPacketSequenceNumber;
36 typedef QuicPacketSequenceNumber QuicFecGroupNumber; 36 typedef QuicPacketSequenceNumber QuicFecGroupNumber;
37 typedef uint64 QuicPublicResetNonceProof; 37 typedef uint64 QuicPublicResetNonceProof;
38 typedef uint8 QuicPacketEntropyHash; 38 typedef uint8 QuicPacketEntropyHash;
39 typedef uint32 QuicVersionTag; 39 typedef uint32 QuicVersionTag;
40 typedef std::vector<QuicVersionTag> QuicVersionTagList; 40 typedef std::vector<QuicVersionTag> QuicVersionTagList;
41 typedef uint32 QuicHeaderId;
42 41
43 // TODO(rch): Consider Quic specific names for these constants. 42 // TODO(rch): Consider Quic specific names for these constants.
44 // Maximum size in bytes of a QUIC packet. 43 // Maximum size in bytes of a QUIC packet.
45 const QuicByteCount kMaxPacketSize = 1200; 44 const QuicByteCount kMaxPacketSize = 1200;
46 45
47 // Maximum number of open streams per connection. 46 // Maximum number of open streams per connection.
48 const size_t kDefaultMaxStreamsPerConnection = 100; 47 const size_t kDefaultMaxStreamsPerConnection = 100;
49 48
50 // Number of bytes reserved for guid in the packet header. 49 // Number of bytes reserved for guid in the packet header.
51 const size_t kQuicGuidSize = 8; 50 const size_t kQuicGuidSize = 8;
(...skipping 23 matching lines...) Expand all
75 // Index of the first byte in a QUIC packet of encrypted data. 74 // Index of the first byte in a QUIC packet of encrypted data.
76 NET_EXPORT_PRIVATE size_t GetStartOfEncryptedData(bool include_version); 75 NET_EXPORT_PRIVATE size_t GetStartOfEncryptedData(bool include_version);
77 // Returns true if |version| is a supported protocol version. 76 // Returns true if |version| is a supported protocol version.
78 NET_EXPORT_PRIVATE bool IsSupportedVersion(QuicVersionTag version); 77 NET_EXPORT_PRIVATE bool IsSupportedVersion(QuicVersionTag version);
79 78
80 // Index of the first byte in a QUIC packet which is used in hash calculation. 79 // Index of the first byte in a QUIC packet which is used in hash calculation.
81 const size_t kStartOfHashData = 0; 80 const size_t kStartOfHashData = 0;
82 81
83 // Limit on the delta between stream IDs. 82 // Limit on the delta between stream IDs.
84 const QuicStreamId kMaxStreamIdDelta = 100; 83 const QuicStreamId kMaxStreamIdDelta = 100;
85 // Limit on the delta between header IDs.
86 const QuicHeaderId kMaxHeaderIdDelta = 100;
87 84
88 // Reserved ID for the crypto stream. 85 // Reserved ID for the crypto stream.
89 // TODO(rch): ensure that this is not usable by any other streams. 86 // TODO(rch): ensure that this is not usable by any other streams.
90 const QuicStreamId kCryptoStreamId = 1; 87 const QuicStreamId kCryptoStreamId = 1;
91 88
92 // Value which indicates this packet is not FEC protected. 89 // Value which indicates this packet is not FEC protected.
93 const uint8 kNoFecOffset = 0xFF; 90 const uint8 kNoFecOffset = 0xFF;
94 91
95 const int64 kDefaultTimeoutUs = 600000000; // 10 minutes. 92 const int64 kDefaultTimeoutUs = 600000000; // 10 minutes.
96 93
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Data was sent for a stream which did not exist. 178 // Data was sent for a stream which did not exist.
182 QUIC_PACKET_FOR_NONEXISTENT_STREAM, 179 QUIC_PACKET_FOR_NONEXISTENT_STREAM,
183 // The peer is going away. May be a client or server. 180 // The peer is going away. May be a client or server.
184 QUIC_PEER_GOING_AWAY, 181 QUIC_PEER_GOING_AWAY,
185 // A stream ID was invalid. 182 // A stream ID was invalid.
186 QUIC_INVALID_STREAM_ID, 183 QUIC_INVALID_STREAM_ID,
187 // Too many streams already open. 184 // Too many streams already open.
188 QUIC_TOO_MANY_OPEN_STREAMS, 185 QUIC_TOO_MANY_OPEN_STREAMS,
189 // Received public reset for this connection. 186 // Received public reset for this connection.
190 QUIC_PUBLIC_RESET, 187 QUIC_PUBLIC_RESET,
191 // Invalid protocol version. 188 // Invalid protocol version
192 QUIC_INVALID_VERSION, 189 QUIC_INVALID_VERSION,
193 // Stream reset before headers decompressed.
194 QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED,
195 // The Header ID for a stream was too far from the previous.
196 QUIC_INVALID_HEADER_ID,
197 190
198 // We hit our prenegotiated (or default) timeout 191 // We hit our prenegotiated (or default) timeout
199 QUIC_CONNECTION_TIMED_OUT, 192 QUIC_CONNECTION_TIMED_OUT,
200 193
201 // Crypto errors. 194 // Crypto errors.
202 195
203 // Handshake message contained out of order tags. 196 // Handshake message contained out of order tags.
204 QUIC_CRYPTO_TAGS_OUT_OF_ORDER, 197 QUIC_CRYPTO_TAGS_OUT_OF_ORDER,
205 // Handshake message contained too many entries. 198 // Handshake message contained too many entries.
206 QUIC_CRYPTO_TOO_MANY_ENTRIES, 199 QUIC_CRYPTO_TOO_MANY_ENTRIES,
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 NET_EXPORT_PRIVATE friend std::ostream& operator<<( 687 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
695 std::ostream& os, const QuicConsumedData& s); 688 std::ostream& os, const QuicConsumedData& s);
696 689
697 size_t bytes_consumed; 690 size_t bytes_consumed;
698 bool fin_consumed; 691 bool fin_consumed;
699 }; 692 };
700 693
701 } // namespace net 694 } // namespace net
702 695
703 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 696 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « trunk/src/net/quic/quic_network_transaction_unittest.cc ('k') | trunk/src/net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698