uipopt.h

Go to the documentation of this file.
00001 
00026 /*
00027  * Copyright (c) 2001-2003, Adam Dunkels.
00028  * All rights reserved.
00029  *
00030  * Redistribution and use in source and binary forms, with or without
00031  * modification, are permitted provided that the following conditions
00032  * are met:
00033  * 1. Redistributions of source code must retain the above copyright
00034  *    notice, this list of conditions and the following disclaimer.
00035  * 2. Redistributions in binary form must reproduce the above copyright
00036  *    notice, this list of conditions and the following disclaimer in the
00037  *    documentation and/or other materials provided with the distribution.
00038  * 3. The name of the author may not be used to endorse or promote
00039  *    products derived from this software without specific prior
00040  *    written permission.
00041  *
00042  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00043  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00044  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00045  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00046  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00047  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00048  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00049  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00050  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00051  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00052  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00053  *
00054  * This file is part of the uIP TCP/IP stack.
00055  *
00056  * $Id: uipopt.h,v 1.4 2006/06/12 08:00:31 adam Exp $
00057  *
00058  */
00059 
00060 #ifndef __UIPOPT_H__
00061 #define __UIPOPT_H__
00062 
00063 #ifndef UIP_LITTLE_ENDIAN
00064 #define UIP_LITTLE_ENDIAN  3412
00065 #endif /* UIP_LITTLE_ENDIAN */
00066 #ifndef UIP_BIG_ENDIAN
00067 #define UIP_BIG_ENDIAN     1234
00068 #endif /* UIP_BIG_ENDIAN */
00069 
00070 #include "uip-conf.h"
00071 
00072 /*------------------------------------------------------------------------------*/
00073 
00097 #define UIP_FIXEDADDR    0
00098 
00111 #ifdef UIP_CONF_PINGADDRCONF
00112 #define UIP_PINGADDRCONF UIP_CONF_PINGADDRCONF
00113 #else /* UIP_CONF_PINGADDRCONF */
00114 #define UIP_PINGADDRCONF 0
00115 #endif /* UIP_CONF_PINGADDRCONF */
00116 
00117 
00127 #define UIP_FIXEDETHADDR 0
00128 
00130 /*------------------------------------------------------------------------------*/
00141 #define UIP_TTL         64
00142 
00156 #define UIP_REASSEMBLY 0
00157 
00163 #define UIP_REASS_MAXAGE 40
00164 
00167 /*------------------------------------------------------------------------------*/
00178 #ifdef UIP_CONF_UDP
00179 #define UIP_UDP UIP_CONF_UDP
00180 #else /* UIP_CONF_UDP */
00181 #define UIP_UDP           0
00182 #endif /* UIP_CONF_UDP */
00183 
00192 #ifdef UIP_CONF_UDP_CHECKSUMS
00193 #define UIP_UDP_CHECKSUMS UIP_CONF_UDP_CHECKSUMS
00194 #else
00195 #define UIP_UDP_CHECKSUMS 0
00196 #endif
00197 
00203 #ifdef UIP_CONF_UDP_CONNS
00204 #define UIP_UDP_CONNS UIP_CONF_UDP_CONNS
00205 #else /* UIP_CONF_UDP_CONNS */
00206 #define UIP_UDP_CONNS    10
00207 #endif /* UIP_CONF_UDP_CONNS */
00208 
00217 /*------------------------------------------------------------------------------*/
00233 #define UIP_ACTIVE_OPEN 1
00234 
00244 #ifndef UIP_CONF_MAX_CONNECTIONS
00245 #define UIP_CONNS       10
00246 #else /* UIP_CONF_MAX_CONNECTIONS */
00247 #define UIP_CONNS UIP_CONF_MAX_CONNECTIONS
00248 #endif /* UIP_CONF_MAX_CONNECTIONS */
00249 
00250 
00258 #ifndef UIP_CONF_MAX_LISTENPORTS
00259 #define UIP_LISTENPORTS 20
00260 #else /* UIP_CONF_MAX_LISTENPORTS */
00261 #define UIP_LISTENPORTS UIP_CONF_MAX_LISTENPORTS
00262 #endif /* UIP_CONF_MAX_LISTENPORTS */
00263 
00273 #define UIP_URGDATA      0
00274 
00280 #define UIP_RTO         3
00281 
00288 #define UIP_MAXRTX      8
00289 
00297 #define UIP_MAXSYNRTX      5
00298 
00305 #define UIP_TCP_MSS     (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)
00306 
00316 #ifndef UIP_CONF_RECEIVE_WINDOW
00317 #define UIP_RECEIVE_WINDOW UIP_TCP_MSS
00318 #else
00319 #define UIP_RECEIVE_WINDOW UIP_CONF_RECEIVE_WINDOW
00320 #endif
00321 
00328 #define UIP_TIME_WAIT_TIMEOUT 120
00329 
00330 
00332 /*------------------------------------------------------------------------------*/
00346 #ifdef UIP_CONF_ARPTAB_SIZE
00347 #define UIP_ARPTAB_SIZE UIP_CONF_ARPTAB_SIZE
00348 #else
00349 #define UIP_ARPTAB_SIZE 8
00350 #endif
00351 
00358 #define UIP_ARP_MAXAGE 120
00359 
00362 /*------------------------------------------------------------------------------*/
00363 
00378 #ifndef UIP_CONF_BUFFER_SIZE
00379 #define UIP_BUFSIZE     1500
00380 #else /* UIP_CONF_BUFFER_SIZE */
00381 #define UIP_BUFSIZE UIP_CONF_BUFFER_SIZE
00382 #endif /* UIP_CONF_BUFFER_SIZE */
00383 
00384 
00392 #ifndef UIP_CONF_STATISTICS
00393 #define UIP_STATISTICS  0
00394 #else /* UIP_CONF_STATISTICS */
00395 #define UIP_STATISTICS UIP_CONF_STATISTICS
00396 #endif /* UIP_CONF_STATISTICS */
00397 
00407 #ifndef UIP_CONF_LOGGING
00408 #define UIP_LOGGING     0
00409 #else /* UIP_CONF_LOGGING */
00410 #define UIP_LOGGING     UIP_CONF_LOGGING
00411 #endif /* UIP_CONF_LOGGING */
00412 
00422 #ifndef UIP_CONF_BROADCAST
00423 #define UIP_BROADCAST 0
00424 #else /* UIP_CONF_BROADCAST */
00425 #define UIP_BROADCAST UIP_CONF_BROADCAST
00426 #endif /* UIP_CONF_BROADCAST */
00427 
00434 void uip_log(char *msg);
00435 
00445 #ifdef UIP_CONF_LLH_LEN
00446 #define UIP_LLH_LEN UIP_CONF_LLH_LEN
00447 #else /* UIP_CONF_LLH_LEN */
00448 #define UIP_LLH_LEN     14
00449 #endif /* UIP_CONF_LLH_LEN */
00450 
00452 /*------------------------------------------------------------------------------*/
00472 #ifdef UIP_CONF_BYTE_ORDER
00473 #define UIP_BYTE_ORDER     UIP_CONF_BYTE_ORDER
00474 #else /* UIP_CONF_BYTE_ORDER */
00475 #define UIP_BYTE_ORDER     UIP_LITTLE_ENDIAN
00476 #endif /* UIP_CONF_BYTE_ORDER */
00477 
00479 /*------------------------------------------------------------------------------*/
00480 
00539 #endif /* __UIPOPT_H__ */