X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/61db0fa798876deeb90fc27f4ebdc207d3a53457..78d6e1ce97611abe9f0d083033197773f93c33f7:/practicas/pipi/src/dns.cpp?ds=sidebyside diff --git a/practicas/pipi/src/dns.cpp b/practicas/pipi/src/dns.cpp index 5b3c66c..f0846d4 100644 --- a/practicas/pipi/src/dns.cpp +++ b/practicas/pipi/src/dns.cpp @@ -23,8 +23,6 @@ void send_loop(NameServer& ns); -void add_routes(RouteTable& rt, std::istream& is, Dev& dev); - int main(int argc, char* argv[]) { uint16_t port = DEVTCP_DEFAULT_PORT; @@ -108,21 +106,4 @@ void send_loop(NameServer& ns) } } -void add_routes(RouteTable& rt, std::istream& is, Dev& dev) -{ - std::string line; - while (std::getline(is, line)) - { - std::istringstream iss(line); - std::string net; - std::string gw; - unsigned mtu; - unsigned metric; - iss >> net >> gw >> mtu >> metric; - if (net == "0") net = "0.0.0.0"; - if (gw == "0") gw = "0.0.0.0"; - rt.add(net, gw, metric, mtu, dev); - } -} - // vim: set et sw=4 sts=4 :