# Broccoli question

**URL:** <https://community.zeek.org/t/broccoli-question/2946>\
**Category:** Development\
**Tags:** development\
**Created:** [December 19, 2013, 8:49pm UTC](https://community.zeek.org/t/broccoli-question/2946 "2013-12-19T20:49:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Caldejon1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Randy\_Caldejon1](https://community.zeek.org/u/Randy_Caldejon1)\
**Post date:** [December 19, 2013, 8:49pm UTC](https://community.zeek.org/t/broccoli-question/2946/1 "2013-12-19T20:49:05Z")

</div>

Hi,

Can somebody tell me if BRO\_TYPE\_TABLE is supported at part of a record? More specifically, I want to send records that look something like this to Bro using Broccoli.

&nbsp;&nbsp;type example\_record: record  
&nbsp;&nbsp;{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uid: string;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: table [string] of string;  
&nbsp;&nbsp;};

However, my implementation core dumps when the following is called (after populating hashTable with key/value pairs):

&nbsp;&nbsp;BroTable \*hashTable = bro\_table\_new();  
&nbsp;&nbsp;.  
&nbsp;&nbsp;.  
&nbsp;&nbsp;.  
&nbsp;&nbsp;&nbsp;bro\_record\_add\_val(rec, "hash", BRO\_TYPE\_TABLE, NULL, hashTable);  
&nbsp;&nbsp;.  
&nbsp;&nbsp;.  
&nbsp;&nbsp;bro\_event\_add\_val(ev, BRO\_TYPE\_RECORD, NULL, rec);

I could not find any examples in the docs or test library on how to include a table as a field in a record.

Thanks,

Randy

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [December 19, 2013, 11:09pm UTC](https://community.zeek.org/t/broccoli-question/2946/2 "2013-12-19T23:09:20Z")

</div>

Regardless of whether it’s part of a record, I don’t think broccoli can create and send tables (as well as sets/vectors). You may have to send individual key-value pairs and reconstruct the table on the Bro-side.

- Jon

---

<div class="post-metadata">

**Author:** ![Randy\_Caldejon1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Randy\_Caldejon1](https://community.zeek.org/u/Randy_Caldejon1)\
**Post date:** [December 19, 2013, 11:12pm UTC](https://community.zeek.org/t/broccoli-question/2946/3 "2013-12-19T23:12:19Z")

</div>

Ok, that's the path that I'll take. Thanks for confirming.  
&nbsp;&nbsp;  
-- Randy

---

<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:41pm UTC](https://community.zeek.org/t/broccoli-question/2946/4 "2022-05-06T15:41:28Z")

</div>


