summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tapvar.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-21 20:29:52 +0000
committerphk <phk@FreeBSD.org>2004-02-21 20:29:52 +0000
commit32b7c9a433930842533064d829ba214aadf6a67d (patch)
treec97716bebd5c7c784bf841850192a5addeaf0347 /sys/net/if_tapvar.h
parentdf397dedeab80f98300da9e5999d17a57c01b19f (diff)
downloadFreeBSD-src-32b7c9a433930842533064d829ba214aadf6a67d.zip
FreeBSD-src-32b7c9a433930842533064d829ba214aadf6a67d.tar.gz
Device megapatch 2/6:
This commit adds a couple of functions for pseudodrivers to use for implementing cloning in a manner we will be able to lock down (shortly). Basically what happens is that pseudo drivers get a way to ask for "give me the dev_t with this unit number" or alternatively "give me a dev_t with the lowest guaranteed free unit number" (there is unfortunately a lot of non-POLA in the exact numeric value of this number, just live with it for now) Managing the unit number space this way removes the need to use rman(9) to do so in the drivers this greatly simplifies the code in the drivers because even using rman(9) they still needed to manage their dev_t's anyway. I have taken the if_tun, if_tap, snp and nmdm drivers through the mill, partly because they (ab)used makedev(), but mostly because together they represent three different problems for device-cloning: if_tun and snp is the plain case: just give me a device. if_tap has two kinds of devices, with a flag for device type. nmdm has paired devices (ala pty) can you can clone either of them.
Diffstat (limited to 'sys/net/if_tapvar.h')
-rw-r--r--sys/net/if_tapvar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_tapvar.h b/sys/net/if_tapvar.h
index 06e3bbdf..ae6c3cd 100644
--- a/sys/net/if_tapvar.h
+++ b/sys/net/if_tapvar.h
@@ -61,6 +61,7 @@ struct tap_softc {
struct selinfo tap_rsel; /* read select */
SLIST_ENTRY(tap_softc) tap_next; /* next device in chain */
+ dev_t tap_dev;
};
#endif /* !_NET_IF_TAPVAR_H_ */
OpenPOWER on IntegriCloud