| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ | 5 #ifndef SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ |
| 6 #define SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ | 6 #define SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "sandbox/linux/bpf_dsl/bpf_dsl_forward.h" | 16 #include "sandbox/linux/bpf_dsl/bpf_dsl_forward.h" |
| 17 #include "sandbox/linux/seccomp-bpf/codegen.h" | 17 #include "sandbox/linux/bpf_dsl/codegen.h" |
| 18 #include "sandbox/linux/seccomp-bpf/errorcode.h" | 18 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
| 19 #include "sandbox/sandbox_export.h" | 19 #include "sandbox/sandbox_export.h" |
| 20 | 20 |
| 21 namespace sandbox { | 21 namespace sandbox { |
| 22 namespace bpf_dsl { | 22 namespace bpf_dsl { |
| 23 class Policy; | 23 class Policy; |
| 24 | 24 |
| 25 // PolicyCompiler implements the bpf_dsl compiler, allowing users to | 25 // PolicyCompiler implements the bpf_dsl compiler, allowing users to |
| 26 // transform bpf_dsl policies into BPF programs to be executed by the | 26 // transform bpf_dsl policies into BPF programs to be executed by the |
| 27 // Linux kernel. | 27 // Linux kernel. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 CodeGen gen_; | 145 CodeGen gen_; |
| 146 bool has_unsafe_traps_; | 146 bool has_unsafe_traps_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(PolicyCompiler); | 148 DISALLOW_COPY_AND_ASSIGN(PolicyCompiler); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace bpf_dsl | 151 } // namespace bpf_dsl |
| 152 } // namespace sandbox | 152 } // namespace sandbox |
| 153 | 153 |
| 154 #endif // SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ | 154 #endif // SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ |
| OLD | NEW |