34 #ifndef __DEV_NET_ETHERINT_HH__ 35 #define __DEV_NET_ETHERINT_HH__ 55 :
Port(name, idx), portName(name), peer(NULL) {}
71 {
return peer ? peer->recvPacket(packet) :
true; }
75 virtual bool isBusy() {
return false; }
78 #endif // __DEV_NET_ETHERINT_HH__ void setPeer(EtherInt *p)
const std::string & name() const
Return port name (for DPRINTF).
Ports are used to interface objects to each other.
const PortID InvalidPortID
void unbind() override
Dettach from a peer port.
void bind(Port &peer) override
Attach to a peer port.
virtual bool recvPacket(EthPacketPtr packet)=0
EtherInt(const std::string &name, int idx=InvalidPortID)
std::shared_ptr< EthPacketData > EthPacketPtr
bool sendPacket(EthPacketPtr packet)
virtual void sendDone()=0