diff --git a/scripts/base/frameworks/pacf/__load__.bro b/scripts/base/frameworks/netcontrol/__load__.bro similarity index 100% rename from scripts/base/frameworks/pacf/__load__.bro rename to scripts/base/frameworks/netcontrol/__load__.bro diff --git a/scripts/base/frameworks/pacf/catch-and-release.bro b/scripts/base/frameworks/netcontrol/catch-and-release.bro similarity index 96% rename from scripts/base/frameworks/pacf/catch-and-release.bro rename to scripts/base/frameworks/netcontrol/catch-and-release.bro index fceefadb5c..608f18ac19 100644 --- a/scripts/base/frameworks/pacf/catch-and-release.bro +++ b/scripts/base/frameworks/netcontrol/catch-and-release.bro @@ -1,6 +1,6 @@ -##! Implementation of catch-and-release functionality for Pacf +##! Implementation of catch-and-release functionality for NetControl -module Pacf; +module NetControl; export { ## Stops all packets involving an IP address from being forwarded. This function diff --git a/scripts/base/frameworks/pacf/cluster.bro b/scripts/base/frameworks/netcontrol/cluster.bro similarity index 67% rename from scripts/base/frameworks/pacf/cluster.bro rename to scripts/base/frameworks/netcontrol/cluster.bro index aea6e832e8..880736c8ed 100644 --- a/scripts/base/frameworks/pacf/cluster.bro +++ b/scripts/base/frameworks/netcontrol/cluster.bro @@ -1,20 +1,20 @@ @load ./main @load base/frameworks/cluster -module Pacf; +module NetControl; export { ## This is the event used to transport add_rule calls to the manager. - global cluster_pacf_add_rule: event(r: Rule); + global cluster_netcontrol_add_rule: event(r: Rule); ## This is the event used to transport remove_rule calls to the manager. - global cluster_pacf_remove_rule: event(id: string); + global cluster_netcontrol_remove_rule: event(id: string); } ## Workers need ability to forward commands to manager. -redef Cluster::worker2manager_events += /Pacf::cluster_pacf_(add|remove)_rule/; +redef Cluster::worker2manager_events += /NetControl::cluster_netcontrol_(add|remove)_rule/; ## Workers need to see the result events from the manager. -redef Cluster::manager2worker_events += /Pacf::rule_(added|removed|timeout|error)/; +redef Cluster::manager2worker_events += /NetControl::rule_(added|removed|timeout|error)/; function activate(p: PluginState, priority: int) @@ -37,7 +37,7 @@ function add_rule(r: Rule) : string if ( r$id == "" ) r$id = cat(Cluster::node, ":", ++local_rule_count); - event Pacf::cluster_pacf_add_rule(r); + event NetControl::cluster_netcontrol_add_rule(r); return r$id; } } @@ -48,18 +48,18 @@ function remove_rule(id: string) : bool return remove_rule_impl(id); else { - event Pacf::cluster_pacf_remove_rule(id); + event NetControl::cluster_netcontrol_remove_rule(id); return T; # well, we can't know here. So - just hope... } } @if ( Cluster::local_node_type() == Cluster::MANAGER ) -event Pacf::cluster_pacf_add_rule(r: Rule) +event NetControl::cluster_netcontrol_add_rule(r: Rule) { add_rule_impl(r); } -event Pacf::cluster_pacf_remove_rule(id: string) +event NetControl::cluster_netcontrol_remove_rule(id: string) { remove_rule_impl(id); } diff --git a/scripts/base/frameworks/pacf/main.bro b/scripts/base/frameworks/netcontrol/main.bro similarity index 96% rename from scripts/base/frameworks/pacf/main.bro rename to scripts/base/frameworks/netcontrol/main.bro index 3ba941e4da..fd32b4ec64 100644 --- a/scripts/base/frameworks/pacf/main.bro +++ b/scripts/base/frameworks/netcontrol/main.bro @@ -10,7 +10,7 @@ ##! provides convinience functions for a set of common operations. The ##! low-level API provides full flexibility. -module Pacf; +module NetControl; @load ./plugin @load ./types @@ -195,7 +195,7 @@ export { ## ignored and not passed on to any plugin. ## ## r: The rule to be added - global Pacf::rule_policy: hook(r: Rule); + global NetControl::rule_policy: hook(r: Rule); ## Type of an entry in the PACF log. type InfoCategory: enum { @@ -242,9 +242,9 @@ export { plugin: string &log &optional; }; - ## Event that can be handled to access the :bro:type:`Pacf::Info` + ## Event that can be handled to access the :bro:type:`NetControl::Info` ## record as it is sent on to the logging framework. - global log_pacf: event(rec: Info); + global log_netcontrol: event(rec: Info); } redef record Rule += { @@ -261,7 +261,7 @@ global id_to_cids: table[string] of set[count]; # id to cid event bro_init() &priority=5 { - Log::create_stream(Pacf::LOG, [$columns=Info, $ev=log_pacf, $path="pacf"]); + Log::create_stream(NetControl::LOG, [$columns=Info, $ev=log_netcontrol, $path="netcontrol"]); } function entity_to_info(info: Info, e: Entity) @@ -394,7 +394,7 @@ function whitelist_subnet(s: subnet, t: interval, location: string &default="") function shunt_flow(f: flow_id, t: interval, location: string &default="") : string { - local flow = Pacf::Flow( + local flow = NetControl::Flow( $src_h=addr_to_subnet(f$src_h), $src_p=f$src_p, $dst_h=addr_to_subnet(f$dst_h), @@ -408,7 +408,7 @@ function shunt_flow(f: flow_id, t: interval, location: string &default="") : str function redirect_flow(f: flow_id, out_port: count, t: interval, location: string &default="") : string { - local flow = Pacf::Flow( + local flow = NetControl::Flow( $src_h=addr_to_subnet(f$src_h), $src_p=f$src_p, $dst_h=addr_to_subnet(f$dst_h), @@ -469,7 +469,7 @@ function add_rule_impl(rule: Rule) : string if ( ! rule?$id || rule$id == "" ) rule$id = cat(rule$cid); - if ( ! hook Pacf::rule_policy(rule) ) + if ( ! hook NetControl::rule_policy(rule) ) return ""; local accepted = F; @@ -514,7 +514,7 @@ function remove_single_rule(id: string, cid: count) : bool { if ( [id,cid] !in rules ) { - Reporter::error(fmt("Rule %s -- %d does not exist in Pacf::remove_single_rule", id, cid)); + Reporter::error(fmt("Rule %s -- %d does not exist in NetControl::remove_single_rule", id, cid)); return F; } @@ -536,7 +536,7 @@ function remove_rule_impl(id: string) : bool { if ( id !in id_to_cids ) { - Reporter::error(fmt("Rule %s does not exist in Pacf::remove_rule", id)); + Reporter::error(fmt("Rule %s does not exist in NetControl::remove_rule", id)); return F; } @@ -547,7 +547,7 @@ function remove_rule_impl(id: string) : bool { if ( [id,cid] !in rules ) { - Reporter::error(fmt("Internal error in pacf::remove_rule - cid %d does not belong to rule %s", cid, id)); + Reporter::error(fmt("Internal error in netcontrol::remove_rule - cid %d does not belong to rule %s", cid, id)); delete cids[cid]; next; } diff --git a/scripts/base/frameworks/pacf/non-cluster.bro b/scripts/base/frameworks/netcontrol/non-cluster.bro similarity index 92% rename from scripts/base/frameworks/pacf/non-cluster.bro rename to scripts/base/frameworks/netcontrol/non-cluster.bro index aa642ca20f..c94e4c9e08 100644 --- a/scripts/base/frameworks/pacf/non-cluster.bro +++ b/scripts/base/frameworks/netcontrol/non-cluster.bro @@ -1,4 +1,4 @@ -module Pacf; +module NetControl; @load ./main diff --git a/scripts/base/frameworks/pacf/plugin.bro b/scripts/base/frameworks/netcontrol/plugin.bro similarity index 99% rename from scripts/base/frameworks/pacf/plugin.bro rename to scripts/base/frameworks/netcontrol/plugin.bro index 501befed76..22a846b977 100644 --- a/scripts/base/frameworks/pacf/plugin.bro +++ b/scripts/base/frameworks/netcontrol/plugin.bro @@ -1,5 +1,5 @@ -module Pacf; +module NetControl; @load ./types diff --git a/scripts/base/frameworks/pacf/plugins/__load__.bro b/scripts/base/frameworks/netcontrol/plugins/__load__.bro similarity index 100% rename from scripts/base/frameworks/pacf/plugins/__load__.bro rename to scripts/base/frameworks/netcontrol/plugins/__load__.bro diff --git a/scripts/base/frameworks/pacf/plugins/acld.bro b/scripts/base/frameworks/netcontrol/plugins/acld.bro similarity index 78% rename from scripts/base/frameworks/pacf/plugins/acld.bro rename to scripts/base/frameworks/netcontrol/plugins/acld.bro index 95d8d5abed..43375cb7ae 100644 --- a/scripts/base/frameworks/pacf/plugins/acld.bro +++ b/scripts/base/frameworks/netcontrol/plugins/acld.bro @@ -1,6 +1,6 @@ -# Acld plugin for the pacf framework. +# Acld plugin for the netcontrol framework. -module Pacf; +module NetControl; @load ../plugin @load base/frameworks/broker @@ -41,9 +41,9 @@ export { global acld_rule_error: event(id: count, r: Rule, msg: string); } -global pacf_acld_topics: set[string] = set(); -global pacf_acld_id: table[count] of PluginState = table(); -global pacf_acld_current_id: count = 0; +global netcontrol_acld_topics: set[string] = set(); +global netcontrol_acld_id: table[count] of PluginState = table(); +global netcontrol_acld_current_id: count = 0; const acld_add_to_remove: table[string] of string = { ["drop"] = "restore", @@ -58,43 +58,43 @@ const acld_add_to_remove: table[string] of string = { ["nullzero "] ="nonullzero" }; -event Pacf::acld_rule_added(id: count, r: Rule, msg: string) +event NetControl::acld_rule_added(id: count, r: Rule, msg: string) { - if ( id !in pacf_acld_id ) + if ( id !in netcontrol_acld_id ) { - Reporter::error(fmt("Pacf acld plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl acld plugin with id %d not found, aborting", id)); return; } - local p = pacf_acld_id[id]; + local p = netcontrol_acld_id[id]; - event Pacf::rule_added(r, p, msg); + event NetControl::rule_added(r, p, msg); } -event Pacf::acld_rule_removed(id: count, r: Rule, msg: string) +event NetControl::acld_rule_removed(id: count, r: Rule, msg: string) { - if ( id !in pacf_acld_id ) + if ( id !in netcontrol_acld_id ) { - Reporter::error(fmt("Pacf acld plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl acld plugin with id %d not found, aborting", id)); return; } - local p = pacf_acld_id[id]; + local p = netcontrol_acld_id[id]; - event Pacf::rule_removed(r, p, msg); + event NetControl::rule_removed(r, p, msg); } -event Pacf::acld_rule_error(id: count, r: Rule, msg: string) +event NetControl::acld_rule_error(id: count, r: Rule, msg: string) { - if ( id !in pacf_acld_id ) + if ( id !in netcontrol_acld_id ) { - Reporter::error(fmt("Pacf acld plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl acld plugin with id %d not found, aborting", id)); return; } - local p = pacf_acld_id[id]; + local p = netcontrol_acld_id[id]; - event Pacf::rule_error(r, p, msg); + event NetControl::rule_error(r, p, msg); } function acld_name(p: PluginState) : string @@ -215,15 +215,15 @@ global acld_plugin = Plugin( function create_acld(config: AcldConfig) : PluginState { - if ( config$acld_topic in pacf_acld_topics ) - Reporter::warning(fmt("Topic %s was added to Pacf acld plugin twice. Possible duplication of commands", config$acld_topic)); + if ( config$acld_topic in netcontrol_acld_topics ) + Reporter::warning(fmt("Topic %s was added to NetControl acld plugin twice. Possible duplication of commands", config$acld_topic)); else - add pacf_acld_topics[config$acld_topic]; + add netcontrol_acld_topics[config$acld_topic]; - local p: PluginState = [$acld_config=config, $plugin=acld_plugin, $acld_id=pacf_acld_current_id]; + local p: PluginState = [$acld_config=config, $plugin=acld_plugin, $acld_id=netcontrol_acld_current_id]; - pacf_acld_id[pacf_acld_current_id] = p; - ++pacf_acld_current_id; + netcontrol_acld_id[netcontrol_acld_current_id] = p; + ++netcontrol_acld_current_id; return p; } diff --git a/scripts/base/frameworks/pacf/plugins/broker.bro b/scripts/base/frameworks/netcontrol/plugins/broker.bro similarity index 56% rename from scripts/base/frameworks/pacf/plugins/broker.bro rename to scripts/base/frameworks/netcontrol/plugins/broker.bro index 0f47641018..959218ca3a 100644 --- a/scripts/base/frameworks/pacf/plugins/broker.bro +++ b/scripts/base/frameworks/netcontrol/plugins/broker.bro @@ -1,8 +1,8 @@ -# Broker plugin for the pacf framework. Sends the raw data structures -# used in pacf on to Broker to allow for easy handling, e.g., of +# Broker plugin for the netcontrol framework. Sends the raw data structures +# used in netcontrol on to Broker to allow for easy handling, e.g., of # command-line scripts. -module Pacf; +module NetControl; @load ../plugin @load base/frameworks/broker @@ -31,60 +31,60 @@ export { global broker_rule_timeout: event(id: count, r: Rule, i: FlowInfo); } -global pacf_broker_topics: set[string] = set(); -global pacf_broker_id: table[count] of PluginState = table(); -global pacf_broker_current_id: count = 0; +global netcontrol_broker_topics: set[string] = set(); +global netcontrol_broker_id: table[count] of PluginState = table(); +global netcontrol_broker_current_id: count = 0; -event Pacf::broker_rule_added(id: count, r: Rule, msg: string) +event NetControl::broker_rule_added(id: count, r: Rule, msg: string) { - if ( id !in pacf_broker_id ) + if ( id !in netcontrol_broker_id ) { - Reporter::error(fmt("Pacf broker plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl broker plugin with id %d not found, aborting", id)); return; } - local p = pacf_broker_id[id]; + local p = netcontrol_broker_id[id]; - event Pacf::rule_added(r, p, msg); + event NetControl::rule_added(r, p, msg); } -event Pacf::broker_rule_removed(id: count, r: Rule, msg: string) +event NetControl::broker_rule_removed(id: count, r: Rule, msg: string) { - if ( id !in pacf_broker_id ) + if ( id !in netcontrol_broker_id ) { - Reporter::error(fmt("Pacf broker plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl broker plugin with id %d not found, aborting", id)); return; } - local p = pacf_broker_id[id]; + local p = netcontrol_broker_id[id]; - event Pacf::rule_removed(r, p, msg); + event NetControl::rule_removed(r, p, msg); } -event Pacf::broker_rule_error(id: count, r: Rule, msg: string) +event NetControl::broker_rule_error(id: count, r: Rule, msg: string) { - if ( id !in pacf_broker_id ) + if ( id !in netcontrol_broker_id ) { - Reporter::error(fmt("Pacf broker plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl broker plugin with id %d not found, aborting", id)); return; } - local p = pacf_broker_id[id]; + local p = netcontrol_broker_id[id]; - event Pacf::rule_error(r, p, msg); + event NetControl::rule_error(r, p, msg); } -event Pacf::broker_rule_timeout(id: count, r: Rule, i: FlowInfo) +event NetControl::broker_rule_timeout(id: count, r: Rule, i: FlowInfo) { - if ( id !in pacf_broker_id ) + if ( id !in netcontrol_broker_id ) { - Reporter::error(fmt("Pacf broker plugin with id %d not found, aborting", id)); + Reporter::error(fmt("NetControl broker plugin with id %d not found, aborting", id)); return; } - local p = pacf_broker_id[id]; + local p = netcontrol_broker_id[id]; - event Pacf::rule_timeout(r, i, p); + event NetControl::rule_timeout(r, i, p); } function broker_name(p: PluginState) : string @@ -129,19 +129,19 @@ global broker_plugin_can_expire = Plugin( function create_broker(host: addr, host_port: port, topic: string, can_expire: bool &default=F) : PluginState { - if ( topic in pacf_broker_topics ) - Reporter::warning(fmt("Topic %s was added to Pacf broker plugin twice. Possible duplication of commands", topic)); + if ( topic in netcontrol_broker_topics ) + Reporter::warning(fmt("Topic %s was added to NetControl broker plugin twice. Possible duplication of commands", topic)); else - add pacf_broker_topics[topic]; + add netcontrol_broker_topics[topic]; local plugin = broker_plugin; if ( can_expire ) plugin = broker_plugin_can_expire; - local p: PluginState = [$broker_host=host, $broker_port=host_port, $plugin=plugin, $broker_topic=topic, $broker_id=pacf_broker_current_id]; + local p: PluginState = [$broker_host=host, $broker_port=host_port, $plugin=plugin, $broker_topic=topic, $broker_id=netcontrol_broker_current_id]; - pacf_broker_id[pacf_broker_current_id] = p; - ++pacf_broker_current_id; + netcontrol_broker_id[netcontrol_broker_current_id] = p; + ++netcontrol_broker_current_id; return p; } diff --git a/scripts/base/frameworks/pacf/plugins/debug.bro b/scripts/base/frameworks/netcontrol/plugins/debug.bro similarity index 91% rename from scripts/base/frameworks/pacf/plugins/debug.bro rename to scripts/base/frameworks/netcontrol/plugins/debug.bro index f032a22a37..0e42b166c0 100644 --- a/scripts/base/frameworks/pacf/plugins/debug.bro +++ b/scripts/base/frameworks/netcontrol/plugins/debug.bro @@ -1,7 +1,7 @@ @load ../plugin -module Pacf; +module NetControl; export { ## Instantiates a debug plugin for the PACF framework. The debug @@ -24,7 +24,7 @@ function debug_name(p: PluginState) : string function debug_log(p: PluginState, msg: string) { - print fmt("pacf debug (%s): %s", debug_name(p), msg); + print fmt("netcontrol debug (%s): %s", debug_name(p), msg); } function debug_init(p: PluginState) @@ -44,7 +44,7 @@ function debug_add_rule(p: PluginState, r: Rule) : bool if ( do_something(p) ) { - event Pacf::rule_added(r, p); + event NetControl::rule_added(r, p); return T; } @@ -56,7 +56,7 @@ function debug_remove_rule(p: PluginState, r: Rule) : bool local s = fmt("remove_rule: %s", r); debug_log(p, s); - event Pacf::rule_removed(r, p); + event NetControl::rule_removed(r, p); return T; } diff --git a/scripts/base/frameworks/pacf/plugins/openflow.bro b/scripts/base/frameworks/netcontrol/plugins/openflow.bro similarity index 93% rename from scripts/base/frameworks/pacf/plugins/openflow.bro rename to scripts/base/frameworks/netcontrol/plugins/openflow.bro index 3a28a36dfe..6628e5e579 100644 --- a/scripts/base/frameworks/pacf/plugins/openflow.bro +++ b/scripts/base/frameworks/netcontrol/plugins/openflow.bro @@ -1,7 +1,7 @@ @load ../plugin @load base/frameworks/openflow -module Pacf; +module NetControl; export { type OfConfig: record { @@ -9,7 +9,7 @@ export { forward: bool &default=T; idle_timeout: count &default=0; table_id: count &optional; - priority_offset: int &default=+0; ##< add this to all rule priorities. Can be useful if you want the openflow priorities be offset from the pacf priorities without having to write a filter function. + priority_offset: int &default=+0; ##< add this to all rule priorities. Can be useful if you want the openflow priorities be offset from the netcontrol priorities without having to write a filter function. check_pred: function(p: PluginState, r: Rule): bool &optional &weaken; match_pred: function(p: PluginState, e: Entity, m: vector of OpenFlow::ofp_match): vector of OpenFlow::ofp_match &optional &weaken; @@ -17,7 +17,7 @@ export { }; redef record PluginState += { - ## OpenFlow controller for Pacf OpenFlow plugin + ## OpenFlow controller for NetControl OpenFlow plugin of_controller: OpenFlow::Controller &optional; ## OpenFlow configuration record that is passed on initialization of_config: OfConfig &optional; @@ -54,7 +54,7 @@ global of_messages: table[count, OpenFlow::ofp_flow_mod_command] of OfTable &cre local p = t[rid, command]$p; local r = t[rid, command]$r; - event Pacf::rule_error(r, p, "Timeout during rule insertion/removal"); + event NetControl::rule_error(r, p, "Timeout during rule insertion/removal"); return 0secs; }; @@ -341,9 +341,9 @@ event OpenFlow::flow_mod_success(match: OpenFlow::ofp_match, flow_mod: OpenFlow: of_flows[id] = OfTable($p=p, $r=r); if ( flow_mod$command == OpenFlow::OFPFC_ADD ) - event Pacf::rule_added(r, p, msg); + event NetControl::rule_added(r, p, msg); else if ( flow_mod$command == OpenFlow::OFPFC_DELETE || flow_mod$command == OpenFlow::OFPFC_DELETE_STRICT ) - event Pacf::rule_removed(r, p, msg); + event NetControl::rule_removed(r, p, msg); } event OpenFlow::flow_mod_failure(match: OpenFlow::ofp_match, flow_mod: OpenFlow::ofp_flow_mod, msg: string) &priority=3 @@ -356,7 +356,7 @@ event OpenFlow::flow_mod_failure(match: OpenFlow::ofp_match, flow_mod: OpenFlow: local p = of_messages[id,flow_mod$command]$p; delete of_messages[id,flow_mod$command]; - event Pacf::rule_error(r, p, msg); + event NetControl::rule_error(r, p, msg); } event OpenFlow::flow_removed(match: OpenFlow::ofp_match, cookie: count, priority: count, reason: count, duration_sec: count, idle_timeout: count, packet_count: count, byte_count: count) @@ -375,12 +375,12 @@ event OpenFlow::flow_removed(match: OpenFlow::ofp_match, cookie: count, priority if ( of_flows[id]$c < 2 ) return; # will do stuff once the second part arrives... else - event Pacf::rule_timeout(r, FlowInfo($duration=double_to_interval((rec$duration_sec+duration_sec)/2), $packet_count=packet_count+rec$packet_count, $byte_count=byte_count+rec$byte_count), p); + event NetControl::rule_timeout(r, FlowInfo($duration=double_to_interval((rec$duration_sec+duration_sec)/2), $packet_count=packet_count+rec$packet_count, $byte_count=byte_count+rec$byte_count), p); return; } - event Pacf::rule_timeout(r, FlowInfo($duration=double_to_interval(duration_sec+0.0), $packet_count=packet_count, $byte_count=byte_count), p); + event NetControl::rule_timeout(r, FlowInfo($duration=double_to_interval(duration_sec+0.0), $packet_count=packet_count, $byte_count=byte_count), p); } global openflow_plugin = Plugin( diff --git a/scripts/base/frameworks/pacf/plugins/packetfilter.bro b/scripts/base/frameworks/netcontrol/plugins/packetfilter.bro similarity index 99% rename from scripts/base/frameworks/pacf/plugins/packetfilter.bro rename to scripts/base/frameworks/netcontrol/plugins/packetfilter.bro index d2f2841790..2c532e4009 100644 --- a/scripts/base/frameworks/pacf/plugins/packetfilter.bro +++ b/scripts/base/frameworks/netcontrol/plugins/packetfilter.bro @@ -3,7 +3,7 @@ # and can only add/remove filters for addresses, this is quite # limited in scope at the moment. -module Pacf; +module NetControl; @load ../plugin diff --git a/scripts/base/frameworks/pacf/types.bro b/scripts/base/frameworks/netcontrol/types.bro similarity index 99% rename from scripts/base/frameworks/pacf/types.bro rename to scripts/base/frameworks/netcontrol/types.bro index fc15323e1b..cb130c291b 100644 --- a/scripts/base/frameworks/pacf/types.bro +++ b/scripts/base/frameworks/netcontrol/types.bro @@ -1,5 +1,5 @@ -module Pacf; +module NetControl; export { const default_priority: int = +0 &redef; diff --git a/scripts/base/init-default.bro b/scripts/base/init-default.bro index 0fee22aded..7fefe0111d 100644 --- a/scripts/base/init-default.bro +++ b/scripts/base/init-default.bro @@ -38,7 +38,7 @@ @load base/frameworks/sumstats @load base/frameworks/tunnels @load base/frameworks/openflow -@load base/frameworks/pacf +@load base/frameworks/netcontrol @load base/protocols/conn @load base/protocols/dhcp diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/recv.recv.out b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/recv.recv.out new file mode 100644 index 0000000000..db2859c4b5 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/recv.recv.out @@ -0,0 +1,7 @@ +BrokerComm::incoming_connection_established +add_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [command=blockhosthost, cookie=2, arg=10.10.1.4 74.53.140.153, comment=here] +add_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [command=droptcpport, cookie=3, arg=25, comment=here] +add_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1], [command=drop, cookie=4, arg=10.10.1.4/32, comment=] +remove_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [command=restorehosthost, cookie=2, arg=10.10.1.4 74.53.140.153, comment=here] +remove_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [command=restoretcpport, cookie=3, arg=25, comment=here] +remove_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1], [command=restore, cookie=4, arg=10.10.1.4/32, comment=] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/send.send.out b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/send.send.out new file mode 100644 index 0000000000..b823dd0aee --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.acld/send.send.out @@ -0,0 +1,7 @@ +BrokerComm::outgoing_connection_established, 127.0.0.1, 9999/tcp +rule added, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +rule added, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +rule added, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] +rule removed, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +rule removed, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +rule removed, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/manager-1.netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/manager-1.netcontrol.log new file mode 100644 index 0000000000..2007630489 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/manager-1.netcontrol.log @@ -0,0 +1,32 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path netcontrol +#open 2015-07-08-19-33-09 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +1436383989.876677 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All +1436383992.255152 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383992.255152 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383992.255152 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383992.255152 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383994.376366 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383994.376366 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383994.376366 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383994.376366 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383991.768500 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383991.768500 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383993.849722 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383993.849722 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436383993.813850 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436383993.813850 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1436384002.162435 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +#close 2015-07-08-19-33-22 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/worker-1..stdout b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/worker-1..stdout similarity index 100% rename from testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/worker-1..stdout rename to testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/worker-1..stdout diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/worker-2..stdout b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/worker-2..stdout similarity index 100% rename from testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/worker-2..stdout rename to testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic-cluster/worker-2..stdout diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/.stdout b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/.stdout new file mode 100644 index 0000000000..0964f600f4 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/.stdout @@ -0,0 +1,9 @@ +netcontrol debug (Debug-All): init +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::WHITELIST, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=5, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::REDIRECT, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=5, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::WHITELIST, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=5, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::REDIRECT, target=NetControl::FORWARD, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=5, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/netcontrol.log new file mode 100644 index 0000000000..379eb0845b --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.basic/netcontrol.log @@ -0,0 +1,26 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path pacf +#open 2015-06-01-22-57-07 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +#close 2015-06-01-22-57-07 diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/recv.recv.out b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/recv.recv.out new file mode 100644 index 0000000000..1d97db6024 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/recv.recv.out @@ -0,0 +1,5 @@ +BrokerComm::incoming_connection_established +add_rule, 0, [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +add_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +remove_rule, 0, [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +remove_rule, 0, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/send.send.out b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/send.send.out new file mode 100644 index 0000000000..826819877b --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.broker/send.send.out @@ -0,0 +1,7 @@ +BrokerComm::outgoing_connection_established, 127.0.0.1, 9999/tcp +rule added, [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +rule added, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +rule timeout, [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [duration=, packet_count=, byte_count=] +rule removed, [ty=NetControl::DROP, target=NetControl::MONITOR, entity=[ty=NetControl::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +rule timeout, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [duration=, packet_count=, byte_count=] +rule removed, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/.stdout b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/.stdout new file mode 100644 index 0000000000..2570a5edc1 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/.stdout @@ -0,0 +1,11 @@ +netcontrol debug (Debug-All): init +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=10.0 mins, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 hr, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 day, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] +netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=6, cid=6, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=10.0 mins, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 hr, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 day, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=6, cid=6, _plugin_id=1] +netcontrol debug (Debug-All): remove_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/netcontrol.log new file mode 100644 index 0000000000..dff4c85769 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.catch-and-release/netcontrol.log @@ -0,0 +1,30 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path pacf +#open 2015-06-02-22-02-42 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All +#close 2015-06-02-22-02-42 diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.hook/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.hook/netcontrol.log new file mode 100644 index 0000000000..2f39a2623f --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.hook/netcontrol.log @@ -0,0 +1,18 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path netcontrol +#open 2015-07-08-19-33-47 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All +#close 2015-07-08-19-33-48 diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.multiple/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.multiple/netcontrol.log new file mode 100644 index 0000000000..f2d13a8251 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.multiple/netcontrol.log @@ -0,0 +1,36 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path pacf +#open 2015-06-02-19-34-04 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 10 - Debug-All +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 10 - Openflow - OpenFlog Log Plugin - DPID 42 +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::REDIRECT NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +1254722776.690444 NetControl::RULE REMOVE NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All +#close 2015-06-02-19-34-04 diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.openflow/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.openflow/netcontrol.log new file mode 100644 index 0000000000..12daa37c03 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.openflow/netcontrol.log @@ -0,0 +1,14 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path netcontrol +#open 2015-07-08-19-33-52 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::MONITOR NetControl::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +#close 2015-07-08-19-33-52 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.openflow/openflow.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.openflow/openflow.log similarity index 100% rename from testing/btest/Baseline/scripts.base.frameworks.pacf.openflow/openflow.log rename to testing/btest/Baseline/scripts.base.frameworks.netcontrol.openflow/openflow.log diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.packetfilter/conn.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.packetfilter/conn.log similarity index 100% rename from testing/btest/Baseline/scripts.base.frameworks.pacf.packetfilter/conn.log rename to testing/btest/Baseline/scripts.base.frameworks.netcontrol.packetfilter/conn.log diff --git a/testing/btest/Baseline/scripts.base.frameworks.netcontrol.quarantine-openflow/netcontrol.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.quarantine-openflow/netcontrol.log new file mode 100644 index 0000000000..74f45e41ec --- /dev/null +++ b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.quarantine-openflow/netcontrol.log @@ -0,0 +1,18 @@ +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path netcontrol +#open 2015-07-08-19-33-55 +#fields ts category cmd state action target entity_type entity msg location plugin +#types time enum string enum string enum string string string string string +0.000000 NetControl::MESSAGE - - - - - - activated plugin with priority 0 - Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->*/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::MODIFY NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->8.8.8.8/32/53 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::MODIFY NetControl::FORWARD NetControl::FLOW 8.8.8.8/32/53->10.10.1.4/32/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::REQUESTED NetControl::WHITELIST NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->192.169.18.1/32/80 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->*/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::MODIFY NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->8.8.8.8/32/53 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::MODIFY NetControl::FORWARD NetControl::FLOW 8.8.8.8/32/53->10.10.1.4/32/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +1254722767.875996 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::WHITELIST NetControl::FORWARD NetControl::FLOW 10.10.1.4/32/*->192.169.18.1/32/80 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 +#close 2015-07-08-19-33-55 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.quarantine-openflow/openflow.log b/testing/btest/Baseline/scripts.base.frameworks.netcontrol.quarantine-openflow/openflow.log similarity index 100% rename from testing/btest/Baseline/scripts.base.frameworks.pacf.quarantine-openflow/openflow.log rename to testing/btest/Baseline/scripts.base.frameworks.netcontrol.quarantine-openflow/openflow.log diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/recv.recv.out b/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/recv.recv.out deleted file mode 100644 index ad604ec09f..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/recv.recv.out +++ /dev/null @@ -1,7 +0,0 @@ -BrokerComm::incoming_connection_established -add_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [command=blockhosthost, cookie=2, arg=10.10.1.4 74.53.140.153, comment=here] -add_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [command=droptcpport, cookie=3, arg=25, comment=here] -add_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1], [command=drop, cookie=4, arg=10.10.1.4/32, comment=] -remove_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [command=restorehosthost, cookie=2, arg=10.10.1.4 74.53.140.153, comment=here] -remove_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [command=restoretcpport, cookie=3, arg=25, comment=here] -remove_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1], [command=restore, cookie=4, arg=10.10.1.4/32, comment=] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/send.send.out b/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/send.send.out deleted file mode 100644 index 1f7e952357..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.acld/send.send.out +++ /dev/null @@ -1,7 +0,0 @@ -BrokerComm::outgoing_connection_established, 127.0.0.1, 9999/tcp -rule added, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -rule added, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -rule added, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] -rule removed, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=, dst_h=74.53.140.153/32, dst_p=, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -rule removed, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=, src_p=, dst_h=, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=here, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -rule removed, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/manager-1.pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/manager-1.pacf.log deleted file mode 100644 index 81fecc2fd3..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic-cluster/manager-1.pacf.log +++ /dev/null @@ -1,32 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-05-28-00-59-14 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -1432774754.087659 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All -1432774756.519062 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774756.519062 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774756.519062 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774756.519062 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774758.581184 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774758.581184 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774758.581184 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774758.581184 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774756.036263 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774756.036263 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774757.774649 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774757.774649 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774758.070948 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774758.070948 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1432774766.388890 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -#close 2015-05-28-00-59-26 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/.stdout b/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/.stdout deleted file mode 100644 index b0a30033d0..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/.stdout +++ /dev/null @@ -1,9 +0,0 @@ -pacf debug (Debug-All): init -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::WHITELIST, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=5, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::REDIRECT, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=5, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::WHITELIST, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=15.0 secs, priority=5, location=, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::REDIRECT, target=Pacf::FORWARD, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=5, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=30.0 secs, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/pacf.log deleted file mode 100644 index 28d5a8c9d8..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.basic/pacf.log +++ /dev/null @@ -1,26 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-06-01-22-57-07 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -#close 2015-06-01-22-57-07 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/recv.recv.out b/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/recv.recv.out deleted file mode 100644 index 2d4118e6f2..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/recv.recv.out +++ /dev/null @@ -1,5 +0,0 @@ -BrokerComm::incoming_connection_established -add_rule, 0, [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -add_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -remove_rule, 0, [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -remove_rule, 0, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/send.send.out b/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/send.send.out deleted file mode 100644 index c1da86ad6e..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.broker/send.send.out +++ /dev/null @@ -1,7 +0,0 @@ -BrokerComm::outgoing_connection_established, 127.0.0.1, 9999/tcp -rule added, [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -rule added, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -rule timeout, [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1], [duration=, packet_count=, byte_count=] -rule removed, [ty=Pacf::DROP, target=Pacf::MONITOR, entity=[ty=Pacf::FLOW, conn=, flow=[src_h=10.10.1.4/32, src_p=1470/tcp, dst_h=74.53.140.153/32, dst_p=25/tcp, src_m=, dst_m=], ip=, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -rule timeout, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1], [duration=, packet_count=, byte_count=] -rule removed, [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=36000.0, priority=0, location=, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/.stdout b/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/.stdout deleted file mode 100644 index d7f55a9556..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/.stdout +++ /dev/null @@ -1,11 +0,0 @@ -pacf debug (Debug-All): init -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=10.0 mins, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 hr, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 day, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] -pacf debug (Debug-All): add_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=6, cid=6, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=10.0 mins, priority=0, location=, c=, i=, d=, s=, mod=, id=2, cid=2, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 hr, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=3, cid=3, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=1.0 day, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=4, cid=4, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=6, cid=6, _plugin_id=1] -pacf debug (Debug-All): remove_rule: [ty=Pacf::DROP, target=Pacf::FORWARD, entity=[ty=Pacf::ADDRESS, conn=, flow=, ip=10.10.1.4/32, mac=], expire=7.0 days, priority=0, location=Re-drop by catch-and-release, c=, i=, d=, s=, mod=, id=5, cid=5, _plugin_id=1] diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/pacf.log deleted file mode 100644 index 31a7c7dff4..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.catch-and-release/pacf.log +++ /dev/null @@ -1,30 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-06-02-22-02-42 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - Re-drop by catch-and-release Debug-All -#close 2015-06-02-22-02-42 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.hook/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.hook/pacf.log deleted file mode 100644 index 1725aa4918..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.hook/pacf.log +++ /dev/null @@ -1,18 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-06-02-21-23-05 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 0.0.0.0/0/1470->74.53.140.153/32/25 - (empty) Debug-All -#close 2015-06-02-21-23-05 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.multiple/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.multiple/pacf.log deleted file mode 100644 index 588c014285..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.multiple/pacf.log +++ /dev/null @@ -1,36 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-06-02-19-34-04 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 10 - Debug-All -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 10 - Openflow - OpenFlog Log Plugin - DPID 42 -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::REDIRECT Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -1254722776.690444 Pacf::RULE REMOVE Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Debug-All -#close 2015-06-02-19-34-04 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.openflow/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.openflow/pacf.log deleted file mode 100644 index aa97127528..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.openflow/pacf.log +++ /dev/null @@ -1,14 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-05-15-18-21-40 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::MONITOR Pacf::FLOW 10.10.1.4/32/1470->74.53.140.153/32/25 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::ADDRESS 10.10.1.4/32 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -#close 2015-05-15-18-21-40 diff --git a/testing/btest/Baseline/scripts.base.frameworks.pacf.quarantine-openflow/pacf.log b/testing/btest/Baseline/scripts.base.frameworks.pacf.quarantine-openflow/pacf.log deleted file mode 100644 index 0bcb99fd48..0000000000 --- a/testing/btest/Baseline/scripts.base.frameworks.pacf.quarantine-openflow/pacf.log +++ /dev/null @@ -1,18 +0,0 @@ -#separator \x09 -#set_separator , -#empty_field (empty) -#unset_field - -#path pacf -#open 2015-06-04-23-18-56 -#fields ts category cmd state action target entity_type entity msg location plugin -#types time enum string enum string enum string string string string string -0.000000 Pacf::MESSAGE - - - - - - activated plugin with priority 0 - Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::DROP Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->*/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::MODIFY Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->8.8.8.8/32/53 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::MODIFY Pacf::FORWARD Pacf::FLOW 8.8.8.8/32/53->10.10.1.4/32/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::REQUESTED Pacf::WHITELIST Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->192.169.18.1/32/80 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::DROP Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->*/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::MODIFY Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->8.8.8.8/32/53 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::MODIFY Pacf::FORWARD Pacf::FLOW 8.8.8.8/32/53->10.10.1.4/32/* - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -1254722767.875996 Pacf::RULE ADD Pacf::SUCCEEDED Pacf::WHITELIST Pacf::FORWARD Pacf::FLOW 10.10.1.4/32/*->192.169.18.1/32/80 - (empty) Openflow - OpenFlog Log Plugin - DPID 42 -#close 2015-06-04-23-18-56 diff --git a/testing/btest/scripts/base/frameworks/pacf/acld.bro b/testing/btest/scripts/base/frameworks/netcontrol/acld.bro similarity index 53% rename from testing/btest/scripts/base/frameworks/pacf/acld.bro rename to testing/btest/scripts/base/frameworks/netcontrol/acld.bro index bf10138a6a..c6aabfd2a2 100644 --- a/testing/btest/scripts/base/frameworks/pacf/acld.bro +++ b/testing/btest/scripts/base/frameworks/netcontrol/acld.bro @@ -9,7 +9,7 @@ @TEST-START-FILE send.bro -@load base/frameworks/pacf +@load base/frameworks/netcontrol const broker_port: port &redef; redef exit_only_after_terminate = T; @@ -17,8 +17,8 @@ redef exit_only_after_terminate = T; event bro_init() { suspend_processing(); - local pacf_acld = Pacf::create_acld(Pacf::AcldConfig($acld_host=127.0.0.1, $acld_port=broker_port, $acld_topic="bro/event/pacftest")); - Pacf::activate(pacf_acld, 0); + local netcontrol_acld = NetControl::create_acld(NetControl::AcldConfig($acld_host=127.0.0.1, $acld_port=broker_port, $acld_topic="bro/event/netcontroltest")); + NetControl::activate(netcontrol_acld, 0); } event BrokerComm::outgoing_connection_established(peer_address: string, @@ -39,31 +39,31 @@ event connection_established(c: connection) { local id = c$id; - local flow1 = Pacf::Flow( + local flow1 = NetControl::Flow( $src_h=addr_to_subnet(c$id$orig_h), $dst_h=addr_to_subnet(c$id$resp_h) ); - local e1: Pacf::Entity = [$ty=Pacf::FLOW, $flow=flow1]; - local r1: Pacf::Rule = [$ty=Pacf::DROP, $target=Pacf::FORWARD, $entity=e1, $expire=10hrs, $location="here"]; + local e1: NetControl::Entity = [$ty=NetControl::FLOW, $flow=flow1]; + local r1: NetControl::Rule = [$ty=NetControl::DROP, $target=NetControl::FORWARD, $entity=e1, $expire=10hrs, $location="here"]; - local flow2 = Pacf::Flow( + local flow2 = NetControl::Flow( $dst_p=c$id$resp_p ); - local e2: Pacf::Entity = [$ty=Pacf::FLOW, $flow=flow2]; - local r2: Pacf::Rule = [$ty=Pacf::DROP, $target=Pacf::FORWARD, $entity=e2, $expire=10hrs, $location="here"]; + local e2: NetControl::Entity = [$ty=NetControl::FLOW, $flow=flow2]; + local r2: NetControl::Rule = [$ty=NetControl::DROP, $target=NetControl::FORWARD, $entity=e2, $expire=10hrs, $location="here"]; - Pacf::add_rule(r1); - Pacf::add_rule(r2); - Pacf::drop_address(id$orig_h, 10hrs); + NetControl::add_rule(r1); + NetControl::add_rule(r2); + NetControl::drop_address(id$orig_h, 10hrs); } -event Pacf::rule_added(r: Pacf::Rule, p: Pacf::PluginState, msg: string) +event NetControl::rule_added(r: NetControl::Rule, p: NetControl::PluginState, msg: string) { print "rule added", r; - Pacf::remove_rule(r$id); + NetControl::remove_rule(r$id); } -event Pacf::rule_removed(r: Pacf::Rule, p: Pacf::PluginState, msg: string) +event NetControl::rule_removed(r: NetControl::Rule, p: NetControl::PluginState, msg: string) { print "rule removed", r; } @@ -72,7 +72,7 @@ event Pacf::rule_removed(r: Pacf::Rule, p: Pacf::PluginState, msg: string) @TEST-START-FILE recv.bro -@load base/frameworks/pacf +@load base/frameworks/netcontrol @load base/frameworks/broker const broker_port: port &redef; @@ -81,7 +81,7 @@ redef exit_only_after_terminate = T; event bro_init() { BrokerComm::enable(); - BrokerComm::subscribe_to_events("bro/event/pacftest"); + BrokerComm::subscribe_to_events("bro/event/netcontroltest"); BrokerComm::listen(broker_port, "127.0.0.1"); } @@ -90,18 +90,18 @@ event BrokerComm::incoming_connection_established(peer_name: string) print "BrokerComm::incoming_connection_established"; } -event Pacf::acld_add_rule(id: count, r: Pacf::Rule, ar: Pacf::AclRule) +event NetControl::acld_add_rule(id: count, r: NetControl::Rule, ar: NetControl::AclRule) { print "add_rule", id, r, ar; - BrokerComm::event("bro/event/pacftest", BrokerComm::event_args(Pacf::acld_rule_added, id, r, ar$command)); + BrokerComm::event("bro/event/netcontroltest", BrokerComm::event_args(NetControl::acld_rule_added, id, r, ar$command)); } -event Pacf::acld_remove_rule(id: count, r: Pacf::Rule, ar: Pacf::AclRule) +event NetControl::acld_remove_rule(id: count, r: NetControl::Rule, ar: NetControl::AclRule) { print "remove_rule", id, r, ar; - BrokerComm::event("bro/event/pacftest", BrokerComm::event_args(Pacf::acld_rule_removed, id, r, ar$command)); + BrokerComm::event("bro/event/netcontroltest", BrokerComm::event_args(NetControl::acld_rule_removed, id, r, ar$command)); if ( r$cid == 4 ) terminate(); diff --git a/testing/btest/scripts/base/frameworks/pacf/basic-cluster.bro b/testing/btest/scripts/base/frameworks/netcontrol/basic-cluster.bro similarity index 75% rename from testing/btest/scripts/base/frameworks/pacf/basic-cluster.bro rename to testing/btest/scripts/base/frameworks/netcontrol/basic-cluster.bro index 73be268394..3047416bac 100644 --- a/testing/btest/scripts/base/frameworks/pacf/basic-cluster.bro +++ b/testing/btest/scripts/base/frameworks/netcontrol/basic-cluster.bro @@ -6,7 +6,7 @@ # @TEST-EXEC: sleep 1 # @TEST-EXEC: btest-bg-run worker-2 "cp ../cluster-layout.bro . && CLUSTER_NODE=worker-2 bro --pseudo-realtime -C -r $TRACES/smtp.trace %INPUT" # @TEST-EXEC: btest-bg-wait 20 -# @TEST-EXEC: btest-diff manager-1/pacf.log +# @TEST-EXEC: btest-diff manager-1/netcontrol.log # @TEST-EXEC: btest-diff worker-1/.stdout # @TEST-EXEC: btest-diff worker-2/.stdout @@ -21,19 +21,19 @@ redef Cluster::nodes = { redef Log::default_rotation_interval = 0secs; #redef exit_only_after_terminate = T; -@load base/frameworks/pacf +@load base/frameworks/netcontrol event bro_init() { - local pacf_debug = Pacf::create_debug(T); - Pacf::activate(pacf_debug, 0); + local netcontrol_debug = NetControl::create_debug(T); + NetControl::activate(netcontrol_debug, 0); } event connection_established(c: connection) { local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); - Pacf::drop_address(id$orig_h, 15sec); + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); + NetControl::drop_address(id$orig_h, 15sec); } event terminate_me() { @@ -44,7 +44,7 @@ event remote_connection_closed(p: event_peer) { schedule 1sec { terminate_me() }; } -event Pacf::rule_added(r: Pacf::Rule, p: Pacf::PluginState, msg: string &default="") +event NetControl::rule_added(r: NetControl::Rule, p: NetControl::PluginState, msg: string &default="") { print "Rule added", r$id, r$cid; } diff --git a/testing/btest/scripts/base/frameworks/netcontrol/basic.bro b/testing/btest/scripts/base/frameworks/netcontrol/basic.bro new file mode 100644 index 0000000000..f1f63b3d99 --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/basic.bro @@ -0,0 +1,20 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff netcontrol.log +# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff .stdout + +@load base/frameworks/netcontrol + +event bro_init() + { + local netcontrol_debug = NetControl::create_debug(T); + NetControl::activate(netcontrol_debug, 0); + } + +event connection_established(c: connection) + { + local id = c$id; + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); + NetControl::drop_address(id$orig_h, 15sec); + NetControl::whitelist_address(id$orig_h, 15sec); + NetControl::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); + } diff --git a/testing/btest/scripts/base/frameworks/pacf/broker.bro b/testing/btest/scripts/base/frameworks/netcontrol/broker.bro similarity index 57% rename from testing/btest/scripts/base/frameworks/pacf/broker.bro rename to testing/btest/scripts/base/frameworks/netcontrol/broker.bro index 9e5caa8864..f675a0fd13 100644 --- a/testing/btest/scripts/base/frameworks/pacf/broker.bro +++ b/testing/btest/scripts/base/frameworks/netcontrol/broker.bro @@ -9,7 +9,7 @@ @TEST-START-FILE send.bro -@load base/frameworks/pacf +@load base/frameworks/netcontrol const broker_port: port &redef; redef exit_only_after_terminate = T; @@ -17,8 +17,8 @@ redef exit_only_after_terminate = T; event bro_init() { suspend_processing(); - local pacf_broker = Pacf::create_broker(127.0.0.1, broker_port, "bro/event/pacftest", T); - Pacf::activate(pacf_broker, 0); + local netcontrol_broker = NetControl::create_broker(127.0.0.1, broker_port, "bro/event/netcontroltest", T); + NetControl::activate(netcontrol_broker, 0); } event BrokerComm::outgoing_connection_established(peer_address: string, @@ -38,22 +38,22 @@ event BrokerComm::outgoing_connection_broken(peer_address: string, event connection_established(c: connection) { local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 10hrs); - Pacf::drop_address(id$orig_h, 10hrs); + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 10hrs); + NetControl::drop_address(id$orig_h, 10hrs); } -event Pacf::rule_added(r: Pacf::Rule, p: Pacf::PluginState, msg: string) +event NetControl::rule_added(r: NetControl::Rule, p: NetControl::PluginState, msg: string) { print "rule added", r; - Pacf::remove_rule(r$id); + NetControl::remove_rule(r$id); } -event Pacf::rule_removed(r: Pacf::Rule, p: Pacf::PluginState, msg: string) +event NetControl::rule_removed(r: NetControl::Rule, p: NetControl::PluginState, msg: string) { print "rule removed", r; } -event Pacf::rule_timeout(r: Pacf::Rule, i: Pacf::FlowInfo, p: Pacf::PluginState) +event NetControl::rule_timeout(r: NetControl::Rule, i: NetControl::FlowInfo, p: NetControl::PluginState) { print "rule timeout", r, i; } @@ -62,7 +62,7 @@ event Pacf::rule_timeout(r: Pacf::Rule, i: Pacf::FlowInfo, p: Pacf::PluginState) @TEST-START-FILE recv.bro -@load base/frameworks/pacf +@load base/frameworks/netcontrol @load base/frameworks/broker const broker_port: port &redef; @@ -71,7 +71,7 @@ redef exit_only_after_terminate = T; event bro_init() { BrokerComm::enable(); - BrokerComm::subscribe_to_events("bro/event/pacftest"); + BrokerComm::subscribe_to_events("bro/event/netcontroltest"); BrokerComm::listen(broker_port, "127.0.0.1"); } @@ -80,19 +80,19 @@ event BrokerComm::incoming_connection_established(peer_name: string) print "BrokerComm::incoming_connection_established"; } -event Pacf::broker_add_rule(id: count, r: Pacf::Rule) +event NetControl::broker_add_rule(id: count, r: NetControl::Rule) { print "add_rule", id, r; - BrokerComm::event("bro/event/pacftest", BrokerComm::event_args(Pacf::broker_rule_added, id, r, "")); + BrokerComm::event("bro/event/netcontroltest", BrokerComm::event_args(NetControl::broker_rule_added, id, r, "")); } -event Pacf::broker_remove_rule(id: count, r: Pacf::Rule) +event NetControl::broker_remove_rule(id: count, r: NetControl::Rule) { print "remove_rule", id, r; - BrokerComm::event("bro/event/pacftest", BrokerComm::event_args(Pacf::broker_rule_timeout, id, r, Pacf::FlowInfo())); - BrokerComm::event("bro/event/pacftest", BrokerComm::event_args(Pacf::broker_rule_removed, id, r, "")); + BrokerComm::event("bro/event/netcontroltest", BrokerComm::event_args(NetControl::broker_rule_timeout, id, r, NetControl::FlowInfo())); + BrokerComm::event("bro/event/netcontroltest", BrokerComm::event_args(NetControl::broker_rule_removed, id, r, "")); if ( r$cid == 3 ) terminate(); diff --git a/testing/btest/scripts/base/frameworks/pacf/catch-and-release.bro b/testing/btest/scripts/base/frameworks/netcontrol/catch-and-release.bro similarity index 68% rename from testing/btest/scripts/base/frameworks/pacf/catch-and-release.bro rename to testing/btest/scripts/base/frameworks/netcontrol/catch-and-release.bro index df6850ac3d..e5ce73410f 100644 --- a/testing/btest/scripts/base/frameworks/pacf/catch-and-release.bro +++ b/testing/btest/scripts/base/frameworks/netcontrol/catch-and-release.bro @@ -1,23 +1,23 @@ # @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff pacf.log +# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff netcontrol.log # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff .stdout -@load base/frameworks/pacf +@load base/frameworks/netcontrol event bro_init() { - local pacf_debug = Pacf::create_debug(T); - Pacf::activate(pacf_debug, 0); + local netcontrol_debug = NetControl::create_debug(T); + NetControl::activate(netcontrol_debug, 0); } -module Pacf; +module NetControl; event connection_established(c: connection) { local id = c$id; - Pacf::drop_address_catch_release(id$orig_h); + NetControl::drop_address_catch_release(id$orig_h); # second one should be ignored because duplicate - Pacf::drop_address_catch_release(id$orig_h); + NetControl::drop_address_catch_release(id$orig_h); # mean call directly into framework - simulate new connection delete current_blocks[id$orig_h]; diff --git a/testing/btest/scripts/base/frameworks/netcontrol/hook.bro b/testing/btest/scripts/base/frameworks/netcontrol/hook.bro new file mode 100644 index 0000000000..d859f8a089 --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/hook.bro @@ -0,0 +1,27 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: btest-diff netcontrol.log + +@load base/frameworks/netcontrol + +event bro_init() + { + local netcontrol_debug = NetControl::create_debug(T); + NetControl::activate(netcontrol_debug, 0); + } + +event connection_established(c: connection) + { + local id = c$id; + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); + NetControl::drop_address(id$orig_h, 15sec); + NetControl::whitelist_address(id$orig_h, 15sec); + NetControl::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); + } + +hook NetControl::rule_policy(r: NetControl::Rule) + { + if ( r$expire == 15sec ) + break; + + r$entity$flow$src_h = 0.0.0.0/0; + } diff --git a/testing/btest/scripts/base/frameworks/netcontrol/multiple.bro b/testing/btest/scripts/base/frameworks/netcontrol/multiple.bro new file mode 100644 index 0000000000..d8676c07ab --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/multiple.bro @@ -0,0 +1,24 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff netcontrol.log + +@load base/frameworks/netcontrol + +event bro_init() + { + local netcontrol_debug = NetControl::create_debug(T); + local netcontrol_debug_2 = NetControl::create_debug(T); + local of_controller = OpenFlow::log_new(42); + local netcontrol_of = NetControl::create_openflow(of_controller); + NetControl::activate(netcontrol_debug, 10); + NetControl::activate(netcontrol_of, 10); + NetControl::activate(netcontrol_debug_2, 0); + } + +event connection_established(c: connection) + { + local id = c$id; + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); + NetControl::drop_address(id$orig_h, 15sec); + NetControl::whitelist_address(id$orig_h, 15sec); + NetControl::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); + } diff --git a/testing/btest/scripts/base/frameworks/netcontrol/openflow.bro b/testing/btest/scripts/base/frameworks/netcontrol/openflow.bro new file mode 100644 index 0000000000..36d3b9bfdb --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/openflow.bro @@ -0,0 +1,21 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: btest-diff netcontrol.log +# @TEST-EXEC: btest-diff openflow.log + +@load base/frameworks/netcontrol + +global of_controller: OpenFlow::Controller; + +event bro_init() + { + of_controller = OpenFlow::log_new(42); + local netcontrol_of = NetControl::create_openflow(of_controller); + NetControl::activate(netcontrol_of, 0); + } + +event connection_established(c: connection) + { + local id = c$id; + NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); + NetControl::drop_address(id$orig_h, 15sec); + } diff --git a/testing/btest/scripts/base/frameworks/netcontrol/packetfilter.bro b/testing/btest/scripts/base/frameworks/netcontrol/packetfilter.bro new file mode 100644 index 0000000000..7ccb9dde5c --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/packetfilter.bro @@ -0,0 +1,18 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: btest-diff conn.log + +@load base/frameworks/netcontrol + +event bro_init() + { + local netcontrol_packetfilter = NetControl::create_packetfilter(); + NetControl::activate(netcontrol_packetfilter, 0); + } + +event connection_established(c: connection) + { + local e = NetControl::Entity($ty=NetControl::ADDRESS, $ip=addr_to_subnet(c$id$orig_h)); + local r = NetControl::Rule($ty=NetControl::DROP, $target=NetControl::MONITOR, $entity=e, $expire=10min); + + NetControl::add_rule(r); + } diff --git a/testing/btest/scripts/base/frameworks/netcontrol/quarantine-openflow.bro b/testing/btest/scripts/base/frameworks/netcontrol/quarantine-openflow.bro new file mode 100644 index 0000000000..ced53f441e --- /dev/null +++ b/testing/btest/scripts/base/frameworks/netcontrol/quarantine-openflow.bro @@ -0,0 +1,19 @@ +# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT +# @TEST-EXEC: btest-diff netcontrol.log +# @TEST-EXEC: btest-diff openflow.log + +@load base/frameworks/netcontrol + +global of_controller: OpenFlow::Controller; + +event bro_init() + { + of_controller = OpenFlow::log_new(42); + local netcontrol_of = NetControl::create_openflow(of_controller); + NetControl::activate(netcontrol_of, 0); + } + +event connection_established(c: connection) + { + NetControl::quarantine_host(c$id$orig_h, 8.8.8.8, 192.169.18.1, 10hrs); + } diff --git a/testing/btest/scripts/base/frameworks/pacf/basic.bro b/testing/btest/scripts/base/frameworks/pacf/basic.bro deleted file mode 100644 index 0684daaecd..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/basic.bro +++ /dev/null @@ -1,20 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff pacf.log -# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff .stdout - -@load base/frameworks/pacf - -event bro_init() - { - local pacf_debug = Pacf::create_debug(T); - Pacf::activate(pacf_debug, 0); - } - -event connection_established(c: connection) - { - local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); - Pacf::drop_address(id$orig_h, 15sec); - Pacf::whitelist_address(id$orig_h, 15sec); - Pacf::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); - } diff --git a/testing/btest/scripts/base/frameworks/pacf/hook.bro b/testing/btest/scripts/base/frameworks/pacf/hook.bro deleted file mode 100644 index e31237d934..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/hook.bro +++ /dev/null @@ -1,27 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: btest-diff pacf.log - -@load base/frameworks/pacf - -event bro_init() - { - local pacf_debug = Pacf::create_debug(T); - Pacf::activate(pacf_debug, 0); - } - -event connection_established(c: connection) - { - local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); - Pacf::drop_address(id$orig_h, 15sec); - Pacf::whitelist_address(id$orig_h, 15sec); - Pacf::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); - } - -hook Pacf::rule_policy(r: Pacf::Rule) - { - if ( r$expire == 15sec ) - break; - - r$entity$flow$src_h = 0.0.0.0/0; - } diff --git a/testing/btest/scripts/base/frameworks/pacf/multiple.bro b/testing/btest/scripts/base/frameworks/pacf/multiple.bro deleted file mode 100644 index baa8c5822e..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/multiple.bro +++ /dev/null @@ -1,24 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff pacf.log - -@load base/frameworks/pacf - -event bro_init() - { - local pacf_debug = Pacf::create_debug(T); - local pacf_debug_2 = Pacf::create_debug(T); - local of_controller = OpenFlow::log_new(42); - local pacf_of = Pacf::create_openflow(of_controller); - Pacf::activate(pacf_debug, 10); - Pacf::activate(pacf_of, 10); - Pacf::activate(pacf_debug_2, 0); - } - -event connection_established(c: connection) - { - local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); - Pacf::drop_address(id$orig_h, 15sec); - Pacf::whitelist_address(id$orig_h, 15sec); - Pacf::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec); - } diff --git a/testing/btest/scripts/base/frameworks/pacf/openflow.bro b/testing/btest/scripts/base/frameworks/pacf/openflow.bro deleted file mode 100644 index 7ea537e505..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/openflow.bro +++ /dev/null @@ -1,21 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: btest-diff pacf.log -# @TEST-EXEC: btest-diff openflow.log - -@load base/frameworks/pacf - -global of_controller: OpenFlow::Controller; - -event bro_init() - { - of_controller = OpenFlow::log_new(42); - local pacf_of = Pacf::create_openflow(of_controller); - Pacf::activate(pacf_of, 0); - } - -event connection_established(c: connection) - { - local id = c$id; - Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec); - Pacf::drop_address(id$orig_h, 15sec); - } diff --git a/testing/btest/scripts/base/frameworks/pacf/packetfilter.bro b/testing/btest/scripts/base/frameworks/pacf/packetfilter.bro deleted file mode 100644 index 9076fbbb1f..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/packetfilter.bro +++ /dev/null @@ -1,18 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: btest-diff conn.log - -@load base/frameworks/pacf - -event bro_init() - { - local pacf_packetfilter = Pacf::create_packetfilter(); - Pacf::activate(pacf_packetfilter, 0); - } - -event connection_established(c: connection) - { - local e = Pacf::Entity($ty=Pacf::ADDRESS, $ip=addr_to_subnet(c$id$orig_h)); - local r = Pacf::Rule($ty=Pacf::DROP, $target=Pacf::MONITOR, $entity=e, $expire=10min); - - Pacf::add_rule(r); - } diff --git a/testing/btest/scripts/base/frameworks/pacf/quarantine-openflow.bro b/testing/btest/scripts/base/frameworks/pacf/quarantine-openflow.bro deleted file mode 100644 index eff863b684..0000000000 --- a/testing/btest/scripts/base/frameworks/pacf/quarantine-openflow.bro +++ /dev/null @@ -1,19 +0,0 @@ -# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT -# @TEST-EXEC: btest-diff pacf.log -# @TEST-EXEC: btest-diff openflow.log - -@load base/frameworks/pacf - -global of_controller: OpenFlow::Controller; - -event bro_init() - { - of_controller = OpenFlow::log_new(42); - local pacf_of = Pacf::create_openflow(of_controller); - Pacf::activate(pacf_of, 0); - } - -event connection_established(c: connection) - { - Pacf::quarantine_host(c$id$orig_h, 8.8.8.8, 192.169.18.1, 10hrs); - }