mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Modification to the Communication framework API.
- Simplified the communication API and made it easier to change to encrypted connections by not having separate variables to define encrypted and unencrypted ports. - Now, to enable listening without configuring nodes just load the frameworks/communication/listen script. - If encrypted listening is desired set the following: redef Communication::listen_encrypted=T; - Accompanying test updates.
This commit is contained in:
parent
250fb3c352
commit
da9b8cc283
16 changed files with 38 additions and 64 deletions
|
@ -6,6 +6,6 @@
|
|||
# when writing a new bro scripts.
|
||||
#
|
||||
# @TEST-EXEC: test -d $DIST/scripts
|
||||
# @TEST-EXEC: for script in `find $DIST/scripts -name \*\.bro -not -path '*/site/*'`; do echo $script; if echo "$script" | egrep -q 'listen-clear|listen-ssl|controllee'; then rm -rf load_attempt .bgprocs; btest-bg-run load_attempt bro -b $script; btest-bg-wait -k 2; cat load_attempt/.stderr >>allerrors; else bro -b $script 2>>allerrors; fi done || exit 0
|
||||
# @TEST-EXEC: for script in `find $DIST/scripts -name \*\.bro -not -path '*/site/*'`; do echo $script; if echo "$script" | egrep -q 'communication/listen|controllee'; then rm -rf load_attempt .bgprocs; btest-bg-run load_attempt bro -b $script; btest-bg-wait -k 2; cat load_attempt/.stderr >>allerrors; else bro -b $script 2>>allerrors; fi done || exit 0
|
||||
# @TEST-EXEC: cat allerrors | grep -v "received termination signal" | sort | uniq > unique_errors
|
||||
# @TEST-EXEC: btest-diff unique_errors
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
@TEST-START-FILE sender.bro
|
||||
|
||||
@load frameworks/communication/listen-ssl
|
||||
@load frameworks/communication/listen
|
||||
redef Communication::listen_encrypted=T;
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
@TEST-START-FILE sender.bro
|
||||
|
||||
@load frameworks/communication/listen-clear
|
||||
@load frameworks/communication/listen
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ function modify()
|
|||
foo2 = 1234567;
|
||||
}
|
||||
|
||||
@load frameworks/communication/listen-clear
|
||||
@load frameworks/communication/listen
|
||||
|
||||
event remote_connection_handshake_done(p: event_peer)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controllee Communication::listen_port_clear=65531/tcp
|
||||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controllee Communication::listen_port=65531/tcp
|
||||
# @TEST-EXEC: btest-bg-run controller BROPATH=$BROPATH:.. bro %INPUT test-redef frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65531/tcp Control::cmd=configuration_update
|
||||
# @TEST-EXEC: btest-bg-run controller2 BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65531/tcp Control::cmd=shutdown
|
||||
# @TEST-EXEC: btest-bg-wait 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT only-for-controllee frameworks/control/controllee Communication::listen_port_clear=65532/tcp
|
||||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT only-for-controllee frameworks/control/controllee Communication::listen_port=65532/tcp
|
||||
# @TEST-EXEC: btest-bg-run controller BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65532/tcp Control::cmd=id_value Control::arg=test_var
|
||||
# @TEST-EXEC: btest-bg-wait -k 1
|
||||
# @TEST-EXEC: btest-diff controller/.stdout
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controllee Communication::listen_port_clear=65530/tcp
|
||||
# @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controllee Communication::listen_port=65530/tcp
|
||||
# @TEST-EXEC: btest-bg-run controller BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65530/tcp Control::cmd=shutdown
|
||||
# @TEST-EXEC: btest-bg-wait 1
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ event bro_init()
|
|||
|
||||
module Test;
|
||||
|
||||
@load frameworks/communication/listen-clear
|
||||
@load frameworks/communication/listen
|
||||
|
||||
event remote_connection_handshake_done(p: event_peer)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ event bro_init()
|
|||
|
||||
module Test;
|
||||
|
||||
@load frameworks/communication/listen-clear
|
||||
@load frameworks/communication/listen
|
||||
|
||||
function fail(rec: Log): bool
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue