X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FNetdeviceController.hh;h=bf224efde1e5a191efa4de86d05b35b62410f52f;hb=8d2a1b34ab80d96c9592d55f56effad26ef4f930;hp=50f878f6ed58ec800d76bad28c59252edccdd485;hpb=ea2f773d1bf79ff787f2c68766ecd154bd9f3631;p=senf.git diff --git a/Socket/NetdeviceController.hh b/Socket/NetdeviceController.hh index 50f878f..bf224ef 100644 --- a/Socket/NetdeviceController.hh +++ b/Socket/NetdeviceController.hh @@ -1,4 +1,4 @@ -// $Id: AddressingPolicy.hh 296 2007-07-10 20:39:34Z g0dil $ +// $Id$ // // Copyright (C) 2007 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) @@ -29,8 +29,10 @@ // Custom includes #include +#include #include "Protocols/Raw/MACAddress.hh" + //#include "NetdeviceController.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -43,15 +45,22 @@ namespace senf { class NetdeviceController { public: - NetdeviceController(std::string const interface_name); - + NetdeviceController(std::string const & interface_name); + NetdeviceController(int interface_index); virtual ~NetdeviceController(); MACAddress hardwareAddress(); + std::string interfaceName(); + int interfaceIndex(); + int mtu(); + void mtu(int new_mtu); private: + void openSocket(); + void doIoctl(ifreq& ifr, int request); + void set_ifr_name(ifreq& ifr); int sockfd_; - std::string interfacename_; + int ifindex_; }; }