blob: 66b76d9367f4590e7a3b8107377f33bd48f9f6da [file] [log] [blame]
Paul Stewart454acb62013-05-02 18:13:21 -07001// 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 Vakulenko262be3f2014-07-30 15:25:50 -07005#ifndef DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_
6#define DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_
Paul Stewart454acb62013-05-02 18:13:21 -07007
8#include <string>
9
Ben Chan657bed82014-09-02 20:40:51 -070010#include <base/macros.h>
Eric Carusocc7106c2017-04-27 14:22:42 -070011#include <brillo/errors/error.h>
12#include <brillo/variant_dictionary.h>
Paul Stewart454acb62013-05-02 18:13:21 -070013
Alex Vakulenko262be3f2014-07-30 15:25:50 -070014#include "debugd/src/subprocess_tool.h"
Paul Stewart454acb62013-05-02 18:13:21 -070015
16namespace debugd {
17
Paul Stewart454acb62013-05-02 18:13:21 -070018class PacketCaptureTool : public SubprocessTool {
19 public:
Ben Chan78f89532014-08-29 09:35:09 -070020 PacketCaptureTool() = default;
21 ~PacketCaptureTool() override = default;
Paul Stewart454acb62013-05-02 18:13:21 -070022
Eric Caruso0b241882018-04-04 13:43:46 -070023 bool Start(const base::ScopedFD& status_fd,
24 const base::ScopedFD& output_fd,
Eric Carusocc7106c2017-04-27 14:22:42 -070025 const brillo::VariantDictionary& options,
Eric Caruso8fe49c72017-04-25 10:43:59 -070026 std::string* out_id,
Eric Carusocc7106c2017-04-27 14:22:42 -070027 brillo::ErrorPtr* error);
Paul Stewart454acb62013-05-02 18:13:21 -070028
29 private:
Paul Stewart454acb62013-05-02 18:13:21 -070030 DISALLOW_COPY_AND_ASSIGN(PacketCaptureTool);
31};
32
Ben Chana0011d82014-05-13 00:19:29 -070033} // namespace debugd
Paul Stewart454acb62013-05-02 18:13:21 -070034
Alex Vakulenko262be3f2014-07-30 15:25:50 -070035#endif // DEBUGD_SRC_PACKET_CAPTURE_TOOL_H_