Changed the name of UIP_CONF_TCP_FORWARD to UIP_CONF_IP_FORWARD since forwarding is done at the IP level

This commit is contained in:
adamdunkels 2008-05-14 19:19:28 +00:00
parent 63a8390f51
commit 31ea41d8db
4 changed files with 16 additions and 13 deletions

View file

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: tcpip.c,v 1.11 2008/03/29 15:19:25 oliverschmidt Exp $ * $Id: tcpip.c,v 1.12 2008/05/14 19:19:28 adamdunkels Exp $
*/ */
#include "contiki-net.h" #include "contiki-net.h"
@ -66,9 +66,9 @@ enum {
u8_t (* tcpip_output)(void); /* Called on IP packet output. */ u8_t (* tcpip_output)(void); /* Called on IP packet output. */
#if UIP_CONF_TCP_FORWARD #if UIP_CONF_IP_FORWARD
unsigned char tcpip_is_forwarding; /* Forwarding right now? */ unsigned char tcpip_is_forwarding; /* Forwarding right now? */
#endif /* UIP_CONF_TCP_FORWARD */ #endif /* UIP_CONF_IP_FORWARD */
PROCESS(tcpip_process, "TCP/IP stack"); PROCESS(tcpip_process, "TCP/IP stack");
@ -76,7 +76,7 @@ PROCESS(tcpip_process, "TCP/IP stack");
static void static void
packet_input(void) packet_input(void)
{ {
#if UIP_CONF_TCP_FORWARD #if UIP_CONF_IP_FORWARD
if(uip_len > 0) { if(uip_len > 0) {
tcpip_is_forwarding = 1; tcpip_is_forwarding = 1;
if(uip_fw_forward() == UIP_FW_LOCAL) { if(uip_fw_forward() == UIP_FW_LOCAL) {
@ -92,7 +92,7 @@ packet_input(void)
} }
tcpip_is_forwarding = 0; tcpip_is_forwarding = 0;
} }
#else /* UIP_CONF_TCP_FORWARD */ #else /* UIP_CONF_IP_FORWARD */
if(uip_len > 0) { if(uip_len > 0) {
uip_input(); uip_input();
if(uip_len > 0) { if(uip_len > 0) {
@ -103,7 +103,7 @@ packet_input(void)
#endif /* UIP_CONF_TCP_SPLIT */ #endif /* UIP_CONF_TCP_SPLIT */
} }
} }
#endif /* UIP_CONF_TCP_FORWARD */ #endif /* UIP_CONF_IP_FORWARD */
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if UIP_ACTIVE_OPEN #if UIP_ACTIVE_OPEN
@ -287,9 +287,9 @@ eventhandler(process_event_t ev, process_data_t data)
} }
} }
} }
#if UIP_CONF_TCP_FORWARD #if UIP_CONF_IP_FORWARD
uip_fw_periodic(); uip_fw_periodic();
#endif /* UIP_CONF_TCP_FORWARD */ #endif /* UIP_CONF_IP_FORWARD */
} }
} }
break; break;

View file

@ -30,7 +30,7 @@
* *
* Author: Oliver Schmidt <ol.sc@web.de> * Author: Oliver Schmidt <ol.sc@web.de>
* *
* @(#)$Id: 6502def.h,v 1.12 2008/03/29 15:22:39 oliverschmidt Exp $ * @(#)$Id: 6502def.h,v 1.13 2008/05/14 19:19:29 adamdunkels Exp $
*/ */
#ifndef __6502DEF_H__ #ifndef __6502DEF_H__
@ -84,9 +84,9 @@ typedef unsigned short uip_stats_t;
#endif /* WITH_BOOST */ #endif /* WITH_BOOST */
#if WITH_FORWARDING #if WITH_FORWARDING
#define UIP_CONF_TCP_FORWARD 1 #define UIP_CONF_IP_FORWARD 1
#else /* WITH_FORWARDING */ #else /* WITH_FORWARDING */
#define UIP_CONF_TCP_FORWARD 0 #define UIP_CONF_IP_FORWARD 0
#endif /* WITH_FORWARDING */ #endif /* WITH_FORWARDING */
#if WITH_CLIENT #if WITH_CLIENT

View file

@ -35,7 +35,7 @@
* *
* This file is part of the Contiki desktop OS * This file is part of the Contiki desktop OS
* *
* $Id: contiki-conf.h,v 1.9 2008/03/03 20:21:59 adamdunkels Exp $ * $Id: contiki-conf.h,v 1.10 2008/05/14 19:19:29 adamdunkels Exp $
* *
*/ */
@ -122,6 +122,8 @@ typedef unsigned long clock_time_t;
#define UIP_CONF_BROADCAST 1 #define UIP_CONF_BROADCAST 1
#define UIP_CONF_IP_FORWARD 1
/* TCP splitting does not work well with multi hop routing. */ /* TCP splitting does not work well with multi hop routing. */
#define UIP_CONF_TCP_SPLIT 0 #define UIP_CONF_TCP_SPLIT 0

View file

@ -1,5 +1,5 @@
/* -*- C -*- */ /* -*- C -*- */
/* @(#)$Id: contiki-conf.h,v 1.25 2008/02/25 02:14:34 adamdunkels Exp $ */ /* @(#)$Id: contiki-conf.h,v 1.26 2008/05/14 19:19:29 adamdunkels Exp $ */
#ifndef CONTIKI_CONF_H #ifndef CONTIKI_CONF_H
#define CONTIKI_CONF_H #define CONTIKI_CONF_H
@ -54,6 +54,7 @@
#define UIP_CONF_ICMP_DEST_UNREACH 1 #define UIP_CONF_ICMP_DEST_UNREACH 1
#define UIP_CONF_IP_FORWARD 1
#define UIP_CONF_DHCP_LIGHT #define UIP_CONF_DHCP_LIGHT
#define UIP_CONF_LLH_LEN 0 #define UIP_CONF_LLH_LEN 0
#define UIP_CONF_BUFFER_SIZE 110 #define UIP_CONF_BUFFER_SIZE 110