def __init__(self, name=None, blocking=True):
flags = os.O_RDWR<EOL>if not blocking:<EOL><INDENT>flags |= os.O_NONBLOCK<EOL><DEDENT>self._fileno = os.open("<STR_LIT>", flags)<EOL>if util.PY3:<EOL><INDENT>self.fd = os.fdopen(self._fileno, '<STR_LIT>', buffering=<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>self.fd = os.fdopen(self._fileno, '<STR_LIT>')<EOL><DEDENT>if name is None:<EOL><INDENT>name = b"<STR_LIT>"<EOL><DEDENT>ifreq = struct.pack("<STR_LIT>", name, IFF_TAP | IFF_NO_PI)<EOL>res = fcntl.ioctl(self.fd, TUNSETIFF, ifreq)<EOL>self.name = struct.unpack("<STR_LIT>", res)[<NUM_LIT:0>].strip(b'<STR_LIT:\x00>')<EOL>fcntl.ioctl(self.fd, TUNSETNOCSUM, <NUM_LIT:1>)<EOL>ifconfig.Interface.__init__(self, self.name)<EOL>
If name is None, the kernel will allocate a device name of the form tap#,
        where # is the lowest unused tap device number.