Intercepting incoming traffic

The secure OLSR plugin must be able to intercept all incoming OLSR traffic and check the signature if present. This is a matter of de-registering all the OLSR sockets (UDP port 698) from the socket listener, and then re-register them with the plugins own input function. This is done using the functions:

int
remove_olsr_socket(int, void(*)(int));

void
add_olsr_socket(int, void(*)(int));

which are implemented in src/socket_parser.c. The OLSR sockets can all be retrieved from the global interface list ifnet.

The plugins own OLSR input function keeps the registered message parser functions and only differs from the original input function in olsrd on two points:

Andreas 2004-07-29