
HTTP Server Support
6-14
6.5
HTTP Server Support
6.5.1
Synopsis
An HTTP (Hypertext Transfer Protocol) server allows a remote browser to view
content on the server file system. Files can be stored for viewing and forms can
also be stored to allow remote interaction with the system. Form POST func-
tions become calls to application defined C functions that allow the embedded
system to be remotely controlled via a HTTP browser.
6.5.2
Operation
The HTTP Server service provides a mechanism for serving HTTP content to
remote HTTP client applications. It uses the “embedded file system” contained
in the OS adaptation layer. These functions in the EFS programming API in-
clude a prefix of “efs_”. Modifying the EFS functions in the OS adaptation layer
allows the system programmer to support a variety of file storage options, in-
cluding memory, flash cards and hard drives.
6.5.3
Using the HTTP Server and Adding WEB Content
This section includes information on how to invoke and monitor the status of
the HTTP server. WEB application developers will be more interested in how
to add WEB content including HTML pages and CGI functions. These topics
are discussed in a special appendix to this document.
6.5.4
HTTP Server Parameter Structure
The HTTP server service does not require a parameter structure.
6.5.5
Specifying Service Using the Configuration
The service can be specified as public in that it can connect using any IP
address, or an IP address of a specific interface. When accepting connections
to any system IP address, the service is specified with the “CALLBYIP” flag
and an IP address of INADDR_ANY. When a private connection is desired, the
service is specified by the physical interface on which connections are allowed
to occur. Since an IP address is required to initialize the service, the
“RESOLVEIP” flag should also be set in the latter case.
For example, the following code specifies that the HTTP server should run us-
ing the IP address INADDR_ANY.