nip_init.h

Go to the documentation of this file.
00001 /*##############################################################################
00002 
00003 nIP - nano IP stack
00004 
00005 File        : nip_init.h
00006 
00007 Description : Initialize NIP Internetstack (HEADER)
00008 
00009 Copyright notice:
00010 
00011 Copyright (C) 2007 -
00012 Andreas Dittrich, dittrich@informatik.hu-berlin.de
00013 Jon Kowal, kowal@informatik.hu-berlin.de
00014 
00015 This program is free software; you can redistribute it and/or
00016 modify it under the terms of the GNU General Public License
00017 as published by the Free Software Foundation; either version 2
00018 of the License, or (at your option) any later version.
00019 
00020 This program is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00023 GNU General Public License for more details.
00024 
00025 You should have received a copy of the GNU General Public License
00026 along with this program; if not, write to the Free Software
00027 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00028 
00029 ##############################################################################*/
00030 
00031 #ifndef _NIP_INIT_H
00032  #define _NIP_INIT_H
00033 
00034 #include "nip_types.h"
00035 
00036 #define QMAKESTR(s) #s
00037 #define MAKESTR(s)  QMAKESTR(s)
00038 
00039 /** @name Architecture */
00040 //@{
00041 /** define what architecture the NIP network stack will be compiled for. The
00042  * architecture has to match a directory name in the `'arch'' directory.
00043  */
00044 #define NIP_ARCH       avr
00045 
00046 /** path for architecture-dependent files. */
00047 #define NIP_ARCH_PATH  arch/NIP_ARCH
00048 
00049 /** Build filename for includes depending on the architecture. */
00050 #define NIP_ARCH_FILE( file ) MAKESTR(NIP_ARCH_PATH/file)
00051 
00052 //@}
00053 
00054 /** @name nIP Modules */
00055 //@{
00056 
00057 #ifndef NIP_MEM_ENABLE
00058         #define NIP_MEM_ENABLE    1 /**< enable memory management */
00059 #endif
00060 #ifndef NIP_NET_ENABLE
00061         #define NIP_NET_ENABLE    1 /**< enable network interfaces */
00062 #endif
00063 #ifndef NIP_DISP_ENABLE
00064         #define NIP_DISP_ENABLE   1 /**< enable dispatcher */
00065 #endif
00066 #ifndef NIP_ETH_ENABLE
00067         #define NIP_ETH_ENABLE    1 /**< enable support of ethernet interfaces */
00068 #endif
00069 #ifndef NIP_RTL_ENABLE
00070         #define NIP_RTL_ENABLE    1 /**< enable realtek network driver */
00071 #endif
00072 #ifndef NIP_IP_ENABLE
00073         #define NIP_IP_ENABLE     1 /**< enable IP */
00074 #endif
00075 #ifndef NIP_ARP_ENABLE
00076         #define NIP_ARP_ENABLE    1 /**< enable ARP */
00077 #endif
00078 #ifndef NIP_ICMP_ENABLE
00079         #define NIP_ICMP_ENABLE   1 /**< enable ICMP */
00080 #endif
00081 #ifndef NIP_UDP_ENABLE
00082         #define NIP_UDP_ENABLE    1 /**< enable UDP */
00083 #endif
00084 #ifndef NIP_TCP_ENABLE
00085         #define NIP_TCP_ENABLE    1 /**< enable TCP */
00086 #endif
00087 #ifndef NIP_DHCP_ENABLE
00088         #define NIP_DHCP_ENABLE   1 /** Dynamic Host Configuration Protocol. Requires NIP_UDP_ENABLE. */
00089 #endif
00090 #ifndef NIP_AUTOIP_ENABLE
00091         #define NIP_AUTOIP_ENABLE 1 /** Dynamic Configuration of IPv4 Link-Local Addresses */
00092 #endif
00093 #ifndef NIP_MULTICAST_ENABLE
00094         #define NIP_MULTICAST_ENABLE 1 /** Send and receive IP multicast messages */
00095 #endif
00096 #ifndef NIP_IGMP_ENABLE
00097         #define NIP_IGMP_ENABLE   0 /** needed to receive multihop multicast messages. Requires NIP_MULTICAST_ENABLE */
00098 #endif
00099 #ifndef NIP_MDNS_ENABLE
00100         #define NIP_MDNS_ENABLE   1 /** mDNS */
00101 #endif
00102 #ifndef NIP_DNSSD_ENABLE
00103         #define NIP_DNSSD_ENABLE   1 /** DNS-SD */
00104 #endif
00105 
00106 //@}
00107 
00108 /** @name Network Interface Configuration */
00109 //@{
00110 
00111 /** Define Number of network interfaces */
00112 #define NIP_NET_IF_COUNT 1
00113 
00114 /** Define maximum number of queued transmissions per interface. Defaults to 2.*/
00115 #define NIP_NET_RX_TRANS_COUNT 2
00116 
00117 /** Define maximum number transmissions in global send queue. Defaults to 2.*/
00118 #define NIP_NET_TX_TRANS_COUNT 2
00119 
00120 /** Define maximum hardware address size. Defaults to 6 for ethernet addresses.*/
00121 #define NIP_MAX_HW_ADDR_SIZE 6
00122 
00123 /** Define maximum network address size. Defaults to 4 for ip addressing.*/
00124 #define NIP_MAX_NET_ADDR_SIZE 4
00125 
00126 /** Enable local loopback of network packages */
00127 #define NIP_NET_LOOPBACK_ENABLE 1
00128 
00129 /** number of entries in ARP cache */
00130 #define NIP_ARP_CACHE_SIZE 4
00131 
00132 //@}
00133 
00134 /** @name Network Interface Statistics */
00135 //@{
00136 
00137 /** count network interface receive buffer overruns */
00138 #define NIP_NET_IF_CNT_OVERRUN
00139 
00140 /** count receive errors */
00141 #define NIP_NET_IF_CNT_RXE
00142 
00143 /** count transmit errors */
00144 #define NIP_NET_IF_CNT_TXE
00145 
00146 /** count discarded packets */
00147 #define NIP_NET_IF_CNT_DISCARDED
00148 
00149 /** count received packets  */
00150 #define NIP_NET_IF_CNT_RECEIVED
00151 
00152 //@}
00153 
00154 
00155 /** @name Transport Layer Configuration */
00156 //@{
00157 
00158 //** Define maximum number of transport layer sockets. */
00159 //#define NIP_MAX_SOCKETS 10
00160 
00161 /** Use fixed socket array (static allocation of memory for fixed numer of
00162         * sockets) or use dynamic array of sockets with at most NIP_UDP_MAX_SOCKETS
00163         * sockets. */
00164 #define NIP_UDP_USE_FIXED_SOCKETS  1
00165 
00166 /** Fixed number of UDP sockets to be used for fixed socket configuration */
00167 #define NIP_UDP_FIXED_SOCKETS      4
00168 
00169 /** Fixed size of UDP queue for incoming packets */
00170 #define NIP_UDP_PACKET_QUEUE_SIZE  2
00171 
00172 
00173 //@}
00174 
00175 
00176 
00177 /** @name Memory management */
00178 //@{
00179 
00180 /** Define maximum number of memory blocks.
00181   * \note Any number larger than 255 will cause memory addresses to be larger
00182   * than 8 Bit, which  may be disadvantagous on 8-bit architectures. */
00183 #define NIP_MEM_MAX_BLOCKS 255
00184 
00185 /** Number of bytes reserved for dynamic buffer management.
00186  * \note Not all of the reservied memory will actually be available for
00187  * allocation, as some of it will be spent on management information.
00188  */
00189 #define NIP_MEM_DYNAMIC_SIZE 1000
00190 
00191 
00192 /** enable additional sanity check which may be useful points to halt the
00193  * debugger at. Check for DEBUG comments in nip_mem.c.
00194  */
00195 #define NIP_MEM_DEBUG  1
00196 
00197 //@}
00198 
00199 
00200 
00201 
00202 void nip_init( void );
00203 
00204 #endif /* _NIP_INIT */
00205 

Generated on Thu Jul 10 01:09:29 2008 for NIP by  doxygen 1.5.5