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_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> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 const QuicTag kAESG = TAG('A', 'E', 'S', 'G'); // AES128 + GCM-12 | 49 const QuicTag kAESG = TAG('A', 'E', 'S', 'G'); // AES128 + GCM-12 |
50 const QuicTag kCC20 = TAG('C', 'C', '2', '0'); // ChaCha20 + Poly1305 RFC7539 | 50 const QuicTag kCC20 = TAG('C', 'C', '2', '0'); // ChaCha20 + Poly1305 RFC7539 |
51 | 51 |
52 // Socket receive buffer | 52 // Socket receive buffer |
53 const QuicTag kSRBF = TAG('S', 'R', 'B', 'F'); // Socket receive buffer | 53 const QuicTag kSRBF = TAG('S', 'R', 'B', 'F'); // Socket receive buffer |
54 | 54 |
55 // Congestion control feedback types | 55 // Congestion control feedback types |
56 const QuicTag kQBIC = TAG('Q', 'B', 'I', 'C'); // TCP cubic | 56 const QuicTag kQBIC = TAG('Q', 'B', 'I', 'C'); // TCP cubic |
57 | 57 |
58 // Connection options (COPT) values | 58 // Connection options (COPT) values |
59 const QuicTag kAFCW = TAG('A', 'F', 'C', 'W'); // Auto-tune flow control | |
60 // receive windows. | |
61 const QuicTag kIFW5 = TAG('I', 'F', 'W', '5'); // Set initial size | |
62 // of stream flow control | |
63 // receive window to | |
64 // 32KB. (2^5 KB). | |
65 const QuicTag kIFW6 = TAG('I', 'F', 'W', '6'); // Set initial size | |
66 // of stream flow control | |
67 // receive window to | |
68 // 64KB. (2^6 KB). | |
69 const QuicTag kIFW7 = TAG('I', 'F', 'W', '7'); // Set initial size | |
70 // of stream flow control | |
71 // receive window to | |
72 // 128KB. (2^7 KB). | |
73 const QuicTag kTBBR = TAG('T', 'B', 'B', 'R'); // Reduced Buffer Bloat TCP | 59 const QuicTag kTBBR = TAG('T', 'B', 'B', 'R'); // Reduced Buffer Bloat TCP |
74 const QuicTag kRENO = TAG('R', 'E', 'N', 'O'); // Reno Congestion Control | 60 const QuicTag kRENO = TAG('R', 'E', 'N', 'O'); // Reno Congestion Control |
75 const QuicTag kBYTE = TAG('B', 'Y', 'T', 'E'); // TCP cubic or reno in bytes | 61 const QuicTag kBYTE = TAG('B', 'Y', 'T', 'E'); // TCP cubic or reno in bytes |
76 const QuicTag kIW03 = TAG('I', 'W', '0', '3'); // Force ICWND to 3 | 62 const QuicTag kIW03 = TAG('I', 'W', '0', '3'); // Force ICWND to 3 |
77 const QuicTag kIW10 = TAG('I', 'W', '1', '0'); // Force ICWND to 10 | 63 const QuicTag kIW10 = TAG('I', 'W', '1', '0'); // Force ICWND to 10 |
78 const QuicTag kIW20 = TAG('I', 'W', '2', '0'); // Force ICWND to 20 | 64 const QuicTag kIW20 = TAG('I', 'W', '2', '0'); // Force ICWND to 20 |
79 const QuicTag kIW50 = TAG('I', 'W', '5', '0'); // Force ICWND to 50 | 65 const QuicTag kIW50 = TAG('I', 'W', '5', '0'); // Force ICWND to 50 |
80 const QuicTag k1CON = TAG('1', 'C', 'O', 'N'); // Emulate a single connection | 66 const QuicTag k1CON = TAG('1', 'C', 'O', 'N'); // Emulate a single connection |
81 const QuicTag kNTLP = TAG('N', 'T', 'L', 'P'); // No tail loss probe | 67 const QuicTag kNTLP = TAG('N', 'T', 'L', 'P'); // No tail loss probe |
82 const QuicTag kNCON = TAG('N', 'C', 'O', 'N'); // N Connection Congestion Ctrl | 68 const QuicTag kNCON = TAG('N', 'C', 'O', 'N'); // N Connection Congestion Ctrl |
83 const QuicTag kNRTO = TAG('N', 'R', 'T', 'O'); // CWND reduction on loss | 69 const QuicTag kNRTO = TAG('N', 'R', 'T', 'O'); // CWND reduction on loss |
84 const QuicTag kTIME = TAG('T', 'I', 'M', 'E'); // Time based loss detection | 70 const QuicTag kTIME = TAG('T', 'I', 'M', 'E'); // Time based loss detection |
85 const QuicTag kMIN1 = TAG('M', 'I', 'N', '1'); // Min CWND of 1 packet | 71 const QuicTag kMIN1 = TAG('M', 'I', 'N', '1'); // Min CWND of 1 packet |
86 const QuicTag kMIN4 = TAG('M', 'I', 'N', '4'); // Min CWND of 4 packets, | 72 const QuicTag kMIN4 = TAG('M', 'I', 'N', '4'); // Min CWND of 4 packets, |
87 // with a min rate of 1 BDP. | 73 // with a min rate of 1 BDP. |
88 const QuicTag kTLPR = TAG('T', 'L', 'P', 'R'); // Tail loss probe delay of | 74 const QuicTag kTLPR = TAG('T', 'L', 'P', 'R'); // Tail loss probe delay of |
89 // 0.5RTT. | 75 // 0.5RTT. |
90 const QuicTag kACKD = TAG('A', 'C', 'K', 'D'); // Ack decimation style acking. | 76 const QuicTag kACKD = TAG('A', 'C', 'K', 'D'); // Ack decimation style acking. |
91 const QuicTag kAKD2 = TAG('A', 'K', 'D', '2'); // Ack decimation tolerating | 77 const QuicTag kAKD2 = TAG('A', 'K', 'D', '2'); // Ack decimation tolerating |
92 // out of order packets. | 78 // out of order packets. |
93 const QuicTag kSSLR = TAG('S', 'S', 'L', 'R'); // Slow Start Large Reduction. | 79 const QuicTag kSSLR = TAG('S', 'S', 'L', 'R'); // Slow Start Large Reduction. |
94 const QuicTag k5RTO = TAG('5', 'R', 'T', 'O'); // Close connection on 5 RTOs | 80 const QuicTag k5RTO = TAG('5', 'R', 'T', 'O'); // Close connection on 5 RTOs |
95 const QuicTag kCTIM = TAG('C', 'T', 'I', 'M'); // Client timestamp in seconds | 81 const QuicTag kCTIM = TAG('C', 'T', 'I', 'M'); // Client timestamp in seconds |
96 // since UNIX epoch. | 82 // since UNIX epoch. |
| 83 const QuicTag kDHDT = TAG('D', 'H', 'D', 'T'); // Disable HPACK dynamic table. |
97 | 84 |
98 // Optional support of truncated Connection IDs. If sent by a peer, the value | 85 // Optional support of truncated Connection IDs. If sent by a peer, the value |
99 // is the minimum number of bytes allowed for the connection ID sent to the | 86 // is the minimum number of bytes allowed for the connection ID sent to the |
100 // peer. | 87 // peer. |
101 const QuicTag kTCID = TAG('T', 'C', 'I', 'D'); // Connection ID truncation. | 88 const QuicTag kTCID = TAG('T', 'C', 'I', 'D'); // Connection ID truncation. |
102 | 89 |
103 // Multipath option. | 90 // Multipath option. |
104 const QuicTag kMPTH = TAG('M', 'P', 'T', 'H'); // Enable multipath. | 91 const QuicTag kMPTH = TAG('M', 'P', 'T', 'H'); // Enable multipath. |
105 | 92 |
106 const QuicTag kNCMR = TAG('N', 'C', 'M', 'R'); // Do not attempt connection | 93 const QuicTag kNCMR = TAG('N', 'C', 'M', 'R'); // Do not attempt connection |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 const QuicTag kCIDK = TAG('C', 'I', 'D', 'K'); // ChannelID key | 156 const QuicTag kCIDK = TAG('C', 'I', 'D', 'K'); // ChannelID key |
170 const QuicTag kCIDS = TAG('C', 'I', 'D', 'S'); // ChannelID signature | 157 const QuicTag kCIDS = TAG('C', 'I', 'D', 'S'); // ChannelID signature |
171 | 158 |
172 // Public reset tags | 159 // Public reset tags |
173 const QuicTag kRNON = TAG('R', 'N', 'O', 'N'); // Public reset nonce proof | 160 const QuicTag kRNON = TAG('R', 'N', 'O', 'N'); // Public reset nonce proof |
174 const QuicTag kRSEQ = TAG('R', 'S', 'E', 'Q'); // Rejected packet number | 161 const QuicTag kRSEQ = TAG('R', 'S', 'E', 'Q'); // Rejected packet number |
175 | 162 |
176 // Universal tags | 163 // Universal tags |
177 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding | 164 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding |
178 | 165 |
| 166 // Server push tags |
| 167 const QuicTag kSPSH = TAG('S', 'P', 'S', 'H'); // Support server push. |
| 168 |
179 // Sent by clients with the fix to crbug/566156 | 169 // Sent by clients with the fix to crbug/566156 |
180 const QuicTag kFIXD = TAG('F', 'I', 'X', 'D'); // Client hello | 170 const QuicTag kFIXD = TAG('F', 'I', 'X', 'D'); // Client hello |
181 // clang-format on | 171 // clang-format on |
182 | 172 |
183 // These tags have a special form so that they appear either at the beginning | 173 // These tags have a special form so that they appear either at the beginning |
184 // or the end of a handshake message. Since handshake messages are sorted by | 174 // or the end of a handshake message. Since handshake messages are sorted by |
185 // tag value, the tags with 0 at the end will sort first and those with 255 at | 175 // tag value, the tags with 0 at the end will sort first and those with 255 at |
186 // the end will sort last. | 176 // the end will sort last. |
187 // | 177 // |
188 // The certificate chain should have a tag that will cause it to be sorted at | 178 // The certificate chain should have a tag that will cause it to be sorted at |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // amplification factor of any mirror DoS attack. | 214 // amplification factor of any mirror DoS attack. |
225 // | 215 // |
226 // A client may pad an inchoate client hello to a size larger than | 216 // A client may pad an inchoate client hello to a size larger than |
227 // kClientHelloMinimumSize to make it more likely to receive a complete | 217 // kClientHelloMinimumSize to make it more likely to receive a complete |
228 // rejection message. | 218 // rejection message. |
229 const size_t kClientHelloMinimumSize = 1024; | 219 const size_t kClientHelloMinimumSize = 1024; |
230 | 220 |
231 } // namespace net | 221 } // namespace net |
232 | 222 |
233 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 223 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
OLD | NEW |