About the embedded web server – Altera Nios II Embedded Evaluation Kit Cyclone III Edition User Manual
Page 50
Altera Corporation
5–14
July 2010
Nios II Embedded Evaluation Kit, Cyclone III Edition
Design Examples
About the Embedded Web Server
The application selector also features an embedded web server which
serves up web pages to enable the remote system update capability. The
way this works is as follows:
■
When your kit is connected to a network, the application will serve
up a web page
1
The HTTP server looks for content contained in the
webserver_html
directory at the top level of the SD card.
Though default content is provided, the server will read any
valid files that are placed into this directory.
■
If DHCP is available, the application will attempt to obtain an IP
address from a DHCP server. Otherwise, a static IP address (defined
in web_server.h) will be assigned after a time-out.
■
The server can process basic requests to serve HTML, JPEG, and GIF
files from the Altera FAT file system on an SD card.
The embedded web server is in no way a complete implementation of a
full-featured HTTP server. This example uses the sockets interface.
To learn more about the application selector with embedded web server
refer to the source code and design example in the <install_dir>/
examples/application_selector
folder.
A good introduction to sockets programming is the book Unix Network
Programming by Richard Stevens. Additionally, the text Sockets in C, by
Donahoo & Calvert, is a concise and inexpensive text for getting started
with sockets programming.