Re: - set default to an enum type
Justin Azoff <[email protected]>
| Newsgroups | gmane.comp.security.detection.bro |
|---|---|
| Message-ID | <CAPfnCujMcHQBwkB0BJ1-t9YNqQuXX18TBokaRyRRaBiiA4kHkw@mail.gmail.com> |
That is the correct syntax.
http://try.bro.org/#/trybro/saved/334009
$ cat color.bro
type Color: enum {Red, Green, Blue};
type Whatever: record {
color: Color &default=Red;
};
event bro_init()
{
local t: Whatever;
print t$color;
}
$ bro color.bro
Red
On Sun, Jun 23, 2019 at 8:20 AM william de ping <[email protected]> wrote:
>
> Hi everyone,
>
> I have a variable that has &optional &default attributes.
> I want the &default attribute to have a value of an enum.
>
> So if the enum is : type color: enum { Red, White, Blue, };
> c: color &default=Red;
>
> Does not work..
>
> Any ideas on the correct syntax ?
>
> Thank you
> B
> _______________________________________________
> Zeek mailing list
> [email protected]
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/zeek
--
Justin
_______________________________________________
Zeek mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/zeek