btest/tap-analyzer: Update existing test and add new one for UpdateConnVal()

This also changes the output of connection UIDs from the tap analyzer to be
prefixed with C for easier correlation with other logs.

Relates to #4337 #4725 #4734 #4737
This commit is contained in:
Arne Welzel 2025-08-06 17:03:50 +02:00
parent bdff2935a4
commit f98508bbb0
8 changed files with 671 additions and 59 deletions

View file

@ -16,13 +16,13 @@ public:
void TapPacket(const zeek::Packet& pkt, zeek::packet_analysis::PacketAction action,
const zeek::packet_analysis::SkipReason skip_reason) override {
std::printf("Packet(len=%d orig=%d, action=%d skip_reason=%d) uid=%s\n", pkt.len, pkt.is_orig,
std::printf("Packet(len=%d orig=%d, action=%d skip_reason=%d) uid=C%s\n", pkt.len, pkt.is_orig,
static_cast<int>(action), static_cast<int>(skip_reason), conn->GetUID().Base62().c_str());
}
void Init() override { std::printf("Init() uid=%s\n", conn->GetUID().Base62().c_str()); }
void Init() override { std::printf("Init() uid=C%s\n", conn->GetUID().Base62().c_str()); }
void Done() override { std::printf("Done() uid=%s\n", conn->GetUID().Base62().c_str()); }
void Done() override { std::printf("Done() uid=C%s\n", conn->GetUID().Base62().c_str()); }
private:
zeek::Connection* conn = nullptr;