[Bro] Using binpac standalone

Christoph Möbius christoph.moebius at mailbox.tu-dresden.de
Thu Aug 4 06:18:45 PDT 2011


Hi all,

I want to use binpac as a standalone parser generator. My use case is:
-write a PDU description
-feed it to a standalone binpac
-get the parser files for the PDU
-use that files somewhere else in order to access protocol fields
programmatically

I tried the Howto of 2008 in the Wiki (http://is.gd/pyZ7If) which leads
me to a problem:
I added the mentioned RE.h, binpac_stdalone.h and binpac_pcre.h to
binpac/lib and recompiled in aux/binpac. Is it right that recompiling
didn't change the binpac binary in aux/binpac/src? And if yes from where
do I call binpac then and where should the .pac file be placed? Even the
unbro'ed http.pac file in the Wiki refers to binpac-lib.pac which
resides outside the binpac folder. Compiling http.pac then leads to an
error since bytestring_to_int is undeclared.
Adding binpac-lib.pac to binpac/lib didn't help. Before changing too
much and getting lost I better ask :)

Even If solve the first problem there's another question: I don't need
any functionality of a protocol machine. So I'd like to get rid of the
need to define connections and analyzers. I just need access to the
fields of a single PDU. Anything else is beyond my focus. Do I really
ALWAYS need to define a connection and a flow?

So is there now another way than the wikified to use binpac as
standalone parser generator?


Best regards,
Christoph Möbius

--
 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII.

GPG Fingerprint: 38E7 4163 3EA1 DE55 FECE  419B 1AE5 2085 CEBC 5A14
christoph.moebius at mailbox.tu-dresden.de




More information about the Bro mailing list