| plan 9 kernel history: overview | file list | diff list |
1991/1115/port/devip.c (diff list | history)
| 1991/1114/sys/src/9/port/devip.c:48,55 – 1991/1115/sys/src/9/port/devip.c:48,58 (short | long | prev | next) | ||
| 1991/1012 | { | |
| 1991/1114 | int j; | |
| 1991/0424 | ||
| 1991/1114 |
| |
| 1991/1115 | for(j = 0; j < conf.ip; j++, cp++){ cp->index = j; | |
| 1991/1114 | cp->stproto = stproto; | |
| 1991/1115 | cp->ipinterface = ifc; } | |
| 1991/1114 | ifc->net.name = stproto->name; ifc->net.nconv = conf.ip; ifc->net.devp = &ipinfo; | |
| 1991/1114/sys/src/9/port/devip.c:57,62 – 1991/1115/sys/src/9/port/devip.c:60,66 | ||
| 1991/1114 | if(stproto != &udpinfo) ifc->net.listen = iplisten; ifc->net.clone = ipclonecon; | |
| 1991/1115 | ifc->net.prot = (Netprot *)ialloc(sizeof(Netprot) * conf.ip, 0); | |
| 1991/1114 | ifc->net.ninfo = 3; ifc->net.info[0].name = "remote"; ifc->net.info[0].fill = ipremotefill; | |
| 1991/1114/sys/src/9/port/devip.c:136,142 – 1991/1115/sys/src/9/port/devip.c:140,146 | ||
| 1991/1108 | Ipconv *new, *base; | |
| 1991/0424 | base = ipconv[c->dev]; | |
| 1991/1108 |
| |
| 1991/1115 | new = ipincoming(base, 0); | |
| 1991/1108 | if(new == 0) error(Enodev); | |
| 1991/1114 | return new - base; | |
| 1991/1114/sys/src/9/port/devip.c:143,151 – 1991/1115/sys/src/9/port/devip.c:147,156 | ||
| 1991/1023 | } Ipconv * | |
| 1991/1024 |
| |
| 1991/1115 | ipincoming(Ipconv *base, Ipconv *from) | |
| 1991/1023 | { | |
| 1991/1024 | Ipconv *new, *etab; | |
| 1991/1115 | Ipifc *ifc; | |
| 1991/1023 | etab = &base[conf.ip]; for(new = base; new < etab; new++) { | |
| 1991/1114/sys/src/9/port/devip.c:156,161 – 1991/1115/sys/src/9/port/devip.c:161,173 | ||
| 1991/0424 | qunlock(new); continue; } | |
| 1991/1115 | ifc = base->ipinterface; if(from) /* copy ownership from listening channel */ netown(&ifc->net, new->index, ifc->net.prot[from->index].owner, 0); else /* current user becomes owner */ netown(&ifc->net, new->index, u->p->user, 0); | |
| 1991/1114 | new->ref = 1; | |
| 1991/0424 | qunlock(new); return new; | |
| 1991/1114/sys/src/9/port/devip.c:167,172 – 1991/1115/sys/src/9/port/devip.c:179,185 | ||
| 1991/0424 | void ipcreate(Chan *c, char *name, int omode, ulong perm) { | |
| 1991/1115 | USED(c, name, omode, perm); | |
| 1991/0424 | error(Eperm); } | |
| 1991/1114/sys/src/9/port/devip.c:173,178 – 1991/1115/sys/src/9/port/devip.c:186,192 | ||
| 1991/0424 | void ipremove(Chan *c) { | |
| 1991/1115 | USED(c); | |
| 1991/0424 | error(Eperm); } | |
| 1991/1114/sys/src/9/port/devip.c:179,185 – 1991/1115/sys/src/9/port/devip.c:193,199 | ||
| 1991/0424 | void ipwstat(Chan *c, char *dp) { | |
| 1991/1115 | netwstat(c, dp, &ipifc[c->dev].net); | |
| 1991/0424 | } void | |
| 1991/1114/sys/src/9/port/devip.c:432,437 – 1991/1115/sys/src/9/port/devip.c:446,452 | ||
| 1991/1114 | ipc->ref = 0; | |
| 1991/0424 | closeipifc(ipc->ipinterface); | |
| 1991/1115 | netdisown(&ipc->ipinterface->net, ipc->index); | |
| 1991/0424 | } void | |
| 1991/1114/sys/src/9/port/devip.c:654,659 – 1991/1115/sys/src/9/port/devip.c:669,675 | ||
| 1991/0424 | qunlock(tcb); break; } | |
| 1991/1115 | netdisown(&s->ipinterface->net, s->index); | |
| 1991/0424 | } | |