Chromium Code Reviews| Index: net/quic/quic_error_list.h |
| diff --git a/net/quic/quic_error_list.h b/net/quic/quic_error_list.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..567a8273868cb3307de820de3751ea0a4b62079a |
| --- /dev/null |
| +++ b/net/quic/quic_error_list.h |
| @@ -0,0 +1,112 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// This file intentionally does not have header guards) |
| +// inside a macro to generate enum. |
| + |
| +// This file contains the list of QUIC errors. |
| + |
| +QUIC_ERROR(NO_ERROR) |
| + |
| +// Connection has reached an invalid state. |
| +QUIC_ERROR(INTERNAL_ERROR) |
| +// There were data frames after the a fin or reset. |
|
eroman
2013/06/17 23:18:19
"the a fin": remove "a"
Ryan Hamilton
2013/06/18 19:23:57
Done.
|
| +QUIC_ERROR(STREAM_DATA_AFTER_TERMINATION) |
| +// Control frame is malformed. |
| +QUIC_ERROR(INVALID_PACKET_HEADER) |
| +// Frame data is malformed. |
| +QUIC_ERROR(INVALID_FRAME_DATA) |
| +// FEC data is malformed. |
| +QUIC_ERROR(INVALID_FEC_DATA) |
| +// Stream rst data is malformed |
| +QUIC_ERROR(INVALID_RST_STREAM_DATA) |
| +// Connection close data is malformed. |
| +QUIC_ERROR(INVALID_CONNECTION_CLOSE_DATA) |
| +// GoAway data is malformed. |
| +QUIC_ERROR(INVALID_GOAWAY_DATA) |
| +// Ack data is malformed. |
| +QUIC_ERROR(INVALID_ACK_DATA) |
| +// Version negotiation packet is malformed. |
| +QUIC_ERROR(INVALID_VERSION_NEGOTIATION_PACKET) |
| +// Public RST packet is malformed. |
| +QUIC_ERROR(INVALID_PUBLIC_RST_PACKET) |
| +// There was an error decrypting. |
| +QUIC_ERROR(DECRYPTION_FAILURE) |
| +// There was an error encrypting. |
| +QUIC_ERROR(ENCRYPTION_FAILURE) |
| +// The packet exceeded kMaxPacketSize. |
| +QUIC_ERROR(PACKET_TOO_LARGE) |
| +// Data was sent for a stream which did not exist. |
| +QUIC_ERROR(PACKET_FOR_NONEXISTENT_STREAM) |
| +// The peer is going away.May be a client or server. |
|
eroman
2013/06/17 23:18:19
space after period
Ryan Hamilton
2013/06/18 19:23:57
Done.
|
| +QUIC_ERROR(PEER_GOING_AWAY) |
| +// A stream ID was invalid. |
| +QUIC_ERROR(INVALID_STREAM_ID) |
| +// Too many streams already open. |
| +QUIC_ERROR(TOO_MANY_OPEN_STREAMS) |
| +// Received public reset for this connection. |
| +QUIC_ERROR(PUBLIC_RESET) |
| +// Invalid protocol version. |
| +QUIC_ERROR(INVALID_VERSION) |
| +// Stream reset before headers decompressed. |
| +QUIC_ERROR(STREAM_RST_BEFORE_HEADERS_DECOMPRESSED) |
| +// The Header ID for a stream was too far from the previous. |
| +QUIC_ERROR(INVALID_HEADER_ID) |
| +// Negotiable parameter received during handshake had invalid value. |
| +QUIC_ERROR(INVALID_NEGOTIATED_VALUE) |
| +// There was an error decompressing data. |
| +QUIC_ERROR(DECOMPRESSION_FAILURE) |
| +// We hit our prenegotiated (or default) timeout |
| +QUIC_ERROR(CONNECTION_TIMED_OUT) |
| +// There was an error encountered migrating addresses |
| +QUIC_ERROR(ERROR_MIGRATING_ADDRESS) |
| +// There was an error while writing the packet. |
| +QUIC_ERROR(PACKET_WRITE_ERROR) |
| + |
| + |
| +// Crypto errors. |
| + |
| +// Hanshake failed. |
|
eroman
2013/06/17 23:18:19
Hanshake: (noun) when you shake hands with Han Sol
Ryan Hamilton
2013/06/18 19:23:57
BWAHAHAHA! Well played, sir!
Done.
|
| +QUIC_ERROR(HANDSHAKE_FAILED) |
| +// Handshake message contained out of order tags. |
| +QUIC_ERROR(CRYPTO_TAGS_OUT_OF_ORDER) |
| +// Handshake message contained too many entries. |
| +QUIC_ERROR(CRYPTO_TOO_MANY_ENTRIES) |
| +// Handshake message contained an invalid value length. |
| +QUIC_ERROR(CRYPTO_INVALID_VALUE_LENGTH) |
| +// A crypto message was received after the handshake was complete. |
| +QUIC_ERROR(CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE) |
| +// A crypto message was received with an illegal message tag. |
| +QUIC_ERROR(INVALID_CRYPTO_MESSAGE_TYPE) |
| +// A crypto message was received with an illegal parameter. |
| +QUIC_ERROR(INVALID_CRYPTO_MESSAGE_PARAMETER) |
| +// A crypto message was received with a mandatory parameter missing. |
| +QUIC_ERROR(CRYPTO_MESSAGE_PARAMETER_NOT_FOUND) |
| +// A crypto message was received with a parameter that has no overlap |
| +// with the local parameter. |
| +QUIC_ERROR(CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP) |
| +// A crypto message was received that contained a parameter with too few |
| +// values. |
| +QUIC_ERROR(CRYPTO_MESSAGE_INDEX_NOT_FOUND) |
| +// An internal error occured in crypto processing. |
| +QUIC_ERROR(CRYPTO_INTERNAL_ERROR) |
| +// A crypto handshake message specified an unsupported version. |
| +QUIC_ERROR(CRYPTO_VERSION_NOT_SUPPORTED) |
| +// There was no intersection between the crypto primitives supported by the |
| +// peer and ourselves. |
| +QUIC_ERROR(CRYPTO_NO_SUPPORT) |
| +// The server rejected our client hello messages too many times. |
| +QUIC_ERROR(CRYPTO_TOO_MANY_REJECTS) |
| +// The client rejected the server's certificate chain or signature. |
| +QUIC_ERROR(PROOF_INVALID) |
| +// A crypto message was received with a duplicate tag. |
| +QUIC_ERROR(CRYPTO_DUPLICATE_TAG) |
| +// A crypto message was received with the wrong encryption level (i.e. it |
| +// should have been encrypted but was not.) |
| +QUIC_ERROR(CRYPTO_ENCRYPTION_LEVEL_INCORRECT) |
| +// The server config for a server has expired. |
| +QUIC_ERROR(CRYPTO_SERVER_CONFIG_EXPIRED) |
| + |
| +// No error. Used as bound while iterating. |
| +QUIC_ERROR(LAST_ERROR) |
|
eroman
2013/06/17 23:18:19
note: this will be exposed in the log file and jav
Ryan Hamilton
2013/06/18 19:23:57
Good point. Moved to the enum declaration.
|