| 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 <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "net/quic/core/quic_constants.h" | 33 #include "net/quic/core/quic_constants.h" |
| 34 #include "net/quic/core/quic_error_codes.h" | 34 #include "net/quic/core/quic_error_codes.h" |
| 35 #include "net/quic/core/quic_time.h" | 35 #include "net/quic/core/quic_time.h" |
| 36 #include "net/quic/core/quic_types.h" | 36 #include "net/quic/core/quic_types.h" |
| 37 #include "net/quic/core/quic_versions.h" | 37 #include "net/quic/core/quic_versions.h" |
| 38 | 38 |
| 39 namespace net { | 39 namespace net { |
| 40 | 40 |
| 41 class QuicPacket; | 41 class QuicPacket; |
| 42 struct QuicPacketHeader; | 42 struct QuicPacketHeader; |
| 43 class QuicAckListenerInterface; | |
| 44 | |
| 45 // Version and Crypto tags are written to the wire with a big-endian | |
| 46 // representation of the name of the tag. For example | |
| 47 // the client hello tag (CHLO) will be written as the | |
| 48 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is | |
| 49 // stored in memory as a little endian uint32_t, we need | |
| 50 // to reverse the order of the bytes. | |
| 51 | 43 |
| 52 // Size in bytes of the data packet header. | 44 // Size in bytes of the data packet header. |
| 53 NET_EXPORT_PRIVATE size_t GetPacketHeaderSize(QuicVersion version, | 45 NET_EXPORT_PRIVATE size_t GetPacketHeaderSize(QuicVersion version, |
| 54 const QuicPacketHeader& header); | 46 const QuicPacketHeader& header); |
| 55 | 47 |
| 56 NET_EXPORT_PRIVATE size_t | 48 NET_EXPORT_PRIVATE size_t |
| 57 GetPacketHeaderSize(QuicVersion version, | 49 GetPacketHeaderSize(QuicVersion version, |
| 58 QuicConnectionIdLength connection_id_length, | 50 QuicConnectionIdLength connection_id_length, |
| 59 bool include_version, | 51 bool include_version, |
| 60 bool include_path_id, | 52 bool include_path_id, |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 QuicPathId path_id; | 742 QuicPathId path_id; |
| 751 bool has_crypto_handshake; | 743 bool has_crypto_handshake; |
| 752 int num_padding_bytes; | 744 int num_padding_bytes; |
| 753 EncryptionLevel encryption_level; | 745 EncryptionLevel encryption_level; |
| 754 QuicPacketNumberLength packet_number_length; | 746 QuicPacketNumberLength packet_number_length; |
| 755 }; | 747 }; |
| 756 | 748 |
| 757 } // namespace net | 749 } // namespace net |
| 758 | 750 |
| 759 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 751 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |