| Line No. | Rev | Author | Line |
|---|---|---|---|
| 1 | 6 | kaklik | <!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>Procyon AVRlib: net/ip.h Source File</title> |
||
| 4 | <link href="dox.css" rel="stylesheet" type="text/css"> |
||
| 5 | </head><body> |
||
| 6 | <!-- Generated by Doxygen 1.4.2 --> |
||
| 7 | <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> |
||
| 8 | <div class="nav"> |
||
| 9 | <a class="el" href="dir_000001.html">net</a></div> |
||
| 10 | <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> |
||
| 11 | 00002 <span class="comment">//*****************************************************************************</span> |
||
| 12 | 00003 <span class="comment">//</span> |
||
| 13 | 00004 <span class="comment">// File Name : 'ip.h'</span> |
||
| 14 | 00005 <span class="comment">// Title : IP (Internet Protocol) Library</span> |
||
| 15 | 00006 <span class="comment">// Author : Pascal Stang</span> |
||
| 16 | 00007 <span class="comment">// Created : 8/30/2004</span> |
||
| 17 | 00008 <span class="comment">// Revised : 7/3/2005</span> |
||
| 18 | 00009 <span class="comment">// Version : 0.1</span> |
||
| 19 | 00010 <span class="comment">// Target MCU : Atmel AVR series</span> |
||
| 20 | 00011 <span class="comment">// Editor Tabs : 4</span> |
||
| 21 | 00012 <span class="comment">//</span><span class="comment"></span> |
||
| 22 | 00013 <span class="comment">/// \ingroup network</span> |
||
| 23 | 00014 <span class="comment">/// \defgroup ip IP (Internet Protocol) Library (ip.c)</span> |
||
| 24 | 00015 <span class="comment">/// \code #include "net/ip.h" \endcode</span> |
||
| 25 | 00016 <span class="comment">/// \par Description</span> |
||
| 26 | 00017 <span class="comment">/// The IP (Internet Protocol) library provide support for sending IP and</span> |
||
| 27 | 00018 <span class="comment">/// IP-related packets. It's not clear if additional features are needed</span> |
||
| 28 | 00019 <span class="comment">/// or will be added, or even if this is the proper way to facilitate IP</span> |
||
| 29 | 00020 <span class="comment">/// packet operations.</span> |
||
| 30 | 00021 <span class="comment"></span><span class="comment">//</span> |
||
| 31 | 00022 <span class="comment">// This code is distributed under the GNU Public License</span> |
||
| 32 | 00023 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span> |
||
| 33 | 00024 <span class="comment">//*****************************************************************************</span><span class="comment"></span> |
||
| 34 | 00025 <span class="comment">//@{</span> |
||
| 35 | 00026 <span class="comment"></span> |
||
| 36 | 00027 <span class="preprocessor">#ifndef IP_H</span> |
||
| 37 | 00028 <span class="preprocessor"></span><span class="preprocessor">#define IP_H</span> |
||
| 38 | 00029 <span class="preprocessor"></span> |
||
| 39 | 00030 <span class="preprocessor">#include "<a class="code" href="net_8h.html">net.h</a>"</span> |
||
| 40 | 00031 <span class="preprocessor">#include "<a class="code" href="arp_8h.html">arp.h</a>"</span> |
||
| 41 | 00032 |
||
| 42 | 00033 <span class="preprocessor">#include <inttypes.h></span> |
||
| 43 | 00034 |
||
| 44 | <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> |
||
| 45 | 00036 <span class="comment"></span>{ |
||
| 46 | <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> |
||
| 47 | <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> |
||
| 48 | <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> |
||
| 49 | 00040 <span class="comment"></span>}; |
||
| 50 | 00041 |
||
| 51 | <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> |
||
| 52 | 00043 <span class="comment"></span><span class="comment"></span> |
||
| 53 | 00044 <span class="comment">//! Set our IP address and routing information.</span> |
||
| 54 | 00045 <span class="comment">/// The myIp value will be used in the source field of IP packets.</span> |
||
| 55 | 00046 <span class="comment">/// Use this function to set and reset the system IP address.</span> |
||
| 56 | 00047 <span class="comment"></span>void ipSetConfig(uint32_t myIp, uint32_t netmask, uint32_t gatewayIp); |
||
| 57 | 00048 <span class="comment"></span> |
||
| 58 | 00049 <span class="comment">//! Get our local IP address.</span> |
||
| 59 | 00050 <span class="comment">/// Returns current IP address value.</span> |
||
| 60 | 00051 <span class="comment"></span><span class="comment">//uint32_t ipGetMyAddress(void);</span> |
||
| 61 | 00052 <span class="comment"></span> |
||
| 62 | 00053 <span class="comment">//! Get our local IP configuration.</span> |
||
| 63 | 00054 <span class="comment">/// Returns pointer to current IP address/configuration.</span> |
||
| 64 | 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>); |
||
| 65 | 00056 <span class="comment"></span> |
||
| 66 | 00057 <span class="comment">//! Print IP configuration</span> |
||
| 67 | 00058 <span class="comment">///</span> |
||
| 68 | 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); |
||
| 69 | 00060 |
||
| 70 | 00061 <span class="comment"></span> |
||
| 71 | 00062 <span class="comment">//! Send an IP packet.</span> |
||
| 72 | 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); |
||
| 73 | 00064 <span class="comment"></span> |
||
| 74 | 00065 <span class="comment">//! Send a UDP/IP packet.</span> |
||
| 75 | 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); |
||
| 76 | 00067 |
||
| 77 | 00068 <span class="preprocessor">#endif</span> |
||
| 78 | 00069 <span class="preprocessor"></span><span class="comment">//@}</span> |
||
| 79 | 00070 <span class="comment"></span> |
||
| 80 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by |
||
| 81 | <a href="http://www.doxygen.org/index.html"> |
||
| 82 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> |
||
| 83 | </body> |
||
| 84 | </html> |
Powered by WebSVN v2.8.3