diff options
author | kjc <kjc@FreeBSD.org> | 1998-07-29 05:35:16 +0000 |
---|---|---|
committer | kjc <kjc@FreeBSD.org> | 1998-07-29 05:35:16 +0000 |
commit | bd9e5f5f5b5ac9cb1bcfd4be4ac99ce4fd518e15 (patch) | |
tree | 62f7c8492d4fd7faf52a9a0f3a13e97ae83bed96 /sys/net/bpf.c | |
parent | 50f3429a4832d3eeb70ad7d19a88c51c7021c04c (diff) | |
download | FreeBSD-src-bd9e5f5f5b5ac9cb1bcfd4be4ac99ce4fd518e15.zip FreeBSD-src-bd9e5f5f5b5ac9cb1bcfd4be4ac99ce4fd518e15.tar.gz |
update ATM driver. (base version: midway.c 1.67 --> 1.68)
several new features are added:
- support vc/vp shaping
- support pvc shadow interface
code cleanup:
- remove WMAYBE related code. ENI WMAYBE DMA doen't work.
- remove updating if_lastchange for every packet.
- BPF related code is moved to midway.c as it should be.
(bpfwrite should work if atm_pseudohdr and LLC/SNAP are
prepended.)
- BPF link type is changed to DLT_ATM_RFC1483.
BPF now understands only LLC/SNAP!! (because bpf can't
handle variable link header length.)
It is recommended to use LLC/SNAP instead of NULL
encapsulation for various reasons. (BPF, IPv6,
interoperability, etc.)
the code has been used for months in ALTQ and KAME IPv6.
OKed by phk long time ago.
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 136edf0..c65bbff 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.38 1998/02/20 13:46:57 bde Exp $ + * $Id: bpf.c,v 1.39 1998/06/07 17:12:01 dfr Exp $ */ #include "bpfilter.h" @@ -197,6 +197,18 @@ bpf_movein(uio, linktype, mp, sockp, datlen) hlen = 0; break; +#ifdef __FreeBSD__ + case DLT_ATM_RFC1483: + /* + * en atm driver requires 4-byte atm pseudo header. + * though it isn't standard, vpi:vci needs to be + * specified anyway. + */ + sockp->sa_family = AF_UNSPEC; + hlen = 12; /* XXX 4(ATM_PH) + 3(LLC) + 5(SNAP) */ + break; +#endif + default: return (EIO); } |