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

83 lines
7.0 KiB
HTML
Raw Normal View History

<!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: apps/smtp/smtp.h File Reference</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 id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul></div>
<h1>apps/smtp/smtp.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
SMTP header file.
<p>
<dl compact><dt><b>Author:</b></dt><dd>Adam Dunkels &lt;<a href="mailto:adam@dunkels.com">adam@dunkels.com</a>&gt; </dd></dl>
<p>
Definition in file <a class="el" href="a00175.html">smtp.h</a>.
<p>
<code>#include &quot;<a class="el" href="a00206.html">uipopt.h</a>&quot;</code><br>
<p>
<a href="a00175.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<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="a00085.html">smtp_state</a></td></tr>
<tr><td colspan="2"><br><h2>Appication specific configurations</h2></td></tr>
<tr><td colspan="2">An uIP application is implemented using a single application function that is called by uIP whenever a TCP/IP event occurs. The name of this function must be registered with uIP at compile time using the UIP_APPCALL definition.<p>
uIP applications can store the application state within the <a class="el" href="a00088.html">uip_conn</a> structure by specifying the type of the application structure by typedef:ing the type uip_tcp_appstate_t and uip_udp_appstate_t.<p>
The file containing the definitions must be included in the <a class="el" href="a00140.html">uipopt.h</a> file.<p>
The following example illustrates how this can look. <div class="fragment"><pre class="fragment"><span class="keywordtype">void</span> <a class="code" href="a00164.html#g648ddfb2dde2cc55034e4e0ea41cb6d1">httpd_appcall</a>(<span class="keywordtype">void</span>);
<span class="preprocessor">#define UIP_APPCALL httpd_appcall</span>
<span class="preprocessor"></span>
<span class="keyword">struct </span><a class="code" href="a00080.html">httpd_state</a> {
<a class="code" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> <a class="code" href="a00080.html#94fcc9f5c47f419040d849ce58beae35">state</a>;
<a class="code" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> <a class="code" href="a00080.html#6df929b448ea98bc44d41f5e96237bda">count</a>;
<span class="keywordtype">char</span> *dataptr;
<span class="keywordtype">char</span> *script;
};
<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00080.html">httpd_state</a> <a class="code" href="a00153.html#g69646a81a922033c5281445a71f8ffed">uip_tcp_appstate_t</a>
</pre></div> <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g41aa744caa46913b3b3aedb2a4e78546"></a><!-- doxytag: member="smtp.h::UIP_APPCALL" ref="g41aa744caa46913b3b3aedb2a4e78546" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g41aa744caa46913b3b3aedb2a4e78546">UIP_APPCALL</a>&nbsp;&nbsp;&nbsp;smtp_appcall</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The name of the application function that uIP should call in response to TCP/IP events. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="a00085.html">smtp_state</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g69646a81a922033c5281445a71f8ffed">uip_tcp_appstate_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The type of the application state that is to be stored in the <a class="el" href="a00088.html">uip_conn</a> structure. <a href="a00153.html#g69646a81a922033c5281445a71f8ffed"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g029256bc17a12e1e86781887e11c0c7d"></a><!-- doxytag: member="smtp.h::SMTP_ERR_OK" ref="g029256bc17a12e1e86781887e11c0c7d" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#g029256bc17a12e1e86781887e11c0c7d">SMTP_ERR_OK</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Error number that signifies a non-error condition. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcff75c8c930abd6ff168e85373a4eb92"></a><!-- doxytag: member="smtp.h::SMTP_SEND" ref="gcff75c8c930abd6ff168e85373a4eb92" args="(to, cc, from, subject, msg)" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#gcff75c8c930abd6ff168e85373a4eb92">SMTP_SEND</a>(to, cc, from, subject, msg)&nbsp;&nbsp;&nbsp;smtp_send(to, cc, from, subject, msg, strlen(msg))</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#gb1fc692a2700b7a51517724364683f67">smtp_done</a> (unsigned char error)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback function that is called when an e-mail transmission is done. <a href="a00161.html#gb1fc692a2700b7a51517724364683f67"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g64807ba7c221ddf735572d05021539f2"></a><!-- doxytag: member="smtp.h::smtp_init" ref="g64807ba7c221ddf735572d05021539f2" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#g64807ba7c221ddf735572d05021539f2">smtp_init</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gbc331f73107958428bf1c392ba19b6f4"></a><!-- doxytag: member="smtp.h::smtp_appcall" ref="gbc331f73107958428bf1c392ba19b6f4" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#gbc331f73107958428bf1c392ba19b6f4">smtp_appcall</a> (void)</td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:01 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>