Subject: Re: Layer-2 socket proposal
To: Darren Reed <firstname.lastname@example.org>
From: Christian E. Hopps <email@example.com>
Date: 12/27/1999 21:56:51
Darren Reed <firstname.lastname@example.org> writes:
> In some email I received from Christian E. Hopps, sie wrote:
> > sdl_index/sdl_nlen+sdl_data
> > -- specifies which interface to receive frame
> > from. If no interface is specified then every
> > interface is eligible.
> > sdl_type -- if no interface is chosen the user
> > can select a specific interface type,
> > e.g., IFT_ETHER.
> > sdl_slen+sdl_data
> > -- specifies a selector in the logical frame.
> > e.g. for FRAMETYPE_E2 it would be a 2 octet
> > value specifying the ethertype, and for
> > FRAMETYPE_LLC it would be the destination
> > service access point (i.e., llc_dsap).
> sdl_data is used twice here...are these three therefore mutually exclusive
> options ? I think it would be useful to be able to specify a combination
> of these things.
No they aren't mutually exclusive. I'm not defining new semantics for
sockaddr_dl, merely using them.
The layout of sockaddr_dl is that sdl_data is sdl_nlen bytes of name,
followed by sdl_alen bytes of address followed by sdl_slen bytes of
selector (e.g., see the LLADDR() currently in the if_dl.h).
So yes you can specify both type and selector or index and selector or
name and selector.