From b565d7d9c47ca1ec5af0effd828431ee96027d60 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Mon, 27 May 2024 22:00:00 +0200 Subject: Rename project from wireframe to packeteer Decided on the name after weighing alternatives in NAMES.md: packeteer (packet + -eer, "one who wields packets") fit the project's actual scope better than the wire/frame pun once it had grown into full L2-L7 dissection, reassembly, checksums, privilege dropping, and dual TUI/GUI frontends. No existing packet-capture project uses the name; the one real-world collision (Packeteer, Inc., a networking company acquired and folded into Blue Coat/Symantec by 2008) is long defunct. Mechanical rename throughout: CMake project/target names, the wireframe:: namespace and include/wireframe/ directory (git mv, history preserved), every #include path, CLI/GUI help text, and the project's own working directory. NAMES.md rewritten to record the decision instead of leaving stale self-referential etymology behind from the blind rename pass. Verified after every step: full rebuild (all four targets, no warnings) and the full test suite (128/128 cases, 366/366 assertions) both from a fresh reconfigure and again after the directory move. --- src/gui_main.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/gui_main.cpp') diff --git a/src/gui_main.cpp b/src/gui_main.cpp index 8a7771a..49f40dc 100644 --- a/src/gui_main.cpp +++ b/src/gui_main.cpp @@ -1,6 +1,6 @@ // GUI frontend (secondary to the TUI - see PLAN.md Decisions). Same // capture/decode/filter/pcapng pipeline as main.cpp's CLI/TUI modes, -// via wireframe::CaptureSession - not a hand-copied setup path, so it +// via packeteer::CaptureSession - not a hand-copied setup path, so it // can't drift on datalink validation, filter errors, or the // pcap_breakloop() shutdown hook the way two independent // implementations eventually would. @@ -22,11 +22,11 @@ #include #include -#include "wireframe/capture_session.hpp" -#include "wireframe/net/tcp_reassembly.hpp" -#include "wireframe/packet_diagnostics.hpp" -#include "wireframe/search.hpp" -#include "wireframe/summarize.hpp" +#include "packeteer/capture_session.hpp" +#include "packeteer/net/tcp_reassembly.hpp" +#include "packeteer/packet_diagnostics.hpp" +#include "packeteer/search.hpp" +#include "packeteer/summarize.hpp" namespace { @@ -58,11 +58,11 @@ struct SharedState { std::atomic capture_alive{true}; }; -void consumer_loop(wireframe::CaptureSession& session, wireframe::CaptureQueue& queue, - SharedState& state, wireframe::net::TcpReassembler* reassembler) { +void consumer_loop(packeteer::CaptureSession& session, packeteer::CaptureQueue& queue, + SharedState& state, packeteer::net::TcpReassembler* reassembler) { while (auto packet = queue.pop()) { std::span bytes{packet->data}; - std::string summary = wireframe::summarize_packet(bytes, session.datalink()); + std::string summary = packeteer::summarize_packet(bytes, session.datalink()); if (auto* writer = session.pcapng_writer()) { writer->write_packet(/*interface_id=*/0, packet->ts_sec, packet->ts_usec, bytes, @@ -71,7 +71,7 @@ void consumer_loop(wireframe::CaptureSession& session, wireframe::CaptureQueue& std::optional reassembled_http; if (reassembler) { - reassembled_http = wireframe::reassembled_http_status(bytes, session.datalink(), + reassembled_http = packeteer::reassembled_http_status(bytes, session.datalink(), *reassembler); } @@ -91,7 +91,7 @@ void consumer_loop(wireframe::CaptureSession& session, wireframe::CaptureQueue& void print_usage(const char* argv0) { std::printf( - "wireframe - terminal packet capture and analysis tool (GUI)\n" + "packeteer - terminal packet capture and analysis tool (GUI)\n" "\n" "Usage: %s [options] [interface]\n" "\n" @@ -127,7 +127,7 @@ int main(int argc, char** argv) { } } - wireframe::CaptureSessionOptions options; + packeteer::CaptureSessionOptions options; bool enable_checksums = false; bool enable_reassembly = false; for (int i = 1; i < argc; ++i) { @@ -146,7 +146,7 @@ int main(int argc, char** argv) { } } - wireframe::CaptureSession session; + packeteer::CaptureSession session; if (auto err = session.open(options)) { std::fprintf(stderr, "%s\n", err->c_str()); return 1; @@ -159,7 +159,7 @@ int main(int argc, char** argv) { } SDL_Window* window = - SDL_CreateWindow("wireframe", 1000, 650, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); + SDL_CreateWindow("packeteer", 1000, 650, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); if (window == nullptr) { std::fprintf(stderr, "SDL_CreateWindow failed: %s\n", SDL_GetError()); SDL_Quit(); @@ -181,9 +181,9 @@ int main(int argc, char** argv) { ImGui_ImplSDL3_InitForSDLRenderer(window, renderer); ImGui_ImplSDLRenderer3_Init(renderer); - wireframe::CaptureQueue queue(4096); + packeteer::CaptureQueue queue(4096); SharedState state; - wireframe::net::TcpReassembler reassembler; + packeteer::net::TcpReassembler reassembler; std::thread capture_thread = session.start_capture_thread(queue); std::thread consumer_thread(consumer_loop, std::ref(session), std::ref(queue), std::ref(state), enable_reassembly ? &reassembler : nullptr); @@ -219,7 +219,7 @@ int main(int argc, char** argv) { ImGui::SetNextWindowPos(ImVec2(0, 0)); ImGui::SetNextWindowSize(io.DisplaySize); - ImGui::Begin("wireframe", nullptr, + ImGui::Begin("packeteer", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse); @@ -246,7 +246,7 @@ int main(int argc, char** argv) { { std::lock_guard lock(state.mutex); for (std::size_t i = 0; i < state.rows.size(); ++i) { - if (!wireframe::matches_search(state.rows[i].summary, search_term)) continue; + if (!packeteer::matches_search(state.rows[i].summary, search_term)) continue; ++shown; // ImGui derives a widget's ID from its label text by @@ -276,7 +276,7 @@ int main(int argc, char** argv) { if (selected_row >= 0 && selected_row < static_cast(state.rows.size())) { const auto& row = state.rows[selected_row]; if (enable_checksums) { - std::string status = wireframe::checksum_status(row.data, session.datalink()); + std::string status = packeteer::checksum_status(row.data, session.datalink()); if (!status.empty()) { ImGui::TextColored(ImVec4(0.6f, 0.8f, 1.0f, 1.0f), "%s", status.c_str()); } @@ -285,7 +285,7 @@ int main(int argc, char** argv) { ImGui::TextColored(ImVec4(0.6f, 1.0f, 0.6f, 1.0f), "%s", row.reassembled_http->c_str()); } - for (const auto& line : wireframe::hex_dump_lines(row.data)) { + for (const auto& line : packeteer::hex_dump_lines(row.data)) { ImGui::TextUnformatted(line.c_str()); } } else { -- cgit v1.2.3