#include "sandbox/linux/bpf_dsl/syscall_set.h"
#include <stdint.h>
#include "base/check.h"
#include "build/build_config.h"
#include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h"
namespace sandbox {
namespace {
#if defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)
static_assert(MIN_SYSCALL == __NR_Linux, "min syscall number should be 4000");
#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)
static_assert(MIN_SYSCALL == __NR_Linux, "min syscall number should be 5000");
#else
static_assert …;
#endif
struct SyscallRange { … };
const SyscallRange kValidSyscallRanges[] = …;
}
SyscallSet::Iterator SyscallSet::begin() const { … }
SyscallSet::Iterator SyscallSet::end() const { … }
bool SyscallSet::IsValid(uint32_t num) { … }
bool operator==(const SyscallSet& lhs, const SyscallSet& rhs) { … }
SyscallSet::Iterator::Iterator(Set set, bool done)
: … { … }
uint32_t SyscallSet::Iterator::operator*() const { … }
SyscallSet::Iterator& SyscallSet::Iterator::operator++() { … }
uint32_t SyscallSet::Iterator::NextSyscall() const { … }
bool operator==(const SyscallSet::Iterator& lhs,
const SyscallSet::Iterator& rhs) { … }
bool operator!=(const SyscallSet::Iterator& lhs,
const SyscallSet::Iterator& rhs) { … }
}