[Bro-Dev] Geo Location Plugin

anthony kasza anthony.kasza at gmail.com
Tue Oct 14 17:48:56 PDT 2014


Thanks all. After moving declarations around, nm shows all my expected
symbols to be defined. I'm now receiving "internal error in
/usr/local/bro/share/bro/base/init-bare.bro, line 1: internal type
geo_location missing". It seems this error is being caused by the
check on the return value of lookup_ID() done within the
internal_type() function in Var.cc. From what I can tell, I don't have

geo_location = internal_type("geo_location")->AsRecordType();

in the right location. This line is from the init_net_var() function
from NetVar.cc, which gets called by main.cc. I thought it might be a
clash in name/module spaces and tried using the init-plugin script
with some unique values, but I still receive the same error. I'm not
sure if it matters but I when I run "bro -NNb" I can see my inactive
dynamic plugin, so I know Bro is aware of it. I currently have
everything sitting in a single .bif file. Would it be useful to post
that?

-AK

On Tue, Oct 7, 2014 at 8:25 AM, Robin Sommer <robin at icir.org> wrote:
>
>
> On Mon, Oct 06, 2014 at 21:46 -0700, you wrote:
>
>> Thanks Robin. Everything on the "Writing Bro Plugins" page is clear
>> although the debugging section seems thin to me. Then again, I've have
>> never compiled Bro with debugging enabled before.
>
> Ok, I'll try to extend that a bit more, it's written mainly from the
> perspective of adding debugging output to your plugin; not in terms of
> leveraging the existing output to see why something's not working.
>
>>  Are there plans to expand the Types section of that page?
>
> I would like to, but it's quite a bit of work to fill in the TODOs, so
> honestly I don't see that coming very soon. The problem is that most
> of the missing TODOs are actually not really a matter per se of
> writing a plugin or not, but require text on how to write the
> corresponding code for Bro in general (in other words, even before
> moving to plugins, much of that would have been quite similar). For
> now, the best way to figure this out is to look at existing code,
> i.e., for the builtin-in stuff other *.bif files.
>
>> I think I'm not declaring a scriptland record type correctly.
>
> Feel free to post error messages here.
>
> Robin
>
> --
> Robin Sommer * Phone +1 (510) 722-6541 *     robin at icir.org
> ICSI/LBNL    * Fax   +1 (510) 666-2956 * www.icir.org/robin


More information about the bro-dev mailing list