Subject: Re: Changes to link layer input routines
To: chopps@merit.edu (Christian E. Hopps), Jason Thorpe <thorpej@nas.nasa.gov>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 05/19/1999 18:58:24
At 07:51 AM 5/19/99 , Christian E. Hopps wrote:
>Jason Thorpe <thorpej@nas.nasa.gov> writes:
>
>> On Sat, 15 May 1999 08:26:13 -0700 
>>  Matt Thomas <matt@3am-software.com> wrote:
>> 
>>  > Out of curiousity, what protocol?
>> 
>> PPP Over Ethernet (RFC 2516).  pppd(8) has one socket for the IPCP/LCP/etc.
>> packets anbd the PPPoE Discovery packets.  PPPoE Session and Discovery
>> packets use different Ethertypes.  pppd(8) needs to be able to choose the
>> correct code path for incoming packets, etc.
>> 
>> Basically, the application is like using Raw IP with IP_HDRINCL, except it
>> happens at layer 2.
>> 
>> The idea here is that for ETHERTYPE_PPPOE and ETHERTYPE_PPPOEDISC,
>> ether_input() will NOT m_adj() past the Ethernet header.
>
>Basically it sounds like what you need is a general purpose raw
>link layer socket.  I too could use this.

ULTRIX and DIGITAL UNIX (Compaq TRU64) have something that does
this called DLI.  It's a socket interface to 802.x media (Ethernet, FDDI,
Token Ring).

It returned you the addresses and 802LLC/EtherType in the sockaddr.
It used a sockaddr_dl but it's not anything like AF_Link's sockaddr_dl.
(it existed several years before sockaddr_dl was added 4.3 BSD).

It dealt with multicasts as well.  You could also bind to a specific
pair of addresses and others could bind to other pairs or be a default
listener for a protocol.

[FWIW, I supported DLI for almost a decade...]
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Sunnyvale, CA             Disclaimer: I avow all knowledge of this message