instrumentation improvement
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled

This commit is contained in:
eerieaerial 2025-05-01 20:39:24 +04:00
parent 083b833bf8
commit 5fb3f5c228
4 changed files with 100 additions and 17 deletions

View file

@ -1288,6 +1288,23 @@ void Switch::_sendViaSpecificPath(void *tPtr,SharedPtr<Peer> peer,SharedPtr<Path
CT("PACKET CONTENTS:");
packet.dump();
const uint8_t * payload = reinterpret_cast<const uint8_t *>(packet.payload());
size_t payloadLength = packet.payloadLength();
Address addr;
switch(packet.verb())
{
case Packet::VERB_WHOIS:
addr.setTo(packet.field(ZT_PACKET_IDX_PAYLOAD, ZT_ADDRESS_LENGTH), ZT_ADDRESS_LENGTH);
addr.toString((buf));
CT("ASKING WHOIS %s", buf);
break;
default:
break;
}
if (trustedPathId) {
packet.setTrusted(trustedPathId);
} else {
@ -1296,6 +1313,7 @@ void Switch::_sendViaSpecificPath(void *tPtr,SharedPtr<Peer> peer,SharedPtr<Path
}
RR->node->expectReplyTo(packet.packetId());
}
CT("PACKET CONTENTS AFTER ENCRYPTION:");
packet.dump();