lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Adding a static route table in LwIP


From: Ivan Delamer
Subject: Re: [lwip-devel] Adding a static route table in LwIP
Date: Wed, 27 May 2015 10:45:42 -0600

Date: Tue, 26 May 2015 17:06:48 -0700
From: pradip de <address@hidden>
To: address@hidden
Subject: Re: [lwip-devel] Adding a static route table in LwIP
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="utf-8"

Hi Ivan,

Thanks again for the suggestion.

The LWIP_HOOK_IP6_ROUTE seems like a callback to higher level
implementation of a routing function. Sure it could be used for a static route check as well. However, the purpose of this hook is only to return an
outgoing netif, correct?

But what if the static route entry has a gateway that needs to be picked up during selection of a next hop. There needs to be logic in nd6_get_next_hop
code that looks up the static route table to fetch the gateway as the
neighbor to send to.

For some reason it seems to me that a static route table is a basic feature and could be a separate part(albeit within conditional compilation flags) of the core IP6 routing mechanism instead of as a plugin or hook. Plugins or hooks are probably apt for hooking up advanced or sophisticated routing
functions.

Thanks,

Pradip

Yes, LWIP_HOOK_IP6_ROUTE would check your static route table and return the suitable netif. Based on netif selection, the stack would select a suitable source address.

In your netif->output_ip6 function, you resolve the next hop. Take a look at ethip6_output(), you can use it as a template. You could insert your static route lookup code before the nd6_get_next_hop_entry() call. You don't need to use ethip6_output(), you can choose your own implementation when you add your netif.

Because static routing can be done in so many ways, I believe it should remain separate from ND6. We aim to be RFC compliant. I don't know that we could come up with a static route module that would satisfy everyone.

My suggestion is that you post your work on Savannah as a patch, so that other people can benefit from it. If we see enough interest over time, and it proves stable, we can look at adding it to the master branch. That's actually how the IPv6 code started, as an optional patch. We may also create a development branch for this if we have several developers working on it.

Cheers
Ivan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]