summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c18
-rw-r--r--sys/net/if.c8
-rw-r--r--sys/net/if_sl.c4
-rw-r--r--sys/net/if_tap.c20
-rw-r--r--sys/net/if_tapvar.h2
-rw-r--r--sys/net/if_tun.c26
-rw-r--r--sys/net/if_var.h2
-rw-r--r--sys/net/ppp_tty.c4
8 files changed, 42 insertions, 42 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 8bb0fe5..4b3cf45 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -319,7 +319,7 @@ bpf_detachd(d)
/* ARGSUSED */
static int
bpfopen(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -364,7 +364,7 @@ bpfopen(dev, flags, fmt, td)
/* ARGSUSED */
static int
bpfclose(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -408,7 +408,7 @@ bpfclose(dev, flags, fmt, td)
*/
static int
bpfread(dev, uio, ioflag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int ioflag;
{
@@ -545,7 +545,7 @@ bpf_timed_out(arg)
static int
bpfwrite(dev, uio, ioflag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int ioflag;
{
@@ -633,7 +633,7 @@ reset_d(d)
/* ARGSUSED */
static int
bpfioctl(dev, cmd, addr, flags, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t addr;
int flags;
@@ -1043,7 +1043,7 @@ bpf_setif(d, ifr)
*/
static int
bpfpoll(dev, events, td)
- dev_t dev;
+ struct cdev *dev;
int events;
struct thread *td;
{
@@ -1079,7 +1079,7 @@ bpfpoll(dev, events, td)
*/
int
bpfkqfilter(dev, kn)
- dev_t dev;
+ struct cdev *dev;
struct knote *kn;
{
struct bpf_d *d = (struct bpf_d *)dev->si_drv1;
@@ -1567,14 +1567,14 @@ bpf_setdlt(d, dlt)
static void bpf_drvinit(void *unused);
-static void bpf_clone(void *arg, char *name, int namelen, dev_t *dev);
+static void bpf_clone(void *arg, char *name, int namelen, struct cdev **dev);
static void
bpf_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
- dev_t *dev;
+ struct cdev **dev;
{
int u;
diff --git a/sys/net/if.c b/sys/net/if.c
index 7942065..2b3805e 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -144,19 +144,19 @@ static struct cdevsw net_cdevsw = {
};
static int
-netopen(dev_t dev, int flag, int mode, struct thread *td)
+netopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
return (0);
}
static int
-netclose(dev_t dev, int flags, int fmt, struct thread *td)
+netclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
return (0);
}
static int
-netioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+netioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct ifnet *ifp;
int error, idx;
@@ -185,7 +185,7 @@ netioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
}
static int
-netkqfilter(dev_t dev, struct knote *kn)
+netkqfilter(struct cdev *dev, struct knote *kn)
{
struct klist *klist;
struct ifnet *ifp;
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 5037742..c05ecd0 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -179,7 +179,7 @@ static l_close_t slclose;
static l_rint_t slinput;
static l_ioctl_t sltioctl;
static int slioctl(struct ifnet *, u_long, caddr_t);
-static int slopen(dev_t, struct tty *);
+static int slopen(struct cdev *, struct tty *);
static int sloutput(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
static int slstart(struct tty *);
@@ -340,7 +340,7 @@ slcreate()
/* ARGSUSED */
static int
slopen(dev, tp)
- dev_t dev;
+ struct cdev *dev;
register struct tty *tp;
{
register struct sl_softc *sc;
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index a9ea725..7f2f856 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -81,8 +81,8 @@
static int tapmodevent(module_t, int, void *);
/* device */
-static void tapclone(void *, char *, int, dev_t *);
-static void tapcreate(dev_t);
+static void tapclone(void *, char *, int, struct cdev **);
+static void tapcreate(struct cdev *);
/* network interface */
static void tapifstart(struct ifnet *);
@@ -222,7 +222,7 @@ tapclone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
- dev_t *dev;
+ struct cdev **dev;
{
u_int extra;
int i, unit;
@@ -264,7 +264,7 @@ tapclone(arg, name, namelen, dev)
*/
static void
tapcreate(dev)
- dev_t dev;
+ struct cdev *dev;
{
struct ifnet *ifp = NULL;
struct tap_softc *tp = NULL;
@@ -334,7 +334,7 @@ tapcreate(dev)
*/
static int
tapopen(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -384,7 +384,7 @@ tapopen(dev, flag, mode, td)
*/
static int
tapclose(dev, foo, bar, td)
- dev_t dev;
+ struct cdev *dev;
int foo;
int bar;
struct thread *td;
@@ -588,7 +588,7 @@ tapifstart(ifp)
*/
static int
tapioctl(dev, cmd, data, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t data;
int flag;
@@ -712,7 +712,7 @@ tapioctl(dev, cmd, data, flag, td)
*/
static int
tapread(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -786,7 +786,7 @@ tapread(dev, uio, flag)
*/
static int
tapwrite(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -858,7 +858,7 @@ tapwrite(dev, uio, flag)
*/
static int
tappoll(dev, events, td)
- dev_t dev;
+ struct cdev *dev;
int events;
struct thread *td;
{
diff --git a/sys/net/if_tapvar.h b/sys/net/if_tapvar.h
index acd4528..512a33d 100644
--- a/sys/net/if_tapvar.h
+++ b/sys/net/if_tapvar.h
@@ -63,7 +63,7 @@ struct tap_softc {
struct selinfo tap_rsel; /* read select */
SLIST_ENTRY(tap_softc) tap_next; /* next device in chain */
- dev_t tap_dev;
+ struct cdev *tap_dev;
struct mtx tap_mtx; /* per-softc mutex */
};
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 90eafeb..975b1c0 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -62,7 +62,7 @@
*/
struct tun_softc {
TAILQ_ENTRY(tun_softc) tun_list;
- dev_t tun_dev;
+ struct cdev *tun_dev;
u_short tun_flags; /* misc flags */
#define TUN_OPEN 0x0001
#define TUN_INITED 0x0002
@@ -105,8 +105,8 @@ static struct clonedevs *tunclones;
static TAILQ_HEAD(,tun_softc) tunhead = TAILQ_HEAD_INITIALIZER(tunhead);
SYSCTL_INT(_debug, OID_AUTO, if_tun_debug, CTLFLAG_RW, &tundebug, 0, "");
-static void tunclone(void *arg, char *name, int namelen, dev_t *dev);
-static void tuncreate(dev_t dev);
+static void tunclone(void *arg, char *name, int namelen, struct cdev **dev);
+static void tuncreate(struct cdev *dev);
static int tunifioctl(struct ifnet *, u_long, caddr_t);
static int tuninit(struct ifnet *);
static int tunmodevent(module_t, int, void *);
@@ -134,7 +134,7 @@ static struct cdevsw tun_cdevsw = {
};
static void
-tunclone(void *arg, char *name, int namelen, dev_t *dev)
+tunclone(void *arg, char *name, int namelen, struct cdev **dev)
{
int u, i;
@@ -151,7 +151,7 @@ tunclone(void *arg, char *name, int namelen, dev_t *dev)
/* find any existing device, or allocate new unit number */
i = clone_create(&tunclones, &tun_cdevsw, &u, dev, 0);
if (i) {
- /* No preexisting dev_t, create one */
+ /* No preexisting struct cdev *, create one */
*dev = make_dev(&tun_cdevsw, unit2minor(u),
UID_UUCP, GID_DIALER, 0600, "tun%d", u);
if (*dev != NULL)
@@ -162,7 +162,7 @@ tunclone(void *arg, char *name, int namelen, dev_t *dev)
static void
tun_destroy(struct tun_softc *tp)
{
- dev_t dev;
+ struct cdev *dev;
/* Unlocked read. */
KASSERT((tp->tun_flags & TUN_OPEN) == 0,
@@ -235,7 +235,7 @@ tunstart(struct ifnet *ifp)
}
static void
-tuncreate(dev_t dev)
+tuncreate(struct cdev *dev)
{
struct tun_softc *sc;
struct ifnet *ifp;
@@ -266,7 +266,7 @@ tuncreate(dev_t dev)
}
static int
-tunopen(dev_t dev, int flag, int mode, struct thread *td)
+tunopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct ifnet *ifp;
struct tun_softc *tp;
@@ -307,7 +307,7 @@ tunopen(dev_t dev, int flag, int mode, struct thread *td)
* routing info
*/
static int
-tunclose(dev_t dev, int foo, int bar, struct thread *td)
+tunclose(struct cdev *dev, int foo, int bar, struct thread *td)
{
struct tun_softc *tp;
struct ifnet *ifp;
@@ -535,7 +535,7 @@ tunoutput(
* the cdevsw interface is now pretty minimal.
*/
static int
-tunioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int s;
int error;
@@ -658,7 +658,7 @@ tunioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
* least as much of a packet as can be read.
*/
static int
-tunread(dev_t dev, struct uio *uio, int flag)
+tunread(struct cdev *dev, struct uio *uio, int flag)
{
struct tun_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tun_if;
@@ -714,7 +714,7 @@ tunread(dev_t dev, struct uio *uio, int flag)
* the cdevsw write interface - an atomic write is a packet - or else!
*/
static int
-tunwrite(dev_t dev, struct uio *uio, int flag)
+tunwrite(struct cdev *dev, struct uio *uio, int flag)
{
struct tun_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tun_if;
@@ -829,7 +829,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
* anyway, it either accepts the packet or drops it.
*/
static int
-tunpoll(dev_t dev, int events, struct thread *td)
+tunpoll(struct cdev *dev, int events, struct thread *td)
{
int s;
struct tun_softc *tp = dev->si_drv1;
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 68cebe6..9fd82c7 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -643,7 +643,7 @@ extern struct mtx ifnet_lock;
struct ifindex_entry {
struct ifnet *ife_ifnet;
struct ifaddr *ife_ifnet_addr;
- dev_t ife_dev;
+ struct cdev *ife_dev;
};
#define ifnet_byindex(idx) ifindex_table[(idx)].ife_ifnet
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 135ddeb..0270acb 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -93,7 +93,7 @@
#include <net/if_ppp.h>
#include <net/if_pppvar.h>
-static int pppopen(dev_t dev, struct tty *tp);
+static int pppopen(struct cdev *dev, struct tty *tp);
static int pppclose(struct tty *tp, int flag);
static int pppread(struct tty *tp, struct uio *uio, int flag);
static int pppwrite(struct tty *tp, struct uio *uio, int flag);
@@ -173,7 +173,7 @@ pppasyncdetach()
/* ARGSUSED */
static int
pppopen(dev, tp)
- dev_t dev;
+ struct cdev *dev;
register struct tty *tp;
{
struct thread *td = curthread; /* XXX */
OpenPOWER on IntegriCloud