Changed packet drivers from services to plain processes.
Now tcpip_output() is a function pointer that is supposed to be set via the macro tcpip_set_outputfunc(). Packet drivers do so on process startup. Thus if there are several packet drivers in a Contiki system the one started last is the one actually used. This behaviour is especially useful for the 'IP forwarding' "meta" packet driver.
This commit is contained in:
parent
5f3296e943
commit
a22d2ecfef
5 changed files with 19 additions and 18 deletions
|
@ -13,9 +13,9 @@ NETSIM = cfs-ram.c ether.c ethernode.c ethernode-uip.c lpm.c rs232.c flash.c \
|
|||
ethernode-rime.c
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) wpcap-service.c wpcap.c
|
||||
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) wpcap-drv.c wpcap.c
|
||||
else
|
||||
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) tapdev-service.c tapdev.c
|
||||
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) tapdev-drv.c tapdev.c
|
||||
endif
|
||||
|
||||
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: contiki-main.c,v 1.14 2007/05/19 21:20:03 oliverschmidt Exp $
|
||||
* $Id: contiki-main.c,v 1.15 2007/05/20 21:41:31 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
|
@ -40,9 +40,9 @@
|
|||
#include "net/rime.h"
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#include "net/wpcap-service.h"
|
||||
#include "net/wpcap-drv.h"
|
||||
#else
|
||||
#include "net/tapdev-service.h"
|
||||
#include "net/tapdev-drv.h"
|
||||
#endif
|
||||
#include "net/ethernode-uip.h"
|
||||
#include "net/ethernode-rime.h"
|
||||
|
@ -62,11 +62,9 @@
|
|||
#include "dev/leds.h"
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
u8_t wpcap_output(void);
|
||||
static struct uip_fw_netif extif =
|
||||
{UIP_FW_NETIF(0,0,0,0, 0,0,0,0, wpcap_output)};
|
||||
#else
|
||||
u8_t tapdev_output(void);
|
||||
static struct uip_fw_netif extif =
|
||||
{UIP_FW_NETIF(0,0,0,0, 0,0,0,0, tapdev_output)};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue