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_CORE_QUIC_PACKETS_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_PACKETS_H_ |
6 #define NET_QUIC_CORE_QUIC_PACKETS_H_ | 6 #define NET_QUIC_CORE_QUIC_PACKETS_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 QuicPacketPublicHeader public_header; | 89 QuicPacketPublicHeader public_header; |
90 QuicPacketNumber packet_number; | 90 QuicPacketNumber packet_number; |
91 }; | 91 }; |
92 | 92 |
93 struct QUIC_EXPORT_PRIVATE QuicPublicResetPacket { | 93 struct QUIC_EXPORT_PRIVATE QuicPublicResetPacket { |
94 QuicPublicResetPacket(); | 94 QuicPublicResetPacket(); |
95 explicit QuicPublicResetPacket(const QuicPacketPublicHeader& header); | 95 explicit QuicPublicResetPacket(const QuicPacketPublicHeader& header); |
96 | 96 |
97 QuicPacketPublicHeader public_header; | 97 QuicPacketPublicHeader public_header; |
98 QuicPublicResetNonceProof nonce_proof; | 98 QuicPublicResetNonceProof nonce_proof; |
99 // TODO(fayang): remove rejected_packet_number when deprecating | |
100 // FLAGS_quic_reloadable_flag_quic_remove_packet_number_from_public_reset. | |
101 QuicPacketNumber rejected_packet_number; | |
102 QuicSocketAddress client_address; | 99 QuicSocketAddress client_address; |
103 }; | 100 }; |
104 | 101 |
105 typedef QuicPacketPublicHeader QuicVersionNegotiationPacket; | 102 typedef QuicPacketPublicHeader QuicVersionNegotiationPacket; |
106 | 103 |
107 class QUIC_EXPORT_PRIVATE QuicData { | 104 class QUIC_EXPORT_PRIVATE QuicData { |
108 public: | 105 public: |
109 QuicData(const char* buffer, size_t length); | 106 QuicData(const char* buffer, size_t length); |
110 QuicData(const char* buffer, size_t length, bool owns_buffer); | 107 QuicData(const char* buffer, size_t length, bool owns_buffer); |
111 virtual ~QuicData(); | 108 virtual ~QuicData(); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 QUIC_EXPORT_PRIVATE void ClearSerializedPacket( | 247 QUIC_EXPORT_PRIVATE void ClearSerializedPacket( |
251 SerializedPacket* serialized_packet); | 248 SerializedPacket* serialized_packet); |
252 | 249 |
253 // Allocates a new char[] of size |packet.encrypted_length| and copies in | 250 // Allocates a new char[] of size |packet.encrypted_length| and copies in |
254 // |packet.encrypted_buffer|. | 251 // |packet.encrypted_buffer|. |
255 QUIC_EXPORT_PRIVATE char* CopyBuffer(const SerializedPacket& packet); | 252 QUIC_EXPORT_PRIVATE char* CopyBuffer(const SerializedPacket& packet); |
256 | 253 |
257 } // namespace net | 254 } // namespace net |
258 | 255 |
259 #endif // NET_QUIC_CORE_QUIC_PACKETS_H_ | 256 #endif // NET_QUIC_CORE_QUIC_PACKETS_H_ |
OLD | NEW |