Skip to content

Commit

Permalink
Updating NEWS and CHANGES.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmmr committed May 21, 2018
1 parent 8755239 commit ad1978f
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 7 deletions.
13 changes: 10 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@

2.5-574 | 2018-05-16 23:52:05 +0000
2.5-576 | 2018-05-17 00:54:28 +0000

* Switch Bro's communication over to Broker; deprecate the old
communication system, including Broccoli. See NEWS for more.

(Many people contributed to this effort. Broker library: Jon
Siwek, Matthias Vallentin, Robin Sommer, Dominik Charousset.
Porting Bro to Broker: Daniel Thayer, Robin Sommer, Jon Siwek.
Further contributions by: Johanna Amann, Justin Azoff, Matthias
Fischer, Jan Grashoefer, and Seth Hall. The final integration was
supported by Corelight.)

* Extend switch statement to branch by type of the operand. See NEWS
for more.
for more. (Robin Sommer)

* Add new operators "is" and "as" for dynamic type casting and type
checking. See NEWS for more.
checking. See NEWS for more. (Robin Sommer)

2.5-569 | 2018-05-10 11:24:07 -0500

Expand Down
124 changes: 123 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,102 @@ Bro 2.6 (in progress)
New Functionality
-----------------

- Bro has switched to using the new Broker library for all its
communication. Broker's API has been completely redesigned (compared
to the version in 2.5), and much of its implementation has been
redone. There's a new script-level "broker" framework that
supersedes the old "communication" framework, which is now
depracated. The "cluster" and "control" frameworks have been ported
to Broker; same for BroControl. For more about the new Broker
framework, see doc/frameworks/broker.rst (there's also guide there
for porting existing Bro scripts to Broker). For more about Broker
itself, including its API for external applications, see
aux/broker/doc.

TODO: Replace documentation paths with URLs once these are available
online.

When using BroControl, the meaning of proxies has changed with
Broker. If you are upgrading and have configured more than one proxy
currenty, we recommend going back down to a single proxy node now.
Unless you are using custom scripts doing significant data
distribution themselves through the new cluster framework, that
should be fine.

- Bro now has new "is" and "as" script operators for dynamic
type-checking and casting.

- "v as T" casts a value v into a value of type T, assuming that's
possible (if not, it triggers a runtime error).

- "v is T" returns a boolean indicating whether value v can be
casted into type T (i.e., if true then "v as T" will succeed).

This casting supports three cases currently: (1) a value of
declared type "any" can be casted to its actual underlying type;
(2) Broker values can be casted to their corresponding script
types; and (3) all values can be casted to their declared types
(i.e., a no-op).

Example for "any":

# cat a.bro
function check(a: any)
{
local s: string = "default";

if ( a is string )
s = (a as string);

print fmt("s=%s", s);
}

event bro_init()
{
check("Foo");
check(1);
}

# bro a.bro
s=Foo
s=default

- The existing "switch" got extended to now also support switching by
type rather than value. The new syntax supports two type-based versions
of "case":

- "case type T: ...": Take branch if operand can be casted to type T.

- "case type T as x: ... ": Take branch if operand can be casted
to type T, and make the casted value available through ID "x".

Multiple types can be listed per branch, separated by commas.
However, one cannot mix cases with expressions and types inside a
single switch statement.

Example:

function switch_one(v: any)
{
switch (v) {
case type string:
print "It's a string!";
break;

case type count as c:
print "It's a count!", c;
break;

case type bool, type addr:
print "It's a bool or address!";
break;

default:
print "Something else!";
break;
}
}

- Bro now comes with a new "configuration framework" that allows
updating script options dynamically at runtime. This functionality
consists of three larger pieces working together:
Expand Down Expand Up @@ -149,7 +245,11 @@ New Functionality
Changed Functionality
---------------------

- The DHCP analyzer and its script-layer interface have been rewritten.
- ALl communication is now handled through Broker, requiring changes
to existing scripts to port them over to the new API. The Broker
framework documentation comes with a porting guide.

- The DHCP analyzer and its script-layer interface have been rewritten.

- Supports more DHCP options than before.

Expand Down Expand Up @@ -227,6 +327,28 @@ Removed Functionality
https://github.com/bro/packages for a list of Bro packages currently
available.

- BroControl: The option 'IPv6Comm' and 'ZoneID' options are no longer
available (though Broker should be able to handle IPv6
automatically).

Deprecated Functionality
------------------------

- The old communication system is now deprecated and scheduled for
removal with the next Bro release. This includes the "communication"
framework, the &sychronized attributes, and the existing
communication-related BiFs. Use Broker instead.

- The infrastructure for serializing Bro values into a binary
representation is now deprecated and scheduled for removal with the
next Bro release. This includes the &persistent attribute, as well
as BiFs like send_id(). Use Broker data stores and the new
configuration framework instead.

- BroControl: The 'update' command is deprecated and scheduled for
removal with the next Bro release. Bro's new configuration framework
is taking its place.

Bro 2.5.1
=========

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5-574
2.5-585
2 changes: 1 addition & 1 deletion aux/broctl
Submodule broctl updated from 0ec694 to 5c49cf
2 changes: 1 addition & 1 deletion aux/broker
Submodule broker updated from a6353c to 4d914b

0 comments on commit ad1978f

Please sign in to comment.