mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Fixing remaining tests.
This commit is contained in:
parent
6e33c92cf0
commit
042afd2feb
9 changed files with 21 additions and 23 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 181f084432e277f899140647d9b788059b3cccb1
|
Subproject commit 4bb294d4d15b14a9e49f875b459fdef8286b5957
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit aa15263ae39667e5e9bd73690b05aa4af9147ca3
|
Subproject commit 4f830a0fbf078d6b64a9a2264d2d06d89e8fe619
|
|
@ -151,7 +151,7 @@ void PktDumperComponent::DoDescribe(ODesc* d) const
|
||||||
if ( prefs.size() )
|
if ( prefs.size() )
|
||||||
prefs += ", ";
|
prefs += ", ";
|
||||||
|
|
||||||
prefs += *i;
|
prefs += '"' + *i + '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
d->Add("dumper prefix");
|
d->Add("dumper prefix");
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
#ifndef IOSOURCE_IOSOURCE_H
|
#ifndef IOSOURCE_IOSOURCE_H
|
||||||
#define IOSOURCE_IOSOURCE_H
|
#define IOSOURCE_IOSOURCE_H
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <pcap.h>
|
||||||
|
}
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
#ifndef IOSOURCE_PKTSRC_PKTSRC_H
|
#ifndef IOSOURCE_PKTSRC_PKTSRC_H
|
||||||
#define IOSOURCE_PKTSRC_PKTSRC_H
|
#define IOSOURCE_PKTSRC_PKTSRC_H
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include <pcap.h>
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "IOSource.h"
|
#include "IOSource.h"
|
||||||
#include "BPF_Program.h"
|
#include "BPF_Program.h"
|
||||||
#include "Dict.h"
|
#include "Dict.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Demo::Foo - <Insert description> (dynamic, version 1.0)
|
Demo::Foo - <Insert description> (dynamic, version 1.0)
|
||||||
[Event] plugin_event
|
|
||||||
[Function] hello_plugin_world
|
[Function] hello_plugin_world
|
||||||
|
[Event] plugin_event
|
||||||
|
|
||||||
plugin: automatically loaded at startup
|
plugin: automatically loaded at startup
|
||||||
calling bif, Hello from the plugin!
|
calling bif, Hello from the plugin!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Demo::Foo - <Insert description> (dynamic, version 1.0)
|
Demo::Foo - <Insert description> (dynamic, version 1.0)
|
||||||
[Event] plugin_event
|
|
||||||
[Function] hello_plugin_world
|
[Function] hello_plugin_world
|
||||||
|
[Event] plugin_event
|
||||||
|
|
||||||
===
|
===
|
||||||
plugin: automatically loaded at startup
|
plugin: automatically loaded at startup
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
# @TEST-EXEC: ${DIST}/aux/bro-aux/plugin-support/init-plugin Demo Foo
|
# @TEST-EXEC: ${DIST}/aux/bro-aux/plugin-support/init-plugin Demo Foo
|
||||||
# @TEST-EXEC: bash %INPUT
|
# @TEST-EXEC: bash %INPUT
|
||||||
# @TEST-EXEC: ./configure --bro-dist=${DIST}
|
# @TEST-EXEC: ./configure --bro-dist=${DIST} --install-root=`pwd`/test-install
|
||||||
# @TEST-EXEC: BRO_PLUGIN_INSTALL=`pwd`/test-install make
|
# @TEST-EXEC: make
|
||||||
# @TEST-EXEC: make install
|
# @TEST-EXEC: make install
|
||||||
# @TEST-EXEC: BRO_PLUGIN_PATH=`pwd`/test-install bro -NN Demo::Foo >>output
|
# @TEST-EXEC: BRO_PLUGIN_PATH=`pwd`/test-install bro -NN Demo::Foo >>output
|
||||||
# @TEST-EXEC: BRO_PLUGIN_PATH=`pwd` bro demo/foo -r $TRACES/empty.trace >>output
|
# @TEST-EXEC: BRO_PLUGIN_PATH=`pwd` bro demo/foo -r $TRACES/empty.trace >>output
|
||||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
||||||
|
|
||||||
|
mkdir -p scripts/demo/foo/base/
|
||||||
|
|
||||||
cat >scripts/__load__.bro <<EOF
|
cat >scripts/__load__.bro <<EOF
|
||||||
@load ./demo/foo/base/at-startup.bro
|
@load ./demo/foo/base/at-startup.bro
|
||||||
EOF
|
EOF
|
||||||
|
@ -22,8 +24,6 @@ event bro_init() &priority=-10
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p scripts/demo/foo/base/
|
|
||||||
|
|
||||||
cat >scripts/demo/foo/base/at-startup.bro <<EOF
|
cat >scripts/demo/foo/base/at-startup.bro <<EOF
|
||||||
event bro_init() &priority=10
|
event bro_init() &priority=10
|
||||||
{
|
{
|
||||||
|
@ -32,17 +32,16 @@ event bro_init() &priority=10
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >src/functions.bif <<EOF
|
cat >src/foo.bif <<EOF
|
||||||
function hello_plugin_world%(%): string
|
function hello_plugin_world%(%): string
|
||||||
%{
|
%{
|
||||||
return new StringVal("Hello from the plugin!");
|
return new StringVal("Hello from the plugin!");
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
event plugin_event%(foo: count%);
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >activate.bro <<EOF
|
cat >activate.bro <<EOF
|
||||||
@load-plugin Demo::Foo
|
@load-plugin Demo::Foo
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >src/events.bif <<EOF
|
|
||||||
event plugin_event%(foo: count%);
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
||||||
|
|
||||||
|
mkdir -p scripts/demo/foo/base/
|
||||||
|
|
||||||
cat >scripts/__load__.bro <<EOF
|
cat >scripts/__load__.bro <<EOF
|
||||||
@load ./demo/foo/base/at-startup.bro
|
@load ./demo/foo/base/at-startup.bro
|
||||||
EOF
|
EOF
|
||||||
|
@ -38,8 +40,6 @@ event bro_init() &priority=-10
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p scripts/demo/foo/base/
|
|
||||||
|
|
||||||
cat >scripts/demo/foo/base/at-startup.bro <<EOF
|
cat >scripts/demo/foo/base/at-startup.bro <<EOF
|
||||||
event bro_init() &priority=10
|
event bro_init() &priority=10
|
||||||
{
|
{
|
||||||
|
@ -48,17 +48,16 @@ event bro_init() &priority=10
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >src/functions.bif <<EOF
|
cat >src/foo.bif <<EOF
|
||||||
function hello_plugin_world%(%): string
|
function hello_plugin_world%(%): string
|
||||||
%{
|
%{
|
||||||
return new StringVal("Hello from the plugin!");
|
return new StringVal("Hello from the plugin!");
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
event plugin_event%(foo: count%);
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >activate.bro <<EOF
|
cat >activate.bro <<EOF
|
||||||
@load-plugin Demo::Foo
|
@load-plugin Demo::Foo
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >src/events.bif <<EOF
|
|
||||||
event plugin_event%(foo: count%);
|
|
||||||
EOF
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue