X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/0a2739fe97762f57a80599ef170df98e07422a3d..9ee7a97ec97d3dc41e1367f1f457d5ed5d5270ea:/practicas/pipi/src/routetable.cpp?ds=sidebyside diff --git a/practicas/pipi/src/routetable.cpp b/practicas/pipi/src/routetable.cpp index 66ccd80..40de2d3 100644 --- a/practicas/pipi/src/routetable.cpp +++ b/practicas/pipi/src/routetable.cpp @@ -1,12 +1,20 @@ #include "routetable.h" +#ifdef DEBUG +#include +#endif RouteTable::RouteTable(Dev& default_iface): default_iface(default_iface) { } -void RouteTable::add(const IPAddr& net, const IPAddr& gw, unsigned metric, Dev& iface) +void RouteTable::add(const IPAddr& net, const IPAddr& gw, unsigned mtu, + unsigned metric, Dev& iface) { - table[net] = Route(gw, metric, iface); + table[net] = Route(gw, metric, mtu, iface); +#ifdef DEBUG + //std::cout << "Se agregó tabla para " << net << ": gw = " << gw + // << ", metric = " << metric << "\n"; +#endif } void RouteTable::del(const IPAddr& net)