Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: net/quic/quic_protocol.h

Issue 1542123002: Add path_id to SerializedPacket. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110310127
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <limits> 10 #include <limits>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const int kUFloat16ExponentBits = 5; 187 const int kUFloat16ExponentBits = 5;
188 const int kUFloat16MaxExponent = (1 << kUFloat16ExponentBits) - 2; // 30 188 const int kUFloat16MaxExponent = (1 << kUFloat16ExponentBits) - 2; // 30
189 const int kUFloat16MantissaBits = 16 - kUFloat16ExponentBits; // 11 189 const int kUFloat16MantissaBits = 16 - kUFloat16ExponentBits; // 11
190 const int kUFloat16MantissaEffectiveBits = kUFloat16MantissaBits + 1; // 12 190 const int kUFloat16MantissaEffectiveBits = kUFloat16MantissaBits + 1; // 12
191 const uint64 kUFloat16MaxValue = // 0x3FFC0000000 191 const uint64 kUFloat16MaxValue = // 0x3FFC0000000
192 ((UINT64_C(1) << kUFloat16MantissaEffectiveBits) - 1) << 192 ((UINT64_C(1) << kUFloat16MantissaEffectiveBits) - 1) <<
193 kUFloat16MaxExponent; 193 kUFloat16MaxExponent;
194 194
195 // Default path ID. 195 // Default path ID.
196 const QuicPathId kDefaultPathId = 0; 196 const QuicPathId kDefaultPathId = 0;
197 // Invalid path ID.
198 const QuicPathId kInvalidPathId = -1;
197 199
198 enum TransmissionType { 200 enum TransmissionType {
199 NOT_RETRANSMISSION, 201 NOT_RETRANSMISSION,
200 FIRST_TRANSMISSION_TYPE = NOT_RETRANSMISSION, 202 FIRST_TRANSMISSION_TYPE = NOT_RETRANSMISSION,
201 HANDSHAKE_RETRANSMISSION, // Retransmits due to handshake timeouts. 203 HANDSHAKE_RETRANSMISSION, // Retransmits due to handshake timeouts.
202 ALL_UNACKED_RETRANSMISSION, // Retransmits all unacked packets. 204 ALL_UNACKED_RETRANSMISSION, // Retransmits all unacked packets.
203 ALL_INITIAL_RETRANSMISSION, // Retransmits all initially encrypted packets. 205 ALL_INITIAL_RETRANSMISSION, // Retransmits all initially encrypted packets.
204 LOSS_RETRANSMISSION, // Retransmits due to loss detection. 206 LOSS_RETRANSMISSION, // Retransmits due to loss detection.
205 RTO_RETRANSMISSION, // Retransmits due to retransmit time out. 207 RTO_RETRANSMISSION, // Retransmits due to retransmit time out.
206 TLP_RETRANSMISSION, // Tail loss probes. 208 TLP_RETRANSMISSION, // Tail loss probes.
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 struct NET_EXPORT_PRIVATE AckListenerWrapper { 1192 struct NET_EXPORT_PRIVATE AckListenerWrapper {
1191 AckListenerWrapper(QuicAckListenerInterface* listener, 1193 AckListenerWrapper(QuicAckListenerInterface* listener,
1192 QuicPacketLength data_length); 1194 QuicPacketLength data_length);
1193 ~AckListenerWrapper(); 1195 ~AckListenerWrapper();
1194 1196
1195 scoped_refptr<QuicAckListenerInterface> ack_listener; 1197 scoped_refptr<QuicAckListenerInterface> ack_listener;
1196 QuicPacketLength length; 1198 QuicPacketLength length;
1197 }; 1199 };
1198 1200
1199 struct NET_EXPORT_PRIVATE SerializedPacket { 1201 struct NET_EXPORT_PRIVATE SerializedPacket {
1200 SerializedPacket(QuicPacketNumber packet_number, 1202 SerializedPacket(QuicPathId path_id,
1203 QuicPacketNumber packet_number,
1201 QuicPacketNumberLength packet_number_length, 1204 QuicPacketNumberLength packet_number_length,
1202 QuicEncryptedPacket* packet, 1205 QuicEncryptedPacket* packet,
1203 QuicPacketEntropyHash entropy_hash, 1206 QuicPacketEntropyHash entropy_hash,
1204 RetransmittableFrames* retransmittable_frames, 1207 RetransmittableFrames* retransmittable_frames,
1205 bool has_ack, 1208 bool has_ack,
1206 bool has_stop_waiting); 1209 bool has_stop_waiting);
1207 SerializedPacket(QuicPacketNumber packet_number, 1210 SerializedPacket(QuicPathId path_id,
1211 QuicPacketNumber packet_number,
1208 QuicPacketNumberLength packet_number_length, 1212 QuicPacketNumberLength packet_number_length,
1209 char* encrypted_buffer, 1213 char* encrypted_buffer,
1210 size_t encrypted_length, 1214 size_t encrypted_length,
1211 bool owns_buffer, 1215 bool owns_buffer,
1212 QuicPacketEntropyHash entropy_hash, 1216 QuicPacketEntropyHash entropy_hash,
1213 RetransmittableFrames* retransmittable_frames, 1217 RetransmittableFrames* retransmittable_frames,
1214 bool has_ack, 1218 bool has_ack,
1215 bool has_stop_waiting, 1219 bool has_stop_waiting,
1216 EncryptionLevel level); 1220 EncryptionLevel level);
1217 ~SerializedPacket(); 1221 ~SerializedPacket();
1218 1222
1219 QuicEncryptedPacket* packet; 1223 QuicEncryptedPacket* packet;
1220 RetransmittableFrames* retransmittable_frames; 1224 RetransmittableFrames* retransmittable_frames;
1225 QuicPathId path_id;
1221 QuicPacketNumber packet_number; 1226 QuicPacketNumber packet_number;
1222 QuicPacketNumberLength packet_number_length; 1227 QuicPacketNumberLength packet_number_length;
1223 EncryptionLevel encryption_level; 1228 EncryptionLevel encryption_level;
1224 QuicPacketEntropyHash entropy_hash; 1229 QuicPacketEntropyHash entropy_hash;
1225 bool is_fec_packet; 1230 bool is_fec_packet;
1226 bool has_ack; 1231 bool has_ack;
1227 bool has_stop_waiting; 1232 bool has_stop_waiting;
1228 1233
1229 // Optional notifiers which will be informed when this packet has been ACKed. 1234 // Optional notifiers which will be informed when this packet has been ACKed.
1230 std::list<AckListenerWrapper> listeners; 1235 std::list<AckListenerWrapper> listeners;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1285 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1281 1286
1282 const struct iovec* iov; 1287 const struct iovec* iov;
1283 const int iov_count; 1288 const int iov_count;
1284 const size_t total_length; 1289 const size_t total_length;
1285 }; 1290 };
1286 1291
1287 } // namespace net 1292 } // namespace net
1288 1293
1289 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1294 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698