chromium/net/dns/opt_record_rdata.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/dns/opt_record_rdata.h"

#include <algorithm>
#include <memory>
#include <numeric>
#include <string_view>
#include <utility>

#include "base/big_endian.h"
#include "base/check_is_test.h"
#include "base/containers/contains.h"
#include "base/containers/span.h"
#include "base/containers/span_reader.h"
#include "base/containers/span_writer.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/types/optional_util.h"
#include "net/dns/public/dns_protocol.h"

namespace net {

namespace {
std::string SerializeEdeOpt(uint16_t info_code, std::string_view extra_text) {}
}  // namespace

OptRecordRdata::Opt::Opt(std::string data) :{}

bool OptRecordRdata::Opt::operator==(const OptRecordRdata::Opt& other) const {}

bool OptRecordRdata::Opt::operator!=(const OptRecordRdata::Opt& other) const {}

bool OptRecordRdata::Opt::IsEqual(const OptRecordRdata::Opt& other) const {}

OptRecordRdata::EdeOpt::EdeOpt(uint16_t info_code, std::string extra_text)
    :{}

OptRecordRdata::EdeOpt::~EdeOpt() = default;

std::unique_ptr<OptRecordRdata::EdeOpt> OptRecordRdata::EdeOpt::Create(
    std::string data) {}

uint16_t OptRecordRdata::EdeOpt::GetCode() const {}

OptRecordRdata::EdeOpt::EdeInfoCode
OptRecordRdata::EdeOpt::GetEnumFromInfoCode() const {}

OptRecordRdata::EdeOpt::EdeInfoCode OptRecordRdata::EdeOpt::GetEnumFromInfoCode(
    uint16_t info_code) {}

OptRecordRdata::PaddingOpt::PaddingOpt(std::string padding)
    :{}

OptRecordRdata::PaddingOpt::PaddingOpt(uint16_t padding_len)
    :{}

OptRecordRdata::PaddingOpt::~PaddingOpt() = default;

uint16_t OptRecordRdata::PaddingOpt::GetCode() const {}

OptRecordRdata::UnknownOpt::~UnknownOpt() = default;

std::unique_ptr<OptRecordRdata::UnknownOpt>
OptRecordRdata::UnknownOpt::CreateForTesting(uint16_t code, std::string data) {}

OptRecordRdata::UnknownOpt::UnknownOpt(uint16_t code, std::string data)
    :{}

uint16_t OptRecordRdata::UnknownOpt::GetCode() const {}

OptRecordRdata::OptRecordRdata() = default;

OptRecordRdata::~OptRecordRdata() = default;

bool OptRecordRdata::operator==(const OptRecordRdata& other) const {}

bool OptRecordRdata::operator!=(const OptRecordRdata& other) const {}

// static
std::unique_ptr<OptRecordRdata> OptRecordRdata::Create(std::string_view data) {}

uint16_t OptRecordRdata::Type() const {}

bool OptRecordRdata::IsEqual(const RecordRdata* other) const {}

void OptRecordRdata::AddOpt(std::unique_ptr<Opt> opt) {}

bool OptRecordRdata::ContainsOptCode(uint16_t opt_code) const {}

std::vector<const OptRecordRdata::Opt*> OptRecordRdata::GetOpts() const {}

std::vector<const OptRecordRdata::PaddingOpt*> OptRecordRdata::GetPaddingOpts()
    const {}

std::vector<const OptRecordRdata::EdeOpt*> OptRecordRdata::GetEdeOpts() const {}

}  // namespace net