Wikia

lwIP Wiki

Sample Web Server

Talk0
89pages on
this wiki

Hi there!Edit

Example
Welcome!
SannseAdded by Sannse

Welcome to our wiki, and thank you for your contributions! There's a lot to do around here, so I hope you'll stay with us and make many more improvements.

Recent changes is a great first stop, because you can see what pages other people have been editing, and where you can help.
Questions? You can ask at the Help desk or on the "discussion" page associated with each article, or post a message on [[User talk:{{{1}}}|my talk page]]!
Need help? The Community Portal has an outline of the site, and pages to help you learn how to edit.
Please sign in every time you edit, so that we can recognise you!

I'm really happy to have you here, and look forward to working with you!


Default lwIP server page
httpserver application default page
JamminJimPAdded by JamminJimP
The contrib area of the lwIP source code repository contains several sample applications, one of which is a basic Web server application. There are two versions, httpserver for use with the lwIP sockets API interface, and httpserver_raw for use with no OS (i.e. implemented via the lwIP raw API).

The application utilizes a dedicated ROMable file system implemented as 'C' source code to provide the page data (html files, jpg images, etc.) served by the lwIP device.

To use this sample application, include httpd.c, fs.c and fsdata.c and the associated header files to your project. Add a call to httpd_init() to initialize the daemon after calling lwip_init() to initialize the stack. If all is good, pointing a Web browser at your lwIP implementation's IP address should display the provided default file system index page.

To customize your web pages, you can use the makefsdata utility to generate your own file system. The 'C' source file containing the file system's contents is generated by a utility called 'makefsdata' which is also maintained/distributed as part of this sample application.

There is also a Perl script version of the makefsdata utility if you don't want to go through the effort of compiling the utility. Note though its use is deprecated and it may not include all the features of the compiled 'C' version.

Advertisement | Your ad here

Around Wikia's network

Random Wiki