mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

Usage demo for plugin writers to add custom event metadata and access in in Zeek scripts.
19 lines
507 B
C++
19 lines
507 B
C++
#pragma once
|
|
|
|
#include <zeek/plugin/Plugin.h>
|
|
#include <string>
|
|
|
|
namespace btest::plugin::Demo_PublishEventMetadata {
|
|
|
|
class Plugin : public zeek::plugin::Plugin {
|
|
protected:
|
|
zeek::plugin::Configuration Configure() override;
|
|
void InitPostScript() override;
|
|
|
|
bool HookPublishEvent(zeek::cluster::Backend& backend, const std::string& topic,
|
|
zeek::cluster::detail::Event& event) override;
|
|
};
|
|
|
|
extern Plugin plugin;
|
|
|
|
} // namespace btest::plugin::Demo_PublishEventMetadata
|