Subject: Re: PPP thoughts
To: None <tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 10/28/1999 21:24:03
>> [I]t seems to me that the PPP setup scheme is rather backward.  You
>> don't tell a PPP device to attach to a tty line, you tell a tty line
>> to have a PPP device attach to it.  This strikes me as rather upside
>> down, and in particular it makes PPPoE comparatively difficult.
> I think this is because ppp runs on top of tty line, not the other
> way around.

Before I saw PPPoE, I would have agreed with you.  But it now seems to
me that PPP is a layer that can be layered on top of - at least - a tty
line or an Ethernet interface.  Rather than have tty lines with a
tty-line-specific way to layer PPP in front of them and a
tty-line-specific way to talk to the PPP layer, and Ethernets with an
Ethernet-specific way to layer PPP in front of them and an
Ethernet-specific way to talk to the PPP layer, it seems to me that it
makes for a less ugly design to instead make the PPP layer a thing in
itself, one which can be talked to with a uniform interface, designed
and tuned for talking to PPP, and with back-ends that talk to serial
lines or Ethernets or whatever.

>> What would the general reaction be to reworking the PPP glue [...]
> Can't you just have pseudo tty device for PPPoE, configure it with
> ioctls (like ethernet src/dst, interface etc) and attach ppp onto it?

You can indeed do that; that's how my current PPPoE code works.  But it
costs cpu cycles for doing and undoing the HDLC-like framing and
byte-stuffing (which is pure waste), and using a relatively scarce
resource (a pty) for something that really doesn't need it.  It's also
a somewhat more difficult paradigm to maintain when considering moving
PPPoE into the kernel; it seems too full of ad-hockery.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B