?lang_form?
?lang_select?
?lang_submit?
?lang_endform?
{HEADER END}
{FILE START}
library
?curdirlinks? - Rev 6
?prevdifflink? - Blame - ?getfile?
<!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>Procyon AVRlib: net/ip.h Source File</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<div class="nav">
<a class="el" href="dir_000001.html">net</a></div>
<h1>ip.h</h1><a href="ip_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file ip.h \brief IP (Internet Protocol) Library. */</span>
00002 <span class="comment">//*****************************************************************************</span>
00003 <span class="comment">//</span>
00004 <span class="comment">// File Name : 'ip.h'</span>
00005 <span class="comment">// Title : IP (Internet Protocol) Library</span>
00006 <span class="comment">// Author : Pascal Stang</span>
00007 <span class="comment">// Created : 8/30/2004</span>
00008 <span class="comment">// Revised : 7/3/2005</span>
00009 <span class="comment">// Version : 0.1</span>
00010 <span class="comment">// Target MCU : Atmel AVR series</span>
00011 <span class="comment">// Editor Tabs : 4</span>
00012 <span class="comment">//</span><span class="comment"></span>
00013 <span class="comment">/// \ingroup network</span>
00014 <span class="comment">/// \defgroup ip IP (Internet Protocol) Library (ip.c)</span>
00015 <span class="comment">/// \code #include "net/ip.h" \endcode</span>
00016 <span class="comment">/// \par Description</span>
00017 <span class="comment">/// The IP (Internet Protocol) library provide support for sending IP and</span>
00018 <span class="comment">/// IP-related packets. It's not clear if additional features are needed</span>
00019 <span class="comment">/// or will be added, or even if this is the proper way to facilitate IP</span>
00020 <span class="comment">/// packet operations.</span>
00021 <span class="comment"></span><span class="comment">//</span>
00022 <span class="comment">// This code is distributed under the GNU Public License</span>
00023 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
00024 <span class="comment">//*****************************************************************************</span><span class="comment"></span>
00025 <span class="comment">//@{</span>
00026 <span class="comment"></span>
00027 <span class="preprocessor">#ifndef IP_H</span>
00028 <span class="preprocessor"></span><span class="preprocessor">#define IP_H</span>
00029 <span class="preprocessor"></span>
00030 <span class="preprocessor">#include "<a class="code" href="net_8h.html">net.h</a>"</span>
00031 <span class="preprocessor">#include "<a class="code" href="arp_8h.html">arp.h</a>"</span>
00032
00033 <span class="preprocessor">#include <inttypes.h></span>
00034
<a name="l00035"></a><a class="code" href="structipConfig.html">00035</a> <span class="keyword">struct </span><a class="code" href="structipConfig.html">ipConfig</a> <span class="comment">///< IP addressing/configuration structure</span>
00036 <span class="comment"></span>{
<a name="l00037"></a><a class="code" href="structipConfig.html#o0">00037</a> uint32_t <a class="code" href="structipConfig.html#o0">ip</a>; <span class="comment">///< IP address</span>
<a name="l00038"></a><a class="code" href="structipConfig.html#o1">00038</a> <span class="comment"></span> uint32_t <a class="code" href="structipConfig.html#o1">netmask</a>; <span class="comment">///< netmask</span>
<a name="l00039"></a><a class="code" href="structipConfig.html#o2">00039</a> <span class="comment"></span> uint32_t <a class="code" href="structipConfig.html#o2">gateway</a>; <span class="comment">///< gateway IP address</span>
00040 <span class="comment"></span>};
00041
<a name="l00042"></a><a class="code" href="group__ip.html#ga5">00042</a> <span class="preprocessor">#define IP_TIME_TO_LIVE 128 </span><span class="comment">///< default Time-To-Live (TTL) value to use in IP headers</span>
00043 <span class="comment"></span><span class="comment"></span>
00044 <span class="comment">//! Set our IP address and routing information.</span>
00045 <span class="comment">/// The myIp value will be used in the source field of IP packets.</span>
00046 <span class="comment">/// Use this function to set and reset the system IP address.</span>
00047 <span class="comment"></span>void ipSetConfig(uint32_t myIp, uint32_t netmask, uint32_t gatewayIp);
00048 <span class="comment"></span>
00049 <span class="comment">//! Get our local IP address.</span>
00050 <span class="comment">/// Returns current IP address value.</span>
00051 <span class="comment"></span><span class="comment">//uint32_t ipGetMyAddress(void);</span>
00052 <span class="comment"></span>
00053 <span class="comment">//! Get our local IP configuration.</span>
00054 <span class="comment">/// Returns pointer to current IP address/configuration.</span>
00055 <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structipConfig.html">ipConfig</a>* <a class="code" href="group__ip.html#ga1">ipGetConfig</a>(<span class="keywordtype">void</span>);
00056 <span class="comment"></span>
00057 <span class="comment">//! Print IP configuration</span>
00058 <span class="comment">///</span>
00059 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__ip.html#ga2">ipPrintConfig</a>(<span class="keyword">struct</span> <a class="code" href="structipConfig.html">ipConfig</a>* config);
00060
00061 <span class="comment"></span>
00062 <span class="comment">//! Send an IP packet.</span>
00063 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__ip.html#ga3">ipSend</a>(uint32_t dstIp, uint8_t protocol, uint16_t len, uint8_t* data);
00064 <span class="comment"></span>
00065 <span class="comment">//! Send a UDP/IP packet.</span>
00066 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__ip.html#ga4">udpSend</a>(uint32_t dstIp, uint16_t dstPort, uint16_t len, uint8_t* data);
00067
00068 <span class="preprocessor">#endif</span>
00069 <span class="preprocessor"></span><span class="comment">//@}</span>
00070 <span class="comment"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|
{FILE END}
{FOOTER START}
Powered by WebSVN v2.8.3