patches and low-level development discussion
 help / color / mirror / code / Atom feed
0f9aaf884abf5d98520751dff7d87af090683c26 blob 1511 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 
.\" SPDX-FileCopyrightText: 2019 Alyssa Ross <hi@alyssa.is>
.\" SPDX-License-Identifier: GPL-2.0-or-later
.Dd December 15, 2019
.Dt MKTUNTAP 8
.Os Linux
.Sh NAME
.Nm mktuntap
.Nd create and open a TUN or TAP device on a file descriptor, then exec
.Sh SYNOPSIS
.Nm
.Fl ( n | p )
.Op Fl v
.Op Fl B
.Op Fl P
.Op Fl E
.Op Fl i Ar ifr_name
.Ar fd
.Ar prog...
.Sh DESCRIPTION
Create a TUN or TAP device named with format
.Ar ifr_name ,
open it on file descriptor
.Ar fd ,
set the TUNTAP_NAME variable in the environment to the name of the
opened device, and then exec into
.Ar prog .
.Pp
By default, the
.Dv IF_NO_PI
flag is set on the device.
.Pp
The arguments are as follows:
.Bl -tag -width Ds
.It Fl p
Create a TAP device.  Mutually exclusive with
.Fl n .
.It Fl n
Create a TUN device.  Mutually exclusive with
.Fl p .
.It Fl v
Set the
.Dv IFF_VNET_HDR
flag on the device.
.It Fl B
Open the device in nonblocking mode.  See discussion of
.Dv O_NONBLOCK
in
.Xr open 2 .
.It Fl P
Don't set the
.Dv IFF_NO_PI
flag on the device.
.It Fl E
Don't set the
.Ev TUNTAP_NAME
environment variable.  Caution: if you use this without using
.Fl i
to set a static device name, it will be difficult to determine the
device name later.
.It Fl i
Set the name for the device.  If present, the character sequence
.Dq %d
will be replaced with a number to create a unique name.  Default:
.Dq tap%d
or
.Dq tun%d ,
as appropriate.
.El
.Sh EXIT STATUS
.Ex -std
See
.Xr sysexits 3
for further details.
.Sh SEE ALSO
.Xr tunctl 8 ,
.Xr ip 8
debug log:

solving 0f9aaf8 ...
found 0f9aaf8 in https://spectrum-os.org/git/mktuntap

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).