[Bro] Advice on REST plugin structure

Ben Mack-Crane ben.mackcrane at corsa.com
Fri Jan 19 08:09:25 PST 2018


I am a Bro newbie and, having run into an endless loop, I'm looking for


I'm working on a NetControl plugin that will use a REST API to talk to the
network device.  I am trying to do this using ActiveHTTP (my web search
having failed to find a REST plugin template).  I am working from the Debug
plugin and other examples I've found in the Bro 2.5.2 distribution.

My endless loop:

Using "when (local rest_resp = ActiveHTTP::request(rest_req))" in the
plugin's init function leads to an endless loop (perhaps similar to type
resolver loop mentioned in plugin.bro).  I think the 'when' statement is
involved since "WhenStmt::Exec" is in the early part of the (overflowing)
stack.  The loop starts with BroType::Serialize for NetControl::PluginState
and returns there via BroType::Serialize for NetControl::Plugin after
several steps.

My plea:

Can anyone offer advice about how I should structure my REST plugin to
avoid this loop?  Are there examples (templates) for the recommended

Ben Mack-Crane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20180119/76141d5f/attachment.html 

More information about the Bro mailing list