OpenTap(vnet_hdr=True,
virtio_net_queues=1,
name="")
| source code
|
Open a new tap device and return its file descriptor.
This is intended to be used by a qemu-type hypervisor together with
the -net tap,fd=<fd> or -net tap,fds=x:y:...:z command line
parameter.
- Parameters:
vnet_hdr (boolean) - Enable the VNET Header
virtio_net_queues (int) - Set number of tap queues but not more than 8, queues only work
with virtio-net device; disabled by default (one queue).
name (string) - name for the TAP interface being created; if an empty string is
passed, the OS will generate a unique name
- Returns: tuple
- (ifname, [tapfds])
|