Hardware Ethernet Interface. More...

#include <senf/Ext/NetEmu/Ethernet/HardwareEthernetInterface.hh>

Inheritance diagram for senf::emu::HardwareEthernetInterface:

Public Types

typedef TypedInterfaceDecorator< HardwareEthernetInterface, Interface::DecoratorDecorator
 
- Public Types inherited from senf::emu::WiredInterface
typedef TypedInterfaceDecorator< WiredInterface, Interface::DecoratorDecorator
 
- Public Types inherited from senf::emu::Interface
typedef InterfaceDecorator Decorator
 Interface base class specific decorator type More...
 

Public Member Functions

 HardwareEthernetInterface (std::string const &name)
 
virtual ~HardwareEthernetInterface ()
 
std::string const & v_device () const override
 
void setREDFilterCallbackRx (senf::ppi::REDFilterCallback const &cb)
 
void setREDFilterCallbackTx (senf::ppi::REDFilterCallback const &cb)
 
VLanId const & pvid () const
 
bool pvid (VLanId const &p, bool accessMode)
 
std::uint32_t vlanMismatchRx ()
 
std::uint32_t vlanMismatchTx ()
 
unsigned sndBuf ()
 
void sndBuf (unsigned sndbuf)
 
unsigned rcvBuf ()
 
void rcvBuf (unsigned rcvbuf)
 
unsigned qlen () const
 
void qlen (unsigned qlen)
 
std::pair< unsigned, unsigned > rxDropped ()
 
std::tuple< unsigned, unsigned, unsigned > txDropped ()
 
void dumpMmapStats (std::ostream &os)
 
bool isDead () const
 
unsigned maxBurst () const
 
void maxBurst (unsigned maxBurst)
 
EthernetControllerethController ()
 
- Public Member Functions inherited from senf::emu::EthernetInterface
template<class Output , class Input >
 EthernetInterface (Output &output, Input &input)
 
- Public Member Functions inherited from senf::emu::InterfaceAPIBase< interface::Wired, interface::Bidirectional >
template<class Output , class Input >
 InterfaceAPIBase (Output &output, Input &input)
 
- Public Member Functions inherited from senf::emu::Interface
virtual ~Interface ()
 
bool canTransmit () const
 true, if interface is transmit capable More...
 
bool canReceive () const
 true, if interface is receive capable More...
 
void enable ()
 Enable interface (aka ifconfig up) More...
 
void disable ()
 Disable interface (aka ifconfig down) More...
 
bool enabled () const
 true, if interface enabled More...
 
unsigned index () const
 Get interface index. More...
 
void id (MACAddress const &eui)
 Change interface MAC. More...
 
MACAddress const & id () const
 Get interface MAC Address. More...
 
void deviceId (InterfaceDeviceId id)
 
InterfaceDeviceId deviceId () const
 
std::string const & device () const
 
boost::uint8_t linkTypeId () const
 
std::string interfaceTypeName () const
 
console::DirectoryNodeconsoleDir () const
 Access interface console directory. More...
 
console::DirectoryNodestatisticsDir () const
 Access the interface statistics directory. More...
 
template<class Stat >
senf::StatisticsregisterStatistics (std::string name, Stat &stat)
 Register statistics source. More...
 
boost::optional< senf::Statistics & > statistic (std::string const &name)
 Get registered statistic. More...
 
void startStatistics (ClockService::clock_type inverval)
 Start statistics generation. More...
 
- Public Member Functions inherited from senf::emu::Receiver
virtual ~Receiver ()
 
bool annotationMode () const
 Get interface annotationMode status. More...
 
void annotationMode (bool a)
 Enable/Disable AnnotationPackets for each frame. More...
 
bool promisc () const
 Get interface promiscuous status. More...
 
void promisc (bool v)
 Change interface promiscuous status. More...
 
void mcAdd (senf::MACAddress const &address)
 
void mcDrop (senf::MACAddress const &address)
 
void flushRxQueues ()
 Flush Rx Queues. More...
 
- Public Member Functions inherited from senf::emu::Transmitter
virtual ~Transmitter ()
 
unsigned mtu () const
 Get interface MTU. More...
 
void mtu (unsigned v)
 Set interface MTU. More...
 
void flushTxQueues ()
 Flush Tx Queues. More...
 

Protected Member Functions

virtual void v_enable () override
 Called to enable interface. More...
 
virtual void v_disable () override
 Called to disable interface. More...
 
virtual unsigned v_mtu () const override
 Called to get interface MTU. More...
 
virtual void v_mtu (unsigned v) override
 Called to set interface MTU. More...
 
- Protected Member Functions inherited from senf::emu::EthernetInterface
void init ()
 
- Protected Member Functions inherited from senf::emu::InterfaceAPIBase< interface::Wired, interface::Bidirectional >
void init ()
 
- Protected Member Functions inherited from senf::emu::WiredInterface
void init ()
 
- Protected Member Functions inherited from senf::emu::Interface
 Interface ()
 
void init ()
 Initialize interface. More...
 
- Protected Member Functions inherited from senf::emu::WiredReceiver
 WiredReceiver (ppi::connector::ActiveOutput<> &output)
 
 WiredReceiver (ppi::connector::ActiveOutput< EthernetPacket > &output)
 
 WiredReceiver (ppi::connector::ActiveOutputJack<> &output)
 
 WiredReceiver (ppi::connector::ActiveOutputJack< EthernetPacket > &output)
 
void init ()
 
- Protected Member Functions inherited from senf::emu::WiredTransmitter
 WiredTransmitter (ppi::connector::PassiveInput<> &input)
 
 WiredTransmitter (ppi::connector::PassiveInput< EthernetPacket > &input)
 
 WiredTransmitter (ppi::connector::PassiveInputJack<> &input)
 
 WiredTransmitter (ppi::connector::PassiveInputJack< EthernetPacket > &input)
 
void init ()
 
- Protected Member Functions inherited from senf::emu::HardwareInterface
void init ()
 

Additional Inherited Members

- Static Public Member Functions inherited from senf::emu::Interface
static unsigned nodeId ()
 Get unique node id. More...
 
static void nodeId (unsigned id)
 Set unique node id. More...
 
- Public Attributes inherited from senf::emu::Interface
boost::signals2::signal< void(Interface &, MACAddress)> idChangedSignal
 
- Public Attributes inherited from senf::emu::Receiver
ppi::connector::ActiveOutputJack< EthernetPacketoutput
 
- Public Attributes inherited from senf::emu::Transmitter
ppi::connector::PassiveInputJack< EthernetPacketinput
 

Detailed Description

Hardware Ethernet Interface.

This class adapts a real, hardware based Ethernet interface into the NetEmu interface API.

See also
WiredInterface

Definition at line 40 of file HardwareEthernetInterface.hh.

Member Typedef Documentation

◆ Decorator

Constructor & Destructor Documentation

◆ HardwareEthernetInterface()

senf::emu::HardwareEthernetInterface::HardwareEthernetInterface ( std::string const &  name)

Definition at line 141 of file HardwareEthernetInterface.cc.

◆ ~HardwareEthernetInterface()

senf::emu::HardwareEthernetInterface::~HardwareEthernetInterface ( )
virtual

Definition at line 204 of file HardwareEthernetInterface.cc.

Member Function Documentation

◆ dumpMmapStats()

void senf::emu::HardwareEthernetInterface::dumpMmapStats ( std::ostream &  os)

Definition at line 486 of file HardwareEthernetInterface.cc.

◆ ethController()

EthernetController& senf::emu::HardwareEthernetInterface::ethController ( )

◆ isDead()

bool senf::emu::HardwareEthernetInterface::isDead ( ) const

Definition at line 499 of file HardwareEthernetInterface.cc.

◆ maxBurst() [1/2]

unsigned senf::emu::HardwareEthernetInterface::maxBurst ( ) const

Definition at line 475 of file HardwareEthernetInterface.cc.

◆ maxBurst() [2/2]

void senf::emu::HardwareEthernetInterface::maxBurst ( unsigned  maxBurst)

Definition at line 481 of file HardwareEthernetInterface.cc.

◆ pvid() [1/2]

VLanId const& senf::emu::HardwareEthernetInterface::pvid ( ) const

◆ pvid() [2/2]

bool senf::emu::HardwareEthernetInterface::pvid ( VLanId const &  p,
bool  accessMode 
)

Definition at line 424 of file HardwareEthernetInterface.cc.

◆ qlen() [1/2]

unsigned senf::emu::HardwareEthernetInterface::qlen ( ) const

Definition at line 446 of file HardwareEthernetInterface.cc.

◆ qlen() [2/2]

void senf::emu::HardwareEthernetInterface::qlen ( unsigned  qlen)

Definition at line 452 of file HardwareEthernetInterface.cc.

◆ rcvBuf() [1/2]

unsigned senf::emu::HardwareEthernetInterface::rcvBuf ( )

Definition at line 418 of file HardwareEthernetInterface.cc.

◆ rcvBuf() [2/2]

void senf::emu::HardwareEthernetInterface::rcvBuf ( unsigned  rcvbuf)

Definition at line 411 of file HardwareEthernetInterface.cc.

◆ rxDropped()

std::pair< unsigned, unsigned > senf::emu::HardwareEthernetInterface::rxDropped ( )

Definition at line 465 of file HardwareEthernetInterface.cc.

◆ setREDFilterCallbackRx()

void senf::emu::HardwareEthernetInterface::setREDFilterCallbackRx ( senf::ppi::REDFilterCallback const &  cb)

◆ setREDFilterCallbackTx()

void senf::emu::HardwareEthernetInterface::setREDFilterCallbackTx ( senf::ppi::REDFilterCallback const &  cb)

◆ sndBuf() [1/2]

unsigned senf::emu::HardwareEthernetInterface::sndBuf ( )

Definition at line 405 of file HardwareEthernetInterface.cc.

◆ sndBuf() [2/2]

void senf::emu::HardwareEthernetInterface::sndBuf ( unsigned  sndbuf)

Definition at line 398 of file HardwareEthernetInterface.cc.

◆ txDropped()

std::tuple< unsigned, unsigned, unsigned > senf::emu::HardwareEthernetInterface::txDropped ( )

Definition at line 470 of file HardwareEthernetInterface.cc.

◆ v_device()

std::string const & senf::emu::HardwareEthernetInterface::v_device ( ) const
overridevirtual

Implements senf::emu::Interface.

Definition at line 211 of file HardwareEthernetInterface.cc.

◆ v_disable()

void senf::emu::HardwareEthernetInterface::v_disable ( )
overrideprotectedvirtual

Called to disable interface.

Implements senf::emu::Interface.

Definition at line 308 of file HardwareEthernetInterface.cc.

◆ v_enable()

void senf::emu::HardwareEthernetInterface::v_enable ( )
overrideprotectedvirtual

Called to enable interface.

Implements senf::emu::Interface.

Definition at line 287 of file HardwareEthernetInterface.cc.

◆ v_mtu() [1/2]

unsigned senf::emu::HardwareEthernetInterface::v_mtu ( ) const
overrideprotectedvirtual

Called to get interface MTU.

Implements senf::emu::Transmitter.

Definition at line 363 of file HardwareEthernetInterface.cc.

◆ v_mtu() [2/2]

void senf::emu::HardwareEthernetInterface::v_mtu ( unsigned  v)
overrideprotectedvirtual

Called to set interface MTU.

Implements senf::emu::Transmitter.

Definition at line 369 of file HardwareEthernetInterface.cc.

◆ vlanMismatchRx()

std::uint32_t senf::emu::HardwareEthernetInterface::vlanMismatchRx ( )

Definition at line 436 of file HardwareEthernetInterface.cc.

◆ vlanMismatchTx()

std::uint32_t senf::emu::HardwareEthernetInterface::vlanMismatchTx ( )

Definition at line 441 of file HardwareEthernetInterface.cc.


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