/// Dispositivo de red
Dev& dev;
+ /// Cola para forwardear paquetes
+ Dev& forward_que;
+
+ /// Indica si es un router
+ bool router;
+
+ /// Indica si hace forwarding
+ bool forward;
+
/// Dispositivo de logging
std::ostream& log;
buffer_type buffer;
/// Constructor
- IPIn(const IPAddr& ip, Dev& dev, std::ostream& log = std::cout);
+ IPIn(const IPAddr& ip, Dev& dev, Dev& forward_que, bool router = false,
+ bool forward = false, std::ostream& log = std::cout);
/// Descarta un paquete
void drop(const std::string& msg, const std::string& buf);
void drop(const std::string& msg, const IPHeader& iph);
/// Recibe un paquete IP
- std::string recv(uint8_t proto, IPAddr& src, IPAddr& dst)
+ std::string recv(uint8_t& proto, IPAddr& src, IPAddr& dst)
throw (std::runtime_error);
// Nada de andar copiando placas...