Replaced function with macro.

This commit is contained in:
oliverschmidt 2007-05-20 00:04:18 +00:00
parent 61f54204d7
commit c32b2ca581
2 changed files with 11 additions and 11 deletions

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: tcpip.c,v 1.6 2007/05/08 08:28:59 bg- Exp $
* $Id: tcpip.c,v 1.7 2007/05/20 00:04:18 oliverschmidt Exp $
*/
#include "contiki-conf.h"
@ -66,23 +66,17 @@ enum {
PACKET_INPUT
};
static unsigned char forwarding; /* Forwarding enabled. */
unsigned char tcpip_do_forwarding; /* Forwarding enabled. */
unsigned char tcpip_is_forwarding; /* Forwarding right now? */
PROCESS(tcpip_process, "TCP/IP stack");
/*---------------------------------------------------------------------------*/
void
tcpip_set_forwarding(unsigned char f)
{
forwarding = f;
}
/*---------------------------------------------------------------------------*/
static void
packet_input(void)
{
if(uip_len > 0) {
if(forwarding) {
if(tcpip_do_forwarding) {
tcpip_is_forwarding = 1;
if(uip_fw_forward() == UIP_FW_LOCAL) {
tcpip_is_forwarding = 0;