| plan 9 kernel history: overview | file list | diff list |
1992/0625/pc/devether.c (diff list | history)
| 1992/0506/sys/src/9/pc/devether.c:59,64 – 1992/0625/sys/src/9/pc/devether.c:59,65 (short | long | prev | next) | ||
| 1992/0403 | */ | |
| 1992/0410 | struct Type { | |
| 1992/0403 | QLock; | |
| 1992/0625 | Netprot; /* stat info */ | |
| 1992/0403 | int type; /* ethernet type */ int prom; /* promiscuous mode */ Queue *q; | |
| 1992/0506/sys/src/9/pc/devether.c:96,102 – 1992/0625/sys/src/9/pc/devether.c:97,102 | ||
| 1992/0424 | uchar kproc; /* true if kproc started */ char name[NAMELEN]; /* name of kproc */ | |
| 1992/0403 | Network net; | |
| 1992/0410 |
| |
| 1992/0403 | ||
| 1992/0424 | Queue lbq; /* software loopback packet queue */ | |
| 1992/0506/sys/src/9/pc/devether.c:331,337 – 1992/0625/sys/src/9/pc/devether.c:331,337 | ||
| 1992/0410 | tp->q = 0; tp->prom = 0; tp->inuse = 0; | |
| 1992/0625 | netdisown(tp); | |
| 1992/0505 | tp->ctlr = 0; | |
| 1992/0410 | qunlock(tp); | |
| 1992/0403 | } | |
| 1992/0506/sys/src/9/pc/devether.c:357,363 – 1992/0625/sys/src/9/pc/devether.c:357,363 | ||
| 1992/0403 | continue; } | |
| 1992/0410 | tp->inuse = 1; | |
| 1992/0625 | netown(tp, u->p->user, 0); | |
| 1992/0410 | qunlock(tp); return tp - cp->type; | |
| 1992/0403 | } | |
| 1992/0506/sys/src/9/pc/devether.c:483,490 – 1992/0625/sys/src/9/pc/devether.c:483,492 | ||
| 1992/0424 | void etherreset(void) { | |
| 1992/0625 | int i; Ctlr *cp; | |
| 1992/0410 | ||
| 1992/0625 | cp = &ctlr[0]; | |
| 1992/0424 | cp->hw = &wd8013; (*cp->hw->reset)(cp); | |
| 1992/0410 | ||
| 1992/0506/sys/src/9/pc/devether.c:497,507 – 1992/0625/sys/src/9/pc/devether.c:499,510 | ||
| 1992/0424 | cp->net.listen = 0; cp->net.clone = clonecon; cp->net.ninfo = 2; | |
| 1992/0625 | for(i = 0; i < NType; i++) netadd(&cp->net, &cp->type[i], i); | |
| 1992/0403 | } | |
| 1992/0425 | void | |
| 1992/0506/sys/src/9/pc/devether.c:611,619 – 1992/0625/sys/src/9/pc/devether.c:614,622 | ||
| 1992/0424 | int i; uchar msr; | |
| 1992/0403 | ||
| 1992/0501 |
| |
| 1992/0625 | cp->rb = xspanalloc(sizeof(Buffer)*Nrb, BY2PG, 0); | |
| 1992/0501 | cp->nrb = Nrb; | |
| 1992/0502 |
| |
| 1992/0625 | cp->tb = xspanalloc(sizeof(Buffer)*Ntb, BY2PG, 0); | |
| 1992/0502 | cp->ntb = Ntb; | |
| 1992/0424 | msr = IN(hw, msr); | |