X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/51f24d14e8c4c52776a98c8e2aaacf95f90ad1f4..659563a75d668130df84664e7e6b1220667cbc28:/practicas/pipi/src/ipin.h diff --git a/practicas/pipi/src/ipin.h b/practicas/pipi/src/ipin.h index 5d0d7a8..8620278 100644 --- a/practicas/pipi/src/ipin.h +++ b/practicas/pipi/src/ipin.h @@ -19,6 +19,15 @@ struct IPIn /// 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; @@ -39,7 +48,8 @@ struct IPIn 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);