On Wed, 2006-07-19 at 16:05 -0700, Dennis Sandwiese wrote: > Hi Everyone, > > I was wondering if someone could shed some light on > how two unrelated processes in Unix could share Lwip. > I see that the application thread communicates with > the TCP thread through message queues. Some of the > Lwip initialization is for the TCP/IP thread and the > rest for the application side. I assume that the lib > code on the application side needs to be initialized > before an unrelated process could "talk" to an already > running TCP thread through message queues. Is that > right? Ultimately, I want to be able to run lwip as an > independent "service" that other applications in the > system could share. I appreciate any suggestions. Or > please let me know if I got it all wrong.
The simplest way to do this would be to have a single service thread that runs lwIP, and the other processes that want to use it can communicate with it using a IPC protocol of your own devising - there are plenty to choose from. How this would be structured rather depends on what operating system features you have, and what performance you need. Each process would then link against a library that would convert socket calls into this IPC protocol and forward them to the lwIP process. It's possible that the interface from sockets API -> core lwIP could be used as a basis for the IPC, but I've not given that much thought so there could easily be major problems there. Have you considered just giving each process its own lwIP stack? Might be easier. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
