1 #include "routetable.h"
6 RouteTable::RouteTable(Dev& default_iface): default_iface(default_iface)
10 void RouteTable::add(const IPAddr& net, const IPAddr& gw, unsigned mtu,
11 unsigned metric, Dev& iface)
13 table[net] = Route(gw, metric, mtu, iface);
15 //std::cout << "Se agregó tabla para " << net << ": gw = " << gw
16 // << ", metric = " << metric << "\n";
20 void RouteTable::del(const IPAddr& net)
25 RouteTable::Route* RouteTable::get(const IPAddr& dst)
28 if (table.find(dst) == table.end())
33 // vim: set et sw=4 sts=4 :