| plan 9 kernel history: overview | file list | diff list |
1998/0307/ip/ethermedium.c (diff list | history)
| 1998/0306/sys/src/9/ip/ethermedium.c:45,50 – 1998/0307/sys/src/9/ip/ethermedium.c:45,51 (short | long | prev | next) | ||
| 1998/0306 | nil, /* flushroute */ nil, /* joinmulti */ nil, /* leavemulti */ | |
| 1998/0307 | 0, /* don't unbind on last close */ | |
| 1998/0306 | }; typedef struct Etherrock Etherrock; | |
| 1998/0306/sys/src/9/ip/ethermedium.c:205,211 – 1998/0307/sys/src/9/ip/ethermedium.c:206,212 | ||
| 1998/0306 | } /* | |
| 1998/0307 | * called by ipoput with a single block to write with ifc rlock'd | |
| 1998/0306 | */ static void etherbwrite(Ipifc *ifc, Block *bp, int version, uchar *ip) | |
| 1998/0306/sys/src/9/ip/ethermedium.c:215,231 – 1998/0307/sys/src/9/ip/ethermedium.c:216,221 | ||
| 1998/0306 | uchar mac[6]; Etherrock *er = ifc->arg; | |
| 1998/0306/sys/src/9/ip/ethermedium.c:233,239 – 1998/0307/sys/src/9/ip/ethermedium.c:223,229 | ||
| 1998/0306 | bp = multicastarp(a, mac); if(bp == nil){ sendarp(ifc, a); | |
| 1998/0307 | return; | |
| 1998/0306 | } } | |
| 1998/0306/sys/src/9/ip/ethermedium.c:261,270 – 1998/0307/sys/src/9/ip/ethermedium.c:251,256 | ||
| 1998/0306 | devtab[er->mchan->type]->bwrite(er->mchan, bp, 0); ifc->out++; | |
| 1998/0306/sys/src/9/ip/ethermedium.c:276,291 – 1998/0307/sys/src/9/ip/ethermedium.c:262,281 | ||
| 1998/0306 | Ipifc *ifc; Block *bp; Etherrock *er; | |
| 1998/0307 | int locked = 0; | |
| 1998/0306 | ifc = a; er = ifc->arg; er->readp = up; /* hide identity under a rock for unbind */ if(waserror()){ | |
| 1998/0307 | if(locked) runlock(ifc); | |
| 1998/0306 | er->readp = 0; pexit("hangup", 1); } for(;;){ bp = devtab[er->mchan->type]->bread(er->mchan, ifc->maxmtu, 0); | |
| 1998/0307 | rlock(ifc); locked = 1; USED(locked); | |
| 1998/0306 | ifc->in++; bp->rp += ifc->m->hsize; if(ifc->lifc == nil) | |
| 1998/0306/sys/src/9/ip/ethermedium.c:292,297 – 1998/0307/sys/src/9/ip/ethermedium.c:282,289 | ||
| 1998/0306 | freeb(bp); else ipiput(ifc->lifc->local, bp); | |
| 1998/0307 | runlock(ifc); locked = 0; USED(locked); | |
| 1998/0306 | } } | |