lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Routing in lwIP.


From: Alain M.
Subject: Re: [lwip-users] Routing in lwIP.
Date: Thu, 29 Jan 2009 16:31:25 -0200
User-agent: Thunderbird 2.0.0.17 (X11/20080914)


Jonathan Larmour escreveu:
Alain M. wrote:
Ranjan Sinha escreveu:
Hi,

I was wondering about how lwIP decides routes. I have gone through the
available documentation and source code as well and to me it seems
that routing is implemented in a very simple way; One interface is
marked as default and we match the destination addresses with
interface addresses keeping netmask in mind.

Has anybody implemented more complex routing scenarios? For example,
assigning metrics and seting up a routing table.

One simple thing that comes to my mind and that can solve most problems
is to select the interface for each connection.

It would certainly be faster then searching a routing table and as an
optional feature the interface selected could be a pointer to the actual
interface.

This should work in reduced environments as things don't usualy change
so much and it would still be light wheight as in LWip :)

The current ip_route is just a simple linear search anyway, so with only
one netif, it would take a trivial amount of time in any case. If you had
some sort of route cache, you'd have to be able to know when to invalidate
it, which would add complexity, thus reducing any difference.

I don't understand why you would want a routing table with a single netif. I was thinking only of the situation with more interfaces (I will have ethernet+ppp/gprs). I am new to lwip, so I would appreciate a lot if you nad give me some extra explanations, or pointers to further study.

So I think any focus on creating an (optional) routing table should be more
focussed on features than performance per se.

FWIW, I agree (I am new here, so it may not be worth a lot :)

Alain

Jifl





reply via email to

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