[Bro] working with Broccoli
Aaron Gee-Clough
lists at g-clef.net
Thu Mar 7 07:10:15 PST 2013
> Wed Mar 06 2013 05:31:59 PM EST from "Siwek, Jonathan Luke"
><jsiwek at illinois.edu> Subject: Re: [Bro] working with Broccoli
>
>
>>import broccoli
>>
>> dns_answer = broccoli.record_type("answer_type", "query", "qtype",
>>"qclass", "TTL")
>>
>> @broccoli.event(broccoli.addr, broccoli.addr, broccoli.time, dns_answer,
>>broccoli.string)
>> def dns_via_api(orig_h, resp_h, start_time, ans, reply):
>> print reply
>>
>> bc = broccoli.Connection("127.0.0.1:47763", connect=False)
>> bc.subscribe("dns_via_api", dns_via_api)
>> bc.connect()
>>
>> while True:
>> bc.processInput()
>> time.sleep(1)
>>
>>
> Try removing the bc.subscribe() call. I think it's only for use with
>non-decorated event callbacks, but you've already got the @broccoli.event
>decoration there.
>
> Jon
>
>
>
>
That was it. the callbacks are working beautifully now. Thank you very much.
aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20130307/5b84d946/attachment.html
More information about the Bro
mailing list