xref: /nrf52832-nimble/rt-thread/components/net/uip/doc/html/a00105.html (revision 167494296f0543431a51b6b1b83e957045294e05)
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>uIP 1.0: apps/smtp/smtp.h File Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6 -->
8<div class="tabs">
9  <ul>
10    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
13    <li id="current"><a href="files.html"><span>Files</span></a></li>
14    <li><a href="examples.html"><span>Examples</span></a></li>
15  </ul></div>
16<div class="tabs">
17  <ul>
18    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
19    <li><a href="globals.html"><span>Globals</span></a></li>
20  </ul></div>
21<h1>apps/smtp/smtp.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
22SMTP header file.
23<p>
24<dl compact><dt><b>Author:</b></dt><dd>Adam Dunkels &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; </dd></dl>
25
26<p>
27Definition in file <a class="el" href="a00175.html">smtp.h</a>.
28<p>
29<code>#include &quot;<a class="el" href="a00206.html">uipopt.h</a>&quot;</code><br>
30
31<p>
32<a href="a00175.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
33<tr><td></td></tr>
34<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
35<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>
36
37<tr><td colspan="2"><br><h2>Appication specific configurations</h2></td></tr>
38<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>
39uIP 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>
40The file containing the definitions must be included in the <a class="el" href="a00140.html">uipopt.h</a> file.<p>
41The 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>);
42<span class="preprocessor">#define UIP_APPCALL     httpd_appcall</span>
43<span class="preprocessor"></span>
44<span class="keyword">struct </span><a class="code" href="a00080.html">httpd_state</a> {
45  <a class="code" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> <a class="code" href="a00080.html#94fcc9f5c47f419040d849ce58beae35">state</a>;
46  <a class="code" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> <a class="code" href="a00080.html#6df929b448ea98bc44d41f5e96237bda">count</a>;
47  <span class="keywordtype">char</span> *dataptr;
48  <span class="keywordtype">char</span> *script;
49};
50<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>
51</pre></div> <br><br></td></tr>
52<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g41aa744caa46913b3b3aedb2a4e78546"></a><!-- doxytag: member="smtp.h::UIP_APPCALL" ref="g41aa744caa46913b3b3aedb2a4e78546" args="" -->
53#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>
54
55<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>
56<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>
57
58<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>
59<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
60<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="" -->
61#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>
62
63<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Error number that signifies a non-error condition. <br></td></tr>
64<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)" -->
65#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>
66
67<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
68<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>
69
70<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>
71<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)" -->
72void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#g64807ba7c221ddf735572d05021539f2">smtp_init</a> (void)</td></tr>
73
74<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)" -->
75void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#gbc331f73107958428bf1c392ba19b6f4">smtp_appcall</a> (void)</td></tr>
76
77</table>
78<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:01 2006 for uIP 1.0 by&nbsp;
79<a href="http://www.doxygen.org/index.html">
80<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
81</body>
82</html>
83