summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-02-06 18:51:28 +0000
committerwollman <wollman@FreeBSD.org>1996-02-06 18:51:28 +0000
commit25ee6cca2a6483ef8d489b2eb60f0fbe475a32f2 (patch)
treee789decafa3124e34fc14cb210cda149ccb87570 /sys/net/if_tun.c
parent2dfb2421458a36326af35171e59f21fbf98ab24f (diff)
downloadFreeBSD-src-25ee6cca2a6483ef8d489b2eb60f0fbe475a32f2.zip
FreeBSD-src-25ee6cca2a6483ef8d489b2eb60f0fbe475a32f2.tar.gz
Clean up Ethernet drivers:
- fill in and use ifp->if_softc - use if_bpf rather than private cookie variables - change bpf interface to take advantage of this - call ether_ifattach() directly from Ethernet drivers - delete kludge in if_attach() that did this indirectly
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index a9db860..2d92f58 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -137,7 +137,7 @@ tunattach(dummy)
ifp->if_opackets = 0;
if_attach(ifp);
#if NBPFILTER > 0
- bpfattach(&tunctl[i].tun_bpf, ifp, DLT_NULL, sizeof(u_int));
+ bpfattach(ifp, DLT_NULL, sizeof(u_int));
#endif
}
}
@@ -329,7 +329,7 @@ tunoutput(ifp, m0, dst, rt)
m0->m_data += sizeof(int);
}
- if (tp->tun_bpf) {
+ if (ifp->if_bpf) {
/*
* We need to prepend the address family as
* a four byte field. Cons up a dummy header
@@ -344,7 +344,7 @@ tunoutput(ifp, m0, dst, rt)
m.m_len = 4;
m.m_data = (char *)&af;
- bpf_mtap(tp->tun_bpf, &m);
+ bpf_mtap(ifp, &m);
}
#endif
@@ -555,7 +555,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
top->m_pkthdr.rcvif = ifp;
#if NBPFILTER > 0
- if (tunctl[unit].tun_bpf) {
+ if (ifp->if_bpf) {
/*
* We need to prepend the address family as
* a four byte field. Cons up a dummy header
@@ -570,7 +570,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
m.m_len = 4;
m.m_data = (char *)&af;
- bpf_mtap(tunctl[unit].tun_bpf, &m);
+ bpf_mtap(ifp, &m);
}
#endif
OpenPOWER on IntegriCloud