[Olsr-dev] [RFC]olsrd praeprocessor patch
Fri Jan 4 22:28:38 CET 2008
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'
Henning Rogge wrote:
> 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.
More information about the Olsr-dev