[Olsr-dev] [RFC]olsrd praeprocessor patch

Hannes Gredler (spam-protected)
Fri Jan 4 22:28:38 CET 2008


hi henning,

have included it to my private tree - (will sync to HG head after 0.5.5 is out of the door).
minor nit - have renamed 'praeprocessor' to 'preprocessor'

/hannes

http://gredler.at/hg/olsrd/rev/58a04e6b4f9a

Henning Rogge wrote:
> Hi, 
> 
> while looking through the olsr secure plugin in noticed the "hijack hack" the 
> plugin uses for capturing the packets before they get processed by olsrd.
> 
> I refactored the parser of olsrd so that this is done by two new functions:
> 
> void olsr_praeprocessor_add_function(praeprocessor_function);
> int olsr_praeprocessor_remove_function(praeprocessor_function);
> 
> The "praeprocessor_function" has the type
> 
> char *praeprocessor_function(char *packet, struct interface *, union
>    olsr_ip_addr *, int *length);
> 
> and all registered praeprocessors are called before the package is decoded by 
> olsrd. This way the secure plugin (and other possible plugins) can check the 
> packages, modify them or discard them (by returning NULL).
> 
> The secure plugin is already changed to the new interface with this patch, it 
> should be applied to todays mercurial repository.
> 
> Henning
> 




More information about the Olsr-dev mailing list