Hardware Ethernet Interface. More...

#include <senf/Ext/NetEmu/TAP/TAPEthernetInterface.hh>

Inheritance diagram for senf::emu::TAPEthernetInterface:

Public Types

typedef TypedInterfaceDecorator< TAPEthernetInterface, 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

 TAPEthernetInterface (std::string const &name)
 
 ~TAPEthernetInterface ()
 
std::string const & v_device () const override
 
unsigned maxBurst () const
 
void maxBurst (unsigned maxBurst)
 
VLanId const & pvid () const
 
bool pvid (VLanId const &p, bool accessMode)
 
std::uint32_t vlanMismatchRx ()
 
std::uint32_t vlanMismatchTx ()
 
- 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

EthernetControllerethController ()
 
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 41 of file TAPEthernetInterface.hh.

Member Typedef Documentation

◆ Decorator

Constructor & Destructor Documentation

◆ TAPEthernetInterface()

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

Definition at line 70 of file TAPEthernetInterface.cc.

◆ ~TAPEthernetInterface()

senf::emu::TAPEthernetInterface::~TAPEthernetInterface ( )

Definition at line 110 of file TAPEthernetInterface.cc.

Member Function Documentation

◆ ethController()

EthernetController& senf::emu::TAPEthernetInterface::ethController ( )
protected

◆ maxBurst() [1/2]

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

Definition at line 243 of file TAPEthernetInterface.cc.

◆ maxBurst() [2/2]

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

Definition at line 249 of file TAPEthernetInterface.cc.

◆ pvid() [1/2]

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

◆ pvid() [2/2]

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

Definition at line 209 of file TAPEthernetInterface.cc.

◆ v_device()

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

Implements senf::emu::Interface.

Definition at line 117 of file TAPEthernetInterface.cc.

◆ v_disable()

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

Called to disable interface.

Implements senf::emu::Interface.

Definition at line 132 of file TAPEthernetInterface.cc.

◆ v_enable()

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

Called to enable interface.

Implements senf::emu::Interface.

Definition at line 123 of file TAPEthernetInterface.cc.

◆ v_mtu() [1/2]

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

Called to get interface MTU.

Implements senf::emu::Transmitter.

Definition at line 182 of file TAPEthernetInterface.cc.

◆ v_mtu() [2/2]

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

Called to set interface MTU.

Implements senf::emu::Transmitter.

Definition at line 188 of file TAPEthernetInterface.cc.

◆ vlanMismatchRx()

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

Definition at line 233 of file TAPEthernetInterface.cc.

◆ vlanMismatchTx()

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

Definition at line 238 of file TAPEthernetInterface.cc.


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