|
From: | address@hidden |
Subject: | Re: [lwip-users] lwIP and Ping |
Date: | Wed, 19 Nov 2008 21:38:39 +0100 |
User-agent: | Thunderbird 2.0.0.17 (Macintosh/20080914) |
HM2 wrote:
Oh, I'm sorry I haven't mentioned that, but sys.h is a core file of lwIP while sys_arch.h isn't: it's a file every port has to provide. As a consequence of that, a prototype used in lwIP core cannot be put into sys_arch.h, as it isn't included in the core files. To put it simple for port-specific functions: core headers = prototypes, port file = implementation!Why then is the sys_now() prototype in sys.h ? To me that would suggest that the function belongs in sys.c If you want the function in arch_sys.c, why isn't the prototype in arch_sys.h ?
_Or_, you could just put the include at the top of sys_arch.c, where the function sys_(unix_)now() is implemented. Oh, wait, someone else already had that idea: http://cvs.savannah.gnu.org/viewvc/contrib/ports/unix/sys_arch.c?revision=1.25&root=lwip&view=markup>From what I can tell the types required that are missing come from sys/time.h in Unix which does not exist in the lwIP file set. So those items are going to need to be added somewhere, I guess in sys_arch.h
Sorry to be joking. To make yourself familiar with lwIP core vs. port it would help to take a look at the contrib module and the example ports to run lwIP under unix/linux and win32 (aka. windows). I can't remember my learning curve with lwIP but I know documentation is not the highest priority as with most open source projects ;-) However, I hoped that the wiki + source code in the contrib module provided some guidance...
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |