[Bro] array to BifEvent

Dina Hadziosmanovic dina at ICSI.Berkeley.EDU
Fri Apr 20 17:15:49 PDT 2012


 

Hi guys, 

I don't know how to pass an array to binpac function and then to BifEvent. 

Here is my type definition:

 

type X(len: uint16) = record {

        byteCount: uint8;

        registers: uint16[registerCount] &length = byteCount;

 

 

 

here is the function I want to call:

 

function something( r: X): bool

               %{

 

// here get a pointer to registers and value to byteCount ???

 

                if ( ::some_event )

                        {

                BifEvent::generate_some_event(

                                connection()->bro_analyzer(),

                                connection()->bro_analyzer()->Conn(),

                        is_orig(),bCount,reg);

                        }

                return true;

 

                %}

 

If BifEvent passes a pointer to the array, then  in bro script I can use
vector type to print those values?

 

 

Thanks,

dina

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20120420/38171767/attachment.html 


More information about the Bro mailing list