diff options
| author | srdusr <[email protected]> | 2024-05-27 22:00:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2024-05-27 22:00:00 +0200 |
| commit | b565d7d9c47ca1ec5af0effd828431ee96027d60 (patch) | |
| tree | fbe0c9c897e78f507443507354d5b1d8fb851099 /include | |
| parent | fbedc55d5aa861c381701c9f913b34ee7ab57ec4 (diff) | |
| download | packeteer-b565d7d9c47ca1ec5af0effd828431ee96027d60.tar.gz packeteer-b565d7d9c47ca1ec5af0effd828431ee96027d60.zip | |
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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/packeteer/byteio.hpp (renamed from include/wireframe/byteio.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/capture_queue.hpp (renamed from include/wireframe/capture_queue.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/capture_session.hpp (renamed from include/wireframe/capture_session.hpp) | 14 | ||||
| -rw-r--r-- | include/packeteer/filter.hpp (renamed from include/wireframe/filter.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/l7/dissector.hpp (renamed from include/wireframe/l7/dissector.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/l7/dns.hpp (renamed from include/wireframe/l7/dns.hpp) | 8 | ||||
| -rw-r--r-- | include/packeteer/l7/http.hpp (renamed from include/wireframe/l7/http.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/l7/mdns.hpp (renamed from include/wireframe/l7/mdns.hpp) | 8 | ||||
| -rw-r--r-- | include/packeteer/l7/ssh.hpp (renamed from include/wireframe/l7/ssh.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/l7/tls.hpp (renamed from include/wireframe/l7/tls.hpp) | 8 | ||||
| -rw-r--r-- | include/packeteer/net/checksum.hpp (renamed from include/wireframe/net/checksum.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/ethernet.hpp (renamed from include/wireframe/net/ethernet.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/icmp.hpp (renamed from include/wireframe/net/icmp.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/ipv4.hpp (renamed from include/wireframe/net/ipv4.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/ipv6.hpp (renamed from include/wireframe/net/ipv6.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/tcp.hpp (renamed from include/wireframe/net/tcp.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/net/tcp_reassembly.hpp (renamed from include/wireframe/net/tcp_reassembly.hpp) | 8 | ||||
| -rw-r--r-- | include/packeteer/net/udp.hpp (renamed from include/wireframe/net/udp.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/packet_diagnostics.hpp (renamed from include/wireframe/packet_diagnostics.hpp) | 20 | ||||
| -rw-r--r-- | include/packeteer/pcapng/reader.hpp (renamed from include/wireframe/pcapng/reader.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/pcapng/writer.hpp (renamed from include/wireframe/pcapng/writer.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/privileges.hpp (renamed from include/wireframe/privileges.hpp) | 4 | ||||
| -rw-r--r-- | include/packeteer/search.hpp (renamed from include/wireframe/search.hpp) | 6 | ||||
| -rw-r--r-- | include/packeteer/summarize.hpp (renamed from include/wireframe/summarize.hpp) | 30 |
24 files changed, 93 insertions, 93 deletions
diff --git a/include/wireframe/byteio.hpp b/include/packeteer/byteio.hpp index c37c29e..cf0cb19 100644 --- a/include/wireframe/byteio.hpp +++ b/include/packeteer/byteio.hpp @@ -6,7 +6,7 @@ // Manual big-endian reads instead of reinterpret_cast onto a packed // struct: network buffers from pcap aren't guaranteed aligned for // multi-byte integer types, so casting would be undefined behavior. -namespace wireframe { +namespace packeteer { inline std::uint16_t read_be16(std::span<const unsigned char> bytes, std::size_t offset) { return static_cast<std::uint16_t>((bytes[offset] << 8) | bytes[offset + 1]); @@ -19,4 +19,4 @@ inline std::uint32_t read_be32(std::span<const unsigned char> bytes, std::size_t static_cast<std::uint32_t>(bytes[offset + 3]); } -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/capture_queue.hpp b/include/packeteer/capture_queue.hpp index 14794ba..cce254c 100644 --- a/include/wireframe/capture_queue.hpp +++ b/include/packeteer/capture_queue.hpp @@ -11,7 +11,7 @@ // thread (PLAN.md's architecture sketch). Owns a copy of each packet's // bytes since the buffer libpcap hands the callback is only valid for // the duration of that call. -namespace wireframe { +namespace packeteer { struct CapturedPacket { std::uint32_t ts_sec; @@ -95,4 +95,4 @@ private: std::uint64_t dropped_ = 0; }; -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/capture_session.hpp b/include/packeteer/capture_session.hpp index 2e3b05a..cc8ac27 100644 --- a/include/wireframe/capture_session.hpp +++ b/include/packeteer/capture_session.hpp @@ -10,11 +10,11 @@ #include <string> #include <thread> -#include "wireframe/capture_queue.hpp" -#include "wireframe/filter.hpp" -#include "wireframe/pcapng/reader.hpp" -#include "wireframe/pcapng/writer.hpp" -#include "wireframe/privileges.hpp" +#include "packeteer/capture_queue.hpp" +#include "packeteer/filter.hpp" +#include "packeteer/pcapng/reader.hpp" +#include "packeteer/pcapng/writer.hpp" +#include "packeteer/privileges.hpp" // Device-open -> datalink-validate -> filter/pcapng-setup -> signal-hook // pipeline, shared by every frontend (CLI, TUI, GUI). Centralized so a @@ -30,7 +30,7 @@ // needing a second code path. The render/consumer side only ever talks // to a CaptureQueue - it has no way to tell whether packets are // arriving from a live pcap_loop or being read back from disk. -namespace wireframe { +namespace packeteer { namespace detail { inline pcap_t* g_capture_handle = nullptr; @@ -309,4 +309,4 @@ private: std::atomic<bool> replay_stop_requested_{false}; }; -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/filter.hpp b/include/packeteer/filter.hpp index 49fa4ab..1cfcd88 100644 --- a/include/wireframe/filter.hpp +++ b/include/packeteer/filter.hpp @@ -11,7 +11,7 @@ // hand-rolling a second one would be a large, separate project with no // bearing on this one's actual goal (the C++ memory model), so this // wraps the existing implementation instead of reinventing it. -namespace wireframe { +namespace packeteer { // Compiles `expression` against `handle`'s linktype/snaplen into // `out`. `handle` can be a real, already-open capture handle, or a @@ -33,4 +33,4 @@ inline std::optional<std::string> compile_filter(pcap_t* handle, const std::stri return std::nullopt; } -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/l7/dissector.hpp b/include/packeteer/l7/dissector.hpp index 9b2cc32..e918baf 100644 --- a/include/wireframe/l7/dissector.hpp +++ b/include/packeteer/l7/dissector.hpp @@ -9,7 +9,7 @@ // Small interface/vtable for L7 dissectors (PLAN.md's architecture // sketch), so protocols can be registered and added incrementally // without touching the L2-L4 decode path or main.cpp's dispatch logic. -namespace wireframe::net { +namespace packeteer::net { class L7Dissector { public: @@ -42,4 +42,4 @@ private: std::vector<const L7Dissector*> dissectors_; }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/l7/dns.hpp b/include/packeteer/l7/dns.hpp index 5c1ab36..2626887 100644 --- a/include/wireframe/l7/dns.hpp +++ b/include/packeteer/l7/dns.hpp @@ -6,8 +6,8 @@ #include <string> #include <utility> -#include "wireframe/byteio.hpp" -#include "wireframe/l7/dissector.hpp" +#include "packeteer/byteio.hpp" +#include "packeteer/l7/dissector.hpp" // Hand-rolled DNS message parsing: header + the first question record. // Answer/authority/additional records aren't decoded (not needed for a @@ -15,7 +15,7 @@ // followed - a pointer in the question section itself is rejected // rather than chased, keeping this a pure forward scan with no risk of // a pointer loop. -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint16_t kDnsPort = 53; @@ -105,4 +105,4 @@ public: } }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/l7/http.hpp b/include/packeteer/l7/http.hpp index 4780b23..f42bf9f 100644 --- a/include/wireframe/l7/http.hpp +++ b/include/packeteer/l7/http.hpp @@ -6,14 +6,14 @@ #include <string> #include <string_view> -#include "wireframe/l7/dissector.hpp" +#include "packeteer/l7/dissector.hpp" // Best-effort, single-segment HTTP/1.x request/status-line parsing (plus // the Host: header for requests). No TCP stream reassembly, so a // message split across multiple packets is only partially visible here // - the same scope DNS already has (single UDP datagram, no // reassembly). Good enough for a one-line summary, not a full dissector. -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint16_t kHttpPort = 80; @@ -110,4 +110,4 @@ public: } }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/l7/mdns.hpp b/include/packeteer/l7/mdns.hpp index 887d811..b7a8529 100644 --- a/include/wireframe/l7/mdns.hpp +++ b/include/packeteer/l7/mdns.hpp @@ -5,8 +5,8 @@ #include <span> #include <string> -#include "wireframe/l7/dissector.hpp" -#include "wireframe/l7/dns.hpp" +#include "packeteer/l7/dissector.hpp" +#include "packeteer/l7/dns.hpp" // mDNS (RFC 6762) reuses DNS's exact wire format - same header layout, // same question/name encoding - just over a different port (5353, @@ -16,7 +16,7 @@ // here too; the only real difference worth a label is which protocol // this traffic actually is, so real-world capture output doesn't read // "DNS" for traffic that never touched a resolver. -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint16_t kMdnsPort = 5353; @@ -41,4 +41,4 @@ public: } }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/l7/ssh.hpp b/include/packeteer/l7/ssh.hpp index efa471f..261b8e1 100644 --- a/include/wireframe/l7/ssh.hpp +++ b/include/packeteer/l7/ssh.hpp @@ -6,7 +6,7 @@ #include <string> #include <string_view> -#include "wireframe/l7/dissector.hpp" +#include "packeteer/l7/dissector.hpp" // SSH's identification exchange (RFC 4253 section 4.2) is the one part // of an SSH connection sent in the clear, before key exchange starts @@ -16,7 +16,7 @@ // dissector already uses). Only that first line is ever readable -- // everything after key exchange is opaque, so this dissector only ever // has one line to look at, on either side of the connection. -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint16_t kSshPort = 22; @@ -62,4 +62,4 @@ public: } }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/l7/tls.hpp b/include/packeteer/l7/tls.hpp index 1c6dc57..40893fc 100644 --- a/include/wireframe/l7/tls.hpp +++ b/include/packeteer/l7/tls.hpp @@ -5,8 +5,8 @@ #include <span> #include <string> -#include "wireframe/byteio.hpp" -#include "wireframe/l7/dissector.hpp" +#include "packeteer/byteio.hpp" +#include "packeteer/l7/dissector.hpp" // TLS ClientHello -> SNI extension parsing. Most web traffic is TLS // today, so HTTP alone covers a shrinking fraction of it - SNI is what @@ -23,7 +23,7 @@ // the buffer before use - this is exactly the kind of nested, // attacker-influenced TLV structure the project's decoders are meant // to get right. -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint16_t kTlsPort = 443; inline constexpr std::uint8_t kTlsContentTypeHandshake = 0x16; @@ -136,4 +136,4 @@ public: } }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/checksum.hpp b/include/packeteer/net/checksum.hpp index 97e5254..522d90a 100644 --- a/include/wireframe/net/checksum.hpp +++ b/include/packeteer/net/checksum.hpp @@ -4,7 +4,7 @@ #include <span> #include <vector> -#include "wireframe/net/ipv4.hpp" +#include "packeteer/net/ipv4.hpp" // RFC 1071 Internet checksum, and the IPv4/TCP/UDP verification built // on it. Not wired into summarize_packet(): on loopback, and for many @@ -16,7 +16,7 @@ // exactly the interfaces this project has been tested against all // session (lo, tailscale0). Wireshark makes this opt-in for the same // reason; so does this (CLI's -c flag calls these directly). -namespace wireframe::net { +namespace packeteer::net { // One's-complement sum of 16-bit big-endian words, folded back into 16 // bits, then complemented. Used identically by IPv4's header checksum @@ -88,4 +88,4 @@ inline ChecksumResult verify_udp_checksum_ipv4(const Ipv4Address& src, const Ipv return internet_checksum(buf) == 0 ? ChecksumResult::kValid : ChecksumResult::kInvalid; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/ethernet.hpp b/include/packeteer/net/ethernet.hpp index 2da4cc8..5b851bc 100644 --- a/include/wireframe/net/ethernet.hpp +++ b/include/packeteer/net/ethernet.hpp @@ -6,9 +6,9 @@ #include <optional> #include <span> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::size_t kEthernetHeaderLen = 14; inline constexpr std::uint16_t kEthertypeIPv4 = 0x0800; @@ -41,4 +41,4 @@ inline std::optional<EthernetFrame> parse_ethernet(std::span<const unsigned char return EthernetFrame{header, bytes.subspan(kEthernetHeaderLen)}; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/icmp.hpp b/include/packeteer/net/icmp.hpp index af83916..d2613a2 100644 --- a/include/wireframe/net/icmp.hpp +++ b/include/packeteer/net/icmp.hpp @@ -5,7 +5,7 @@ #include <span> #include <string> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" // ICMPv4 (RFC 792) and ICMPv6 (RFC 4443) share the same first-4-byte // shape (Type, Code, Checksum) but a completely different type @@ -14,7 +14,7 @@ // tables, sharing only the header struct shape. Neither protocol has // ports, so this doesn't fit L7Registry's port-keyed dispatch at all; // it's handled directly by protocol number in summarize.hpp instead. -namespace wireframe::net { +namespace packeteer::net { struct IcmpHeader { std::uint8_t type; @@ -81,4 +81,4 @@ inline std::string icmpv6_type_name(std::uint8_t type) { } } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/ipv4.hpp b/include/packeteer/net/ipv4.hpp index f53b4f2..ee77c17 100644 --- a/include/wireframe/net/ipv4.hpp +++ b/include/packeteer/net/ipv4.hpp @@ -6,9 +6,9 @@ #include <optional> #include <span> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::uint8_t kProtoIcmp = 1; inline constexpr std::uint8_t kProtoTcp = 6; @@ -53,4 +53,4 @@ inline std::optional<Ipv4Packet> parse_ipv4(std::span<const unsigned char> bytes return Ipv4Packet{header, bytes.subspan(header_len)}; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/ipv6.hpp b/include/packeteer/net/ipv6.hpp index 4b6b28a..8c048e8 100644 --- a/include/wireframe/net/ipv6.hpp +++ b/include/packeteer/net/ipv6.hpp @@ -8,9 +8,9 @@ #include <span> #include <string> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::size_t kIpv6HeaderLen = 40; inline constexpr std::uint8_t kNextHeaderHopByHop = 0; @@ -170,4 +170,4 @@ inline std::string ipv6_to_string(const Ipv6Address& addr) { return out; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/tcp.hpp b/include/packeteer/net/tcp.hpp index f691a7f..e3d9670 100644 --- a/include/wireframe/net/tcp.hpp +++ b/include/packeteer/net/tcp.hpp @@ -4,9 +4,9 @@ #include <optional> #include <span> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" -namespace wireframe::net { +namespace packeteer::net { // Lower 6 bits of the flags byte: URG ACK PSH RST SYN FIN. CWR/ECE (the // top 2 bits) are masked off - not needed for now. @@ -51,4 +51,4 @@ inline std::optional<TcpSegment> parse_tcp(std::span<const unsigned char> bytes) return TcpSegment{header, bytes.subspan(header_len)}; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/tcp_reassembly.hpp b/include/packeteer/net/tcp_reassembly.hpp index 90824a4..3dbf04f 100644 --- a/include/wireframe/net/tcp_reassembly.hpp +++ b/include/packeteer/net/tcp_reassembly.hpp @@ -7,7 +7,7 @@ #include <tuple> #include <vector> -#include "wireframe/net/ipv4.hpp" +#include "packeteer/net/ipv4.hpp" // Minimal, in-order-only TCP stream reassembly: tracks each flow's two // directions separately, accumulating payload bytes as segments arrive @@ -19,13 +19,13 @@ // arrive in order. A capture point far from either endpoint (e.g. a // middlebox) would need real out-of-order buffering this doesn't do. // -// The point: HTTP's dissector (wireframe/l7/http.hpp) only ever sees +// The point: HTTP's dissector (packeteer/l7/http.hpp) only ever sees // one segment at a time, so a request/response split across TCP // segments - a Host: header landing in the second packet of a // request, say - is invisible to it. Feeding the *reassembled* stream // back through the same parse_http() lets it see what single-segment // dissection structurally can't. -namespace wireframe::net { +namespace packeteer::net { struct FlowKey { Ipv4Address ip_a; @@ -122,4 +122,4 @@ private: std::size_t max_flows_; }; -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/net/udp.hpp b/include/packeteer/net/udp.hpp index 07664c2..6602b96 100644 --- a/include/wireframe/net/udp.hpp +++ b/include/packeteer/net/udp.hpp @@ -4,9 +4,9 @@ #include <optional> #include <span> -#include "wireframe/byteio.hpp" +#include "packeteer/byteio.hpp" -namespace wireframe::net { +namespace packeteer::net { inline constexpr std::size_t kUdpHeaderLen = 8; @@ -32,4 +32,4 @@ inline std::optional<UdpDatagram> parse_udp(std::span<const unsigned char> bytes return UdpDatagram{header, bytes.subspan(kUdpHeaderLen)}; } -} // namespace wireframe::net +} // namespace packeteer::net diff --git a/include/wireframe/packet_diagnostics.hpp b/include/packeteer/packet_diagnostics.hpp index 4b9b0c6..f1edeef 100644 --- a/include/wireframe/packet_diagnostics.hpp +++ b/include/packeteer/packet_diagnostics.hpp @@ -5,22 +5,22 @@ #include <span> #include <string> -#include "wireframe/l7/http.hpp" -#include "wireframe/net/checksum.hpp" -#include "wireframe/net/ethernet.hpp" -#include "wireframe/net/ipv4.hpp" -#include "wireframe/net/tcp.hpp" -#include "wireframe/net/tcp_reassembly.hpp" +#include "packeteer/l7/http.hpp" +#include "packeteer/net/checksum.hpp" +#include "packeteer/net/ethernet.hpp" +#include "packeteer/net/ipv4.hpp" +#include "packeteer/net/tcp.hpp" +#include "packeteer/net/tcp_reassembly.hpp" // Checksum validation and TCP stream reassembly are both deliberately // kept out of summarize_packet()'s shared per-packet output - see -// wireframe/net/checksum.hpp and wireframe/net/tcp_reassembly.hpp for +// packeteer/net/checksum.hpp and packeteer/net/tcp_reassembly.hpp for // why each is opt-in (checksum offload false positives; reassembly's // per-flow state and extra per-packet work). Shared between the CLI // (-c/-a) and GUI frontends so they don't hand-roll two separate // Ethernet/IPv4/TCP walks down to the same byte spans - the same -// reasoning wireframe::CaptureSession exists for at the setup layer. -namespace wireframe { +// reasoning packeteer::CaptureSession exists for at the setup layer. +namespace packeteer { inline std::string checksum_status(std::span<const unsigned char> bytes, int datalink) { std::span<const unsigned char> ip_bytes; @@ -89,4 +89,4 @@ inline std::optional<std::string> reassembled_http_status(std::span<const unsign return out; } -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/pcapng/reader.hpp b/include/packeteer/pcapng/reader.hpp index d01b431..264c276 100644 --- a/include/wireframe/pcapng/reader.hpp +++ b/include/packeteer/pcapng/reader.hpp @@ -16,7 +16,7 @@ // writer.hpp emits and what pcapng writers on this class of hardware // (tcpdump, dumpcap) produce. A big-endian file is out of scope - this // pairs with our own writer, not general pcapng interop. -namespace wireframe::pcapng { +namespace packeteer::pcapng { struct PacketRecord { std::uint32_t interface_id; @@ -120,4 +120,4 @@ private: std::optional<std::uint16_t> link_type_; }; -} // namespace wireframe::pcapng +} // namespace packeteer::pcapng diff --git a/include/wireframe/pcapng/writer.hpp b/include/packeteer/pcapng/writer.hpp index 18f6022..59e3c42 100644 --- a/include/wireframe/pcapng/writer.hpp +++ b/include/packeteer/pcapng/writer.hpp @@ -14,8 +14,8 @@ // // Multi-byte fields are written little-endian by hand (matching the // 0x1A2B3C4D byte-order magic below) rather than via struct-casting, -// for the same alignment/UB reasons as the src/wireframe/net decoders. -namespace wireframe::pcapng { +// for the same alignment/UB reasons as the src/packeteer/net decoders. +namespace packeteer::pcapng { inline constexpr std::uint32_t kBlockTypeShb = 0x0A0D0D0A; inline constexpr std::uint32_t kBlockTypeIdb = 0x00000001; @@ -91,4 +91,4 @@ private: std::FILE* file_; }; -} // namespace wireframe::pcapng +} // namespace packeteer::pcapng diff --git a/include/wireframe/privileges.hpp b/include/packeteer/privileges.hpp index 69df725..7c7be7b 100644 --- a/include/wireframe/privileges.hpp +++ b/include/packeteer/privileges.hpp @@ -28,7 +28,7 @@ // straight back to the invoking user immediately, so the rest of the // process's lifetime - including any -w output file, which then ends // up owned by that user instead of root - runs unprivileged either way. -namespace wireframe { +namespace packeteer { // Drops from root to the user who actually invoked the program, via // sudo's SUDO_UID/SUDO_GID (which sudo always sets). A no-op if not @@ -84,4 +84,4 @@ inline std::optional<std::string> drop_privileges_if_root() { #endif } -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/search.hpp b/include/packeteer/search.hpp index 4cb9203..826f184 100644 --- a/include/wireframe/search.hpp +++ b/include/packeteer/search.hpp @@ -4,7 +4,7 @@ #include <cctype> #include <string> -// A display filter, distinct from -f's capture filter (wireframe/filter.hpp): +// A display filter, distinct from -f's capture filter (packeteer/filter.hpp): // -f decides what's captured - and, combined with -w, what's written to // disk. This decides what's shown, without touching either. Same // distinction Wireshark draws between a capture filter and a display @@ -12,7 +12,7 @@ // plain case-insensitive substring match over the packet's summary line // is enough for "find the packets mentioning this host/port", which is // the actual use case. -namespace wireframe { +namespace packeteer { inline bool matches_search(const std::string& haystack, const std::string& needle) { if (needle.empty()) return true; @@ -23,4 +23,4 @@ inline bool matches_search(const std::string& haystack, const std::string& needl return it != haystack.end(); } -} // namespace wireframe +} // namespace packeteer diff --git a/include/wireframe/summarize.hpp b/include/packeteer/summarize.hpp index 840ddf9..77d9ec3 100644 --- a/include/wireframe/summarize.hpp +++ b/include/packeteer/summarize.hpp @@ -8,23 +8,23 @@ #include <pcap.h> -#include "wireframe/l7/dissector.hpp" -#include "wireframe/l7/dns.hpp" -#include "wireframe/l7/http.hpp" -#include "wireframe/l7/mdns.hpp" -#include "wireframe/l7/ssh.hpp" -#include "wireframe/l7/tls.hpp" -#include "wireframe/net/ethernet.hpp" -#include "wireframe/net/icmp.hpp" -#include "wireframe/net/ipv4.hpp" -#include "wireframe/net/ipv6.hpp" -#include "wireframe/net/tcp.hpp" -#include "wireframe/net/udp.hpp" +#include "packeteer/l7/dissector.hpp" +#include "packeteer/l7/dns.hpp" +#include "packeteer/l7/http.hpp" +#include "packeteer/l7/mdns.hpp" +#include "packeteer/l7/ssh.hpp" +#include "packeteer/l7/tls.hpp" +#include "packeteer/net/ethernet.hpp" +#include "packeteer/net/icmp.hpp" +#include "packeteer/net/ipv4.hpp" +#include "packeteer/net/ipv6.hpp" +#include "packeteer/net/tcp.hpp" +#include "packeteer/net/udp.hpp" // Packet -> human-readable summary. Shared by every frontend (plain // CLI, TUI, GUI) so they can't drift apart on what a given packet // decodes to - one source of truth, not three copies to keep in sync. -namespace wireframe { +namespace packeteer { inline std::string mac_to_string(const net::MacAddress& mac) { char buf[18]; @@ -53,7 +53,7 @@ inline std::string tcp_flags_to_string(std::uint8_t flags) { } // Registered once. DNS (UDP) was the first L7 dissector, proving the -// interface (wireframe/l7/dissector.hpp) is enough to add a protocol +// interface (packeteer/l7/dissector.hpp) is enough to add a protocol // without touching the L2-L4 decode path; HTTP (TCP) is the second, // and the first to actually exercise L7Registry's TCP-payload path -- // DNS alone never did, since it only ever runs over UDP port 53. TLS @@ -272,4 +272,4 @@ inline std::vector<std::string> hex_dump_lines(std::span<const unsigned char> by return lines; } -} // namespace wireframe +} // namespace packeteer |