[Bro-Dev] BiF parsing index types

Will baxterw3232 at gmail.com
Fri May 13 08:01:50 PDT 2011


This isn't likely in the same vein, but is the syntax below correct?
It doesn't appear to be working properly.

# ... unless the lookup comes from one of these hosts.
const okay_to_lookup_sensitive_hosts: set[addr] = {
                [172.0.0.1],
                [172.0.0.2],
} &redef;

Thanks,

-Will

On Thu, May 12, 2011 at 3:49 PM, Gregor Maier <gregor at icir.org> wrote:
> On 5/12/11 10:09 , Robin Sommer wrote:
>>
>> On Thu, May 12, 2011 at 10:52 -0500, you wrote:
>>
>>> Can type notation like "vector of string" and "set[addr]" be parsed in
>>> BiF declarations?
>>
>> D'oh! I never realized that that's reason for the type aliases. Seems
>> something we should teach bifcl at some point.
>
> having looked at bifcl recently, I might actually make sense to consider
> extending the Bro language parser to be able to also parse bifs (i.e.,
> having a "bif-mode" but still compiling a bifcl binary).
>
> Type definitions in bro can be quite complex and one would have to
> completely duplicate that in bif.
>
> Similarly, when I was working on the bif syntax to make record types,
> enums, etc. available to C++ I thought that it would have been great if
> I could just specify the record in the BiF. Instead I have to specify
> the record in a bro file and put a simple "type foo: record;" in the
> BiF. Otherwise I would have had to copy all record-type-definition syntax.
>
> I think the more we use BiFs the more we will encounter such situations
> were the BiF-syntax is not powerful enough and were we would like to
> have elements of the Bro syntax available.
>
>
> Just my 2ct.
> gregor
> --
> Gregor Maier
> <gregor at icir.org>  <gregor at icsi.berkeley.edu>
> Int. Computer Science Institute (ICSI)
> 1947 Center St., Ste. 600
> Berkeley, CA 94704, USA
> http://www.icir.org/gregor/
> _______________________________________________
> bro-dev mailing list
> bro-dev at bro-ids.org
> http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
>



More information about the bro-dev mailing list