00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef QOLYESTER_DAEMON_SYS_ROUTING_HXX
00020 # define QOLYESTER_DAEMON_SYS_ROUTING_HXX 1
00021
00022 # include <stdexcept>
00023 # include <ostream>
00024 # include "routing.hh"
00025 # include "utl/log.hh"
00026
00027 namespace olsr {
00028
00029 namespace sys {
00030
00031 void
00032 RoutingActions::print_kernel_routes() {
00033 _rs.print_kernel_routes();
00034 }
00035
00036 void
00037 RoutingActions::remove_old_routes() {
00038 try {
00039 _rs.remove_old_routes();
00040 } catch (std::runtime_error& e) {
00041 error << e.what() << std::endl;
00042 }
00043 }
00044
00045 void
00046 RoutingActions::add_local_route(const net::LocalRoute& r) {
00047 try {
00048 _rs.add_local_route(r.dest_addr(), r.prefix(), r.interface_info());
00049 } catch (std::runtime_error& e) {
00050 error << e.what() << std::endl;
00051 }
00052 }
00053
00054 void
00055 RoutingActions::add_remote_route(const net::RemoteRoute& r) {
00056 try {
00057 _rs.add_remote_route(r.dest_addr(), r.prefix(), r.next_addr());
00058 } catch (std::runtime_error& e) {
00059 error << e.what() << std::endl;
00060 }
00061 }
00062
00063 void
00064 RoutingActions::remove_local_route(const net::LocalRoute& r) {
00065 try {
00066 _rs.remove_local_route(r.dest_addr(), r.prefix(), r.interface_info());
00067 } catch (std::runtime_error& e) {
00068 error << e.what() << std::endl;
00069 }
00070 }
00071
00072 void
00073 RoutingActions::remove_remote_route(const net::RemoteRoute& r) {
00074 try {
00075 _rs.remove_remote_route(r.dest_addr(), r.prefix(), r.next_addr());
00076 } catch (std::runtime_error& e) {
00077 error << e.what() << std::endl;
00078 }
00079 }
00080
00081 }
00082
00083 }
00084
00085 #endif // ! QOLYESTER_DAEMON_SYS_ROUTING_HXX