Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 5 | #ifndef DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_ |
| 6 | #define DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_ |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
Ben Chan | 657bed8 | 2014-09-02 20:40:51 -0700 | [diff] [blame] | 10 | #include <base/macros.h> |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame] | 11 | #include <brillo/errors/error.h> |
| 12 | #include <brillo/variant_dictionary.h> |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 13 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 14 | #include "debugd/src/subprocess_tool.h" |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 15 | |
| 16 | namespace debugd { |
| 17 | |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 18 | class PacketCaptureTool : public SubprocessTool { |
| 19 | public: |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 20 | PacketCaptureTool() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame] | 21 | PacketCaptureTool(const PacketCaptureTool&) = delete; |
| 22 | PacketCaptureTool& operator=(const PacketCaptureTool&) = delete; |
| 23 | |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 24 | ~PacketCaptureTool() override = default; |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 25 | |
Eric Caruso | 0b24188 | 2018-04-04 13:43:46 -0700 | [diff] [blame] | 26 | bool Start(const base::ScopedFD& status_fd, |
| 27 | const base::ScopedFD& output_fd, |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame] | 28 | const brillo::VariantDictionary& options, |
Eric Caruso | 8fe49c7 | 2017-04-25 10:43:59 -0700 | [diff] [blame] | 29 | std::string* out_id, |
Eric Caruso | cc7106c | 2017-04-27 14:22:42 -0700 | [diff] [blame] | 30 | brillo::ErrorPtr* error); |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 33 | } // namespace debugd |
Paul Stewart | 454acb6 | 2013-05-02 18:13:21 -0700 | [diff] [blame] | 34 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 35 | #endif // DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_ |