aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/if_tun
Commit message (Collapse)AuthorAgeFilesLines
* tun/tap: merge and rename to `tuntap`Kyle Evans2019-05-081-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=347241
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-041-1/+1
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* Move most of the 15 variations on generating opt_inet.h andWarner Losh2014-08-041-8/+0
| | | | | | | | | opt_inet6.h into kmod.mk by forcing almost everybody to eat the same dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h targets here too. Notes: svn path=/head/; revision=269540
* Remove AppleTalk support.Gleb Smirnoff2014-03-141-4/+1
| | | | | | | | | | | | | AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary networking protocol is TCP/IP. The last Mac OS X release to support AppleTalk happened in 2009. The same year routing equipment vendors (namely Cisco) end their support. Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE. Notes: svn path=/head/; revision=263152
* Remove IPX support.Gleb Smirnoff2014-03-141-4/+1
| | | | | | | | | | | | | | IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998. Later, in this century the Novell Open Enterprise Server became successor of Novell NetWare. The last release that claimed to still support IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco) discontinued support for IPX in 2011. Thus, IPX won't be supported in FreeBSD 11.0-RELEASE. Notes: svn path=/head/; revision=263140
* Remove opt_mac.h generation for various kernel modules that no longerRobert Watson2009-06-061-1/+1
| | | | | | | | | require it. Submitted by: pjd Notes: svn path=/head/; revision=193588
* Let modules use the kernel's opt_*.h files if built along withYaroslav Tykhiy2005-10-141-0/+2
| | | | | | | | | | | | | | | | | the kernel by wrapping all targets for fake opt_*.h files in .if defined(KERNBUILDDIR). Thus, such fake files won't be created at all if modules are built with the kernel. Some modules undergo cleanup like removing unused or unneeded options or .h files, without which they wouldn't build this way or the other. Reviewed by: ru Tested by: no binary changes in modules built alone Tested on: i386 sparc64 amd64 Notes: svn path=/head/; revision=151350
* We don't need to generate vnode_if.h anymoreWarner Losh2004-12-291-2/+1
| | | | Notes: svn path=/head/; revision=139399
* Fix module build by adding options to Makefile.Jonathan Lemon2003-03-081-1/+11
| | | | Notes: svn path=/head/; revision=112008
* The ppp and tunnel modules now rely on opt_mac.h. Missed in a previousRobert Watson2002-07-311-1/+1
| | | | | | | | | commit. Submitted by: Anders Andersson <anders@hack.org> Notes: svn path=/head/; revision=101113
* Drop <bsd.man.mk> support from <bsd.kmod.mk>.Ruslan Ermilov2002-01-111-1/+0
| | | | | | | Not objected to by: -current Notes: svn path=/head/; revision=89260
* Use a consistent style and one much closer to the rest of /usr/srcDavid E. O'Brien2001-01-061-1/+2
| | | | Notes: svn path=/head/; revision=70711
* Removed fresh garbage (vestiges of old way of configuring number ofBruce Evans2000-09-261-9/+4
| | | | | | | | | | units), mature garbage (vestiges of old way of configuring bpf) and old garbage (vestiges of old way of configuring INET). Fixed most style bugs. Notes: svn path=/head/; revision=66397
* Avoid the modules madness I inadvertently introduced by making thePoul-Henning Kamp2000-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | cloning infrastructure standard in kern_conf. Modules are now the same with or without devfs support. If you need to detect if devfs is present, in modules or elsewhere, check the integer variable "devfs_present". This happily removes an ugly hack from kern/vfs_conf.c. This forces a rename of the eventhandler and the standard clone helper function. Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include like <sys/queue.h> Remove all #includes of opt_devfs.h they no longer matter. Notes: svn path=/head/; revision=65374
* Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead ofPeter Wemm2000-05-271-1/+1
| | | | | | | encoding the relative path. Notes: svn path=/head/; revision=60966
* Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.Peter Wemm2000-05-041-1/+1
| | | | | | | | | | This means that the kernel can be totally self contained now and is not dependent on the last buildworld to update /usr/share/mk. This might also make it easier to build 5.x kernels on 4.0 boxes etc, assuming gensetdefs and config(8) are updated. Notes: svn path=/head/; revision=59951
* Restore to version 1.14. Only opt_inet.h is required again.Brian Somers2000-01-291-21/+1
| | | | Notes: svn path=/head/; revision=56778
* Don't use ATM on the alpha - it #errors out.Brian Somers2000-01-261-1/+5
| | | | | | | Pointed out by: jdp Notes: svn path=/head/; revision=56622
* Move the *intrq variables into net/intrq.c and unconditionallyBrian Somers2000-01-241-7/+13
| | | | | | | | | | | | | | include this in all kernels. Declare some const *intrq_present variables that can be checked by a module prior to using *intrq to queue data. Make the if_tun module capable of processing atm, ip, ip6, ipx, natm and netatalk packets when TUNSIFHEAD is ioctl()d on. Review not required by: freebsd-hackers Notes: svn path=/head/; revision=56555
* Hmm, don't compile in INET6, IPX or NETATALK support for theBrian Somers2000-01-231-3/+3
| | | | | | | | moment :-( I think we need some sort of stub variable and a ``is this queue available'' flag. Notes: svn path=/head/; revision=56436
* Support INET6, NETATALK and IPX as well as INET.Brian Somers2000-01-231-1/+11
| | | | Notes: svn path=/head/; revision=56411
* Removed special rules for building and cleaning device interface filesBruce Evans1999-11-281-5/+0
| | | | | | | | and empty options files. The rules are now generated automatically in bsd.kmod.mk. Cleaned up related things ($S and ${CLEANFILES}). Notes: svn path=/head/; revision=53846
* Zap some unused echo "#define NFOO 1" > foo.h style defunct stuff.Peter Wemm1999-09-271-5/+2
| | | | Notes: svn path=/head/; revision=51712
* Don't generate 'bpf.h' since it's not used.Peter Wemm1999-09-271-5/+2
| | | | Notes: svn path=/head/; revision=51704
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Rename bpfilter to bpf.Dag-Erling Smørgrav1999-07-061-6/+6
| | | | Notes: svn path=/head/; revision=48645
* Allow loadable interface drivers with BPF support to be loaded into a kernelMike Smith1999-04-281-2/+2
| | | | | | | | | | | that doesn't have it. This is achieved by having minimal do-nothing stubs enabled when there are no bpfilter devices configured. Driver modules should be built with BPF enabled for maximum convenience (but can be built without it for maximum performance). Notes: svn path=/head/; revision=46130
* Undo #undef KERNEL hack for vnode.h to avoid vnode_if.h.Peter Wemm1999-01-171-2/+3
| | | | | | | | | | | | XXX It probably makes sense to have a flag for bsd.kern.mk to avoid these rules. XXX IO_NDELAY seems to be the main reason for it, when used in a cdevsw read or write "flag" context. Perhaps a redundant declaration somewhere like sys/conf.h might help remove the need for vnode.h in these device drivers in the first place. Notes: svn path=/head/; revision=42769
* Sample initial set of kld-ified modules. Not all have been completelyPeter Wemm1998-10-161-4/+3
| | | | | | | | | | converted yet. These are more of a starting point. This is NOT connected to the parent Makefile. OK'ed by jkh (who is ever so patiently waiting) Notes: svn path=/head/; revision=40440
* Don't put "-I." in ${CFLAGS} here. bsd.kmod.mk now puts an absoluteBruce Evans1998-02-011-2/+1
| | | | | | | | path to the obj directory in ${CFLAGS}. This is actually equivalent to "-I." since bsd.kmod.mk also puts -I- in ${CFLAGS}. Notes: svn path=/head/; revision=32990
* LKM-support for converting all file-system options to new-style options.Eivind Eklund1998-01-241-3/+6
| | | | Notes: svn path=/head/; revision=32725
* Make the LKMs compile with the INET option as a newstyle option inEivind Eklund1998-01-081-4/+6
| | | | | | | opt_inet.h. Notes: svn path=/head/; revision=32352
* Revert $FreeBSD$ back to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22982
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* The discard, tunnel, SLIP, and PPP network interface pseudo-devicesGarrett Wollman1995-03-201-0/+23
are now dynamically loadable. It doesn't make sense to do the same for the loopback. Notes: svn path=/head/; revision=7194