added more meaningful exception text
[senf.git] / Socket / NetdeviceController.hh
index 757aac5..dbc5ce6 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Thorsten Horstmann <tho@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -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,16 @@ namespace senf {
         NetdeviceController(int interface_index);
         virtual ~NetdeviceController();
         
-        MACAddress hardwareAddress();
-        std::string interfaceName();
-        int interfaceIndex();
-        int mtu();
-        void mtu(int new_mtu);
+        MACAddress hardwareAddress() const;
+        std::string interfaceName() const;
+        int interfaceIndex() const; ///< return the interface index of the interface
+        int mtu() const;
+        void mtu(int new_mtu) const;
     
     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_;
     };