srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/include/wireframe/l7/mdns.hpp
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2024-05-27 22:00:00 +0200
committersrdusr <[email protected]>2024-05-27 22:00:00 +0200
commitb565d7d9c47ca1ec5af0effd828431ee96027d60 (patch)
treefbe0c9c897e78f507443507354d5b1d8fb851099 /include/wireframe/l7/mdns.hpp
parentfbedc55d5aa861c381701c9f913b34ee7ab57ec4 (diff)
downloadpacketeer-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/wireframe/l7/mdns.hpp')
-rw-r--r--include/wireframe/l7/mdns.hpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/include/wireframe/l7/mdns.hpp b/include/wireframe/l7/mdns.hpp
deleted file mode 100644
index 887d811..0000000
--- a/include/wireframe/l7/mdns.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#pragma once
-
-#include <cstdint>
-#include <optional>
-#include <span>
-#include <string>
-
-#include "wireframe/l7/dissector.hpp"
-#include "wireframe/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,
-// usually to/from the multicast address 224.0.0.251) and typically
-// with many questions/answers per packet instead of DNS's usual one.
-// parse_dns() already only looks at the first question, which is true
-// 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 {
-
-inline constexpr std::uint16_t kMdnsPort = 5353;
-
-class MdnsDissector : public L7Dissector {
-public:
- std::uint16_t port() const override { return kMdnsPort; }
-
- std::optional<std::string> summarize(std::span<const unsigned char> payload) const override {
- auto msg = parse_dns(payload);
- if (!msg) return std::nullopt;
-
- // No id= field here unlike DnsDissector's summary: RFC 6762
- // 18.1 has multicast queries send it as zero, so printing it
- // would just be "id=0" noise on real traffic.
- std::string out = "mDNS ";
- out += msg->header.is_response ? "response" : "query";
- if (msg->header.is_response) out += " ancount=" + std::to_string(msg->header.ancount);
- if (msg->question) {
- out += " " + msg->question->name + " type=" + std::to_string(msg->question->qtype);
- }
- return out;
- }
-};
-
-} // namespace wireframe::net