added camouflaging functionality and instrumentation

This commit is contained in:
eerieaerial 2025-04-30 17:40:54 +04:00
parent cdaf5e5468
commit 083b833bf8
16 changed files with 904 additions and 43 deletions

View file

@ -74,6 +74,22 @@ public:
{
}
/**
* Create a new packet-in-decode from an existing packet
*
* @param packet Source packet
* @param path Path over which packet arrived
* @param now Current time
* @throws std::out_of_range Range error processing packet
*/
IncomingPacket(const Packet &packet, const SharedPtr<Path> &path, int64_t now) :
Packet(packet),
_receiveTime(now),
_path(path),
_authenticated(false)
{
}
/**
* Init packet-in-decode in place
*
@ -91,6 +107,22 @@ public:
_authenticated = false;
}
/**
* Init packet-in-decode in place from an existing packet
*
* @param packet Source packet
* @param path Path over which packet arrived
* @param now Current time
* @throws std::out_of_range Range error processing packet
*/
inline void init(const Packet &packet, const SharedPtr<Path> &path, int64_t now)
{
copyFrom(packet.data(), packet.size());
_receiveTime = now;
_path = path;
_authenticated = false;
}
/**
* Attempt to decode this packet
*