This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with application to use lwIP


On Fri, Oct 12, 2007 at 12:33:44PM +0200, ?yvind Harboe wrote:
> I'm trying to use lwIP, but I run into problems because lwIP uses
> macros, e.g. #define read(a,b,c), which screws things up. I've seen
> some posts about people wishing for/thinking about making lwIP more
> compatible with a "standard" eCos TCP/IP stack.
> 
> Rather than try to adapt the code that is going to use lwIP(it
> currently uses eCos FreeBSD + POSIX) or changing lwIP, I was wondering
> if I could somehow pull off the following:
> 
> - Use the standard include files from eCos instead of lwIP include
> files so application continues to compile fine.
> - Link w/lwIP only instead of trying to compile with it.
> 
> This would require adding a .c file that implemented functions that
> used the lwIP include files and exported function calls that were
> compatible with lwIP.
> 
> Any thoughts on this approach?

I've had a quick look. Most of it is straight forward. There is a
couple of problem though....

lwip has no recvmsg and sendmsg function. The missing sendmsg is the
bigger problem because eCos maps all send functions to it. So your
wrapper will need to implement it on top of what lwip
provides. However i don't think this is a big problem. It looks like
you can implement the functions needed for struct cyg_sock_ops. 

Implementing select looks a bit trickier. You are probably going to
have to make the lwip implementation of select in
/net/lwip_tcpip/current/src/api/socket.c conditional compiled so you
can remove it. However i think the necessary calls backs are there to
make an eCos style select work.

Overall, i think it is feasible, but you won't really know until you
try to implement it. Then the real details will become clear.

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]