patches and low-level development discussion
 help / color / mirror / code / Atom feed
9bbfb78d79268c4f4ef2c1f53b73090d9ae6c210 blob 2149 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
 
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Copyright 2019 Alyssa Ross
.\"
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
.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 9bbfb78 ...
found 9bbfb78 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).