Chromium Code Reviews| Index: net/quic/quic_protocol.h |
| diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h |
| index 5b113b61707d5a8c5fadf5da59c95007a449b52e..bccd2ec84b4d49696c2c64b5bcb5f5b22aaeaf0a 100644 |
| --- a/net/quic/quic_protocol.h |
| +++ b/net/quic/quic_protocol.h |
| @@ -173,128 +173,15 @@ NET_EXPORT_PRIVATE size_t GetStartOfEncryptedData( |
| QuicSequenceNumberLength sequence_number_length); |
| enum QuicRstStreamErrorCode { |
|
eroman
2013/06/17 23:18:19
I dont know this code, but would it make sense for
Ryan Hamilton
2013/06/18 19:23:57
The code started out like this, but it became clea
|
| - QUIC_STREAM_NO_ERROR = 0, |
| - |
| - // There was some server error which halted stream processing. |
| - QUIC_SERVER_ERROR_PROCESSING_STREAM, |
| - // We got two fin or reset offsets which did not match. |
| - QUIC_MULTIPLE_TERMINATION_OFFSETS, |
| - // We got bad payload and can not respond to it at the protocol level. |
| - QUIC_BAD_APPLICATION_PAYLOAD, |
| - // Stream closed due to connection error. No reset frame is sent when this |
| - // happens. |
| - QUIC_STREAM_CONNECTION_ERROR, |
| - // GoAway frame sent. No more stream can be created. |
| - QUIC_STREAM_PEER_GOING_AWAY, |
| - |
| - // No error. Used as bound while iterating. |
| - QUIC_STREAM_LAST_ERROR, |
| +#define QUIC_RST_STREAM_ERROR(error) QUIC_ ## error, |
| +#include "net/quic/quic_rst_stream_error_list.h" |
| +#undef QUIC_RST_STREAM_ERROR |
| }; |
| enum QuicErrorCode { |
| - QUIC_NO_ERROR = 0, |
| - |
| - // Connection has reached an invalid state. |
| - QUIC_INTERNAL_ERROR, |
| - // There were data frames after the a fin or reset. |
| - QUIC_STREAM_DATA_AFTER_TERMINATION, |
| - // Control frame is malformed. |
| - QUIC_INVALID_PACKET_HEADER, |
| - // Frame data is malformed. |
| - QUIC_INVALID_FRAME_DATA, |
| - // FEC data is malformed. |
| - QUIC_INVALID_FEC_DATA, |
| - // Stream rst data is malformed |
| - QUIC_INVALID_RST_STREAM_DATA, |
| - // Connection close data is malformed. |
| - QUIC_INVALID_CONNECTION_CLOSE_DATA, |
| - // GoAway data is malformed. |
| - QUIC_INVALID_GOAWAY_DATA, |
| - // Ack data is malformed. |
| - QUIC_INVALID_ACK_DATA, |
| - // Version negotiation packet is malformed. |
| - QUIC_INVALID_VERSION_NEGOTIATION_PACKET, |
| - // Public RST packet is malformed. |
| - QUIC_INVALID_PUBLIC_RST_PACKET, |
| - // There was an error decrypting. |
| - QUIC_DECRYPTION_FAILURE, |
| - // There was an error encrypting. |
| - QUIC_ENCRYPTION_FAILURE, |
| - // The packet exceeded kMaxPacketSize. |
| - QUIC_PACKET_TOO_LARGE, |
| - // Data was sent for a stream which did not exist. |
| - QUIC_PACKET_FOR_NONEXISTENT_STREAM, |
| - // The peer is going away. May be a client or server. |
| - QUIC_PEER_GOING_AWAY, |
| - // A stream ID was invalid. |
| - QUIC_INVALID_STREAM_ID, |
| - // Too many streams already open. |
| - QUIC_TOO_MANY_OPEN_STREAMS, |
| - // Received public reset for this connection. |
| - QUIC_PUBLIC_RESET, |
| - // Invalid protocol version. |
| - QUIC_INVALID_VERSION, |
| - // Stream reset before headers decompressed. |
| - QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED, |
| - // The Header ID for a stream was too far from the previous. |
| - QUIC_INVALID_HEADER_ID, |
| - // Negotiable parameter received during handshake had invalid value. |
| - QUIC_INVALID_NEGOTIATED_VALUE, |
| - // There was an error decompressing data. |
| - QUIC_DECOMPRESSION_FAILURE, |
| - // We hit our prenegotiated (or default) timeout |
| - QUIC_CONNECTION_TIMED_OUT, |
| - // There was an error encountered migrating addresses |
| - QUIC_ERROR_MIGRATING_ADDRESS, |
| - // There was an error while writing the packet. |
| - QUIC_PACKET_WRITE_ERROR, |
| - |
| - |
| - // Crypto errors. |
| - |
| - // Hanshake failed. |
| - QUIC_HANDSHAKE_FAILED, |
| - // Handshake message contained out of order tags. |
| - QUIC_CRYPTO_TAGS_OUT_OF_ORDER, |
| - // Handshake message contained too many entries. |
| - QUIC_CRYPTO_TOO_MANY_ENTRIES, |
| - // Handshake message contained an invalid value length. |
| - QUIC_CRYPTO_INVALID_VALUE_LENGTH, |
| - // A crypto message was received after the handshake was complete. |
| - QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, |
| - // A crypto message was received with an illegal message tag. |
| - QUIC_INVALID_CRYPTO_MESSAGE_TYPE, |
| - // A crypto message was received with an illegal parameter. |
| - QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, |
| - // A crypto message was received with a mandatory parameter missing. |
| - QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, |
| - // A crypto message was received with a parameter that has no overlap |
| - // with the local parameter. |
| - QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, |
| - // A crypto message was received that contained a parameter with too few |
| - // values. |
| - QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND, |
| - // An internal error occured in crypto processing. |
| - QUIC_CRYPTO_INTERNAL_ERROR, |
| - // A crypto handshake message specified an unsupported version. |
| - QUIC_CRYPTO_VERSION_NOT_SUPPORTED, |
| - // There was no intersection between the crypto primitives supported by the |
| - // peer and ourselves. |
| - QUIC_CRYPTO_NO_SUPPORT, |
| - // The server rejected our client hello messages too many times. |
| - QUIC_CRYPTO_TOO_MANY_REJECTS, |
| - // The client rejected the server's certificate chain or signature. |
| - QUIC_PROOF_INVALID, |
| - // A crypto message was received with a duplicate tag. |
| - QUIC_CRYPTO_DUPLICATE_TAG, |
| - // A crypto message was received with the wrong encryption level (i.e. it |
| - // should have been encrypted but was not.) |
| - QUIC_CRYPTO_ENCRYPTION_LEVEL_INCORRECT, |
| - // The server config for a server has expired. |
| - QUIC_CRYPTO_SERVER_CONFIG_EXPIRED, |
| - |
| - // No error. Used as bound while iterating. |
| - QUIC_LAST_ERROR, |
| +#define QUIC_ERROR(error) QUIC_ ## error, |
| +#include "net/quic/quic_error_list.h" |
| +#undef QUIC_ERROR |
| }; |
| // Version and Crypto tags are written to the wire with a big-endian |