rtt-f030/components/net/uip/doc/html/a00102.html

120 lines
12 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: apps/resolv/resolv.c 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/resolv/resolv.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
DNS host name to IP address resolver.
<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>
This file implements a DNS host name to IP address resolver.
<p>
Definition in file <a class="el" href="a00172.html">resolv.c</a>.
<p>
<code>#include &quot;<a class="el" href="a00173.html">resolv.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="a00202.html">uip.h</a>&quot;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<p>
<a href="a00172.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>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g070d2ce7b6bb7e5c05602aa8c308d0c4"></a><!-- doxytag: member="resolv.c::NULL" ref="g070d2ce7b6bb7e5c05602aa8c308d0c4" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>&nbsp;&nbsp;&nbsp;(void *)0</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gecf13b8dc783db2202ca5c34fe117fc3"></a><!-- doxytag: member="resolv.c::MAX_RETRIES" ref="gecf13b8dc783db2202ca5c34fe117fc3" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#gecf13b8dc783db2202ca5c34fe117fc3">MAX_RETRIES</a>&nbsp;&nbsp;&nbsp;8</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="96eb4534b574ece96ed36806039f73d3"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_RESPONSE" ref="96eb4534b574ece96ed36806039f73d3" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#96eb4534b574ece96ed36806039f73d3">DNS_FLAG1_RESPONSE</a>&nbsp;&nbsp;&nbsp;0x80</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4350350ce0d4595876743d4c0a720bcc"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_OPCODE_STATUS" ref="4350350ce0d4595876743d4c0a720bcc" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#4350350ce0d4595876743d4c0a720bcc">DNS_FLAG1_OPCODE_STATUS</a>&nbsp;&nbsp;&nbsp;0x10</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7250008b68d1909d54040515eef8ebb"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_OPCODE_INVERSE" ref="e7250008b68d1909d54040515eef8ebb" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#e7250008b68d1909d54040515eef8ebb">DNS_FLAG1_OPCODE_INVERSE</a>&nbsp;&nbsp;&nbsp;0x08</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a327c0ffd40f69fbcd5f01f12e5745c"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_OPCODE_STANDARD" ref="6a327c0ffd40f69fbcd5f01f12e5745c" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#6a327c0ffd40f69fbcd5f01f12e5745c">DNS_FLAG1_OPCODE_STANDARD</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd685a0f8b5e76a2687cc0f306813bfb"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_AUTHORATIVE" ref="dd685a0f8b5e76a2687cc0f306813bfb" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#dd685a0f8b5e76a2687cc0f306813bfb">DNS_FLAG1_AUTHORATIVE</a>&nbsp;&nbsp;&nbsp;0x04</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e52037249bb98d7bbecf42e275beb07"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_TRUNC" ref="2e52037249bb98d7bbecf42e275beb07" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#2e52037249bb98d7bbecf42e275beb07">DNS_FLAG1_TRUNC</a>&nbsp;&nbsp;&nbsp;0x02</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72d99b1623afa14bd58c667b748c2ddc"></a><!-- doxytag: member="resolv.c::DNS_FLAG1_RD" ref="72d99b1623afa14bd58c667b748c2ddc" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#72d99b1623afa14bd58c667b748c2ddc">DNS_FLAG1_RD</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c72f8777ccc45ae274449ea7a9f3de04"></a><!-- doxytag: member="resolv.c::DNS_FLAG2_RA" ref="c72f8777ccc45ae274449ea7a9f3de04" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#c72f8777ccc45ae274449ea7a9f3de04">DNS_FLAG2_RA</a>&nbsp;&nbsp;&nbsp;0x80</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f6c329c04baba17fe0f5b2a6597d713"></a><!-- doxytag: member="resolv.c::DNS_FLAG2_ERR_MASK" ref="9f6c329c04baba17fe0f5b2a6597d713" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#9f6c329c04baba17fe0f5b2a6597d713">DNS_FLAG2_ERR_MASK</a>&nbsp;&nbsp;&nbsp;0x0f</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6aaa9da3d0f8d4c0799516d46d939942"></a><!-- doxytag: member="resolv.c::DNS_FLAG2_ERR_NONE" ref="6aaa9da3d0f8d4c0799516d46d939942" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#6aaa9da3d0f8d4c0799516d46d939942">DNS_FLAG2_ERR_NONE</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ee5e2c8e517d6e4f2198057f81e93c6"></a><!-- doxytag: member="resolv.c::DNS_FLAG2_ERR_NAME" ref="8ee5e2c8e517d6e4f2198057f81e93c6" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#8ee5e2c8e517d6e4f2198057f81e93c6">DNS_FLAG2_ERR_NAME</a>&nbsp;&nbsp;&nbsp;0x03</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee60b8757bacab269b0ccd7c240bf01d"></a><!-- doxytag: member="resolv.c::STATE_UNUSED" ref="ee60b8757bacab269b0ccd7c240bf01d" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#ee60b8757bacab269b0ccd7c240bf01d">STATE_UNUSED</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf4401501f1389872141a78b63f325a3"></a><!-- doxytag: member="resolv.c::STATE_NEW" ref="bf4401501f1389872141a78b63f325a3" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#bf4401501f1389872141a78b63f325a3">STATE_NEW</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55735650f879293d9b7b5fda6753d147"></a><!-- doxytag: member="resolv.c::STATE_ASKING" ref="55735650f879293d9b7b5fda6753d147" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#55735650f879293d9b7b5fda6753d147">STATE_ASKING</a>&nbsp;&nbsp;&nbsp;2</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="876c82c946543cd70c141e41417138e0"></a><!-- doxytag: member="resolv.c::STATE_DONE" ref="876c82c946543cd70c141e41417138e0" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#876c82c946543cd70c141e41417138e0">STATE_DONE</a>&nbsp;&nbsp;&nbsp;3</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bf0c086c7c41c12cc63324327932d91"></a><!-- doxytag: member="resolv.c::STATE_ERROR" ref="7bf0c086c7c41c12cc63324327932d91" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#7bf0c086c7c41c12cc63324327932d91">STATE_ERROR</a>&nbsp;&nbsp;&nbsp;4</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g221d37ccde7e3fd0dd2c2eb0a6b15493"></a><!-- doxytag: member="resolv.c::RESOLV_ENTRIES" ref="g221d37ccde7e3fd0dd2c2eb0a6b15493" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#g221d37ccde7e3fd0dd2c2eb0a6b15493">RESOLV_ENTRIES</a>&nbsp;&nbsp;&nbsp;4</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="g7c5359305008e9183b18d6ab75f568bf"></a><!-- doxytag: member="resolv.c::resolv_appcall" ref="g7c5359305008e9183b18d6ab75f568bf" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#g7c5359305008e9183b18d6ab75f568bf">resolv_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="a00160.html#ge4dcbbe6c641d2e3b8537b479df5fc99">resolv_query</a> (char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Queues a name so that a question for the name will be sent out. <a href="a00160.html#ge4dcbbe6c641d2e3b8537b479df5fc99"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#g66d19181ad5fe8b8f7c84d1f1d46a2ec">resolv_lookup</a> (char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up a hostname in the array of known hostnames. <a href="a00160.html#g66d19181ad5fe8b8f7c84d1f1d46a2ec"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#g3191066cf8f76bd00b6843b77c37068f">resolv_getserver</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtain the currently configured DNS server. <a href="a00160.html#g3191066cf8f76bd00b6843b77c37068f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#gdf916e0c752f5cda70d0bddb2be422ba">resolv_conf</a> (<a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> *dnsserver)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Configure which DNS server to use for queries. <a href="a00160.html#gdf916e0c752f5cda70d0bddb2be422ba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gb50f78bbf36d912d69f6c1685d0b40e3"></a><!-- doxytag: member="resolv.c::resolv_init" ref="gb50f78bbf36d912d69f6c1685d0b40e3" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#gb50f78bbf36d912d69f6c1685d0b40e3">resolv_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initalize the resolver. <br></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>