Packets: Fix VariantParser invalid parser access bug
[senf.git] / Socket / NetdeviceController.hh
index 1db8655..56afdac 100644 (file)
@@ -24,8 +24,8 @@
     \brief NetdeviceController public header
  */
 
-#ifndef HH_NetdeviceController_
-#define HH_NetdeviceController_ 1
+#ifndef HH_SENF_Socket_NetdeviceController_
+#define HH_SENF_Socket_NetdeviceController_ 1
 
 // Custom includes
 #include <string>
@@ -50,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_;
     };