zeek/testing/btest/plugins/func-hook.zeek
Jon Siwek 272db640aa Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()
This also changes the argument type of Func::operator() to zeek::Args*
to allow plugins to be able to alter function arguments in place as
was previously documented.
2020-05-22 21:01:38 -07:00

17 lines
481 B
Text

# @TEST-EXEC: ${DIST}/aux/zeek-aux/plugin-support/init-plugin -u . Demo Hooks
# @TEST-EXEC: cp -r %DIR/func-hook-plugin/* .
# @TEST-EXEC: ./configure --zeek-dist=${DIST} && make
# @TEST-EXEC: ZEEK_PLUGIN_ACTIVATE="Demo::Hooks" ZEEK_PLUGIN_PATH=`pwd` zeek -b %INPUT 2>&1 | grep foo >output
# @TEST-EXEC: btest-diff output
@unload base/misc/version
function foo(a: count, b: count, c: count, s: string)
{
print "foo", a, b, c, s;
}
event zeek_init()
{
foo(1, 2, 3, "yo");
}