rt-thread/components/net/uip/doc/html/a00164.html

173 lines
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>uIP 1.0: Web server</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul></div>
<h1>Web server<br>
<small>
[<a class="el" href="a00143.html">Applications</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
The uIP web server is a very simplistic implementation of an HTTP server.
<p>
It can serve web pages and files from a read-only ROM filesystem, and provides a very small scripting language.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html">httpd-cgi.h</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Web server script interface header file. <br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html">httpd-cgi.c</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Web server script interface. <br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html">httpd.c</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Web server. <br></td></tr>
<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00079.html">httpd_cgi_call</a></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g1dbc635a2924806f42d7e3273a6a69b5">HTTPD_CGI_CALL</a>(name, str, function)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">HTTPD CGI function declaration. <a href="#g1dbc635a2924806f42d7e3273a6a69b5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7d7920c1e51cc4eef80206ebd6fee3f4"></a><!-- doxytag: member="httpd::STATE_WAITING" ref="g7d7920c1e51cc4eef80206ebd6fee3f4" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g7d7920c1e51cc4eef80206ebd6fee3f4">STATE_WAITING</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g8a645f8831837320c4e0c704e871abcf"></a><!-- doxytag: member="httpd::STATE_OUTPUT" ref="g8a645f8831837320c4e0c704e871abcf" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g8a645f8831837320c4e0c704e871abcf">STATE_OUTPUT</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3212e70c55244608ac16316888c354f0"></a><!-- doxytag: member="httpd::ISO_nl" ref="g3212e70c55244608ac16316888c354f0" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g3212e70c55244608ac16316888c354f0">ISO_nl</a>&nbsp;&nbsp;&nbsp;0x0a</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g71e1b022f7b7fa3a154f19372b239935"></a><!-- doxytag: member="httpd::ISO_space" ref="g71e1b022f7b7fa3a154f19372b239935" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g71e1b022f7b7fa3a154f19372b239935">ISO_space</a>&nbsp;&nbsp;&nbsp;0x20</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge3f8f7deae69854853b0c8ebb82c380d"></a><!-- doxytag: member="httpd::ISO_bang" ref="ge3f8f7deae69854853b0c8ebb82c380d" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#ge3f8f7deae69854853b0c8ebb82c380d">ISO_bang</a>&nbsp;&nbsp;&nbsp;0x21</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g79f9a50c2cccb967d38a2eeb45d2fd75"></a><!-- doxytag: member="httpd::ISO_percent" ref="g79f9a50c2cccb967d38a2eeb45d2fd75" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g79f9a50c2cccb967d38a2eeb45d2fd75">ISO_percent</a>&nbsp;&nbsp;&nbsp;0x25</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf7dd2757d1e766f65b01ba7c91c660a0"></a><!-- doxytag: member="httpd::ISO_period" ref="gf7dd2757d1e766f65b01ba7c91c660a0" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#gf7dd2757d1e766f65b01ba7c91c660a0">ISO_period</a>&nbsp;&nbsp;&nbsp;0x2e</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g820fb27c50e7bb4ac6d9eae1b06630a5"></a><!-- doxytag: member="httpd::ISO_slash" ref="g820fb27c50e7bb4ac6d9eae1b06630a5" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g820fb27c50e7bb4ac6d9eae1b06630a5">ISO_slash</a>&nbsp;&nbsp;&nbsp;0x2f</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g14e276fa8e765f774f4162619f1c8fc1"></a><!-- doxytag: member="httpd::ISO_colon" ref="g14e276fa8e765f774f4162619f1c8fc1" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g14e276fa8e765f774f4162619f1c8fc1">ISO_colon</a>&nbsp;&nbsp;&nbsp;0x3a</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge6f849e94cf6e214be8ffa9a548ecfcd"></a><!-- doxytag: member="httpd::httpd_cgi" ref="ge6f849e94cf6e214be8ffa9a548ecfcd" args="(char *name)" -->
httpd_cgifunction&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#ge6f849e94cf6e214be8ffa9a548ecfcd">httpd_cgi</a> (char *name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g648ddfb2dde2cc55034e4e0ea41cb6d1"></a><!-- doxytag: member="httpd::httpd_appcall" ref="g648ddfb2dde2cc55034e4e0ea41cb6d1" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#g648ddfb2dde2cc55034e4e0ea41cb6d1">httpd_appcall</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#gc364305cee969a0be43c071722b136e6">httpd_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the web server. <a href="#gc364305cee969a0be43c071722b136e6"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="g1dbc635a2924806f42d7e3273a6a69b5"></a><!-- doxytag: member="httpd-cgi.h::HTTPD_CGI_CALL" ref="g1dbc635a2924806f42d7e3273a6a69b5" args="(name, str, function)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define HTTPD_CGI_CALL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">name, <tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>str, <tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>function&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
HTTPD CGI function declaration.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The C variable name of the function </td></tr>
<tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>The string name of the function, used in the script file </td></tr>
<tr><td valign="top"></td><td valign="top"><em>function</em>&nbsp;</td><td>A pointer to the function that implements it</td></tr>
</table>
</dl>
This macro is used for declaring a HTTPD CGI function. This function is then added to the list of HTTPD CGI functions with the httpd_cgi_add() function.
<p>
Definition at line <a class="el" href="a00183.html#l00077">77</a> of file <a class="el" href="a00183.html">httpd-cgi.h</a>. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gc364305cee969a0be43c071722b136e6"></a><!-- doxytag: member="httpd.c::httpd_init" ref="gc364305cee969a0be43c071722b136e6" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void httpd_init </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">void&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Initialize the web server.
<p>
This function initializes the web server and should be called at system boot-up.
<p>
Definition at line <a class="el" href="a00184.html#l00333">333</a> of file <a class="el" href="a00184.html">httpd.c</a>.
<p>
References <a class="el" href="a00202.html#l01070">HTONS</a>, and <a class="el" href="a00201.html#l00529">uip_listen()</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>