summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_packet_creator.h
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2015-04-30 17:55:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-01 00:55:42 +0000
commite0ee6eb405c96a4775330d2f43378d6add200027 (patch)
treea05fae8e86fc5335cfda7173b13c1ddf2564561a /net/quic/quic_packet_creator.h
parent83702558f580081d9223fcde6f36bc030c82676d (diff)
downloadchromium_src-e0ee6eb405c96a4775330d2f43378d6add200027.zip
chromium_src-e0ee6eb405c96a4775330d2f43378d6add200027.tar.gz
chromium_src-e0ee6eb405c96a4775330d2f43378d6add200027.tar.bz2
Land Recent QUIC Changes until 04/30/2015.
Deprecate --FLAGS_quic_do_not_retransmit_for_reset_streams. Merge internal change: 92249265 https://codereview.chromium.org/1111703003/ Remove QUIC v23 This means that the headers stream only speaks SPDY/4. This removes the congestion feedback tag vector from the handshake. Merge internal change: 92245766 https://codereview.chromium.org/1115883002/ Fix a minor bug in TcpCubicSender in the conversion from packets to bytes. Merge internal change: 92010035 https://codereview.chromium.org/1103163006/ Don't calculate or send bandwidth resumption source address tokens when the bandwidth resumption experiment is disabled. Estimated to save 0.5% of CPU on bandaid. Merge internal change: 92003353 https://codereview.chromium.org/1113833003/ Allocate encrypted packets into a buffer on the stack. Estimated to save ~4% of CPU. Merge internal change: 92000931 https://codereview.chromium.org/1115873002/ Flag-protected. Add SREJ support to quic crypto server config. ProcessClientHello and BuildRejection now take two extra arugments, indicating a) that the server should generate stateless rejects and b) if stateless, the new connection ID that should be added to the message. In theory, every reject emitted could be a stateless reject. The tests have been modified with two new parameters: 1. Stateless reject support enabled via flag. 2. Server configured to emit stateless rejects. They then check to ensure that, if enabled, the reject is formatted correctly. In chromium, set FLAGS_enable_quic_stateless_reject_support to false. Merge internal change: 91946386 https://codereview.chromium.org/1112693005/ Break out QUIC's balsa-specific SPDY utilities from SpdyUtils to SpdyBalsaUtils to help ease the process of merging to Chrome. Merge internal change: 91854176 https://codereview.chromium.org/1112923002/ Prevent a crash when the stream frame is NULL. Log an detailed DFATAL and close the connection instead. Merge internal change: 91820383 https://codereview.chromium.org/1111413004/ Doing a better job of cleaning up quic udp proxy state. Fully tearing down the client we use for probing connectivity to core when we do UDP proxying, while preserving the file descriptor. Chrome specific change: make CleanUpUDPSocket virtual. Merge internal change: 91805238 https://codereview.chromium.org/1120433002/ Update QuicPacketGeneratorTest to save every packet when it's serialized into a vector instead of into separate variables. Test only change. Merge internal change: 91631596 https://codereview.chromium.org/1105283003/ Update QuicPacketGeneratorTest to save every packet when it's serialized into a vector instead of into separate variables. Test only change. Merge internal change: 91631596 https://codereview.chromium.org/1105283003/ Change QuicPacketGenerator's destructor to use the more compact for syntax. No functional change. Merge internal change: 91620560 https://codereview.chromium.org/1117503002/ Adding a comment to make clear the toy server is a toy. Merge internal change: 91604221 https://codereview.chromium.org/1113713002/ Minor code QUIC readability improvements. No functional changes. Merge internal change: 91545808 https://codereview.chromium.org/1116543002/ Add QuicClientCryptoConfig stateless-reject support. (This change is not flag-protected, since it only affects the client-side.) When the QuicClientCryptoConfig receives a stateless reject, it will read the server-designated connection ID from the reject message. It will store that ID in its cached config for subsequent use. The Cache itself can now store a server-designated connection-id for one-time use. Clients can query the cache to see whether it stores a server-designated connection-ID. If so, the client can consume the ID. Subsequent queries will indicate that there is no server-designated connection-ID until another stateless reject is returned. Note: Currently, the cached config state only stores one server-designated connection ID at a time. Merge internal change: 91419089 https://codereview.chromium.org/1116463004/ Adding EXPECT_CALLs to prevent gMock warnings. Replacing scoped_ptr with unique_ptr. Lowering some DLOG(INFO)s to DVLOG(1). n/a (Tests and debug logging only.) Merge internal change: 91343963 https://codereview.chromium.org/1117483002/ Remove unused argument TransmissionType from QUIC's ShouldGeneratePacket. No functional change. Merge internal change: 91300968 https://codereview.chromium.org/1113553003/ Reorganize the packet validity check code. Add checks to not create connections for packets with large seq. nos. or truncated conn. IDs. Reorganize the packet validity checks to make the packet sequence number accessible to the dispatcher's packet-classification logic: Put most of the logic in OnUnauthenticatedHeader, which is called after the sequence number is decoded. Add validity checks and tests of the validity checks. Merge internal change: 91299299 https://codereview.chromium.org/1110243002/ Setting QoS for UDP proxy backends (two machine canary on internal servers). Merge internal change: 91293512 https://codereview.chromium.org/1109793006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/1115853003 Cr-Commit-Position: refs/heads/master@{#327851}
Diffstat (limited to 'net/quic/quic_packet_creator.h')
-rw-r--r--net/quic/quic_packet_creator.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index 335d2d3..190e530 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -88,7 +88,9 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
// single packet. Also, sets the entropy hash of the serialized packet to a
// random bool and returns that value as a member of SerializedPacket.
// Never returns a RetransmittableFrames in SerializedPacket.
- SerializedPacket SerializeAllFrames(const QuicFrames& frames);
+ SerializedPacket SerializeAllFrames(const QuicFrames& frames,
+ char* buffer,
+ size_t buffer_len);
// Re-serializes frames with the original packet's sequence number length.
// Used for retransmitting packets to ensure they aren't too long.
@@ -96,7 +98,9 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
// method.
SerializedPacket ReserializeAllFrames(
const RetransmittableFrames& frames,
- QuicSequenceNumberLength original_length);
+ QuicSequenceNumberLength original_length,
+ char* buffer,
+ size_t buffer_len);
// Returns true if there are frames pending to be serialized.
bool HasPendingFrames() const;
@@ -148,12 +152,14 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
// SerializedPacket. Also, sets |serialized_frames| in the SerializedPacket to
// the corresponding RetransmittableFrames if any frames are to be
// retransmitted.
- SerializedPacket SerializePacket();
+ // Fails if |buffer_len| isn't long enough for the encrypted packet.
+ SerializedPacket SerializePacket(char* encrypted_buffer, size_t buffer_len);
// Packetize FEC data. All frames must fit into a single packet. Also, sets
// the entropy hash of the serialized packet to a random bool and returns
// that value as a member of SerializedPacket.
- SerializedPacket SerializeFec();
+ // Fails if |buffer_len| isn't long enough for the encrypted packet.
+ SerializedPacket SerializeFec(char* buffer, size_t buffer_len);
// Creates a version negotiation packet which supports |supported_versions|.
// Caller owns the created packet. Also, sets the entropy hash of the