#include "ipin.h"
#include "ipheader.h"
+#ifdef DEBUG
+#include <iostream>
+#endif
/// Constructor
IPIn::IPIn(const IPAddr& ip, Dev& dev, Dev& forward_que, bool router,
}
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)
{
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?)