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 metric, Dev& iface)
12 table[net] = Route(gw, metric, iface);
14 //std::cout << "Se agregó tabla para " << net << ": gw = " << gw
15 // << ", metric = " << metric << "\n";
19 void RouteTable::del(const IPAddr& net)
24 RouteTable::Route* RouteTable::get(const IPAddr& dst)
27 if (table.find(dst) == table.end())
32 // vim: set et sw=4 sts=4 :