OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "sandbox/linux/bpf_dsl/dump_bpf.h" | 5 #include "sandbox/linux/bpf_dsl/dump_bpf.h" |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
8 #include <stdio.h> | 10 #include <stdio.h> |
9 | 11 |
10 #include <string> | 12 #include <string> |
11 | 13 |
12 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
13 #include "sandbox/linux/bpf_dsl/codegen.h" | 15 #include "sandbox/linux/bpf_dsl/codegen.h" |
14 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" | 16 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
15 #include "sandbox/linux/bpf_dsl/trap_registry.h" | 17 #include "sandbox/linux/bpf_dsl/trap_registry.h" |
16 #include "sandbox/linux/system_headers/linux_filter.h" | 18 #include "sandbox/linux/system_headers/linux_filter.h" |
17 #include "sandbox/linux/system_headers/linux_seccomp.h" | 19 #include "sandbox/linux/system_headers/linux_seccomp.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 std::string DumpBPF::StringPrintProgram(const CodeGen::Program& program) { | 150 std::string DumpBPF::StringPrintProgram(const CodeGen::Program& program) { |
149 std::string res; | 151 std::string res; |
150 for (size_t i = 0; i < program.size(); i++) { | 152 for (size_t i = 0; i < program.size(); i++) { |
151 AppendInstruction(&res, i + 1, program[i]); | 153 AppendInstruction(&res, i + 1, program[i]); |
152 } | 154 } |
153 return res; | 155 return res; |
154 } | 156 } |
155 | 157 |
156 } // namespace bpf_dsl | 158 } // namespace bpf_dsl |
157 } // namespace sandbox | 159 } // namespace sandbox |
OLD | NEW |