Subject: dumb fix for Decstation if_le.c and Berkeley Packet Filter
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 05/24/1995 18:36:32
The following makes BPF and tcpdump work (again or finally?), tho'
personally I'm tempted to replace pmax/dev/if_le.c with the Alpha
driver and some `millicode' to copy to/from the funky DMA-padded
Decstation buffers.
I've tested it on a 5k/240 and 200 it works for me.
I can't get to sun-lamp right now or I'd commit this.
*** if_le.c.DIST Wed May 3 03:05:19 1995
--- if_le.c Wed May 24 17:56:04 1995
***************
*** 767,773 ****
--- 767,780 ----
* If so, hand off the raw packet to enet.
*/
if (le->sc_if.if_bpf) {
+ M_PREPEND(m, sizeof(struct ether_header), M_DONTWAIT);
+ if (m == 0)
+ return;
+ bcopy(&et, mtod(m, void *), sizeof(struct ether_header));
+
bpf_mtap(le->sc_if.if_bpf, m);
+
+ m_adj(m, sizeof(struct ether_header));
/*
* Keep the packet if it's a broadcast or has our