blob: a83f74e4d1def6b302f34c3616eb28e2865d2b9c [file] [log] [blame]
wubf975eac2019-08-19 19:41:01 -07001// Copyright (c) 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/third_party/quiche/src/quic/qbone/qbone_constants.h"
6
7#include "net/third_party/quiche/src/quic/core/quic_utils.h"
8
9namespace quic {
10
11constexpr char QboneConstants::kQboneAlpn[];
12const QuicByteCount QboneConstants::kMaxQbonePacketBytes;
13const uint32_t QboneConstants::kQboneRouteTableId;
14
15QuicStreamId QboneConstants::GetControlStreamId(QuicTransportVersion version) {
16 return QuicUtils::GetFirstBidirectionalStreamId(version,
17 Perspective::IS_CLIENT);
18}
19
20const QuicIpAddress* QboneConstants::TerminatorLocalAddress() {
21 static auto* terminator_address = []() {
22 QuicIpAddress* address = new QuicIpAddress;
23 // 0x71 0x62 0x6f 0x6e 0x65 is 'qbone' in ascii.
24 address->FromString("fe80::71:626f:6e65");
25 return address;
26 }();
27 return terminator_address;
28}
29
30const IpRange* QboneConstants::TerminatorLocalAddressRange() {
31 static auto* range =
32 new quic::IpRange(*quic::QboneConstants::TerminatorLocalAddress(), 128);
33 return range;
34}
35
36} // namespace quic