Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA5748 ; Fri, 01 Jan 93 01:54:41 EST Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!hal.gnu.ai.mit.edu!mycroft From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum) Newsgroups: comp.unix.bsd Subject: Re: [386BSD] NE/2000 and packet filter Date: 30 Dec 1992 12:15:39 GMT Organization: /etc/organization Lines: 64 Distribution: world Message-ID: <1hs3tbINNjcn@life.ai.mit.edu> References: <1hs211INNig3@life.ai.mit.edu> NNTP-Posting-Host: hal.gnu.ai.mit.edu A couple more patches: -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<----- *** if_ne.c.~1~ Tue Dec 29 20:35:19 1992 --- if_ne.c Wed Dec 30 07:05:58 1992 *************** *** 124,130 **** --- 124,133 ---- u_char ns_rxend; /* receiver buffer end */ short ns_port; /* i/o port base */ short ns_mode; /* word/byte mode */ + short ns_rcr; + #if NBPFILTER > 0 caddr_t ns_bpf; + #endif } ne_softc[NNE] ; #define ENBUFSIZE (sizeof(struct ether_header) + ETHERMTU + 2 + ETHER_MIN_LEN) *************** *** 387,396 **** outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG1|DSCM_STOP); outb(nec+ds1_curr, ns->ns_rxstart); outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG0|DSCM_START); ! if (ns->ns_if.if_flags & IFF_PROMISC) ! outb (nec+ds0_rcr, DSRC_AB|DSRC_PRO); ! else ! outb (nec+ds0_rcr, DSRC_AB); outb(nec+ds0_dcr, ns->ns_mode); outb (nec+ds0_imr, 0xff); --- 390,398 ---- outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG1|DSCM_STOP); outb(nec+ds1_curr, ns->ns_rxstart); outb (nec+ds_cmd, DSCM_NODMA|DSCM_PG0|DSCM_START); ! ns->ns_rcr = (ns->ns_if.if_flags & IFF_BROADCAST ? DSRC_AB : 0) | ! (ns->ns_if.if_flags & IFF_PROMISC ? DSRC_PRO : 0); ! outb (nec+ds0_rcr, ns->ns_rcr); outb(nec+ds0_dcr, ns->ns_mode); outb (nec+ds0_imr, 0xff); *************** *** 637,643 **** outb(nec+ds0_tcr, DSTC_LB0); outb(nec+ds0_rcr, DSRC_MON); outb(nec+ds_cmd, DSCM_START|DSCM_NODMA); ! outb(nec+ds0_rcr, DSRC_AB); outb(nec+ds0_tcr, 0); } --- 639,645 ---- outb(nec+ds0_tcr, DSTC_LB0); outb(nec+ds0_rcr, DSRC_MON); outb(nec+ds_cmd, DSCM_START|DSCM_NODMA); ! outb(nec+ds0_rcr, ns->ns_rcr); outb(nec+ds0_tcr, 0); } -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<----- -- \ / Charles Hannum, mycroft@ai.mit.edu /\ \ PGP public key available on request. MIME, AMS, NextMail accepted. Scheme White heterosexual atheist male (WHAM) pride!