[Bro-Dev] Configuration framework syntax proposal

Johanna Amann johanna at corelight.com
Wed Sep 20 17:19:59 PDT 2017

> Could the definition be
> const filter = “ip” &config;
> if you just wanted to use NameSpace::filter ?  That kinda seems like the best of both worlds… Especially if anything marked &redef was automatically registered as a configuration variable.

technically - yes. Though I am not quite sure that I like it :).

On the redef side - this specifically does not touch the functionality of
redef and also does not aim to automatically integrate with redef. The
background is that we do not know if a variable that is currently
redef-able will work as a configuration variable, or needs additional
commands to be run (or just works if set at startup as it is actually the
case with a lot of the current consts). I don't think going the route of
intermingling that would be a good idea - if someone wants something to be
a config variable, I think it should be an explicit opt-in.

> Thinking of all my scripts that could use this feature I think I would always want NameSpace::option.

Ok. That would actually more pull me to using the other syntax again
(configopt varname) and not doing &plugin at all.

Thanks a lot :)

More information about the bro-dev mailing list