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

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

Issue 22647002: Add support to QUIC for QUIC_VERSION_8: for RSA-PSS signatures, set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 4 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Bit 2: Payload is FEC as opposed to frames? 173 // Bit 2: Payload is FEC as opposed to frames?
174 PACKET_PRIVATE_FLAGS_FEC = 1 << 2, 174 PACKET_PRIVATE_FLAGS_FEC = 1 << 2,
175 175
176 // All bits set (bits 3-7 are not currently used): 00000111 176 // All bits set (bits 3-7 are not currently used): 00000111
177 PACKET_PRIVATE_FLAGS_MAX = (1 << 3) - 1 177 PACKET_PRIVATE_FLAGS_MAX = (1 << 3) - 1
178 }; 178 };
179 179
180 // The available versions of QUIC. Guaranteed that the integer value of the enum 180 // The available versions of QUIC. Guaranteed that the integer value of the enum
181 // will match the version number. 181 // will match the version number.
182 // When adding a new version to this enum you should add it to 182 // When adding a new version to this enum you should add it to
183 // kSupportedVersions (if appropriate), and also add a new case to the helper 183 // kSupportedQuicVersions (if appropriate), and also add a new case to the
184 // methods QuicVersionToQuicTag, and QuicTagToQuicVersion. 184 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and
185 // QuicVersionToString.
185 enum QuicVersion { 186 enum QuicVersion {
186 // Special case to indicate unknown/unsupported QUIC version. 187 // Special case to indicate unknown/unsupported QUIC version.
187 QUIC_VERSION_UNSUPPORTED = 0, 188 QUIC_VERSION_UNSUPPORTED = 0,
188 189
189 QUIC_VERSION_6 = 6, 190 QUIC_VERSION_6 = 6,
190 QUIC_VERSION_7 = 7, // Current version. 191 QUIC_VERSION_7 = 7,
192 QUIC_VERSION_8 = 8, // Current version.
191 }; 193 };
192 194
193 // This vector contains QUIC versions which we currently support. 195 // This vector contains QUIC versions which we currently support.
194 // This should be ordered such that the highest supported version is the first 196 // This should be ordered such that the highest supported version is the first
195 // element, with subsequent elements in descending order (versions can be 197 // element, with subsequent elements in descending order (versions can be
196 // skipped as necessary). 198 // skipped as necessary).
197 static const QuicVersion kSupportedQuicVersions[] = 199 static const QuicVersion kSupportedQuicVersions[] =
198 {QUIC_VERSION_7, QUIC_VERSION_6}; 200 {QUIC_VERSION_8, QUIC_VERSION_7, QUIC_VERSION_6};
199 201
200 typedef std::vector<QuicVersion> QuicVersionVector; 202 typedef std::vector<QuicVersion> QuicVersionVector;
201 203
202 // Upper limit on versions we support. 204 // Upper limit on versions we support.
203 NET_EXPORT_PRIVATE QuicVersion QuicVersionMax(); 205 NET_EXPORT_PRIVATE QuicVersion QuicVersionMax();
204 206
205 // QuicTag is written to and read from the wire, but we prefer to use 207 // QuicTag is written to and read from the wire, but we prefer to use
206 // the more readable QuicVersion at other levels. 208 // the more readable QuicVersion at other levels.
207 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 209 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0
208 // if QuicVersion is unsupported. 210 // if QuicVersion is unsupported.
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 NET_EXPORT_PRIVATE friend std::ostream& operator<<( 834 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
833 std::ostream& os, const QuicConsumedData& s); 835 std::ostream& os, const QuicConsumedData& s);
834 836
835 size_t bytes_consumed; 837 size_t bytes_consumed;
836 bool fin_consumed; 838 bool fin_consumed;
837 }; 839 };
838 840
839 } // namespace net 841 } // namespace net
840 842
841 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 843 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698