| 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_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
| 6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 QuicSequenceNumberLength sequence_number_length); | 263 QuicSequenceNumberLength sequence_number_length); |
| 264 // Index of the first byte in a QUIC packet of encrypted data. | 264 // Index of the first byte in a QUIC packet of encrypted data. |
| 265 NET_EXPORT_PRIVATE size_t GetStartOfEncryptedData( | 265 NET_EXPORT_PRIVATE size_t GetStartOfEncryptedData( |
| 266 QuicGuidLength guid_length, | 266 QuicGuidLength guid_length, |
| 267 bool include_version, | 267 bool include_version, |
| 268 QuicSequenceNumberLength sequence_number_length); | 268 QuicSequenceNumberLength sequence_number_length); |
| 269 | 269 |
| 270 enum QuicRstStreamErrorCode { | 270 enum QuicRstStreamErrorCode { |
| 271 QUIC_STREAM_NO_ERROR = 0, | 271 QUIC_STREAM_NO_ERROR = 0, |
| 272 | 272 |
| 273 // There was some server error which halted stream processing. | 273 // There was some error which halted stream processing. |
| 274 QUIC_SERVER_ERROR_PROCESSING_STREAM, | 274 QUIC_ERROR_PROCESSING_STREAM, |
| 275 // We got two fin or reset offsets which did not match. | 275 // We got two fin or reset offsets which did not match. |
| 276 QUIC_MULTIPLE_TERMINATION_OFFSETS, | 276 QUIC_MULTIPLE_TERMINATION_OFFSETS, |
| 277 // We got bad payload and can not respond to it at the protocol level. | 277 // We got bad payload and can not respond to it at the protocol level. |
| 278 QUIC_BAD_APPLICATION_PAYLOAD, | 278 QUIC_BAD_APPLICATION_PAYLOAD, |
| 279 // Stream closed due to connection error. No reset frame is sent when this | 279 // Stream closed due to connection error. No reset frame is sent when this |
| 280 // happens. | 280 // happens. |
| 281 QUIC_STREAM_CONNECTION_ERROR, | 281 QUIC_STREAM_CONNECTION_ERROR, |
| 282 // GoAway frame sent. No more stream can be created. | 282 // GoAway frame sent. No more stream can be created. |
| 283 QUIC_STREAM_PEER_GOING_AWAY, | 283 QUIC_STREAM_PEER_GOING_AWAY, |
| 284 // The stream has been cancelled. | 284 // The stream has been cancelled. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 // There was an error encrypting. | 327 // There was an error encrypting. |
| 328 QUIC_ENCRYPTION_FAILURE = 13, | 328 QUIC_ENCRYPTION_FAILURE = 13, |
| 329 // The packet exceeded kMaxPacketSize. | 329 // The packet exceeded kMaxPacketSize. |
| 330 QUIC_PACKET_TOO_LARGE = 14, | 330 QUIC_PACKET_TOO_LARGE = 14, |
| 331 // Data was sent for a stream which did not exist. | 331 // Data was sent for a stream which did not exist. |
| 332 QUIC_PACKET_FOR_NONEXISTENT_STREAM = 15, | 332 QUIC_PACKET_FOR_NONEXISTENT_STREAM = 15, |
| 333 // The peer is going away. May be a client or server. | 333 // The peer is going away. May be a client or server. |
| 334 QUIC_PEER_GOING_AWAY = 16, | 334 QUIC_PEER_GOING_AWAY = 16, |
| 335 // A stream ID was invalid. | 335 // A stream ID was invalid. |
| 336 QUIC_INVALID_STREAM_ID = 17, | 336 QUIC_INVALID_STREAM_ID = 17, |
| 337 // A priority was invalid. |
| 338 QUIC_INVALID_PRIORITY = 49, |
| 337 // Too many streams already open. | 339 // Too many streams already open. |
| 338 QUIC_TOO_MANY_OPEN_STREAMS = 18, | 340 QUIC_TOO_MANY_OPEN_STREAMS = 18, |
| 339 // Received public reset for this connection. | 341 // Received public reset for this connection. |
| 340 QUIC_PUBLIC_RESET = 19, | 342 QUIC_PUBLIC_RESET = 19, |
| 341 // Invalid protocol version. | 343 // Invalid protocol version. |
| 342 QUIC_INVALID_VERSION = 20, | 344 QUIC_INVALID_VERSION = 20, |
| 343 // Stream reset before headers decompressed. | 345 // Stream reset before headers decompressed. |
| 344 QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21, | 346 QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21, |
| 345 // The Header ID for a stream was too far from the previous. | 347 // The Header ID for a stream was too far from the previous. |
| 346 QUIC_INVALID_HEADER_ID = 22, | 348 QUIC_INVALID_HEADER_ID = 22, |
| 347 // Negotiable parameter received during handshake had invalid value. | 349 // Negotiable parameter received during handshake had invalid value. |
| 348 QUIC_INVALID_NEGOTIATED_VALUE = 23, | 350 QUIC_INVALID_NEGOTIATED_VALUE = 23, |
| 349 // There was an error decompressing data. | 351 // There was an error decompressing data. |
| 350 QUIC_DECOMPRESSION_FAILURE = 24, | 352 QUIC_DECOMPRESSION_FAILURE = 24, |
| 351 // We hit our prenegotiated (or default) timeout | 353 // We hit our prenegotiated (or default) timeout |
| 352 QUIC_CONNECTION_TIMED_OUT = 25, | 354 QUIC_CONNECTION_TIMED_OUT = 25, |
| 353 // There was an error encountered migrating addresses | 355 // There was an error encountered migrating addresses |
| 354 QUIC_ERROR_MIGRATING_ADDRESS = 26, | 356 QUIC_ERROR_MIGRATING_ADDRESS = 26, |
| 355 // There was an error while writing to the socket. | 357 // There was an error while writing to the socket. |
| 356 QUIC_PACKET_WRITE_ERROR = 27, | 358 QUIC_PACKET_WRITE_ERROR = 27, |
| 357 // There was an error while reading from the socket. | 359 // There was an error while reading from the socket. |
| 358 QUIC_PACKET_READ_ERROR = 51, | 360 QUIC_PACKET_READ_ERROR = 51, |
| 361 // We received a STREAM_FRAME with no data and no fin flag set. |
| 362 QUIC_INVALID_STREAM_FRAME = 50, |
| 359 | 363 |
| 360 | 364 |
| 361 // Crypto errors. | 365 // Crypto errors. |
| 362 | 366 |
| 363 // Hanshake failed. | 367 // Hanshake failed. |
| 364 QUIC_HANDSHAKE_FAILED = 28, | 368 QUIC_HANDSHAKE_FAILED = 28, |
| 365 // Handshake message contained out of order tags. | 369 // Handshake message contained out of order tags. |
| 366 QUIC_CRYPTO_TAGS_OUT_OF_ORDER = 29, | 370 QUIC_CRYPTO_TAGS_OUT_OF_ORDER = 29, |
| 367 // Handshake message contained too many entries. | 371 // Handshake message contained too many entries. |
| 368 QUIC_CRYPTO_TOO_MANY_ENTRIES = 30, | 372 QUIC_CRYPTO_TOO_MANY_ENTRIES = 30, |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // How many bytes were consumed. | 867 // How many bytes were consumed. |
| 864 size_t bytes_consumed; | 868 size_t bytes_consumed; |
| 865 | 869 |
| 866 // True if an incoming fin was consumed. | 870 // True if an incoming fin was consumed. |
| 867 bool fin_consumed; | 871 bool fin_consumed; |
| 868 }; | 872 }; |
| 869 | 873 |
| 870 } // namespace net | 874 } // namespace net |
| 871 | 875 |
| 872 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 876 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |