⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smtp__client_8c.html

📁 Freescale mcu OpenTCP-1.0.4.doc.html.zip 文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>smtp_client.c File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindex" href="examples.html">Examples</a> &nbsp; </center><hr><h1>/opentcp/smtp/smtp_client.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> <dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Version: </b></dt><dd>1.0 </dl><dl compact><dt><b>Date: </b></dt><dd>9.8.2002 </dl><dl compact><dt><b><a class="el" href="bug.html#_bug000018">Bug: </a></b></dt><dd></dl> <dl compact><dt><b>Warning: </b></dt><dd> </dl><dl compact><dt><b><a class="el" href="todo.html#_todo000020">Todo: </a></b></dt><dd></dl><p>OpenTCP implementation of SMTP client that uses TCP api. For interface functions declarations see <a class="el" href="smtp__client_8h.html">/inet/smtp/smtp_client.h</a>.<p><p>Definition in file <a class="el" href="smtp__client_8c-source.html">smtp_client.c</a>.<p><a href="smtp__client_8c-source.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>Functions</h2></td></tr><tr><td nowrap align=right valign=top>INT8&nbsp;</td><td valign=bottom><a class="el" href="smtp__client_8c.html#a9">smtpc_connect</a> (UINT32 ip, UINT16 port)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Start E-mail sending procedure.</em> <a href="#a9"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="smtp__client_8c.html#a10">smtpc_init</a> (void)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Initializes SMTP client.</em> <a href="#a10"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>UINT8&nbsp;</td><td valign=bottom><a class="el" href="smtp__client_8c.html#a11">smtpc_getstate</a> (void)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Retrieves SMTP clients' state.</em> <a href="#a11"></a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td nowrap align=right valign=top>UINT8&nbsp;</td><td valign=bottom><a class="el" href="smtp__client_8c.html#a0">smtpc_init_done</a> = 0</td></tr><tr><td nowrap>struct {</td></tr><tr><td nowrap valign=top>}&nbsp;</td><td valign=bottom><a class="el" href="smtp__client_8c.html#a8">smtp_client</a></td></tr><tr><td>&nbsp;</td><td><font size=-1><em>SMTP client state information.</em> <a href="#a8"></a><em></em></font><br><br></td></tr></table><hr><h2>Function Documentation</h2><a name="a9" doxytag="smtp_client.c::smtpc_connect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> INT8 smtpc_connect </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">UINT32&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>ip</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>UINT16&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>port</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>12.08.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>ip</em>&nbsp;</td><td>IP address of SMTP server </td></tr><tr><td valign=top><em>port</em>&nbsp;</td><td>Port number on server (remote port) </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> - 1 - Error <li> &gt;=0 - Connection procedure started (OK)</ul></dl>This function is called by user when she wants to start E-mail  sending procedure. The function is responsible of establishing connection to SMTP server. After connection is established the SMTP client engine starts to make callbacks to user functions in order to get E-mail address information, data etc. <p>Definition at line <a class="el" href="smtp__client_8c-source.html#l00120">120</a> of file <a class="el" href="smtp__client_8c-source.html">smtp_client.c</a>.<p>References <a class="el" href="smtp__client_8c.html#a8">smtp_client</a>, <a class="el" href="smtp__client_8h-source.html#l00079">SMTP_CLOSED</a>, and <a class="el" href="smtp__client_8h-source.html#l00080">SMTP_OPEN_REQUESTED</a>.    </td>  </tr></table><a name="a10" doxytag="smtp_client.c::smtpc_init"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void smtpc_init </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&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><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>12.08.2002</dl>This function should be called once when system starts. Make sure that system services e.g. timers, TCP are initialized before initializing applications! <p>Definition at line <a class="el" href="smtp__client_8c-source.html#l00155">155</a> of file <a class="el" href="smtp__client_8c-source.html">smtp_client.c</a>.<p>References <a class="el" href="timers_8c-source.html#l00131">get_timer()</a>, <a class="el" href="system_8h-source.html#l00163">RESET_SYSTEM</a>, <a class="el" href="smtp__client_8c.html#a8">smtp_client</a>, <a class="el" href="smtp__client_8h-source.html#l00079">SMTP_CLOSED</a>, <a class="el" href="smtp__client_8c-source.html#l00075">smtpc_init_done</a>, <a class="el" href="tcp__ip_8h-source.html#l00459">TCP_APP_OFFSET</a>, <a class="el" href="tcp__ip_8h-source.html#l00225">TCP_DEF_TOUT</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp__ip_8h-source.html#l00214">TCP_TOS_NORMAL</a>, and <a class="el" href="tcp__ip_8h-source.html#l00320">TCP_TYPE_CLIENT</a>.    </td>  </tr></table><a name="a11" doxytag="smtp_client.c::smtpc_getstate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> UINT8 smtpc_getstate </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&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><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>6.10.2002</dl>Returns the state of SMTP client <p>Definition at line <a class="el" href="smtp__client_8c-source.html#l00193">193</a> of file <a class="el" href="smtp__client_8c-source.html">smtp_client.c</a>.<p>References <a class="el" href="smtp__client_8c.html#a8">smtp_client</a>.    </td>  </tr></table><hr><h2>Variable Documentation</h2><a name="a0" doxytag="smtp_client.c::smtpc_init_done"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> UINT8 smtpc_init_done = 0      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Defines whether smtpc_init has already been invoked or not <p>Definition at line <a class="el" href="smtp__client_8c-source.html#l00075">75</a> of file <a class="el" href="smtp__client_8c-source.html">smtp_client.c</a>.<p>Referenced by <a class="el" href="smtp__client_8c-source.html#l00155">smtpc_init()</a>.    </td>  </tr></table><a name="a8" doxytag="smtp_client.c::smtp_client"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> struct { ... }  smtp_client      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>smtp_client variable holds various information about the smtp client needed for proper operation. <p>Referenced by <a class="el" href="smtp__client_8c-source.html#l00120">smtpc_connect()</a>, <a class="el" href="smtp__client_8c-source.html#l00193">smtpc_getstate()</a>, and <a class="el" href="smtp__client_8c-source.html#l00155">smtpc_init()</a>.    </td>  </tr></table><hr><address style="align: right;"><small>Generated on Sun Aug 3 20:33:00 2003 for OpenTCP by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -