mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00

This enables locating the headers within the install-tree using the dirs provided by `zeek-config --include_dir`. To enable locating these headers within the build-tree, this change also creates a 'build/src/include/zeek -> ..' symlink.
26 lines
748 B
C++
26 lines
748 B
C++
|
|
#include "Foo.h"
|
|
#include "events.bif.h"
|
|
|
|
#include <zeek/file_analysis/Manager.h>
|
|
#include <zeek/file_analysis/File.h>
|
|
|
|
using namespace btest::plugin::Demo_Foo;
|
|
|
|
Foo::Foo(zeek::RecordValPtr args, zeek::file_analysis::File* file)
|
|
: zeek::file_analysis::Analyzer(zeek::file_mgr->GetComponentTag("FOO"), std::move(args), file)
|
|
{
|
|
}
|
|
|
|
zeek::file_analysis::Analyzer* Foo::Instantiate(zeek::RecordValPtr args, zeek::file_analysis::File* file)
|
|
{
|
|
return new Foo(std::move(args), file);
|
|
}
|
|
|
|
bool Foo::DeliverStream(const u_char* data, uint64_t len)
|
|
{
|
|
zeek::event_mgr.Enqueue(foo_piece,
|
|
GetFile()->ToVal(),
|
|
zeek::make_intrusive<zeek::StringVal>(new zeek::String(data, len, 0)));
|
|
return true;
|
|
}
|