I have been hacking on the PPP generic layer with the aim of making it
easier to implement ppp channels by removing the requirement that the
channel code has to provide read/write/ioctl methods; instead these are
provided per-channel in the generic code. Secondarily I have been
improving the SMP locking.
Currently it works for async ttys on UP systems. There is some kind of
deadlock in the SMP locking that I am still chasing, and I haven't updated
the sync ppp channel code yet. There is some embryonic multilink code in
there but it isn't complete.
If you are interested to have a look, the url is:
The `register channel' and `connect channel to ppp interface' functions
are now distinct. When a channel is ready to do PPP, it should call
register_channel, which now only takes one argument, the address of the
ppp_channel structure. Pppd will arrange to do the `connect channel to
ppp interface' part via the generic layer.
The generic code lets pppd attach an open instance of /dev/ppp to an
individual channel and do read/write/ioctl on it. The channel can provide
an ioctl function which gets called from the generic layer if it gets an
ioctl on an instance of /dev/ppp that is attached to a channel and it
doesn't recognize the command.
For now, the async tty channel code provides read/write/ioctl by calling
compatibility functions in the generic code - this lets pppd-2.3.11 run
with the new code.
So all the channel code has to do is to call register_channel and
unregister_channel at the appropriate times, provide a start_xmit function
and optionally an ioctl function, and call ppp_input with received frames.
Should be a piece of cake, no? :-)
Paul Mackerras, Senior Open Source Researcher, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
Linuxcare. Support for the revolution.