Event/zeek.bif: Add EventMetadata current() and current_values() accessors

...and basic smoke testing.
This commit is contained in:
Arne Welzel 2025-05-21 16:48:47 +02:00
parent 53b0f0ad64
commit 75aa6588fe
14 changed files with 155 additions and 0 deletions

View file

@ -66,6 +66,18 @@ public:
const zeek::Args& Args() const { return args; }
double Time() const;
/**
* @return a pointer to the MetadataVector of this event or a nullptr.
*/
const detail::EventMetadataVector* Metadata() const { return meta.get(); }
/**
* @return a vector of values for metadata matching identifier \a id.
*
* @param id The metadata identifier as an enum value.
*/
VectorValPtr MetadataValues(const EnumValPtr& id) const;
void Describe(ODesc* d) const override;
private: