| plan 9 kernel history: overview | file list | diff list |
1993/1120/pc/devether.c (diff list | history)
| 1993/1119/sys/src/9/pc/devether.c:94,99 – 1993/1120/sys/src/9/pc/devether.c:94,139 (short | long | prev | next) | ||
| 1993/1113 | netifwstat(ether[c->dev], c, dp); | |
| 1992/0424 | } | |
| 1993/1120 | void etherrloop(Ether *ctlr, Etherpkt *pkt, long len) { ushort type; Netfile *f, **fp, **ep; type = (pkt->type[0]<<8)|pkt->type[1]; ep = &ctlr->f[Ntypes]; for(fp = ctlr->f; fp < ep; fp++){ f = *fp; if(f && (f->type == type || f->type < 0)){ switch(qproduce(f->in, pkt->d, len)){ case -1: print("etherrloop overflow\n"); break; case -2: print("etherrloop memory\n"); break; } } } } static int etherwloop(Ether *ctlr, Etherpkt *pkt, long len) { int s, different; different = memcmp(pkt->d, pkt->s, sizeof(pkt->s)); if(different && memcmp(pkt->d, ctlr->bcast, sizeof(pkt->d))) return 0; s = splhi(); etherrloop(ctlr, pkt, len); splx(s); return !different; } | |
| 1993/1113 | long etherwrite(Chan *c, void *buf, long n, ulong offset) | |
| 1992/0407 | { | |
| 1993/1119/sys/src/9/pc/devether.c:107,112 – 1993/1120/sys/src/9/pc/devether.c:147,155 | ||
| 1993/1113 | if(NETTYPE(c->qid.path) != Ndataqid) return netifwrite(ctlr, c, buf, n); | |
| 1992/0403 | ||
| 1993/1120 | if(etherwloop(ctlr, buf, n)) return n; | |
| 1992/1222 | qlock(&ctlr->tlock); | |
| 1992/0403 | if(waserror()){ | |
| 1992/1222 | qunlock(&ctlr->tlock); | |
| 1993/1119/sys/src/9/pc/devether.c:204,209 – 1993/1120/sys/src/9/pc/devether.c:247,253 | ||
| 1992/0410 | ||
| 1993/1113 | ether[ctlrno] = ctlr; ctlr = 0; | |
| 1993/1120 | break; | |
| 1993/1113 | } | |
| 1992/0403 | } | |
| 1993/1113 | if(ctlr) | |