Hardware Ethernet Interface. More...
#include <senf/Ext/NetEmu/Ethernet/HardwareEthernetInterface.hh>
Public Types | |
typedef TypedInterfaceDecorator< HardwareEthernetInterface, Interface::Decorator > | Decorator |
Public Types inherited from senf::emu::WiredInterface | |
typedef TypedInterfaceDecorator< WiredInterface, Interface::Decorator > | Decorator |
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) |
EthernetController & | ethController () |
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::DirectoryNode & | consoleDir () const |
Access interface console directory. More... | |
console::DirectoryNode & | statisticsDir () const |
Access the interface statistics directory. More... | |
template<class Stat > | |
senf::Statistics & | registerStatistics (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... | |
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< EthernetPacket > | output |
Public Attributes inherited from senf::emu::Transmitter | |
ppi::connector::PassiveInputJack< EthernetPacket > | input |
Hardware Ethernet Interface.
This class adapts a real, hardware based Ethernet interface into the NetEmu interface API.
Definition at line 40 of file HardwareEthernetInterface.hh.
typedef TypedInterfaceDecorator< HardwareEthernetInterface, Interface::Decorator> senf::emu::HardwareEthernetInterface::Decorator |
Definition at line 47 of file HardwareEthernetInterface.hh.
senf::emu::HardwareEthernetInterface::HardwareEthernetInterface | ( | std::string const & | name | ) |
Definition at line 141 of file HardwareEthernetInterface.cc.
|
virtual |
Definition at line 204 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::dumpMmapStats | ( | std::ostream & | os | ) |
Definition at line 486 of file HardwareEthernetInterface.cc.
EthernetController& senf::emu::HardwareEthernetInterface::ethController | ( | ) |
bool senf::emu::HardwareEthernetInterface::isDead | ( | ) | const |
Definition at line 499 of file HardwareEthernetInterface.cc.
unsigned senf::emu::HardwareEthernetInterface::maxBurst | ( | ) | const |
Definition at line 475 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::maxBurst | ( | unsigned | maxBurst | ) |
Definition at line 481 of file HardwareEthernetInterface.cc.
VLanId const& senf::emu::HardwareEthernetInterface::pvid | ( | ) | const |
bool senf::emu::HardwareEthernetInterface::pvid | ( | VLanId const & | p, |
bool | accessMode | ||
) |
Definition at line 424 of file HardwareEthernetInterface.cc.
unsigned senf::emu::HardwareEthernetInterface::qlen | ( | ) | const |
Definition at line 446 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::qlen | ( | unsigned | qlen | ) |
Definition at line 452 of file HardwareEthernetInterface.cc.
unsigned senf::emu::HardwareEthernetInterface::rcvBuf | ( | ) |
Definition at line 418 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::rcvBuf | ( | unsigned | rcvbuf | ) |
Definition at line 411 of file HardwareEthernetInterface.cc.
std::pair< unsigned, unsigned > senf::emu::HardwareEthernetInterface::rxDropped | ( | ) |
Definition at line 465 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::setREDFilterCallbackRx | ( | senf::ppi::REDFilterCallback const & | cb | ) |
void senf::emu::HardwareEthernetInterface::setREDFilterCallbackTx | ( | senf::ppi::REDFilterCallback const & | cb | ) |
unsigned senf::emu::HardwareEthernetInterface::sndBuf | ( | ) |
Definition at line 405 of file HardwareEthernetInterface.cc.
void senf::emu::HardwareEthernetInterface::sndBuf | ( | unsigned | sndbuf | ) |
Definition at line 398 of file HardwareEthernetInterface.cc.
std::tuple< unsigned, unsigned, unsigned > senf::emu::HardwareEthernetInterface::txDropped | ( | ) |
Definition at line 470 of file HardwareEthernetInterface.cc.
|
overridevirtual |
Implements senf::emu::Interface.
Definition at line 211 of file HardwareEthernetInterface.cc.
|
overrideprotectedvirtual |
Called to disable interface.
Implements senf::emu::Interface.
Definition at line 308 of file HardwareEthernetInterface.cc.
|
overrideprotectedvirtual |
Called to enable interface.
Implements senf::emu::Interface.
Definition at line 287 of file HardwareEthernetInterface.cc.
|
overrideprotectedvirtual |
Called to get interface MTU.
Implements senf::emu::Transmitter.
Definition at line 363 of file HardwareEthernetInterface.cc.
|
overrideprotectedvirtual |
Called to set interface MTU.
Implements senf::emu::Transmitter.
Definition at line 369 of file HardwareEthernetInterface.cc.
std::uint32_t senf::emu::HardwareEthernetInterface::vlanMismatchRx | ( | ) |
Definition at line 436 of file HardwareEthernetInterface.cc.
std::uint32_t senf::emu::HardwareEthernetInterface::vlanMismatchTx | ( | ) |
Definition at line 441 of file HardwareEthernetInterface.cc.