[openbeosnetteam] Re: PPP #2

> > So, as promised, more on how I'm implementing the PPP stuff :)
> >
> > I've started rewriting much of the code and have made some good
> > progress.
> > Essentially the idea goes like this...
> >
> > When the ppp module starts is basically starts waiting for messages
> > using
> > receive_data (blocking) in a seperate thread. before doing this it
> > loads all
> > the modules that it can use for input/output and protocols.
> >
> > The userland PPP app starts up and sends a message to the control
> > thread,
> > using known codes for the actions and with up to 100 bytes of data.
>
> Just out of curiousity, is this userland app an equivalent of ifconfig,
> or is it the actual daemon?

It's a mixture. It's also very incomplete at the moment and ready for
someone to work on. :)

> > The format goes something like this...
> >
> > ppp user app asks for a new ppp connection for serial2,
> > - ppp control thread scans a list of "match" strings for a match,
> > gets a
> > match on "serial" and so asks the serial_ppp module (who has
> > registered this
> > match) to create a new device for "2".
> > - if we get a new serial_ppp device we create a new ppp device and
> > attach
> > the serial_ppp pointer to it
> >
> > This all works already. Next steps are harder :)  Some of the code
> > needs
> > working on, but I think I'm making progress.
>
> Yeah, I'd imagine so. One thing I think would help (although this might
> admittedly be complex) is to allow infinite layering of protocols. This
> would give you enormous long-term flexibility, although it may be
> difficult to implement.

As of last night LCP works (to a degree) and IPCP was being loaded but not
yet being started or checking things. Progress :)

The model should allow for almost unlimited attaching and layering.
Basically modules are added at run time by using string based tags, with
each module being able to register as many string "matches" as it wants. So,
while at present IPCP only currently registers "ipcp" it could (should) also
register "ipv4". This should then allow configuration options to be very
easily used. Imagine a config option

protocols: ipv4 ipx ipv6 chap

Thsi could add all these and would allow them to be correctly layered. when
the physical layer comes "up" and is in the Opened state, all the next
layers get signalled to run, so we'd end up with

physical(LCP) -> chap -> ipv4/ipx/ipv6

Of course I actually imagine that in a lot of ways when dialling in the auth
protocol will be added according to what is negotiated by LCP which makes it
even more flexible. Does that all make sense? The code is pretty damn
horrible, but you'll see that once I commit it. Hopefully we can find ways
of making it better :)

> > I'll try to get some code committed but I've had connection woes
> > since I got
> > home and will be out for possibly the next couple of days :(
>
> That sounds icky.

It was.

> > Has anyone started looking at PPPoE yet? If not I'll try to get some
> > stuff
> > started.
>
> Yeah, but 'started' is the operative term. Real life has been seriously
> intruding lately...

Know the feeling.

david



Other related posts: