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: pradip de
Subject: Re: [lwip-devel] Adding a static route table in LwIP
Date: Tue, 26 May 2015 17:06:48 -0700

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

>
> Hi,
>
> A hook is the way to go. Check master branch, you can define LWIP_HOOK_IP6_ROUTE for this purpose.

> This will allow you to choose the proper netif based on your own static routing. The stack will then select the correct source address. In your netif->output_ip6 function you would then resolve your router MAC address, either through ND6 or through the static table (or a mixed approach, however you implement it).

>
> Cheers
> Ivan


reply via email to

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