[openbeosnetteam] Re: PPP API

  • From: "Nathan Whitehorn" <nathan.whitehorn@xxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Wed, 21 May 2003 22:16:30 -0400

> Nathan wrote:
> > What happens is that you declare yourself, say, ppp/ethernet. The 
> > net 
> > stack, which keeps a register of all active layers, then tries to 
> > attach all ethernet/* devices underneath you, and to attach you to 
> > all 
> > */ppp devices. In the case of PPP, since the ppp protocol does 
> > things 
> > itself, pppoe would be something like ppptransport/ethernet, and 
> > PPP 
> > would be ppp/ppptransport. 
> 
> Oh, I see now.
> Don't ask, but first time I saw the layer names, I thought of MIME 
> string :-)
> 
> So, for a TCP connection sent over an ethernet card /dev/net/vt86c100
> /0 
> (that's an example fitting well my home system :-) ) it will give 
> these 
> down linked layers:
> 
> 1) socket[able]/tcp
> 2) tcp/ip
> 3) ip/ethernet
> 4) ethernet/vt86c100(/0?)
> 
> where:
> 
> 1) implement the TCP datagram(s) building and handling
> 2) implement the TCP datagram encapsulation into a IP frame (and 
> handle 
> fragmentation, retries, etc?)
> 3) implement ethernet framing of a ip datagram
> 4) implement an ethernet type interface link
>  
> Am I right?

Yes. For generic IP tasks shared among IP protocols, you might have 
iptransport/ethernet and ip/iptransport layers. It depends how much 
shared functionality there is.

You might also have a sockets/socketable layer at the very top that 
implements the sockets layer. This would allow us to have multiple 
front-ends to the stack too, as well as removing network functionality 
from the central stack entirely.

> For input, the Net::Layer::ParentType() give the layer name from 
> which 
> we accept (or is it only "expect" here?)
> input, like in your sample ppp/pppoe layer, which return ParentType() 
> of "ethernet/*"?

This is an old version of the architecture, which let you supply, in 
ParentType() a regex for the sorts of things you want under you. I 
prefer the above-mentioned naming architecture to the way it exists in 
the code I submitted.

> Overall, I like this way of auto-assembly of network layers, which 
> suppress the protocols/interfaces classic split too.

Thanks!

> Fortune Cookie Says:
> 
> Pohl's law:
>       Nothing is so good that somebody, somewhere, will not hate it.

Interesting applicability. I wonder who will hate this? :P
-Nathan

--
Fortune Cookie Says:

Around computers it is difficult to find the correct unit of time to
measure progress.  Some cathedrals took a century to complete.  Can you
imagine the grandeur and scope of a program that would take as long?
                -- Epigrams in Programming, ACM SIGPLAN Sept. 1982

Other related posts: