netdev
[Top] [All Lists]

Re: RFC: PPP over X

To: Henner Eisen <eis@xxxxxxxxxxxxx>
Subject: Re: RFC: PPP over X
From: Michal Ostrowski <mostrows@xxxxxxxxxxxxxxxxx>
Date: Thu, 3 Feb 2000 18:12:01 -0500 (EST)
Cc: jamal <hadi@xxxxxxxxxx>, netdev@xxxxxxxxxxx, axboe@xxxxxxx, Mark Spencer <markster@xxxxxxxxx>, mitch@xxxxxxxxxx, Andi Kleen <ak@xxxxxxx>, Marc Boucher <marc@xxxxxxx>, paulus@xxxxxxxxxxxxx, Michal Ostrowski <mostrows@xxxxxxxxxxxxxxxxx>, Ben LaHaise <bcrl@xxxxxxxxxx>
In-reply-to: <ou7lgm2bbu.fsf@baty.hanse.de>
References: <Pine.GSO.4.20.0002021030520.22723-100000@shell.cyberus.ca> <ou7lgm2bbu.fsf@baty.hanse.de>
Sender: owner-netdev@xxxxxxxxxxx
Henner Eisen writes:
 > >>>>> "jamal" == jamal  <hadi@xxxxxxxxxx> writes:
 > 
 >     jamal> -Hard coded for PPPOE -Creating a whole socket family for
 >     jamal> just PPPOE is a bad idea (claim: Could make it for PPPOX
 >     jamal> with type PPPOE, L2TP etc).
 > 
 > What about a generic ´ppp over socket´ paradigm which would eliminate
 > the need of special protocol families for each ppp carrier?
 > 
 > I´was thinking about it like this:
 > 

Your outline is almost identical to the code I've got right now. Feel
free to take a look: http://www.math.uwaterloo.ca/~mostrows



 > 
 > ppp connections would be set up like this:
 > 
 > - pppd creates socket corresponding to ppp carrier, e.g.
 >   PPP over ethernet:   s = socket(PF_PACKET,SOCK_PACKET,ETH_P_PPPOE);


The problem here is that you need to use bind and/or connect
(regardless of where negotiation is performed), and you need to do
with a sockaddr that is not compatible with PF_PACKET.  It is this
need for an addressing scheme which is unique to PPPoE that made me go
with PF_PPPOE.  Modifying PF_PACKET to make exceptions and support
"protocols" that have different addressing schemes would be rather
grotesque.


To do PPPoE you must bind sockets to addresses that consist of an
ethernet MAC address and a PPPoE session id (and implicitly an
ethernet data type of 0x8864).  I don't think there's any way of doing 
this cleanly inside another address family such as PF_PACKET.

Things get a bit more complicated when you want to do in-kernel
connection negotiation, since you may then have to bind sockets to an
additional address component: the access-concentrator name.  

Michal Ostrowski
mostrows@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>