Kyle Evans 251a32b5b2 tun/tap: merge and rename to tuntap
tun(4) and tap(4) share the same general management interface and have a lot
in common. Bugs exist in tap(4) that have been fixed in tun(4), and
vice-versa. Let's reduce the maintenance requirements by merging them
together and using flags to differentiate between the three interface types
(tun, tap, vmnet).

This fixes a couple of tap(4)/vmnet(4) issues right out of the gate:
- tap devices may no longer be destroyed while they're open [0]
- VIMAGE issues already addressed in tun by kp

[0] emaste had removed an easy-panic-button in r240938 due to devdrn
blocking. A naive glance over this leads me to believe that this isn't quite
complete -- destroy_devl will only block while executing d_* functions, but
doesn't block the device from being destroyed while a process has it open.
The latter is the intent of the condvar in tun, so this is "fixed" (for
certain definitions of the word -- it wasn't really broken in tap, it just
wasn't quite ideal).

ifconfig(8) also grew the ability to map an interface name to a kld, so
that `ifconfig {tun,tap}0` can continue to autoload the correct module, and
`ifconfig vmnet0 create` will now autoload the correct module. This is a
low overhead addition.

(MFC commentary)

This may get MFC'd if many bugs in tun(4)/tap(4) are discovered after this,
and how critical they are. Changes after this are likely easily MFC'd
without taking this merge, but the merge will be easier.

I have no plans to do this MFC as of now.

Reviewed by:	bcr (manpages), tuexen (testing, syzkaller/packetdrill)
Input also from:	melifaro
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D20044
2019-05-08 02:32:11 +00:00
..
2018-07-07 15:55:52 +00:00
2018-05-24 17:06:00 +00:00
2018-01-12 12:14:14 +00:00
2018-11-01 23:11:47 +00:00
2018-04-07 19:29:19 +00:00
2018-07-17 23:23:45 +00:00
2019-02-15 03:46:39 +00:00
2019-03-28 08:59:11 +00:00
2017-12-30 11:42:49 +00:00
2019-03-01 04:17:43 +00:00
2018-01-07 20:28:17 +00:00
2019-03-28 08:30:45 +00:00
2019-03-28 08:30:45 +00:00
2018-08-01 08:24:34 +00:00
2019-03-28 08:59:11 +00:00
2017-04-03 03:07:48 +00:00
2017-05-18 06:13:29 +00:00
2017-12-20 18:15:06 +00:00
2017-12-20 18:15:06 +00:00
2017-11-21 09:08:27 +00:00
2017-11-13 10:49:18 +00:00
2018-12-05 14:11:20 +00:00
2018-12-05 14:11:20 +00:00
2018-12-05 14:11:20 +00:00
2017-06-09 12:06:22 +00:00
2019-03-28 08:59:11 +00:00
2017-08-21 20:27:45 +00:00
2018-11-28 13:53:43 +00:00
2018-01-12 12:14:14 +00:00
2018-01-12 12:14:14 +00:00
2018-07-20 17:46:55 +00:00
2017-05-09 05:22:51 +00:00
2019-03-28 08:59:11 +00:00
2018-08-05 11:14:13 +00:00
2018-07-03 21:02:25 +00:00
2019-02-26 19:55:03 +00:00
2018-08-21 03:45:09 +00:00
2019-05-08 02:32:11 +00:00