summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tunvar.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-06-01 15:51:10 +0000
committerbrian <brian@FreeBSD.org>2001-06-01 15:51:10 +0000
commit18d829816a2677997213825136db215b5be7a1a1 (patch)
tree466c3b3f2d7f7a36065d5d8fe16c67d474765e67 /sys/net/if_tunvar.h
parente1e34d59e0508cd55b20f59a9671fadd3f070092 (diff)
downloadFreeBSD-src-18d829816a2677997213825136db215b5be7a1a1.zip
FreeBSD-src-18d829816a2677997213825136db215b5be7a1a1.tar.gz
Support /dev/tun cloning. Ansify if_tun.c while I'm there.
Only tun0 -> tun32767 may now be opened as struct ifnet's if_unit is a short. It's now possible to open /dev/tun and get a handle back for an available tun device (use devname to find out what you got). The implementation uses rman by popular demand (and against my judgement) to track opened devices and uses the new dev_depends() to ensure that all make_dev()d devices go away before the module is unloaded. Reviewed by: phk
Diffstat (limited to 'sys/net/if_tunvar.h')
-rw-r--r--sys/net/if_tunvar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_tunvar.h b/sys/net/if_tunvar.h
index e5583f0..d49213f 100644
--- a/sys/net/if_tunvar.h
+++ b/sys/net/if_tunvar.h
@@ -50,6 +50,7 @@ struct tun_softc {
struct selinfo tun_wsel; /* write select (not used) */
struct tun_softc *next; /* Next softc in list */
+ struct resource *r_unit; /* resource allocated for this unit */
};
#endif /* !_NET_IF_TUNVAR_H_ */
OpenPOWER on IntegriCloud