00001 00023 /* 00024 * Copyright (c) 2001-2003, Adam Dunkels. 00025 * All rights reserved. 00026 * 00027 * Redistribution and use in source and binary forms, with or without 00028 * modification, are permitted provided that the following conditions 00029 * are met: 00030 * 1. Redistributions of source code must retain the above copyright 00031 * notice, this list of conditions and the following disclaimer. 00032 * 2. Redistributions in binary form must reproduce the above copyright 00033 * notice, this list of conditions and the following disclaimer in the 00034 * documentation and/or other materials provided with the distribution. 00035 * 3. The name of the author may not be used to endorse or promote 00036 * products derived from this software without specific prior 00037 * written permission. 00038 * 00039 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 00040 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00041 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00042 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00043 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00044 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00045 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00046 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00047 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00048 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00049 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00050 * 00051 * This file is part of the uIP TCP/IP stack. 00052 * 00053 * $Id: uipopt.h,v 1.16.2.5 2003/10/07 13:22:51 adam Exp $ 00054 * 00055 */ 00056 00057 #ifndef __UIPOPT_H__ 00058 #define __UIPOPT_H__ 00059 00060 #include <NE2000.h> 00061 00062 /* 00063 * UIP CONFIGURATION FOR AVR ATMEGA! 00064 * 00065 */ 00066 #include <inttypes.h> 00067 00068 /*------------------------------------------------------------------------------*/ 00080 typedef unsigned char u8_t; 00081 00088 typedef uint16_t u16_t; 00089 00096 typedef uint16_t uip_stats_t; 00097 00100 /*------------------------------------------------------------------------------*/ 00101 00125 #define UIP_FIXEDADDR 1 00126 00139 #define UIP_PINGADDRCONF 0 00140 00141 #define UIP_IPADDR0 192 00144 #define UIP_IPADDR1 168 00147 #define UIP_IPADDR2 0 00150 #define UIP_IPADDR3 6 00154 #define UIP_NETMASK0 255 00157 #define UIP_NETMASK1 255 00160 #define UIP_NETMASK2 255 00163 #define UIP_NETMASK3 0 00167 #define UIP_DRIPADDR0 192 00170 #define UIP_DRIPADDR1 168 00173 #define UIP_DRIPADDR2 0 00176 #define UIP_DRIPADDR3 1 00189 #define UIP_FIXEDETHADDR 1 00190 00191 #define UIP_ETHADDR0 MAC1 00194 #define UIP_ETHADDR1 MAC2 00197 #define UIP_ETHADDR2 MAC3 00200 #define UIP_ETHADDR3 MAC4 00203 #define UIP_ETHADDR4 MAC5 00206 #define UIP_ETHADDR5 MAC6 00211 /*------------------------------------------------------------------------------*/ 00212 00222 #define UIP_TTL 255 00223 00237 #define UIP_REASSEMBLY 0 00238 00244 #define UIP_REASS_MAXAGE 40 00245 00248 /*------------------------------------------------------------------------------*/ 00264 #define UIP_UDP 1 00265 00274 #define UIP_UDP_CHECKSUMS 0 00275 00281 #define UIP_UDP_CONNS 5 00282 00288 #define UIP_UDP_APPCALL udp_app 00289 00291 /*------------------------------------------------------------------------------*/ 00307 #define UIP_ACTIVE_OPEN 1 00308 00318 #define UIP_CONNS 5 00319 00327 #define UIP_LISTENPORTS 5 00328 00338 #define UIP_RECEIVE_WINDOW 400 00339 00349 #define UIP_URGDATA 1 00350 00356 #define UIP_RTO 3 00357 00364 #define UIP_MAXRTX 8 00365 00373 #define UIP_MAXSYNRTX 3 00374 00380 #define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - 40) 00381 00388 #define UIP_TIME_WAIT_TIMEOUT 120 00389 00390 00392 /*------------------------------------------------------------------------------*/ 00406 #define UIP_ARPTAB_SIZE 8 00407 00414 #define UIP_ARP_MAXAGE 120 00415 00418 /*------------------------------------------------------------------------------*/ 00419 00434 #define UIP_BUFSIZE 400 00435 00436 00444 #define UIP_STATISTICS 0 00445 00455 #ifdef UIP_LOG 00456 #define UIP_LOGGING 1 00457 #else 00458 #define UIP_LOGGING 0 00459 #endif 00460 00466 //void uip_log(char *msg); 00467 00477 #define UIP_LLH_LEN 14 00478 00479 00481 /*------------------------------------------------------------------------------*/ 00492 #ifndef LITTLE_ENDIAN 00493 #define LITTLE_ENDIAN 3412 00494 #endif /* LITTLE_ENDIAN */ 00495 #ifndef BIG_ENDIAN 00496 #define BIG_ENDIAN 1234 00497 #endif /* BIGE_ENDIAN */ 00498 00507 #ifndef BYTE_ORDER 00508 #define BYTE_ORDER LITTLE_ENDIAN 00509 #endif /* BYTE_ORDER */ 00510 00512 /*------------------------------------------------------------------------------*/ 00513 00553 #define UIP_APPCALL() 00554 00560 #define UIP_APPSTATE_SIZE 0 00561 00563 /* Include the header file for the application program that should be 00564 used. If you don't use the example web server, you should change 00565 this. */ 00566 //#include "httpd.h" 00567 00568 00569 #endif /* __UIPOPT_H__ */