code: def set_mac(self, mac):
          
          mac = map(ord, mac)
          ifreq = struct.pack('16sH6B8', self.name, socket.AF_UNIX, *mac)
          fcntl.ioctl(self.fileno(), self.SIOCSIFHWADDR, ifreq)
docs: 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