diff --git a/src/Event.h b/src/Event.h index fe5dc9baf2..69e9fe37f9 100644 --- a/src/Event.h +++ b/src/Event.h @@ -145,7 +145,7 @@ protected: analyzer::ID current_aid; RecordVal* src_val; bool draining; - bro::Flare queue_flare; + zeek::detail::Flare queue_flare; }; extern EventMgr mgr; diff --git a/src/Flare.cc b/src/Flare.cc index ec3ef2073f..89e24303ab 100644 --- a/src/Flare.cc +++ b/src/Flare.cc @@ -6,7 +6,7 @@ #include #include -using namespace bro; +using namespace zeek::detail; Flare::Flare() : pipe(FD_CLOEXEC, FD_CLOEXEC, O_NONBLOCK, O_NONBLOCK) diff --git a/src/Flare.h b/src/Flare.h index ea484b2858..3fa92a6cae 100644 --- a/src/Flare.h +++ b/src/Flare.h @@ -4,7 +4,7 @@ #include "Pipe.h" -namespace bro { +namespace zeek::detail { class Flare { public: @@ -21,8 +21,7 @@ public: * @return a file descriptor that will become ready if the flare has been * Fire()'d and not yet Extinguished()'d. */ - int FD() const - { return pipe.ReadFD(); } + int FD() const { return pipe.ReadFD(); } /** * Put the object in the "ready" state. @@ -44,4 +43,4 @@ private: Pipe pipe; }; -} // namespace bro +} // namespace zeek::detail diff --git a/src/Pipe.cc b/src/Pipe.cc index 5a0916a3dd..93ceac50ea 100644 --- a/src/Pipe.cc +++ b/src/Pipe.cc @@ -7,7 +7,7 @@ #include #include -using namespace bro; +using namespace zeek::detail; static void pipe_fail(int eno) { diff --git a/src/Pipe.h b/src/Pipe.h index e310c83edc..16d2bfcec2 100644 --- a/src/Pipe.h +++ b/src/Pipe.h @@ -2,7 +2,7 @@ #pragma once -namespace bro { +namespace zeek::detail { class Pipe { public: @@ -136,4 +136,4 @@ private: bool swapped = false; }; -} // namespace bro +} // namespace zeek::detail diff --git a/src/iosource/Manager.h b/src/iosource/Manager.h index af6f62ce77..bd875f5fae 100644 --- a/src/iosource/Manager.h +++ b/src/iosource/Manager.h @@ -178,7 +178,7 @@ private: double GetNextTimeout() override { return -1; } private: - bro::Flare flare; + zeek::detail::Flare flare; }; struct Source { diff --git a/src/supervisor/Supervisor.cc b/src/supervisor/Supervisor.cc index df8aa63026..16f0483fa0 100644 --- a/src/supervisor/Supervisor.cc +++ b/src/supervisor/Supervisor.cc @@ -83,8 +83,8 @@ struct Stem { pid_t parent_pid; int last_signal = -1; - std::unique_ptr signal_flare; - std::unique_ptr pipe; + std::unique_ptr signal_flare; + std::unique_ptr pipe; std::map nodes; std::string msg_buffer; bool shutting_down = false; @@ -426,7 +426,7 @@ size_t Supervisor::ProcessMessages() } Stem::Stem(Supervisor::StemState ss) - : parent_pid(ss.parent_pid), signal_flare(new bro::Flare()), pipe(std::move(ss.pipe)) + : parent_pid(ss.parent_pid), signal_flare(new zeek::detail::Flare()), pipe(std::move(ss.pipe)) { zeek::set_thread_name("zeek.stem"); pipe->Swap(); @@ -928,7 +928,7 @@ std::optional Supervisor::CreateStem(bool supervisor_mode fds[i] = std::stoi(zeek_stem_nums[i + 1]); StemState ss; - ss.pipe = std::make_unique(FD_CLOEXEC, O_NONBLOCK, fds); + ss.pipe = std::make_unique(FD_CLOEXEC, O_NONBLOCK, fds); ss.parent_pid = stem_ppid; zeek::Supervisor::RunStem(std::move(ss)); return {}; @@ -938,7 +938,7 @@ std::optional Supervisor::CreateStem(bool supervisor_mode return {}; StemState ss; - ss.pipe = std::make_unique(FD_CLOEXEC, O_NONBLOCK); + ss.pipe = std::make_unique(FD_CLOEXEC, O_NONBLOCK); ss.parent_pid = getpid(); ss.pid = fork(); diff --git a/src/supervisor/Supervisor.h b/src/supervisor/Supervisor.h index b7800a2c83..ba381ad6dd 100644 --- a/src/supervisor/Supervisor.h +++ b/src/supervisor/Supervisor.h @@ -241,7 +241,7 @@ public: /** * Bidirectional pipes that allow the Supervisor and Stem to talk. */ - std::unique_ptr pipe; + std::unique_ptr pipe; /** * The Stem's parent process ID (i.e. PID of the Supervisor). */ @@ -382,9 +382,9 @@ private: Config config; pid_t stem_pid; - std::unique_ptr stem_pipe; + std::unique_ptr stem_pipe; int last_signal = -1; - bro::Flare signal_flare; + zeek::detail::Flare signal_flare; NodeMap nodes; std::string msg_buffer; }; diff --git a/src/threading/MsgThread.h b/src/threading/MsgThread.h index 42ce20984f..c95a424777 100644 --- a/src/threading/MsgThread.h +++ b/src/threading/MsgThread.h @@ -338,7 +338,7 @@ private: bool child_sent_finish; // Child thread asked to be finished. bool failed; // Set to true when a command failed. - bro::Flare flare; + zeek::detail::Flare flare; }; /**