I was wondering why the concept of generics has been implemented via
#define hacking in some of the code (the parts where the connectionPDict
and FragReassemblesPdict are defined in session.h). Are they any
advantages to doing this in the stead of templates? It is very tedious
looking at this in the code, especially to someone who comes from
another language. If there aren't any advantages shall I refractor it
out of the code for the sake of future newbie's like me?
i'm playing around with broccoli and i have problems with events that
contain enum type. the event is defined in a policy and i can use it for
inter-bro-comunication, but broccoli ignores it. calling the event
without the enum type argument works well.
where is my mistake?
c code (modified 'broping'):
bro_mytest(BroConn *conn, void *data, uint32 *num, BroRecord *status)
/*just print a simple message....*/
printf("event mytest received!\n");
bro_event_registry_add(bc, "mytest", (BroEventFunc) bro_mytest, NULL) ;
type testtype : enum
# 1) does'nt work with broccoli!
event mytest(123, first_type);
# 2) this works!