gfe-relnote: Default-initialize QUIC BBRv2 loss event threshold for exiting STARTUP from a flag. Protected by --gfe2_reloadable_flag_quic_default_to_bbr_v2.
PiperOrigin-RevId: 264298542
Change-Id: I304ab19e4820dec51d3f8ef53762a393f6b175fd
diff --git a/quic/qbone/qbone_packet_processor_test_tools.cc b/quic/qbone/qbone_packet_processor_test_tools.cc
new file mode 100644
index 0000000..9f9b623
--- /dev/null
+++ b/quic/qbone/qbone_packet_processor_test_tools.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/third_party/quiche/src/quic/qbone/qbone_packet_processor_test_tools.h"
+
+#include <netinet/ip6.h>
+
+namespace quic {
+
+string PrependIPv6HeaderForTest(const string& body, int hops) {
+ ip6_hdr header;
+ memset(&header, 0, sizeof(header));
+
+ header.ip6_vfc = 6 << 4;
+ header.ip6_plen = htons(body.size());
+ header.ip6_nxt = IPPROTO_UDP;
+ header.ip6_hops = hops;
+ header.ip6_src = in6addr_loopback;
+ header.ip6_dst = in6addr_loopback;
+
+ string packet(sizeof(header) + body.size(), '\0');
+ memcpy(&packet[0], &header, sizeof(header));
+ memcpy(&packet[sizeof(header)], body.data(), body.size());
+ return packet;
+}
+
+} // namespace quic