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

Side by Side Diff: net/quic/crypto/crypto_protocol.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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
« no previous file with comments | « net/quic/crypto/crypto_handshake_message_test.cc ('k') | net/quic/crypto/crypto_secret_boxer.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_CRYPTO_CRYPTO_PROTOCOL_H_ 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_
6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ 6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <string> 11 #include <string>
9 12
10 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
11 #include "net/quic/quic_protocol.h" 14 #include "net/quic/quic_protocol.h"
12 15
13 // Version and Crypto tags are written to the wire with a big-endian 16 // Version and Crypto tags are written to the wire with a big-endian
14 // representation of the name of the tag. For example 17 // representation of the name of the tag. For example
15 // the client hello tag (CHLO) will be written as the 18 // the client hello tag (CHLO) will be written as the
16 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is 19 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is
17 // stored in memory as a little endian uint32, we need 20 // stored in memory as a little endian uint32_t, we need
18 // to reverse the order of the bytes. 21 // to reverse the order of the bytes.
19 // 22 //
20 // We use a macro to ensure that no static initialisers are created. Use the 23 // We use a macro to ensure that no static initialisers are created. Use the
21 // MakeQuicTag function in normal code. 24 // MakeQuicTag function in normal code.
22 #define TAG(a, b, c, d) \ 25 #define TAG(a, b, c, d) \
23 static_cast<QuicTag>((d << 24) + (c << 16) + (b << 8) + a) 26 static_cast<QuicTag>((d << 24) + (c << 16) + (b << 8) + a)
24 27
25 namespace net { 28 namespace net {
26 29
27 typedef std::string ServerConfigID; 30 typedef std::string ServerConfigID;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // amplification factor of any mirror DoS attack. 215 // amplification factor of any mirror DoS attack.
213 // 216 //
214 // A client may pad an inchoate client hello to a size larger than 217 // A client may pad an inchoate client hello to a size larger than
215 // kClientHelloMinimumSize to make it more likely to receive a complete 218 // kClientHelloMinimumSize to make it more likely to receive a complete
216 // rejection message. 219 // rejection message.
217 const size_t kClientHelloMinimumSize = 1024; 220 const size_t kClientHelloMinimumSize = 1024;
218 221
219 } // namespace net 222 } // namespace net
220 223
221 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ 224 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_handshake_message_test.cc ('k') | net/quic/crypto/crypto_secret_boxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698