# broccoli and enum

**URL:** <https://community.zeek.org/t/broccoli-and-enum/1202>\
**Category:** Zeek\
**Created:** [August 1, 2007, 12:39am UTC](https://community.zeek.org/t/broccoli-and-enum/1202 "2007-08-01T00:39:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandro\_Reichert](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sandro\_Reichert](https://community.zeek.org/u/Sandro_Reichert)\
**Post date:** [August 1, 2007, 12:39am UTC](https://community.zeek.org/t/broccoli-and-enum/1202/1 "2007-08-01T00:39:21Z")

</div>

hi all,

i'm playing around with broccoli and i have problems with events that contain enum type. the event is defined in a policy and i can use it for inter-bro-comunication, but broccoli ignores it. calling the event without the enum type argument works well.  
where is my mistake?

thanks!!  
sandro

example:  
c code (modified 'broping'):

bro\_mytest(BroConn \*conn, void \*data, uint32 \*num, BroRecord \*status)  
{  
&nbsp;&nbsp;/\*just print a simple message....\*/  
&nbsp;&nbsp;printf("event mytest received!\n");  
}

bro\_event\_registry\_add(bc, "mytest", (BroEventFunc) bro\_mytest, NULL) ;

policy code:

type testtype : enum  
{  
&nbsp;&nbsp;&nbsp;first\_type,  
&nbsp;&nbsp;&nbsp;second\_type,  
};

# 1) does'nt work with broccoli!  
event mytest(123, first\_type);

# 2) this works!  
event mytest(123);

---

<div class="post-metadata">

**Author:** ![Sandro\_Reichert](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Sandro\_Reichert](https://community.zeek.org/u/Sandro_Reichert)\
**Post date:** [August 1, 2007, 7:34pm UTC](https://community.zeek.org/t/broccoli-and-enum/1202/2 "2007-08-01T19:34:13Z")

</div>

hi all,

i solved my problen.

best regards,

sandro

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:38pm UTC](https://community.zeek.org/t/broccoli-and-enum/1202/3 "2022-05-06T15:38:18Z")

</div>


