Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ip.h

Go to the documentation of this file.
00001 /*! \file ip.h \brief IP (Internet Protocol) Library. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'ip.h'
00005 // Title        : IP (Internet Protocol) Library
00006 // Author       : Pascal Stang
00007 // Created      : 8/30/2004
00008 // Revised      : 7/3/2005
00009 // Version      : 0.1
00010 // Target MCU   : Atmel AVR series
00011 // Editor Tabs  : 4
00012 //
00013 /// \ingroup network
00014 /// \defgroup ip IP (Internet Protocol) Library (ip.c)
00015 /// \code #include "net/ip.h" \endcode
00016 /// \par Description
00017 ///     The IP (Internet Protocol) library provide support for sending IP and
00018 ///     IP-related packets.  It's not clear if additional features are needed
00019 ///     or will be added, or even if this is the proper way to facilitate IP
00020 ///     packet operations.
00021 //
00022 //  This code is distributed under the GNU Public License
00023 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00024 //*****************************************************************************
00025 //@{
00026 
00027 #ifndef IP_H
00028 #define IP_H
00029 
00030 #include "net.h"
00031 #include "arp.h"
00032 
00033 #include <inttypes.h>
00034 
00035 #define IP_TIME_TO_LIVE     128     ///< default Time-To-Live (TTL) value to use in IP headers
00036 
00037 //! Set our IP address and routing information.
00038 /// The myIp value will be used in the source field of IP packets.
00039 /// Use this function to set and reset the system IP address.
00040 void ipSetAddress(uint32_t myIp, uint32_t netmask, uint32_t gatewayIp);
00041 
00042 //! Get our local IP address.
00043 /// Returns current IP address value.
00044 uint32_t ipGetMyAddress(void);
00045 
00046 //! Send an IP packet.
00047 void ipSend(uint32_t dstIp, uint8_t protocol, uint16_t len, uint8_t* data);
00048 
00049 //! Send a UDP/IP packet.
00050 void udpSend(uint32_t dstIp, uint16_t dstPort, uint16_t len, uint8_t* data);
00051 
00052 #endif
00053 //@}
00054 

Generated on Tue Sep 20 03:11:43 2005 for Procyon AVRlib by  doxygen 1.4.2