[Ns-developers] How to tap an NetDevice into another one ?
Tom Henderson
tomh at tomh.org
Wed Nov 16 22:16:34 PST 2011
On 11/16/2011 03:20 PM, Tommaso Pecorella wrote:
> Hi all,
>
> request for suggestions (maybe I missed something).
>
> I want to stick an NetDevice on top of another one, masquerading it in
> the "right" way. So far I borrowed the idea from the Bridge interface,
> but I'm far from happy about the results.
>
> Let me first explain the problem better.
>
> Normal stack Custom stack
> +------------------+ +--------------------+
> | IP layer | | IP layer |
> | | +--------------------+
> +------------------+ | ghost layer |
> | MAC layer | +--------------------+
> | | | MAC layer |
> +------------------+ +--------------------+
>
> The problem with the approach I used is that it works BUT I have one
> extra NetDevice in the list of the node devices, so a dumb code could
> try to use it, while it should be invisible but for the ones explicitly
> checking for it.
>
> Any smart ideas ?
Are there particular problems with existing code getting confused? I
think it is probably a job of the upper-layer code to be smarter about
which devices to use or not. For example, IPv4 global routing code will
not try to use net devices that do not have a corresponding IPv4
interface defined.
>
> BTW, if you're wondering the ghost layer is basically shrinking IP
> packet headers, as is, it's the 6LoWPAN layer. I was even thinking to
> add it to the IP stack as a decorator, but it's a bit an overkill... or
> not ?
I was thinking that 6LoWPAN could be instead supported by a single
NetDevice that combined 802.15.4 mac and phy with the 802.2 LLC and
convergence layers specific to 6LoWPAN. Does your 6LoWPAN layer have to
be another NetDevice?
- Tom
More information about the Ns-developers
mailing list