18 #ifndef HH_SENF_Socket_NetdeviceController_ 19 #define HH_SENF_Socket_NetdeviceController_ 1 23 #include <boost/shared_ptr.hpp> 24 #include <boost/filesystem.hpp> 51 void reset(std::string
const & interface_name);
74 void mtu(
int new_mtu);
90 void addVLAN(std::uint16_t vlanId);
93 void delVLAN(std::uint16_t vlanId);
107 typedef boost::shared_ptr<SockFd>
ptr;
119 void ifrName(ifreq & ifr)
const;
int mtu() const
return the Maximum Transmission Unit
static SockFd::ptr sockfd()
void timestamping(int txType, int rxFilter)
configures hw timestamping for RX and/or TX
void addVLAN(std::uint16_t vlanId)
add a VLAN interface
void up()
ifconfig up interface
bool isUp() const
return true if interface is up
void reset(std::string const &interface_name)
reset the ifindex_ from the given iface_name (i.e. after USB Ethernet unplug/plug ...
int txqueuelen() const
return the Tx Queue Length
void ifrName(ifreq &ifr) const
boost::shared_ptr< SockFd > ptr
void down()
ifconfig down interface
bool promisc() const
return true if interface is in promiscuous mode
MACAddress hardwareAddress() const
return hardware address
void delVLAN(std::uint16_t vlanId)
delete a VLAN interface
int interfaceIndex() const
return the interface index
NetdeviceController(std::string const &interface_name)
Construct a new controller for the given interface name.
static MACAddress readMACAddressFromFile(boost::filesystem::path const &path)
std::string interfaceName() const
return interface name
static std::string macToName(MACAddress const &mac)