# using binpac for protocol parser

**URL:** <https://community.zeek.org/t/using-binpac-for-protocol-parser/3438>\
**Category:** Zeek\
**Created:** [January 20, 2015, 11:45am UTC](https://community.zeek.org/t/using-binpac-for-protocol-parser/3438 "2015-01-20T11:45:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emmanuel\_TORQUATO](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Emmanuel\_TORQUATO](https://community.zeek.org/u/Emmanuel_TORQUATO)\
**Post date:** [January 20, 2015, 11:45am UTC](https://community.zeek.org/t/using-binpac-for-protocol-parser/3438/1 "2015-01-20T11:45:59Z")

</div>

Hello All,

I would like to use binpac for protocol analyzer creation. The protocol is called cb2a, it’s a bank exchange protocol.

I find very few sources which explains the way of building analyzers using binpac from scratch. The only ones I have are “binpac: A yacc for writing application protocol Parsers” and the sample-message example.

However, I have been able to use binpac for file creation .cc and .h.

When adding the new folder in /usr/src/bro/src/analyzer/protocol/cb2a in the CMakeLists.txt with the below files and doing ./configure and then make, I have the error

“Linking CXX executable bro

CMakeFiles/bro.dir/plugins.cc.o: In function `\_\_make\_sure\_to\_use\_plugin\_globals()’:

/usr/src/bro-2.3/build/src/plugins.cc:69: undefined reference to `plugin::Bro\_Cb2a::\_\_plugin’

“

There is something to do with file Plugin.cc but I don’t know what… this file is not generated by binpac, so I have done one, but still the same issue.

Anyone can help me please?

Files:

---

<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:42pm UTC](https://community.zeek.org/t/using-binpac-for-protocol-parser/3438/2 "2022-05-06T15:42:22Z")

</div>


