33 #ifndef __DEV_NET_ETHERTAP_HH__ 34 #define __DEV_NET_ETHERTAP_HH__ 40 #include "config/use_tuntap.hh" 45 #include "params/EtherTap.hh" 49 #include "params/EtherTapStub.hh" 66 return dynamic_cast<const Params *
>(
_params);
89 virtual void recvReal(
int revent) = 0;
146 return dynamic_cast<const Params *
>(
_params);
174 typedef EtherTapParams
Params;
175 EtherTap(
const Params *
p);
181 return dynamic_cast<const Params *
>(
_params);
194 #endif // __DEV_NET_ETHERTAP_HH__ Ports are used to interface objects to each other.
const PortID InvalidPortID
void serialize(CheckpointOut &cp) const override
Serialize an object.
void sendSimulated(void *data, size_t len)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
const Params * params() const
const Params * params() const
bool recvPacket(EthPacketPtr pkt) override
EventFunctionWrapper txEvent
bool recvSimulated(EthPacketPtr packet)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
virtual bool sendReal(const void *data, size_t len)=0
std::shared_ptr< EthPacketData > EthPacketPtr
EtherTapBase(const Params *p)
virtual const std::string name() const
virtual void recvReal(int revent)=0
std::ostream CheckpointOut
EtherTapBaseParams Params
const SimObjectParams * _params
Cached copy of the object parameters.
std::queue< EthPacketPtr > packetBuffer
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
EtherTapStubParams Params
EtherTapInt(const std::string &name, EtherTapBase *t)
Abstract superclass for simulation objects.