Sets the MAC address of the device to 'mac'.
            parameter 'mac' should be a binary representation
            of the MAC address
            Note: Will fail for TUN devices

def set_mac(self, mac):
        """ Sets the MAC address of the device to 'mac'.
            parameter 'mac' should be a binary representation
            of the MAC address
            Note: Will fail for TUN devices
        """
        mac = map(ord, mac)
        ifreq = struct.pack('16sH6B8', self.name, socket.AF_UNIX, *mac)
        fcntl.ioctl(self.fileno(), self.SIOCSIFHWADDR, ifreq)