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/bpf_dsl/codegen.h" | 17 #include "sandbox/linux/bpf_dsl/codegen.h" |
| 18 #include "sandbox/linux/bpf_dsl/errorcode.h" |
18 #include "sandbox/linux/bpf_dsl/trap_registry.h" | 19 #include "sandbox/linux/bpf_dsl/trap_registry.h" |
19 #include "sandbox/linux/seccomp-bpf/errorcode.h" | |
20 #include "sandbox/sandbox_export.h" | 20 #include "sandbox/sandbox_export.h" |
21 | 21 |
22 namespace sandbox { | 22 namespace sandbox { |
23 namespace bpf_dsl { | 23 namespace bpf_dsl { |
24 class Policy; | 24 class Policy; |
25 | 25 |
26 // PolicyCompiler implements the bpf_dsl compiler, allowing users to | 26 // PolicyCompiler implements the bpf_dsl compiler, allowing users to |
27 // transform bpf_dsl policies into BPF programs to be executed by the | 27 // transform bpf_dsl policies into BPF programs to be executed by the |
28 // Linux kernel. | 28 // Linux kernel. |
29 class SANDBOX_EXPORT PolicyCompiler { | 29 class SANDBOX_EXPORT PolicyCompiler { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 CodeGen gen_; | 160 CodeGen gen_; |
161 bool has_unsafe_traps_; | 161 bool has_unsafe_traps_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(PolicyCompiler); | 163 DISALLOW_COPY_AND_ASSIGN(PolicyCompiler); |
164 }; | 164 }; |
165 | 165 |
166 } // namespace bpf_dsl | 166 } // namespace bpf_dsl |
167 } // namespace sandbox | 167 } // namespace sandbox |
168 | 168 |
169 #endif // SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ | 169 #endif // SANDBOX_LINUX_BPF_DSL_POLICY_COMPILER_H_ |
OLD | NEW |