Subject: Re: ppp FAQ suggestions
To: Paul Goyette <paul@whooppee.com>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 08/08/1997 14:02:38
> 
> Well, _I_ don't like calling these things the "printer" port or the
> "modem" port.  Why can't we be consistent and call them tty00 and tty01?
> And then we could rather easily pass an optional parameter to a generic
> script to select the port to use.

Well, the idea behind "modem" and "print" was twofold. 1) use names which
newbies know about. That can be taken care of (we just say which is
which). The other is so that all of the files get colated together by
ls. All the "modem" files show up together, as do the printer ones. And
they are more distinct than a bunch of tty00 & tty01 files.

I think it'd be easier if all the tty00 (or modem)  files were together.
Thus I'd put the port name at the first.

I wanted two different scipts (the same one just with the port hardcoded)
so that the user can hardcode things after the configuration.

> But then, we're going to get pretty complicated/messy, since we'll need to
> worry about whether there's a file called /etc/ppp/options.tty00 or
> /etc/ppp/options.tty01 out there.  We'd need to look for these in
> deference to the default /etc/ppp/options if we're going to set up the
> ppp-debug script to be able to turn on debugging for the proper port.

That's part of the reason that I want to include everything from the begining.
There WILL be an options.tty00 or tty01 file (assuming pppd works right;
in the past if you connected via tty01 and fired up pppd on tty00, pppd
read options.tty01). Thus the script always knows what to do.

Also, a number of folks (three, at least, which is a lot given how many
folks post to the list after that initial "it doesn't work" stage) have
asked about running two pppd's at once. It's not that hard, if the scripts
are right. If you're just starting out, changing the scripts isn't obvious.

If people can be un-intimidated by the possability of two pppd's, then
it's easier to make the kit work for two from the start.

I'm toying with the idea of a "just" script. You run it as "just print"
or "just modem" or "just tty00", and it deletes all the other config
files. The idea's if there are fewer files, folks will be less
intimidated.  (but since the files are built as needed, if they don't
set things up for a port they never use, they won't have the files.
Maybe I don't need this connamd).

> And of course, how can we be sure whether tty00 is associated with ppp0
> when we try to shut things down?  IIRC, the ppp0 or ppp1 will get chosen
> based on the first unit number that's available, even if we run pppd on
> tty01 first - it would get associated with ppp0.

We use the lock file, which contains the pid of the pppd process on
that port. Thus LOCK.tty00 (I think it starts w/ LOCK) is the pid of
the pppd on tty00, etc. That's the main reason for the lock files.

> Things do get messy...
> 
> On Fri, 8 Aug 1997, Colin Wood wrote:
> > 
> > Hmmm...that will work, but do you think that this functionality is really
> > necessary?  Wouldn't someone interested in doing this be willing to go to
> > the trouble of modifying the scripts themselves?  How do you pick which
> > port is going to be the "client" port and which the "server"?  I realize
> > pppd is both, but one connect script is actually going to dial a remote
> > system, the other should just put the modem in auto-answer mode or
> > something like that.
> > 
> > Perhaps you'd want something more like:
> > 
> > ppp-up [modem | printer]  (defaults to modem)
> > 
> > and 
> > 
> > ppp-server [printer | modem] (defaults to printer)
> > 
> > Does this make sense?

Yes, except that dial-in service was one of the things I was NOT
thinking about supporting. A direct connect connection (using a printer
cable, for example), yes. But if you want to deal with a dial-in system,
I think you need more knowledge than my target audience for this kit.

My current feeling is to make a shell script, which I've started,
to build the config files. It would have fragments which it would
assemble for the final files.

So it'd support

account name/password connection
PAP
CHAP
direct connect (no passwords, etc).

Dial-On-Demand if Paul can teach me how it works. :-)

thoughts?

Take care,

Bill