chromium/sandbox/linux/bpf_dsl/bpf_dsl.cc

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

#include "sandbox/linux/bpf_dsl/bpf_dsl.h"

#include <stddef.h>
#include <stdint.h>

#include <limits>
#include <ostream>

#include "base/check.h"
#include "base/memory/raw_ptr.h"
#include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h"
#include "sandbox/linux/bpf_dsl/errorcode.h"
#include "sandbox/linux/bpf_dsl/policy_compiler.h"
#include "sandbox/linux/system_headers/linux_seccomp.h"

namespace sandbox {
namespace bpf_dsl {
namespace {

class ReturnResultExprImpl : public internal::ResultExprImpl {};

class TrapResultExprImpl : public internal::ResultExprImpl {};

class IfThenResultExprImpl : public internal::ResultExprImpl {};

class ConstBoolExprImpl : public internal::BoolExprImpl {};

class MaskedEqualBoolExprImpl : public internal::BoolExprImpl {};

class NegateBoolExprImpl : public internal::BoolExprImpl {};

class AndBoolExprImpl : public internal::BoolExprImpl {};

class OrBoolExprImpl : public internal::BoolExprImpl {};

}  // namespace

namespace internal {

bool ResultExprImpl::HasUnsafeTraps() const {}

bool ResultExprImpl::IsAllow() const {}

bool ResultExprImpl::IsDeny() const {}

uint64_t DefaultMask(size_t size) {}

BoolExpr ArgEq(int num, size_t size, uint64_t mask, uint64_t val) {}

}  // namespace internal

ResultExpr Allow() {}

ResultExpr Error(int err) {}

ResultExpr Kill() {}

ResultExpr Trace(uint16_t aux) {}

ResultExpr Trap(TrapRegistry::TrapFnc trap_func, const void* aux) {}

ResultExpr UnsafeTrap(TrapRegistry::TrapFnc trap_func, const void* aux) {}

ResultExpr UserNotify() {}

BoolExpr BoolConst(bool value) {}

BoolExpr Not(BoolExpr cond) {}

BoolExpr AllOf() {}

BoolExpr AllOf(BoolExpr lhs, BoolExpr rhs) {}

BoolExpr AnyOf() {}

BoolExpr AnyOf(BoolExpr lhs, BoolExpr rhs) {}

Elser If(BoolExpr cond, ResultExpr then_result) {}

Elser::Elser(cons::List<Clause> clause_list) :{}

Elser::Elser(const Elser& elser) = default;

Elser::~Elser() = default;

Elser Elser::ElseIf(BoolExpr cond, ResultExpr then_result) const {}

ResultExpr Elser::Else(ResultExpr else_result) const {}

}  // namespace bpf_dsl
}  // namespace sandbox

namespace std {
template class shared_ptr<const sandbox::bpf_dsl::internal::BoolExprImpl>;
template class shared_ptr<const sandbox::bpf_dsl::internal::ResultExprImpl>;
}  // namespace std