[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Gateway problem with LwIP
From: |
address@hidden |
Subject: |
Re: [lwip-users] Gateway problem with LwIP |
Date: |
Fri, 21 Dec 2012 14:31:20 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
sb80 wrote:
have you an example code for me to realize this routing function?
No, I'm sorry there is no extended routing code available, and I can't
write it for you.
should I define in the the opt.h something like this
Yes, the definition looks good.
and in ip.c
No, place the function somewhere else. You shouldn't have to modify the
original lwIP source files.
struct netif * routingToNetif(ip_addr_t *dest)
{
...
??what should the code make here? select the interface which have the rigth
gateway?
That totally depends on how you want your routing. I can't tell you
that: for me, the standard lwIP routing is enough.
Am I right? that if i include this function, the ARP, ping and others take
the right interface to find the gateway (MAC) and other destinitaions?
No, routing is done at IP level, ARP is on a lower level. But I think I
see what you mean... If your routing function is OK, you will see the
ARP requests on both netifs when you ping the correct addres.
Is it enough that only this routing function is included in the old version
from me with out to upgrade the whole lwip code?
I'm sorry I can't support such selective upgrade paths. It might work
though, just try it and see if it works.
Can you advise a documentation where i can learn more about the functions
from the lwip stack? Because sometimes I don't understand the application
flow from the stack (because it's a new world for me :-) )
See the text files in /doc, and the wiki (http://lwip.wikia.com/).
Simon