| plan 9 kernel history: overview | file list | diff list |
1998/0313/ip/gre.c (diff list | history)
| 1997/0327/sys/src/9/ip/gre.c:73,81 – 1997/0403/sys/src/9/ip/gre.c:73,83 (short | long) | ||
| 1997/0327 | } unlock(p); | |
| 1997/0403 | if(err != nil) return err; Fsconnected(&fs, c, nil); | |
| 1997/0327 |
| |
| 1997/0403 | return nil; | |
| 1997/0327 | } static int | |
| 1997/0327/sys/src/9/ip/gre.c:93,102 – 1997/0403/sys/src/9/ip/gre.c:95,104 | ||
| 1997/0327 | c->wq = qopen(64*1024, 0, 0, 0); } | |
| 1997/0403 | static char* greannounce(Conv*, char**, int) | |
| 1997/0327 | { | |
| 1997/0403 | return "pktifc does not support announce"; | |
| 1997/0327 | } static void | |
| 1997/0403/sys/src/9/ip/gre.c:163,169 – 1997/0423/sys/src/9/ip/gre.c:163,169 (short | long) | ||
| 1997/0327 | } static void | |
| 1997/0423 | greiput(Media *m, Block *bp) | |
| 1997/0327 | { int len; GREhdr *ghp; | |
| 1997/0403/sys/src/9/ip/gre.c:171,176 – 1997/0423/sys/src/9/ip/gre.c:171,177 | ||
| 1997/0327 | Conv *c, **p; ushort eproto; | |
| 1997/0423 | USED(m); | |
| 1997/0327 | ghp = (GREhdr*)(bp->rp); eproto = nhgets(ghp->eproto); | |
| 1997/0423/sys/src/9/ip/gre.c:158,163 – 1997/0522/sys/src/9/ip/gre.c:158,165 (short | long) | ||
| 1997/0327 | hnputl(ghp->dst, c->raddr); hnputl(ghp->src, c->laddr); hnputs(ghp->eproto, c->rport); | |
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0327 | ipoput(bp, 0, c->ttl); } | |
| 1997/0522/sys/src/9/ip/gre.c:121,128 – 1997/0524/sys/src/9/ip/gre.c:121,127 (short | long) | ||
| 1997/0327 | grekick(Conv *c, int l) { GREhdr *ghp; | |
| 1997/0524 | Block *bp; | |
| 1997/0327 | USED(l); | |
| 1997/0522/sys/src/9/ip/gre.c:129,146 – 1997/0524/sys/src/9/ip/gre.c:128,133 | ||
| 1997/0327 | bp = qget(c->wq); if(bp == nil) return; | |
| 1997/0524/sys/src/9/ip/gre.c:11,18 – 1997/0530/sys/src/9/ip/gre.c:11,18 (short | long) | ||
| 1997/0327 | enum { | |
| 1997/0530 | GRE_IPONLY = 12, /* size of ip header */ GRE_IPPLUSGRE = 12, /* minimum size of GRE header */ | |
| 1997/0327 | IP_GREPROTO = 47, GRErxms = 200, | |
| 1997/0524/sys/src/9/ip/gre.c:122,127 – 1997/0530/sys/src/9/ip/gre.c:122,128 | ||
| 1997/0327 | { GREhdr *ghp; | |
| 1997/0524 | Block *bp; | |
| 1997/0530 | ulong raddr, laddr; | |
| 1997/0327 | USED(l); | |
| 1997/0524/sys/src/9/ip/gre.c:130,149 – 1997/0530/sys/src/9/ip/gre.c:131,157 | ||
| 1997/0327 | return; /* Make space to fit ip header (gre header already there) */ | |
| 1997/0530 | bp = padblock(bp, GRE_IPONLY); | |
| 1997/0327 | if(bp == nil) return; /* make sure the message has a GRE header */ | |
| 1997/0530 | bp = pullupblock(bp, GRE_IPONLY+GRE_IPPLUSGRE); | |
| 1997/0327 | if(bp == nil) return; ghp = (GREhdr *)(bp->rp); | |
| 1997/0530 | raddr = nhgetl(ghp->src); laddr = nhgetl(ghp->dst); if(raddr == 0) raddr = c->raddr; if(laddr == 0 || Mediaforme(ghp->dst) <= 0) laddr = c->laddr; | |
| 1997/0327 | ghp->proto = IP_GREPROTO; | |
| 1997/0530 | hnputl(ghp->dst, raddr); hnputl(ghp->src, laddr); | |
| 1997/0327 | hnputs(ghp->eproto, c->rport); | |
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0524/sys/src/9/ip/gre.c:184,195 – 1997/0530/sys/src/9/ip/gre.c:192,203 | ||
| 1997/0327 | /* * Trim the packet down to data size */ | |
| 1997/0530 | len = nhgets(ghp->len) - GRE_IPONLY; if(len < GRE_IPPLUSGRE){ | |
| 1997/0327 | freeblist(bp); return; } | |
| 1997/0530 | bp = trimblock(bp, GRE_IPONLY, len); | |
| 1997/0327 | if(bp == nil){ gre.lenerr++; return; | |
| 1997/0530/sys/src/9/ip/gre.c:142,152 – 1997/0531/sys/src/9/ip/gre.c:142,152 (short | long) | ||
| 1997/0327 | ghp = (GREhdr *)(bp->rp); | |
| 1997/0530 |
| |
| 1997/0531 | raddr = nhgetl(ghp->dst); laddr = nhgetl(ghp->src); | |
| 1997/0530 | if(raddr == 0) raddr = c->raddr; | |
| 1997/0531 | if(laddr == 0 || Mediaforme(ghp->src) <= 0) | |
| 1997/0530 | laddr = c->laddr; | |
| 1997/0327 | ghp->proto = IP_GREPROTO; | |
| 1997/0531/sys/src/9/ip/gre.c:23,42 – 1998/0306/sys/src/9/ip/gre.c:23,42 (short | long) | ||
| 1997/0327 | typedef struct GREhdr { /* ip header */ | |
| 1998/0306 | uchar vihl; /* Version and header length */ uchar tos; /* Type of service */ uchar len[2]; /* packet length (including headers) */ uchar id[2]; /* Identification */ uchar frag[2]; /* Fragment information */ uchar Unused; uchar proto; /* Protocol */ uchar cksum[2]; /* checksum */ uchar src[4]; /* Ip source */ uchar dst[4]; /* Ip destination */ | |
| 1997/0327 | /* gre header */ | |
| 1998/0306 | uchar flags[2]; uchar eproto[2]; /* encapsulation protocol */ | |
| 1997/0327 | } GREhdr; Proto gre; | |
| 1997/0531/sys/src/9/ip/gre.c:56,62 – 1998/0306/sys/src/9/ip/gre.c:56,62 | ||
| 1997/0327 | /* make sure noone's already connected to this other sys */ p = c->p; | |
| 1998/0306 | qlock(p); | |
| 1997/0327 | ecp = &p->conv[p->nc]; for(cp = p->conv; cp < ecp; cp++){ tc = *cp; | |
| 1997/0531/sys/src/9/ip/gre.c:66,77 – 1998/0306/sys/src/9/ip/gre.c:66,77 | ||
| 1997/0327 | continue; if(tc->rport == c->rport && tc->raddr == c->raddr){ err = "already connected to that addr/proto"; | |
| 1998/0306 | ipmove(c->laddr, IPnoaddr); ipmove(c->raddr, IPnoaddr); | |
| 1997/0327 | break; } } | |
| 1998/0306 | qunlock(p); | |
| 1997/0327 | ||
| 1997/0403 | if(err != nil) return err; | |
| 1997/0531/sys/src/9/ip/gre.c:81,91 – 1998/0306/sys/src/9/ip/gre.c:81,90 | ||
| 1997/0327 | } static int | |
| 1998/0306 | grestate(Conv *c, char *state, int n) | |
| 1997/0327 | { USED(c); | |
| 1998/0306 | return snprint(state, n, "%s", "Datagram"); | |
| 1997/0327 | } static void | |
| 1997/0531/sys/src/9/ip/gre.c:107,114 – 1998/0306/sys/src/9/ip/gre.c:106,113 | ||
| 1997/0327 | qclose(c->rq); qclose(c->wq); qclose(c->eq); | |
| 1998/0306 | ipmove(c->laddr, IPnoaddr); ipmove(c->raddr, IPnoaddr); | |
| 1997/0327 | c->lport = 0; c->rport = 0; | |
| 1997/0531/sys/src/9/ip/gre.c:122,128 – 1998/0306/sys/src/9/ip/gre.c:121,127 | ||
| 1997/0327 | { GREhdr *ghp; | |
| 1997/0524 | Block *bp; | |
| 1997/0530 |
| |
| 1998/0306 | uchar laddr[IPaddrlen], raddr[IPaddrlen]; | |
| 1997/0327 | USED(l); | |
| 1997/0531/sys/src/9/ip/gre.c:142,157 – 1998/0306/sys/src/9/ip/gre.c:141,157 | ||
| 1997/0327 | ghp = (GREhdr *)(bp->rp); | |
| 1997/0531 |
| |
| 1997/0530 |
| |
| 1997/0531 |
| |
| 1997/0530 |
| |
| 1998/0306 | v4tov6(raddr, ghp->dst); if(ipcmp(raddr, v4prefix) == 0) memmove(ghp->dst, c->raddr + IPv4off, IPv4addrlen); v4tov6(laddr, ghp->src); if(ipcmp(laddr, v4prefix) == 0){ if(ipcmp(c->laddr, IPnoaddr) == 0) findlocalip(c->laddr, raddr); /* pick interface closest to dest */ memmove(ghp->src, c->laddr + IPv4off, IPv4addrlen); } | |
| 1997/0530 | ||
| 1997/0327 | ghp->proto = IP_GREPROTO; | |
| 1997/0530 |
| |
| 1997/0327 | hnputs(ghp->eproto, c->rport); | |
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0531/sys/src/9/ip/gre.c:160,178 – 1998/0306/sys/src/9/ip/gre.c:160,177 | ||
| 1997/0327 | } static void | |
| 1997/0423 |
| |
| 1998/0306 | greiput(uchar*, Block *bp) | |
| 1997/0327 | { int len; GREhdr *ghp; | |
| 1998/0306 | uchar raddr[IPaddrlen]; | |
| 1997/0327 | ||
| 1997/0423 |
| |
| 1997/0327 | ghp = (GREhdr*)(bp->rp); | |
| 1998/0306 | v4tov6(raddr, ghp->src); | |
| 1997/0327 | eproto = nhgets(ghp->eproto); | |
| 1997/0531/sys/src/9/ip/gre.c:180,186 – 1998/0306/sys/src/9/ip/gre.c:179,185 | ||
| 1997/0327 | c = *p; if(c->inuse == 0) continue; | |
| 1998/0306 | if(c->rport == eproto && ipcmp(c->raddr, raddr) == 0) | |
| 1997/0327 | break; } | |
| 1997/0531/sys/src/9/ip/gre.c:216,221 – 1998/0306/sys/src/9/ip/gre.c:215,228 | ||
| 1997/0327 | } } | |
| 1998/0306 | int grestats(char *buf, int len) { return snprint(buf, len, "gre: csum %d hlen %d len %d order %d rexmit %d\n", gre.csumerr, gre.hlenerr, gre.lenerr, gre.order, gre.rexmit); } | |
| 1997/0327 | void greinit(Fs *fs) { | |
| 1997/0531/sys/src/9/ip/gre.c:229,234 – 1998/0306/sys/src/9/ip/gre.c:236,242 | ||
| 1997/0327 | gre.rcv = greiput; gre.ctl = nil; gre.advise = nil; | |
| 1998/0306 | gre.stats = grestats; | |
| 1997/0327 | gre.ipproto = IP_GREPROTO; gre.nc = 64; gre.ptclsize = 0; | |
| 1998/0306/sys/src/9/ip/gre.c:39,47 – 1998/0313/sys/src/9/ip/gre.c:39,51 (short | long) | ||
| 1998/0306 | uchar eproto[2]; /* encapsulation protocol */ | |
| 1997/0327 | } GREhdr; | |
| 1998/0313 | typedef struct GREpriv GREpriv; struct GREpriv { /* non-MIB stats */ ulong csumerr; /* checksum errors */ ulong lenerr; /* short packet */ }; | |
| 1997/0327 | static char* greconnect(Conv *c, char **argv, int argc) | |
| 1998/0306/sys/src/9/ip/gre.c:75,81 – 1998/0313/sys/src/9/ip/gre.c:79,85 | ||
| 1997/0327 | ||
| 1997/0403 | if(err != nil) return err; | |
| 1998/0313 | Fsconnected(c, nil); | |
| 1997/0327 | ||
| 1997/0403 | return nil; | |
| 1997/0327 | } | |
| 1998/0306/sys/src/9/ip/gre.c:147,153 – 1998/0313/sys/src/9/ip/gre.c:151,157 | ||
| 1998/0306 | v4tov6(laddr, ghp->src); if(ipcmp(laddr, v4prefix) == 0){ if(ipcmp(c->laddr, IPnoaddr) == 0) | |
| 1998/0313 | findlocalip(c->p->f, c->laddr, raddr); /* pick interface closest to dest */ | |
| 1998/0306 | memmove(ghp->src, c->laddr + IPv4off, IPv4addrlen); } | |
| 1997/0530 | ||
| 1998/0306/sys/src/9/ip/gre.c:156,166 – 1998/0313/sys/src/9/ip/gre.c:160,170 | ||
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0327 |
| |
| 1998/0313 | ipoput(c->p->f, bp, 0, c->ttl); | |
| 1997/0327 | } static void | |
| 1998/0306 |
| |
| 1998/0313 | greiput(Proto *gre, uchar*, Block *bp) | |
| 1997/0327 | { int len; GREhdr *ghp; | |
| 1998/0306/sys/src/9/ip/gre.c:167,173 – 1998/0313/sys/src/9/ip/gre.c:171,179 | ||
| 1997/0327 | Conv *c, **p; ushort eproto; | |
| 1998/0306 | uchar raddr[IPaddrlen]; | |
| 1998/0313 | GREpriv *gpriv; | |
| 1997/0327 | ||
| 1998/0313 | gpriv = gre->priv; | |
| 1997/0327 | ghp = (GREhdr*)(bp->rp); | |
| 1998/0306 | v4tov6(raddr, ghp->src); | |
| 1998/0306/sys/src/9/ip/gre.c:175,181 – 1998/0313/sys/src/9/ip/gre.c:181,187 | ||
| 1997/0327 | /* Look for a conversation structure for this port and address */ c = nil; | |
| 1998/0313 | for(p = gre->conv; *p; p++) { | |
| 1997/0327 | c = *p; if(c->inuse == 0) continue; | |
| 1998/0306/sys/src/9/ip/gre.c:198,204 – 1998/0313/sys/src/9/ip/gre.c:204,210 | ||
| 1997/0327 | } | |
| 1997/0530 | bp = trimblock(bp, GRE_IPONLY, len); | |
| 1997/0327 | if(bp == nil){ | |
| 1998/0313 | gpriv->lenerr++; | |
| 1997/0327 | return; } | |
| 1998/0306/sys/src/9/ip/gre.c:216,245 – 1998/0313/sys/src/9/ip/gre.c:222,257 | ||
| 1997/0327 | } | |
| 1998/0306 | int | |
| 1998/0313 | grestats(Proto *gre, char *buf, int len) | |
| 1998/0306 | { | |
| 1998/0313 | GREpriv *gpriv; gpriv = gre->priv; return snprint(buf, len, "gre: len %d\n", gpriv->lenerr); | |
| 1998/0306 | } | |
| 1997/0327 | void greinit(Fs *fs) { | |
| 1998/0306 |
| |
| 1997/0327 |
| |
| 1998/0313 | Proto *gre; | |
| 1997/0327 |
| |
| 1998/0313 | gre = smalloc(sizeof(Proto)); gre->priv = smalloc(sizeof(GREpriv)); gre->name = "gre"; gre->kick = grekick; gre->connect = greconnect; gre->announce = greannounce; gre->state = grestate; gre->create = grecreate; gre->close = greclose; gre->rcv = greiput; gre->ctl = nil; gre->advise = nil; gre->stats = grestats; gre->ipproto = IP_GREPROTO; gre->nc = 64; gre->ptclsize = 0; Fsproto(fs, gre); | |
| 1997/0327 | } | |
| 1998/0313/sys/src/9/ip/gre.c:68,74 – 1998/0401/sys/src/9/ip/gre.c:68,74 (short | long) | ||
|
Bug: use ipcmp to compare addresses, not ptr comparison.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1997/0327 | break; if(tc == c) continue; | |
| 1998/0401 | if(tc->rport == c->rport && ipcmp(tc->raddr, c->raddr) == 0){ | |
| 1997/0327 | err = "already connected to that addr/proto"; | |
| 1998/0306 | ipmove(c->laddr, IPnoaddr); ipmove(c->raddr, IPnoaddr); | |
| 1998/0401/sys/src/9/ip/gre.c:228,234 – 1998/0825/sys/src/9/ip/gre.c:228,234 (short | long) | ||
|
Bug fix: print format.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1998/0313 | gpriv = gre->priv; | |
| 1998/0825 | return snprint(buf, len, "gre: len %lud\n", gpriv->lenerr); | |
| 1998/0306 | } | |
| 1997/0327 | void | |
| 1998/0825/sys/src/9/ip/gre.c:115,121 – 1999/0302/sys/src/9/ip/gre.c:115,121 (short | long) | ||
| 1997/0327 | c->lport = 0; c->rport = 0; | |
| 1999/0302 | qunlock(c); | |
| 1997/0327 | } int drop; | |
| 1998/0825/sys/src/9/ip/gre.c:179,184 – 1999/0302/sys/src/9/ip/gre.c:179,186 | ||
| 1998/0306 | v4tov6(raddr, ghp->src); | |
| 1997/0327 | eproto = nhgets(ghp->eproto); | |
| 1999/0302 | qlock(gre); | |
| 1997/0327 | /* Look for a conversation structure for this port and address */ c = nil; | |
| 1998/0313 | for(p = gre->conv; *p; p++) { | |
| 1998/0825/sys/src/9/ip/gre.c:190,198 – 1999/0302/sys/src/9/ip/gre.c:192,203 | ||
| 1997/0327 | } if(*p == nil) { | |
| 1999/0302 | qunlock(gre); | |
| 1997/0327 | freeblist(bp); return; } | |
| 1999/0302 | qunlock(gre); | |
| 1997/0327 | /* * Trim the packet down to data size | |
| 1999/0302/sys/src/9/ip/gre.c:160,166 – 1999/0817/sys/src/9/ip/gre.c:160,166 (short | long) | ||
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0327 | ||
| 1998/0313 |
| |
| 1999/0817 | ipoput(c->p->f, bp, 0, c->ttl, c->tos); | |
| 1997/0327 | } static void | |
| 1999/0817/sys/src/9/ip/gre.c:114,121 – 2000/1220/sys/src/9/ip/gre.c:114,119 (short | long) | ||
| 1998/0306 | ipmove(c->raddr, IPnoaddr); | |
| 1997/0327 | c->lport = 0; c->rport = 0; | |
| 1999/0302 |
| |
| 1997/0327 | } int drop; | |
| 2000/1220/sys/src/9/ip/gre.c:94,100 – 2001/0127/sys/src/9/ip/gre.c:94,100 (short | long) | ||
| 1997/0327 | static void grecreate(Conv *c) { | |
| 2001/0127 | c->rq = qopen(64*1024, 1, 0, c); | |
| 1997/0327 | c->wq = qopen(64*1024, 0, 0, 0); } | |
| 2001/0127/sys/src/9/ip/gre.c:119,131 – 2001/0306/sys/src/9/ip/gre.c:119,129 (short | long) | ||
| 1997/0327 | int drop; static void | |
| 2001/0306 | grekick(Conv *c) | |
| 1997/0327 | { GREhdr *ghp; | |
| 1997/0524 | Block *bp; | |
| 1998/0306 | uchar laddr[IPaddrlen], raddr[IPaddrlen]; | |
| 1997/0327 |
| |
| 2001/0306/sys/src/9/ip/gre.c:160,166 – 2001/0623/sys/src/9/ip/gre.c:160,166 (short | long) | ||
| 1997/0327 | } static void | |
| 1998/0313 |
| |
| 2001/0623 | greiput(Proto *gre, Ipifc*, Block *bp) | |
| 1997/0327 | { int len; GREhdr *ghp; | |
| 2001/0623/sys/src/9/ip/gre.c:140,145 – 2002/0507/sys/src/9/ip/gre.c:140,146 (short | long) | ||
| 1997/0327 | return; ghp = (GREhdr *)(bp->rp); | |
| 2002/0507 | ghp->vihl = IP_VER4; | |
| 1997/0327 | ||
| 1998/0306 | v4tov6(raddr, ghp->dst); if(ipcmp(raddr, v4prefix) == 0) | |
| 2001/0623/sys/src/9/ip/gre.c:156,162 – 2002/0507/sys/src/9/ip/gre.c:157,163 | ||
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0327 | ||
| 1999/0817 |
| |
| 2002/0507 | ipoput4(c->p->f, bp, 0, c->ttl, c->tos); | |
| 1997/0327 | } static void | |
| 2002/0507/sys/src/9/ip/gre.c:94,100 – 2002/0711/sys/src/9/ip/gre.c:94,100 (short | long) | ||
| 1997/0327 | static void grecreate(Conv *c) { | |
| 2001/0127 |
| |
| 2002/0711 | c->rq = qopen(64*1024, Qmsg, 0, c); | |
| 1997/0327 | c->wq = qopen(64*1024, 0, 0, 0); } | |
| 2002/0711/sys/src/9/ip/gre.c:47,52 – 2002/0712/sys/src/9/ip/gre.c:47,54 (short | long) | ||
| 1998/0313 | ulong lenerr; /* short packet */ }; | |
| 1997/0327 | ||
| 2002/0712 | static void grekick(void *x); | |
| 1997/0327 | static char* greconnect(Conv *c, char **argv, int argc) { | |
| 2002/0711/sys/src/9/ip/gre.c:84,89 – 2002/0712/sys/src/9/ip/gre.c:86,98 | ||
| 1997/0403 | return nil; | |
| 1997/0327 | } | |
| 2002/0712 | static void grecreate(Conv *c) { c->rq = qopen(64*1024, Qmsg, 0, c); c->wq = qopen(64*1024, Qkick, grekick, c); } | |
| 1997/0327 | static int | |
| 1998/0306 | grestate(Conv *c, char *state, int n) | |
| 1997/0327 | { | |
| 2002/0711/sys/src/9/ip/gre.c:91,103 – 2002/0712/sys/src/9/ip/gre.c:100,105 | ||
| 1998/0306 | return snprint(state, n, "%s", "Datagram"); | |
| 1997/0327 | } | |
| 2002/0711 |
| |
| 1997/0327 |
| |
| 1997/0403 | static char* greannounce(Conv*, char**, int) | |
| 1997/0327 | { | |
| 2002/0711/sys/src/9/ip/gre.c:119,126 – 2002/0712/sys/src/9/ip/gre.c:121,129 | ||
| 1997/0327 | int drop; static void | |
| 2001/0306 |
| |
| 2002/0712 | grekick(void *x) | |
| 1997/0327 | { | |
| 2002/0712 | Conv *c = x; | |
| 1997/0327 | GREhdr *ghp; | |
| 1997/0524 | Block *bp; | |
| 1998/0306 | uchar laddr[IPaddrlen], raddr[IPaddrlen]; | |
| 2002/0711/sys/src/9/ip/gre.c:241,247 – 2002/0712/sys/src/9/ip/gre.c:244,249 | ||
| 1998/0313 | gre = smalloc(sizeof(Proto)); gre->priv = smalloc(sizeof(GREpriv)); gre->name = "gre"; | |
| 2002/0712/sys/src/9/ip/gre.c:47,53 – 2003/0220/sys/src/9/ip/gre.c:47,53 (short | long) | ||
| 1998/0313 | ulong lenerr; /* short packet */ }; | |
| 1997/0327 | ||
| 2002/0712 |
| |
| 2003/0220 | static void grekick(void *x, Block *bp); | |
| 2002/0712 | ||
| 1997/0327 | static char* greconnect(Conv *c, char **argv, int argc) | |
| 2002/0712/sys/src/9/ip/gre.c:90,96 – 2003/0220/sys/src/9/ip/gre.c:90,96 | ||
| 2002/0712 | grecreate(Conv *c) { c->rq = qopen(64*1024, Qmsg, 0, c); | |
| 2003/0220 | c->wq = qbypass(grekick, c); | |
| 2002/0712 | } | |
| 1997/0327 | static int | |
| 2002/0712/sys/src/9/ip/gre.c:121,134 – 2003/0220/sys/src/9/ip/gre.c:121,132 | ||
| 1997/0327 | int drop; static void | |
| 2002/0712 |
| |
| 2003/0220 | grekick(void *x, Block *bp) | |
| 1997/0327 | { | |
| 2002/0712 | Conv *c = x; | |
| 1997/0327 | GREhdr *ghp; | |
| 1997/0524 |
| |
| 1998/0306 | uchar laddr[IPaddrlen], raddr[IPaddrlen]; | |
| 1997/0327 |
| |
| 2003/0220/sys/src/9/ip/gre.c:158,164 – 2003/0308/sys/src/9/ip/gre.c:158,164 (short | long) | ||
| 1997/0522 | ghp->frag[0] = 0; ghp->frag[1] = 0; | |
| 1997/0327 | ||
| 2002/0507 |
| |
| 2003/0308 | ipoput4(c->p->f, bp, 0, c->ttl, c->tos, nil); | |
| 1997/0327 | } static void | |