Re: [Bro-Dev] attributes & named types

2018-09-05 Thread Vern Paxson
> I think the right solution for this is to introduce a new BroType called
> a NamedType.  A NamedType has an identifier, an underlying BroType, and a
> set of attributes.  When a NamedType is constructed ...

Huh, turns out there's already a "TypeType", which is the equivalent.
All I need to do, I believe, is allow these to have attributes.

Vern
___
bro-dev mailing list
bro-dev@bro.org
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev


Re: [Bro-Dev] Bro 2.6-beta plans

2018-09-05 Thread Michael Dopheide
To be clear, Cluster::relay_rr() is gone forever?  I’ll need to rewrite
some policies, but also update the blog to be correct.

Dop

On Wed, Sep 5, 2018 at 5:37 PM Jon Siwek  wrote:

> There's no significant code changes/features planned to get added to
> the master branch from now until the 2.6-beta gets released (maybe in
> about a week).  Until that happens, please help test the latest master
> branch and provide any feedback about how it's working if you can.
>
> - Jon
> ___
> bro-dev mailing list
> bro-dev@bro.org
> http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
>
___
bro-dev mailing list
bro-dev@bro.org
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev


[Bro-Dev] Bro 2.6-beta plans

2018-09-05 Thread Jon Siwek
There's no significant code changes/features planned to get added to
the master branch from now until the 2.6-beta gets released (maybe in
about a week).  Until that happens, please help test the latest master
branch and provide any feedback about how it's working if you can.

- Jon
___
bro-dev mailing list
bro-dev@bro.org
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev


[Bro-Dev] attributes & named types

2018-09-05 Thread Vern Paxson
For some scripting I'm doing, I'm running into the problem that
attributes associated with named types don't get propagated.  For
example,

type a: table[count] of count  = 5;
global c: a;
print c[9];

complains that c[9] isn't set, instead of returning the value 5.

Having dived[*] into this and examined some potential fixes, I've identified
that the problem is that (1) the attribute " = 5" in the above
example gets associated with the identifier 'a' rather than with a's type,
and (2) when the parser processes the second line, early in the process 'a'
gets converted to its underlying type, with the attributes lost at that
point since, internally, BroType's do not have attributes.

This is a pain to deal with.  If we simply add attributes to BroType's and
for statements like the first line associate the attributes with the type,
then a sequence like:

type a: table[count] of count  = 5;
type b: a _expire = 1 min;

will wind up changing the attributes associated with 'a' even though it
really shouldn't.

I think the right solution for this is to introduce a new BroType called
a NamedType.  A NamedType has an identifier, an underlying BroType, and a
set of attributes.  When a NamedType is constructed, for its attributes
it combines both the explicit attributes in its declaration (like the
_expire for 'b' above) and the implicit (i.e., it inherits/copies the
 from 'a').

I plan to implement this soon, so please speak up if you have thoughts.

Vern


[*] The dive also exposed some other bugs in attribute processing, which
I'll enter into the tracker shortly.
___
bro-dev mailing list
bro-dev@bro.org
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev