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

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

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

Powered by Google App Engine
This is Rietveld 408576698