Control ethernet interfaces. More...
#include <senf/Ext/NetEmu/Ethernet/EthernetController.hh>

Public Types | |
| enum | Duplex_mode { HALF_DUPLEX, FULL_DUPLEX, UNKNOWN_DUPLEX } |
Public Member Functions | |
| EthernetController (std::string const &interface_name) | |
| EthernetController (int interface_index) | |
| unsigned | speed () const |
| Duplex_mode | duplex () const |
| std::string | duplexAsString () const |
| bool | hasLink () const |
| bool | nWayReset () |
| bool | ringSize (std::uint32_t rx, std::uint32_t tx) |
| std::pair< std::uint32_t, std::uint32_t > | ringSize () |
| bool | setEEE (bool on) |
| bool | getEEE () |
Public Member Functions inherited from senf::NetdeviceController | |
| NetdeviceController (std::string const &interface_name) | |
| NetdeviceController (int interface_index) | |
| void | reset (std::string const &interface_name) |
| int | interfaceIndex () const |
| MACAddress | hardwareAddress () const |
| void | hardwareAddress (MACAddress const &newAddress) |
| std::string | interfaceName () const |
| void | interfaceName (std::string const &newName) |
| int | mtu () const |
| void | mtu (int new_mtu) |
| int | txqueuelen () const |
| void | txqueuelen (int new_mtu) |
| bool | promisc () const |
| void | promisc (bool mode) |
| void | addVLAN (std::uint16_t vlanId) |
| void | delVLAN (std::uint16_t vlanId) |
| void | timestamping (int txType, int rxFilter) |
| bool | isUp () const |
| void | up () |
| void | down () |
Static Public Member Functions | |
| static std::string | duplexAsString (Duplex_mode mode) |
Static Public Member Functions inherited from senf::NetdeviceController | |
| static SockFd::ptr | sockfd () |
| static std::string | macToName (MACAddress const &mac) |
| static MACAddress | readMACAddressFromFile (boost::filesystem::path const &path) |
Additional Inherited Members | |
Protected Member Functions inherited from senf::NetdeviceController | |
| void | ifrName (ifreq &ifr) const |
Protected Attributes inherited from senf::NetdeviceController | |
| SockFd::ptr | sockfd_ |
| int | ifindex_ |
Control ethernet interfaces.
Definition at line 31 of file EthernetController.hh.
| Enumerator | |
|---|---|
| HALF_DUPLEX | |
| FULL_DUPLEX | |
| UNKNOWN_DUPLEX | |
Definition at line 35 of file EthernetController.hh.
|
explicit |
Definition at line 36 of file EthernetController.cc.
|
explicit |
Definition at line 40 of file EthernetController.cc.
| senf::emu::EthernetController::Duplex_mode senf::emu::EthernetController::duplex | ( | ) | const |
Definition at line 56 of file EthernetController.cc.
| std::string senf::emu::EthernetController::duplexAsString | ( | ) | const |
Definition at line 78 of file EthernetController.cc.
|
static |
Definition at line 84 of file EthernetController.cc.
| bool senf::emu::EthernetController::getEEE | ( | ) |
Definition at line 153 of file EthernetController.cc.
| bool senf::emu::EthernetController::hasLink | ( | ) | const |
Definition at line 91 of file EthernetController.cc.
| bool senf::emu::EthernetController::nWayReset | ( | ) |
Definition at line 103 of file EthernetController.cc.
| bool senf::emu::EthernetController::ringSize | ( | std::uint32_t | rx, |
| std::uint32_t | tx | ||
| ) |
Definition at line 114 of file EthernetController.cc.
| std::pair< std::uint32_t, std::uint32_t > senf::emu::EthernetController::ringSize | ( | ) |
Definition at line 128 of file EthernetController.cc.
| bool senf::emu::EthernetController::setEEE | ( | bool | on | ) |
Definition at line 140 of file EthernetController.cc.
| unsigned senf::emu::EthernetController::speed | ( | ) | const |
Definition at line 44 of file EthernetController.cc.