| // Copyright 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 "quic/masque/masque_utils.h" |
| ParsedQuicVersionVector MasqueSupportedVersions() { |
| QuicVersionInitializeSupportForIetfDraft(); |
| ParsedQuicVersionVector versions; |
| for (const ParsedQuicVersion& version : AllSupportedVersions()) { |
| // Use all versions that support IETF QUIC. |
| if (version.UsesHttp3()) { |
| QuicEnableVersion(version); |
| versions.push_back(version); |
| QUICHE_CHECK(!versions.empty()); |
| QuicConfig MasqueEncapsulatedConfig() { |
| config.SetMaxPacketSizeToSend(kMasqueMaxEncapsulatedPacketSize); |
| std::string MasqueModeToString(MasqueMode masque_mode) { |
| case MasqueMode::kInvalid: |
| case MasqueMode::kLegacy: |
| return absl::StrCat("Unknown(", static_cast<int>(masque_mode), ")"); |
| std::ostream& operator<<(std::ostream& os, const MasqueMode& masque_mode) { |
| os << MasqueModeToString(masque_mode); |