From: Remi Gacogne Date: Tue, 17 Mar 2026 13:10:22 +0000 (+0100) Subject: Implement a more useful version of `PacketReader::getRemaining()` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=813473a5e31cd80c8ccdd07eb16fe57d2c608b3d;p=thirdparty%2Fpdns.git Implement a more useful version of `PacketReader::getRemaining()` Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index fa79f2534a..8d06ea93a0 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -171,7 +171,7 @@ public: } const string getRemaining() const { - return ""; + return "Remaining data from PacketReader, current position " + std::to_string(d_pos) + " in packet of size " + std::to_string(d_content.size()) + ", end of record expected at " + std::to_string(d_startrecordpos + d_recordlen) + ": " + makeHexDump(std::string(d_content.begin() + d_pos, d_content.begin() + d_startrecordpos + d_recordlen)); }; uint16_t getPosition() const