[lwip-users] lwip with & without OS (need help & advice)

3 views
Skip to first unread message

sanjib das

unread,
Apr 20, 2011, 12:04:38 PM4/20/11
to lwip-...@nongnu.org
Hi All,

I am very new to lwip. I have a very basic doubt on porting lwip with & without OS.
I googled a lot...but dint get as such any link where things are explained in detail.

lwip with OS (say Linux):
-- does it mean lwip stack will be initialized as part of Linux kernel?
-- in that case does the Linux kernel bypasses its own TCP/IP stack?
-- If lwip is not initialized as part of linux kernel, then can we run it as user space process?

lwip without OS:
-- does it mean lwip can be ported solely as an OS in a micro-controller chip?

Can we port it with Linux (either as kernel or user space module)? Is there any document
on how to port with linux?

thanks in advance
onebrother
 

WebRep
Overall rating
 

gold...@gmx.de

unread,
Apr 20, 2011, 2:34:16 PM4/20/11
to Mailing list for lwIP users
sanjib das wrote:
> Hi All,
Hi onebrother,

>
> I am very new to lwip. I have a very basic doubt on porting lwip with
> & without OS.
> I googled a lot...but dint get as such any link where things are
> explained in detail.
In the lwIP case, "OS" has nothing to do with Linux or Windows or other
full-featured operating systems. Instead, it means the ability to have
multiple threads. lwIP as such is targeted for embedded systems only.
You can compile it to run as a process in user-space on Linux or Windows
(and others), but first, you need a way to access a network device from
there (e.g. by using pcap or a tunnel-interface) and on the other hand,
you won't get the same performance as you do with these OS's internal
network stacks as lwIP often favours small size over high speed.

So, in the lwIP case, "without OS" means you have on big main loop only
(aside from interrupts), while "with OS" means that you have a small
embedded OS that provides threading support, semaphores, mailboxes, etc.

OTOH, there are working ports for Linux and windows in the contrib
module in CVS, but that's simply not the main target of lwIP.

Simon

_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Kieran Mansley

unread,
Apr 20, 2011, 3:41:36 PM4/20/11
to Mailing list for lwIP users

On 20 Apr 2011, at 17:04, sanjib das wrote:

> lwip with OS (say Linux):
> -- does it mean lwip stack will be initialized as part of Linux kernel?

No.

> -- in that case does the Linux kernel bypasses its own TCP/IP stack?

No.

> -- If lwip is not initialized as part of linux kernel, then can we run it as user space process?

Yes! This is the normal way it is used with Linux. When running with an OS on a microcontroller though it may well be the only stack, and not really be the same as a user-level stack within a process as is done in the Linux (actually unix) port

> lwip without OS:
> -- does it mean lwip can be ported solely as an OS in a micro-controller chip?

Not quite sure what you mean here, but lwIP can operate on a micro-controller without an operating system providing things like threads, etc. lwIP isn't the OS in this case, there just isn't one.

> Can we port it with Linux (either as kernel or user space module)?

Yes, although you don't need to because this port has already been done. See the contrib/ports/unix directory.

> Is there any document
> on how to port with linux?

No, but see the above example.

Kieran

sanjib das

unread,
Apr 28, 2011, 4:22:34 AM4/28/11
to Mailing list for lwIP users
thanks a lot Kieran.

sanjib das

unread,
Apr 28, 2011, 4:22:58 AM4/28/11
to Mailing list for lwIP users
thanks Simon.

guruprasad k

unread,
Oct 14, 2025, 10:59:06 PMOct 14
to osdeve.mirror.tcpip.lwip
hello 
i wanted to know how can we port the lwip files to PSoC 

Regards,
GP
Reply all
Reply to author
Forward
0 new messages