Add the implementation of the router
Signed-off-by: David Aparicio <ra142289@beach.lab.ic.unicamp.br>