X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FNetdeviceController.hh;h=cabf6a448743dc2530676cf2afff0053965fec23;hb=6e417a227d417cef20d55af94e2474fbe9c280b8;hp=4f2ced06a11e3d167f18ee90b484d95c74223f4d;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Socket/NetdeviceController.hh b/Socket/NetdeviceController.hh index 4f2ced0..cabf6a4 100644 --- a/Socket/NetdeviceController.hh +++ b/Socket/NetdeviceController.hh @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Thorsten Horstmann // // This program is free software; you can redistribute it and/or modify @@ -41,6 +41,7 @@ namespace senf { /** \brief NetdeviceController \todo document me + \todo Add 'promisc' member to enable/disable promiscuous mode */ class NetdeviceController { @@ -49,16 +50,21 @@ namespace senf { NetdeviceController(int interface_index); virtual ~NetdeviceController(); - MACAddress hardwareAddress(); - std::string interfaceName(); - int interfaceIndex(); ///< return the interface index of the interface - int mtu(); - void mtu(int new_mtu); + int interfaceIndex() const; ///< return the interface index + MACAddress hardwareAddress() const; ///< return hardware address + void hardwareAddress(const MACAddress &newAddress); ///< set hardware address + + std::string interfaceName() const; ///< return interface name + void interfaceName(const std::string &newName) const; ///< set interface name + + int mtu() const; ///< return the Maximum Transmission Unit + void mtu(int new_mtu) const; //< set the Maximum Transmission Unit + private: void openSocket(); - void doIoctl(ifreq& ifr, int request); - void ifrName(ifreq& ifr); + void doIoctl(ifreq& ifr, int request) const; + void ifrName(ifreq& ifr) const; int sockfd_; int ifindex_; };