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 #include "net/quic/quic_utils.h" | 5 #include "net/quic/quic_utils.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP); | 243 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP); |
244 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND); | 244 RETURN_STRING_LITERAL(QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND); |
245 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_ID); | 245 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_ID); |
246 RETURN_STRING_LITERAL(QUIC_INVALID_PRIORITY); | 246 RETURN_STRING_LITERAL(QUIC_INVALID_PRIORITY); |
247 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OPEN_STREAMS); | 247 RETURN_STRING_LITERAL(QUIC_TOO_MANY_OPEN_STREAMS); |
248 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESET); | 248 RETURN_STRING_LITERAL(QUIC_PUBLIC_RESET); |
249 RETURN_STRING_LITERAL(QUIC_INVALID_VERSION); | 249 RETURN_STRING_LITERAL(QUIC_INVALID_VERSION); |
250 RETURN_STRING_LITERAL(QUIC_INVALID_HEADER_ID); | 250 RETURN_STRING_LITERAL(QUIC_INVALID_HEADER_ID); |
251 RETURN_STRING_LITERAL(QUIC_INVALID_NEGOTIATED_VALUE); | 251 RETURN_STRING_LITERAL(QUIC_INVALID_NEGOTIATED_VALUE); |
252 RETURN_STRING_LITERAL(QUIC_DECOMPRESSION_FAILURE); | 252 RETURN_STRING_LITERAL(QUIC_DECOMPRESSION_FAILURE); |
253 RETURN_STRING_LITERAL(QUIC_CONNECTION_TIMED_OUT); | 253 RETURN_STRING_LITERAL(QUIC_NETWORK_IDLE_TIMEOUT); |
254 RETURN_STRING_LITERAL(QUIC_CONNECTION_OVERALL_TIMED_OUT); | 254 RETURN_STRING_LITERAL(QUIC_HANDSHAKE_TIMEOUT); |
255 RETURN_STRING_LITERAL(QUIC_ERROR_MIGRATING_ADDRESS); | 255 RETURN_STRING_LITERAL(QUIC_ERROR_MIGRATING_ADDRESS); |
256 RETURN_STRING_LITERAL(QUIC_PACKET_WRITE_ERROR); | 256 RETURN_STRING_LITERAL(QUIC_PACKET_WRITE_ERROR); |
257 RETURN_STRING_LITERAL(QUIC_PACKET_READ_ERROR); | 257 RETURN_STRING_LITERAL(QUIC_PACKET_READ_ERROR); |
258 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_FRAME); | 258 RETURN_STRING_LITERAL(QUIC_INVALID_STREAM_FRAME); |
259 RETURN_STRING_LITERAL(QUIC_INVALID_HEADERS_STREAM_DATA); | 259 RETURN_STRING_LITERAL(QUIC_INVALID_HEADERS_STREAM_DATA); |
260 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA); | 260 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA); |
261 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA); | 261 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA); |
262 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_INVALID_WINDOW); | 262 RETURN_STRING_LITERAL(QUIC_FLOW_CONTROL_INVALID_WINDOW); |
263 RETURN_STRING_LITERAL(QUIC_CONNECTION_IP_POOLED); | 263 RETURN_STRING_LITERAL(QUIC_CONNECTION_IP_POOLED); |
264 RETURN_STRING_LITERAL(QUIC_PROOF_INVALID); | 264 RETURN_STRING_LITERAL(QUIC_PROOF_INVALID); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 static_assert(sizeof(packet_number) == 8, | 471 static_assert(sizeof(packet_number) == 8, |
472 "Size of QuicPacketNumber changed."); | 472 "Size of QuicPacketNumber changed."); |
473 // Use path_id and lower 7 bytes of packet_number as lower 8 bytes of nonce. | 473 // Use path_id and lower 7 bytes of packet_number as lower 8 bytes of nonce. |
474 uint64_t path_id_packet_number = | 474 uint64_t path_id_packet_number = |
475 (static_cast<uint64_t>(path_id) << 56) | packet_number; | 475 (static_cast<uint64_t>(path_id) << 56) | packet_number; |
476 DCHECK(path_id != kDefaultPathId || path_id_packet_number == packet_number); | 476 DCHECK(path_id != kDefaultPathId || path_id_packet_number == packet_number); |
477 return path_id_packet_number; | 477 return path_id_packet_number; |
478 } | 478 } |
479 | 479 |
480 } // namespace net | 480 } // namespace net |
OLD | NEW |