gem5  v20.1.0.0
Public Member Functions | Protected Attributes | List of all members
EtherInt Class Referenceabstract

#include <etherint.hh>

Inheritance diagram for EtherInt:
Port DistEtherLink::LocalIface EtherLink::Interface EtherSwitch::Interface EtherTapInt IGbEInt NSGigEInt Sinic::Interface

Public Member Functions

 EtherInt (const std::string &name, int idx=InvalidPortID)
 
virtual ~EtherInt ()
 
const std::string & name () const
 Return port name (for DPRINTF). More...
 
void bind (Port &peer) override
 Attach to a peer port. More...
 
void unbind () override
 Dettach from a peer port. More...
 
void setPeer (EtherInt *p)
 
EtherIntgetPeer ()
 
void recvDone ()
 
virtual void sendDone ()=0
 
bool sendPacket (EthPacketPtr packet)
 
virtual bool recvPacket (EthPacketPtr packet)=0
 
bool askBusy ()
 
virtual bool isBusy ()
 
- Public Member Functions inherited from Port
virtual ~Port ()
 Virtual destructor due to inheritance. More...
 
PortgetPeer ()
 Return a reference to this port's peer. More...
 
const std::string name () const
 Return port name (for DPRINTF). More...
 
PortID getId () const
 Get the port id. More...
 
bool isConnected () const
 Is this port currently connected to a peer? More...
 
void takeOverFrom (Port *old)
 A utility function to make it easier to swap out ports. More...
 

Protected Attributes

std::string portName
 
EtherIntpeer
 
- Protected Attributes inherited from Port
const PortID id
 A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is not part of a vector. More...
 
Port_peer
 A pointer to this port's peer. More...
 
bool _connected
 Whether this port is currently connected to a peer port. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Port
void reportUnbound () const
 
 Port (const std::string &_name, PortID _id)
 Abstract base class for ports. More...
 

Detailed Description

Definition at line 47 of file etherint.hh.

Constructor & Destructor Documentation

◆ EtherInt()

EtherInt::EtherInt ( const std::string &  name,
int  idx = InvalidPortID 
)
inline

Definition at line 54 of file etherint.hh.

◆ ~EtherInt()

virtual EtherInt::~EtherInt ( )
inlinevirtual

Definition at line 56 of file etherint.hh.

Member Function Documentation

◆ askBusy()

bool EtherInt::askBusy ( )
inline

Definition at line 74 of file etherint.hh.

References isBusy(), and peer.

◆ bind()

void EtherInt::bind ( Port peer)
overridevirtual

Attach to a peer port.

Reimplemented from Port.

Definition at line 35 of file etherint.cc.

References Port::_connected, fatal, name(), MipsISA::p, peer, and setPeer().

◆ getPeer()

EtherInt* EtherInt::getPeer ( )
inline

Definition at line 65 of file etherint.hh.

References peer.

◆ isBusy()

virtual bool EtherInt::isBusy ( )
inlinevirtual

Reimplemented in DistEtherLink::LocalIface, and EtherLink::Interface.

Definition at line 75 of file etherint.hh.

Referenced by askBusy().

◆ name()

const std::string& EtherInt::name ( ) const
inline

Return port name (for DPRINTF).

Definition at line 59 of file etherint.hh.

References portName.

Referenced by bind(), EtherSwitch::Interface::learnSenderAddr(), EtherSwitch::Interface::recvPacket(), and setPeer().

◆ recvDone()

void EtherInt::recvDone ( )
inline

Definition at line 67 of file etherint.hh.

References peer, and sendDone().

Referenced by EtherTapBase::recvSimulated().

◆ recvPacket()

virtual bool EtherInt::recvPacket ( EthPacketPtr  packet)
pure virtual

◆ sendDone()

virtual void EtherInt::sendDone ( )
pure virtual

◆ sendPacket()

bool EtherInt::sendPacket ( EthPacketPtr  packet)
inline

◆ setPeer()

void EtherInt::setPeer ( EtherInt p)

Definition at line 54 of file etherint.cc.

References name(), MipsISA::p, panic, and peer.

Referenced by bind().

◆ unbind()

void EtherInt::unbind ( )
overridevirtual

Dettach from a peer port.

Reimplemented from Port.

Definition at line 47 of file etherint.cc.

References Port::_connected, and peer.

Member Data Documentation

◆ peer

EtherInt* EtherInt::peer
protected

◆ portName

std::string EtherInt::portName
mutableprotected

Definition at line 50 of file etherint.hh.

Referenced by name().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:24 for gem5 by doxygen 1.8.17