+ protected:
+ EtherTapInt *interface;
+
+ public:
+ Port &getPort(const std::string &if_name,
+ PortID idx=InvalidPortID) override;
+
+ bool recvSimulated(EthPacketPtr packet);
+ void sendSimulated(void *data, size_t len);
+
+ protected:
+ std::queue<EthPacketPtr> packetBuffer;
+ void retransmit();
+ EventFunctionWrapper txEvent;
+};
+
+class EtherTapInt : public EtherInt
+{
+ private:
+ EtherTapBase *tap;
+ public:
+ EtherTapInt(const std::string &name, EtherTapBase *t) :
+ EtherInt(name), tap(t)
+ { }
+
+ bool recvPacket(EthPacketPtr pkt) override
+ { return tap->recvSimulated(pkt); }
+ void sendDone() override {}
+};