chromium/net/third_party/quiche/src/quiche/quic/core/quic_config.h

// Copyright (c) 2013 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.

#ifndef QUICHE_QUIC_CORE_QUIC_CONFIG_H_
#define QUICHE_QUIC_CORE_QUIC_CONFIG_H_

#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>

#include "quiche/quic/core/crypto/transport_parameters.h"
#include "quiche/quic/core/quic_connection_id.h"
#include "quiche/quic/core/quic_packets.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/platform/api/quic_export.h"

namespace quic {

namespace test {
class QuicConfigPeer;
}  // namespace test

class CryptoHandshakeMessage;

// Describes whether or not a given QuicTag is required or optional in the
// handshake message.
enum QuicConfigPresence : uint8_t {};

// Whether the CryptoHandshakeMessage is from the client or server.
enum HelloType {};

// An abstract base class that stores a value that can be sent in CHLO/SHLO
// message. These values can be OPTIONAL or REQUIRED, depending on |presence_|.
class QUICHE_EXPORT QuicConfigValue {};

// Stores uint32_t from CHLO or SHLO messages that are not negotiated.
class QUICHE_EXPORT QuicFixedUint32 : public QuicConfigValue {};

// Stores 62bit numbers from handshake messages that unilaterally shared by each
// endpoint. IMPORTANT: these are serialized as 32-bit unsigned integers when
// using QUIC_CRYPTO versions and CryptoHandshakeMessage.
class QUICHE_EXPORT QuicFixedUint62 : public QuicConfigValue {};

// Stores StatelessResetToken from CHLO or SHLO messages that are not
// negotiated.
class QUICHE_EXPORT QuicFixedStatelessResetToken : public QuicConfigValue {};

// Stores tag from CHLO or SHLO messages that are not negotiated.
class QUICHE_EXPORT QuicFixedTagVector : public QuicConfigValue {};

// Stores QuicSocketAddress from CHLO or SHLO messages that are not negotiated.
class QUICHE_EXPORT QuicFixedSocketAddress : public QuicConfigValue {};

// QuicConfig contains non-crypto configuration options that are negotiated in
// the crypto handshake.
class QUICHE_EXPORT QuicConfig {};

}  // namespace quic

#endif  // QUICHE_QUIC_CORE_QUIC_CONFIG_H_