9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: miller@hamnavoe.demon.co.uk
To: 9fans@cse.psu.edu
Subject: RE: [9fans] pcmcia modems
Date: Fri, 21 Jul 2000 13:56:40 +0100	[thread overview]
Message-ID: <E13FcLO-0007sM-0B@finch-post-11.mail.demon.net> (raw)

> 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


             reply	other threads:[~2000-07-21 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-21 12:56 miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-21 13:19 presotto
2000-07-20 23:46 presotto
2000-07-16 23:02 presotto
2000-07-20 18:55 ` Peter LeBlond
2000-07-15 16:03 sah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E13FcLO-0007sM-0B@finch-post-11.mail.demon.net \
    --to=miller@hamnavoe.demon.co.uk \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).