Re: [Bro-Dev] attributes & named types

2018-09-10 Thread Jon Siwek
On Mon, Sep 10, 2018 at 5:08 PM Vern Paxson wrote: > > At least that's how I think it's currently working, so are you going > > start using TypeType as a means of type aliasing in addition to adding > > attributes to them? > > Not quite. Rather, the type of "mytype" would be a TypeType, which

Re: [Bro-Dev] attributes & named types

2018-09-10 Thread Vern Paxson
> My understanding was just that TypeType's currently are *not* used > when creating type aliases. Correct. > # Passing the type name/alias as a value. > # The local variable/argument 'x' becomes of type > # "TypeType". It's not of type "count". > foo(mytype); (Note that here any attributes

Re: [Bro-Dev] attributes & named types

2018-09-10 Thread Jon Siwek
On Mon, Sep 10, 2018 at 4:16 PM Vern Paxson wrote: > Seems simplest to me to have TypeType's (and only those) include attributes. > The rest of it is easy to do from there. We could also do this with a > separate NameType, but I don't see what that gains, since TypeType's already > come into

Re: [Bro-Dev] attributes & named types

2018-09-10 Thread Vern Paxson
> Other ideas I'm having for solving the overall problem are: > > (1) 'a' and 'b' need to actually be distinct BroType's. Instead of > 'b' being a reference/alias to 'a' with extended attributes, just > create it as it's own BroType by first cloning 'a', then adding any > additional attributes.

Re: [Bro-Dev] How to use Broker::Data in an event handler?

2018-09-10 Thread Jon Siwek
On Mon, Sep 10, 2018 at 8:01 AM Matthias Vallentin wrote: > > I'm trying to figure out if/how it is possible to use Broker::Data in an > event handler as follows: > > event foo(x: Broker::Data) > { > print x; > } No, but you can try to use 'any' instead of 'Broker::Data'.

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

2018-09-10 Thread Azoff, Justin S
> On Sep 7, 2018, at 4:41 PM, Azoff, Justin S wrote: > > Before, cpu maxed out but spending 60% in user and 30% in system > After, cpu maxed out but spending 12% in user and 80% in system > I did some more testing and profiling and figured out what is going on.. The new version is much more

[Bro-Dev] How to use Broker::Data in an event handler?

2018-09-10 Thread Matthias Vallentin
I'm trying to figure out if/how it is possible to use Broker::Data in an event handler as follows: event foo(x: Broker::Data) { print x; } I'm trying to send an event via the Python bindings: event = broker.bro.Event("foo", broker.Data(42))