Subject: Re: ADSL modems
To: None <port-mac68k@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-mac68k
Date: 04/27/2000 21:27:44
[I'm not on port-mac68k, at least not yet - but someone who is
forwarded me a copy of this message.  It's a little confused, though,
enough that I decided to break my usual rule against contributing to
lists I don't myself follow to clarify it.]

>> Is anybody working on a pppoe solution that will run as part of the
>> kernel?  There is also that mouse-pppoe package.  But there is not
>> much documentation about that.

(Right there are its two major failings: userland, and ~~no doc.)

> Der Mouse's package runs in userland.  It copies all packets in/out
> of kernel space twice instead of once,

This is roughly true; every packet makes two kernel/user crossings it
ideally wouldn't - kernel to user and back to kernel, when ideally it
would stay in the kernel.  One of my "someday" projects is to migrate
it into pppd and the kernel....

> and I think there is some encapsulation that gets done/undone/redone
> as well.

This is true too - it does the PPP part by running stock PPP over a
pty, and that means the pseudo-HDLC encapsulation that PPP over a
serial line does.  But since PPPoE doesn't use this encapsulation, I
have to unencapsulate packets going one way and encapsulate packets
going the other.  Otherwise, it would have meant hacking on the kernel
PPP code to make it capable of not doing that encapsulation.

> It reportedly worked at one time for him on NetBSD before he switched
> to a provider that did not use PPPoE.

This is the confused part.  My current provider does use PPPoE; indeed,
it's still the one that prompted me to write it in the first place.  I
don't use the program as it appears in pkgsrc, though, for two reasons:
(1) the program I actually use does a good deal more than just PPPoE
(it also manages two encapsulating tunnels and some supporting routes),
and (2) whoever pkgized the thing did some nontrivial changes to it in
the process, at least one of which appears to have broken something
(specifically, I got a report from which I infer that it sets the PPP
MTU too high).

> It may depend on -current of the time though.

I don't think it depends on much.  It uses BPF to send and receive the
PPPoE packets themselves and it uses pppd on a pty to do the PPP part
of things; everything else is entirely its own code.  Since both of
those interfaces are pretty stable, there's not much that's liable to
break.

					der Mouse

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