9fans archive / 2000 / 07 / 539    prev next

search terms are split using tokenize from:regexp searches From: lines subject:regexp searches Subject: lines before:yyyy[/mm[/dd]] and after:yyyy[/mm[/dd]] specify date range powered by grep(1)
From: miller@ham... Subject: RE: pcmcia modems Date: Fri, 21 Jul 2000 13:56:40 BST > If you're using ppp, don't use telco. In fact if you want to use ppp with telco, it only takes a small change -- I happen to have done this a couple of days ago: term% diff /sys/src/cmd/ip/ppp/ppp.c ppp.c 2277,2281c2277,2289 < fprint(2, "ppp: couldn't open %s\n", dev); < exits(dev); < } < snprint(buf, sizeof buf, "%sctl", dev); < cfd = open(buf, ORDWR); --- > if(strchr(dev, '!')){ > if((mediafd = dial(dev, 0, 0, &cfd)) == -1){ > fprint(2, "ppp: couldn't dial %s: %r\n", dev); > exits(dev); > } > } else { > fprint(2, "ppp: couldn't open %s\n", dev); > exits(dev); > } > } else { > snprint(buf, sizeof buf, "%sctl", dev); > cfd = open(buf, ORDWR); > } With this you can do 'ip/ppp -ufp telco!555-1234' or if your ndb has a line like 'sys=demon telco=555-1234 telco=555-1234 telco=555-9999' then you can do 'ip/ppp -ufp telco!demon' and dial() will try phone numbers in order until one works. (Note the repeated number to try that one twice.) -- Richard Miller