X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/49f488eb5e757db401a81bc40a30a84d1abcaf88..6758589f5ff68b1775d5a83b01d7ac49f1b612ef:/practicas/pipi/src/ipin.cpp diff --git a/practicas/pipi/src/ipin.cpp b/practicas/pipi/src/ipin.cpp index 55bc856..c191b90 100644 --- a/practicas/pipi/src/ipin.cpp +++ b/practicas/pipi/src/ipin.cpp @@ -1,6 +1,9 @@ #include "ipin.h" #include "ipheader.h" +#ifdef DEBUG +#include +#endif /// Constructor IPIn::IPIn(const IPAddr& ip, Dev& dev, Dev& forward_que, bool router, @@ -35,9 +38,9 @@ std::string IPIn::recv(uint8_t proto, IPAddr& src, IPAddr& dst) throw (std::runt } IPHeader iph(buf); #ifdef DEBUG - log << "IPIn::recv: IPHeader: " << iph << "\n"; + std::cout << "IPIn::recv: IPHeader: " << iph << "\n"; std::string tmp = buf.substr(iph.header_len()); - log << "\tdata (" << tmp.size() << ") = " << tmp << "\n"; + std::cout << "\tdata (" << tmp.size() << ") = " << tmp << "\n"; #endif if (iph.version != 4) { @@ -82,7 +85,7 @@ std::string IPIn::recv(uint8_t proto, IPAddr& src, IPAddr& dst) throw (std::runt data += i->second; } #ifdef DEBUG - log << "IPIn::recv: Paquete completo: data = '" << data << "'\n"; + std::cout << "IPIn::recv: Paquete completo: data = '" << data << "'\n"; #endif buffer.erase(iph); //TODO faltaría limpiar fragmentos viejos cada tanto (timer?)