#pragma once #include #include #include #include namespace Envoy { // RAII tcpdump wrapper for tests. It's expected that tcpdump is in the path. class TcpDump { public: // Start tcpdump on a given interface, to a given file on a set of given // ports. TcpDump(const std::string& path, const std::string& iface, const std::vector& ports); // Stop tcpdump and wait for child process termination. ~TcpDump(); private: int tcpdump_pid_; }; using TcpDumpPtr = std::unique_ptr; } // namespace Envoy