[Bro-Dev] [JIRA] (BIT-1315) Teach Bro how to 'while'

Seth Hall (JIRA) jira at bro-tracker.atlassian.net
Fri Feb 13 10:26:00 PST 2015


    [ https://bro-tracker.atlassian.net/browse/BIT-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19605#comment-19605 ] 

Seth Hall commented on BIT-1315:
--------------------------------

Do you think we should think about this a bit more and see if we can figure out an elegant way to present an evented looping construct to users?  It's currently possible to do evented loops, but it's certainly inelegant.

It would be really nice to be able to do loops in Bro that last the entire duration of the Bro process but that would definitely necessitate a different approach.

> Teach Bro how to 'while'
> ------------------------
>
>                 Key: BIT-1315
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1315
>             Project: Bro Issue Tracker
>          Issue Type: New Feature
>          Components: Bro
>            Reporter: Jon Siwek
>            Priority: Low
>             Fix For: 2.4
>
>
> topic/jsiwek/while has an implementation of a general purpose 'while' loop.  If one wants to hack around the current limitation of only looping over collections, they're going to do it (e.g. recursion), so why not just provide a more convenient way instead?  The mess you have to write to work around the limitation may be more error-prone than just providing a simple while loop.
> An alternative to adding 'while' to the language might be to allow "for ()" to be an unbounded loop and force the author to put the necessary break/return conditions in the body.



--
This message was sent by Atlassian JIRA
(v6.4-OD-14-082#64012)


More information about the bro-dev mailing list