The plugin also needs to be able to intercept all outgoing traffic to
add signature messages. To be able to do this, a new set of function
pointers was added to olsrd. They are called packet transformation
functions. A plugin can register its own packet transform functions
with olsrd, and these functions are applied to every OLSR packet
right before sending it. The
function to add such a function pointer is declared in
src/net.h as:
int add_ptf(int (*)(char *, int *));
The plugin registers a function that calculates and adds a signature
to the end of all outgoing OLSR packets. To be sure the packet will
have room for the signature message (especially when stacking messages)
the max message size in olsrd is set to maxmsgsize - sizeof(signaturemsg).