mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
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.
This commit is contained in:
parent
46c5dea733
commit
272db640aa
27 changed files with 417 additions and 77 deletions
17
testing/btest/plugins/legacy-func-hook.zeek
Normal file
17
testing/btest/plugins/legacy-func-hook.zeek
Normal file
|
@ -0,0 +1,17 @@
|
|||
# @TEST-EXEC: ${DIST}/aux/zeek-aux/plugin-support/init-plugin -u . Demo Hooks
|
||||
# @TEST-EXEC: cp -r %DIR/legacy-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");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue