diff --git a/Makefile.include b/Makefile.include index 7310cb2dc..5f0ecc57c 100644 --- a/Makefile.include +++ b/Makefile.include @@ -58,25 +58,7 @@ UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}} CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1 -include $(CONTIKI)/core/net/rime/Makefile.rime -include $(CONTIKI)/core/net/mac/Makefile.mac -SYSTEM = process.c procinit.c autostart.c elfloader.c \ - compower.c serial-line.c -THREADS = mt.c -LIBS = memb.c mmem.c timer.c list.c etimer.c ctimer.c energest.c rtimer.c stimer.c trickle-timer.c \ - print-stats.c ifft.c crc16.c random.c ringbuf.c settings.c -DEV = nullradio.c - -include $(CONTIKI)/core/net/Makefile.uip -include $(CONTIKI)/core/net/rpl/Makefile.rpl - -CTK = ctk.c - -ifndef CONTIKI_NO_NET - CONTIKIFILES = $(SYSTEM) $(LIBS) $(NET) $(THREADS) $(DHCP) $(DEV) -else - CONTIKIFILES = $(SYSTEM) $(LIBS) $(THREADS) $(DEV) sicslowpan.c fakeuip.c -endif +MODULES += core/sys core/dev core/lib CONTIKI_SOURCEFILES += $(CONTIKIFILES) @@ -93,6 +75,8 @@ PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFI $(OBJECTDIR): mkdir $@ +uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) + ### Include application makefiles ifdef APPS @@ -121,17 +105,13 @@ else include $(target_makefile) endif -ifdef PLATFORMAPPS - PLATFORMAPPDS = ${wildcard ${foreach DIR, $(APPDIRS), ${addprefix $(DIR)/, $(PLATFORMAPPS)}}} \ - ${wildcard ${addprefix $(CONTIKI)/apps/, $(PLATFORMAPPS)} \ - ${addprefix $(CONTIKI)/platform/$(TARGET)/apps/, $(PLATFORMAPPS)} \ - $(PLATFORMAPPS)} - PLATFORMAPPINCLUDES = ${foreach APP, $(PLATFORMAPPS), \ - ${wildcard ${foreach DIR, $(PLATFORMAPPDS), $(DIR)/Makefile.$(APP)}}} - -include $(PLATFORMAPPINCLUDES) - PLATFORMAPP_SOURCES = ${foreach APP, $(PLATFORMAPPS), $($(APP)_src)} - CONTIKI_SOURCEFILES += $(PLATFORMAPP_SOURCES) - APPDS += $(PLATFORMAPPDS) +ifdef MODULES + UNIQUEMODULES = $(call uniq,$(MODULES)) + MODULESSUBST = ${subst /,-,$(UNIQUEMODULES)} + MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}} + MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}} + CONTIKI_SOURCEFILES += $(MODULES_SOURCES) + APPDS += $(MODULEDIRS) endif ### Verbosity control. Use make V=1 to get verbose builds. @@ -168,7 +148,7 @@ SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \ vpath %.c $(SOURCEDIRS) vpath %.S $(SOURCEDIRS) -CFLAGS += ${addprefix -I,$(SOURCEDIRS)} +CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)} ### Check for a git repo and pass version if found ### git.exe in Windows cmd shells may require no stderr redirection @@ -205,6 +185,8 @@ clean: distclean: clean -rm -rf $(CONTIKI_PROJECT).$(TARGET) +-include $(CONTIKI)/platform/$(TARGET)/Makefile.customrules-$(TARGET) + ifndef CUSTOM_RULE_C_TO_CE %.ce: %.c $(TRACE_CC) diff --git a/apps/antelope/aql-adt.c b/apps/antelope/aql-adt.c index 3187f0a1c..fb9960e2e 100644 --- a/apps/antelope/aql-adt.c +++ b/apps/antelope/aql-adt.c @@ -42,7 +42,7 @@ #include "aql.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static unsigned char char_buf[DB_MAX_CHAR_SIZE_PER_ROW]; static uint8_t next_free_offset; diff --git a/apps/antelope/aql-exec.c b/apps/antelope/aql-exec.c index b838a720f..9d15dce4a 100644 --- a/apps/antelope/aql-exec.c +++ b/apps/antelope/aql-exec.c @@ -42,7 +42,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "index.h" #include "relation.h" diff --git a/apps/antelope/index-inline.c b/apps/antelope/index-inline.c index 24527ee50..7141e4b8c 100644 --- a/apps/antelope/index-inline.c +++ b/apps/antelope/index-inline.c @@ -48,7 +48,7 @@ #include "storage.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" struct search_handle { index_t *index; diff --git a/apps/antelope/index-maxheap.c b/apps/antelope/index-maxheap.c index 0e8cfc30f..4d50f9729 100644 --- a/apps/antelope/index-maxheap.c +++ b/apps/antelope/index-maxheap.c @@ -64,7 +64,7 @@ #include "storage.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define BRANCH_FACTOR 2 #define BUCKET_SIZE 128 diff --git a/apps/antelope/index-memhash.c b/apps/antelope/index-memhash.c index db3c3fbe3..d071610ab 100644 --- a/apps/antelope/index-memhash.c +++ b/apps/antelope/index-memhash.c @@ -42,7 +42,7 @@ #include "index.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static db_result_t create(index_t *); static db_result_t destroy(index_t *); diff --git a/apps/antelope/index.c b/apps/antelope/index.c index 0a7e53dc1..53d979d99 100644 --- a/apps/antelope/index.c +++ b/apps/antelope/index.c @@ -40,7 +40,7 @@ #include "lib/list.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "antelope.h" #include "attribute.h" diff --git a/apps/antelope/relation.c b/apps/antelope/relation.c index d28fddb19..b8eac5070 100644 --- a/apps/antelope/relation.c +++ b/apps/antelope/relation.c @@ -42,7 +42,7 @@ #include "lib/memb.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "db-options.h" #include "index.h" diff --git a/apps/antelope/result.c b/apps/antelope/result.c index e4e9fdf55..8b35dd745 100644 --- a/apps/antelope/result.c +++ b/apps/antelope/result.c @@ -37,7 +37,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "result.h" #include "storage.h" diff --git a/apps/antelope/storage-cfs.c b/apps/antelope/storage-cfs.c index 425873e2a..c3d10ac9f 100644 --- a/apps/antelope/storage-cfs.c +++ b/apps/antelope/storage-cfs.c @@ -43,7 +43,7 @@ #include "lib/random.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "db-options.h" #include "storage.h" diff --git a/apps/codeprop/codeprop.c b/apps/codeprop/codeprop.c index f7f4ca725..ead410ba7 100644 --- a/apps/codeprop/codeprop.c +++ b/apps/codeprop/codeprop.c @@ -71,7 +71,7 @@ #include "sys/clock.h" #include "loader/elfloader.h" -#include "net/tcpip.h" +#include "net/ip/tcpip.h" #include "dev/eeprom.h" #include "dev/leds.h" diff --git a/apps/codeprop/tcp_loader.c b/apps/codeprop/tcp_loader.c index 9c94384ce..d647915ed 100644 --- a/apps/codeprop/tcp_loader.c +++ b/apps/codeprop/tcp_loader.c @@ -37,7 +37,7 @@ #include "sys/etimer.h" #include "loader/elfloader_compat.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/xmem.h" diff --git a/apps/codeprop/tcp_loader2.c b/apps/codeprop/tcp_loader2.c index 58fda871e..eb1abf19f 100644 --- a/apps/codeprop/tcp_loader2.c +++ b/apps/codeprop/tcp_loader2.c @@ -39,7 +39,7 @@ #include "loader/cle.h" #include "loader/cmod.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/xmem.h" diff --git a/apps/collect-view/collect-view-sky.c b/apps/collect-view/collect-view-sky.c index 0963b4725..ed6b6abe8 100644 --- a/apps/collect-view/collect-view-sky.c +++ b/apps/collect-view/collect-view-sky.c @@ -1,9 +1,9 @@ #include "collect-view.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" #include "dev/light-sensor.h" #include "dev/battery-sensor.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "collect-view-sky.h" diff --git a/apps/collect-view/collect-view-z1.c b/apps/collect-view/collect-view-z1.c index 124ae00d5..b750eea57 100644 --- a/apps/collect-view/collect-view-z1.c +++ b/apps/collect-view/collect-view-z1.c @@ -1,5 +1,5 @@ #include "collect-view.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" #include "dev/i2cmaster.h" #include "dev/tmp102.h" diff --git a/apps/collect-view/collect-view.c b/apps/collect-view/collect-view.c index aa3d1e2c7..8491e6c05 100644 --- a/apps/collect-view/collect-view.c +++ b/apps/collect-view/collect-view.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "net/rime/collect-neighbor.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/timesynch.h" #include "collect-view.h" diff --git a/apps/collect-view/collect-view.h b/apps/collect-view/collect-view.h index 259fec370..a647ab826 100644 --- a/apps/collect-view/collect-view.h +++ b/apps/collect-view/collect-view.h @@ -2,7 +2,7 @@ #define COLLECT_VIEW_H #include "contiki-conf.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/rime/collect.h" struct collect_view_data_msg { diff --git a/apps/deluge/deluge.c b/apps/deluge/deluge.c index 686d4a514..05027b281 100644 --- a/apps/deluge/deluge.c +++ b/apps/deluge/deluge.c @@ -41,7 +41,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "cfs/cfs.h" #include "loader/elfloader.h" #include "lib/crc16.h" diff --git a/apps/deluge/deluge.h b/apps/deluge/deluge.h index b0de04a95..6aa31e81f 100644 --- a/apps/deluge/deluge.h +++ b/apps/deluge/deluge.h @@ -40,7 +40,7 @@ #ifndef DELUGE_H #define DELUGE_H -#include "net/rime.h" +#include "net/rime/rime.h" PROCESS_NAME(deluge_process); diff --git a/apps/dhcp/dhcp.c b/apps/dhcp/dhcp.c index a7d72943b..9ac20b102 100644 --- a/apps/dhcp/dhcp.c +++ b/apps/dhcp/dhcp.c @@ -1,6 +1,6 @@ #include "contiki-net.h" #include "ctk/ctk.h" -#include "net/dhcpc.h" +#include "net/ip/dhcpc.h" diff --git a/apps/email/email.c b/apps/email/email.c index ae74e4e1b..ddb21da01 100644 --- a/apps/email/email.c +++ b/apps/email/email.c @@ -38,7 +38,7 @@ #include "smtp.h" #include "lib/petsciiconv.h" -#include "lib/ctk-textentry-multiline.h" +#include "ctk/ctk-textentry-multiline.h" #include diff --git a/apps/ftp/ftp.c b/apps/ftp/ftp.c index b20499aee..a93a9c940 100644 --- a/apps/ftp/ftp.c +++ b/apps/ftp/ftp.c @@ -40,7 +40,7 @@ #include "contiki.h" #include "ctk/ctk.h" #include "cfs/cfs.h" -#include "net/resolv.h" +#include "net/ip/resolv.h" #define MAX_USERNAMELEN 16 #define MAX_PASSWORDLEN 16 diff --git a/apps/irc/irc.c b/apps/irc/irc.c index 733426944..75cc9eccf 100644 --- a/apps/irc/irc.c +++ b/apps/irc/irc.c @@ -41,7 +41,7 @@ #include "ircc.h" #include "ctk/ctk.h" -#include "lib/ctk-textentry-cmdline.h" +#include "ctk/ctk-textentry-cmdline.h" #include "lib/petsciiconv.h" diff --git a/apps/powertrace/powertrace.c b/apps/powertrace/powertrace.c index 9c2c2cbff..4e43acb0f 100644 --- a/apps/powertrace/powertrace.c +++ b/apps/powertrace/powertrace.c @@ -41,7 +41,7 @@ #include "contiki-lib.h" #include "sys/compower.h" #include "powertrace.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #include diff --git a/apps/serial-shell/serial-shell.c b/apps/serial-shell/serial-shell.c index 024f2405a..a3aef3745 100644 --- a/apps/serial-shell/serial-shell.c +++ b/apps/serial-shell/serial-shell.c @@ -45,7 +45,7 @@ #include "shell.h" #include "dev/serial-line.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #include diff --git a/apps/servreg-hack/servreg-hack.c b/apps/servreg-hack/servreg-hack.c index 3d3ca2409..3242433c6 100644 --- a/apps/servreg-hack/servreg-hack.c +++ b/apps/servreg-hack/servreg-hack.c @@ -44,9 +44,9 @@ #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip.h" +#include "net/ip/uip.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #include "servreg-hack.h" diff --git a/apps/servreg-hack/servreg-hack.h b/apps/servreg-hack/servreg-hack.h index e80cb50d6..11fc70eec 100644 --- a/apps/servreg-hack/servreg-hack.h +++ b/apps/servreg-hack/servreg-hack.h @@ -64,7 +64,7 @@ #define SERVREG_HACK_H #include "contiki-conf.h" -#include "net/uip.h" +#include "net/ip/uip.h" typedef uint8_t servreg_hack_id_t; typedef void servreg_hack_item_t; diff --git a/apps/shell/gui-shell.c b/apps/shell/gui-shell.c index 19e8a5b0d..5fe70db8d 100644 --- a/apps/shell/gui-shell.c +++ b/apps/shell/gui-shell.c @@ -36,7 +36,7 @@ #include "shell.h" -#include "lib/ctk-textentry-cmdline.h" +#include "ctk/ctk-textentry-cmdline.h" #include diff --git a/apps/shell/shell-download.c b/apps/shell/shell-download.c index 82bb157f4..a49f6b633 100644 --- a/apps/shell/shell-download.c +++ b/apps/shell/shell-download.c @@ -41,7 +41,7 @@ #include "contiki.h" #include "shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "cfs/cfs.h" #include "dev/leds.h" diff --git a/apps/shell/shell-netfile.c b/apps/shell/shell-netfile.c index 75e8e30a7..45c303974 100644 --- a/apps/shell/shell-netfile.c +++ b/apps/shell/shell-netfile.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "shell-netfile.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/rudolph0.h" #include "dev/leds.h" diff --git a/apps/shell/shell-netperf.c b/apps/shell/shell-netperf.c index 1fa4643e2..b9a7cf0b0 100644 --- a/apps/shell/shell-netperf.c +++ b/apps/shell/shell-netperf.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "shell-netperf.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "contiki-conf.h" #include diff --git a/apps/shell/shell-rime-debug-runicast.c b/apps/shell/shell-rime-debug-runicast.c index 1ab08cc23..2de2bb468 100644 --- a/apps/shell/shell-rime-debug-runicast.c +++ b/apps/shell/shell-rime-debug-runicast.c @@ -45,7 +45,7 @@ #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/trickle.h" diff --git a/apps/shell/shell-rime-debug.c b/apps/shell/shell-rime-debug.c index fd83c0723..b034a0f1f 100644 --- a/apps/shell/shell-rime-debug.c +++ b/apps/shell/shell-rime-debug.c @@ -45,7 +45,7 @@ #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/trickle.h" diff --git a/apps/shell/shell-rime-neighbors.c b/apps/shell/shell-rime-neighbors.c index 85b048805..8ac97cec4 100644 --- a/apps/shell/shell-rime-neighbors.c +++ b/apps/shell/shell-rime-neighbors.c @@ -39,7 +39,7 @@ #include #include "shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" PROCESS(shell_neighbors_process, "neighbors"); SHELL_COMMAND(neighbors_command, diff --git a/apps/shell/shell-rime-netcmd.c b/apps/shell/shell-rime-netcmd.c index 763088091..08acc2ed1 100644 --- a/apps/shell/shell-rime-netcmd.c +++ b/apps/shell/shell-rime-netcmd.c @@ -46,7 +46,7 @@ #include "lib/crc16.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/trickle.h" diff --git a/apps/shell/shell-rime-ping.c b/apps/shell/shell-rime-ping.c index d146c8cda..e0af535a2 100644 --- a/apps/shell/shell-rime-ping.c +++ b/apps/shell/shell-rime-ping.c @@ -39,7 +39,7 @@ #include "shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #include diff --git a/apps/shell/shell-rime-sendcmd.c b/apps/shell/shell-rime-sendcmd.c index 80a427cbc..70d18727e 100644 --- a/apps/shell/shell-rime-sendcmd.c +++ b/apps/shell/shell-rime-sendcmd.c @@ -39,7 +39,7 @@ #include "lib/crc16.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/unicast.h" #include "net/rime/timesynch.h" diff --git a/apps/shell/shell-rime-sniff.c b/apps/shell/shell-rime-sniff.c index 44cb82c63..9e9e2a9fb 100644 --- a/apps/shell/shell-rime-sniff.c +++ b/apps/shell/shell-rime-sniff.c @@ -38,7 +38,7 @@ */ #include "shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" static uint8_t sniff_for_attributes; diff --git a/apps/shell/shell-rime-unicast.c b/apps/shell/shell-rime-unicast.c index 16d44fc72..8d377ef8b 100644 --- a/apps/shell/shell-rime-unicast.c +++ b/apps/shell/shell-rime-unicast.c @@ -45,7 +45,7 @@ #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/trickle.h" diff --git a/apps/shell/shell-rime.c b/apps/shell/shell-rime.c index 0d20b774f..07a68bf67 100644 --- a/apps/shell/shell-rime.c +++ b/apps/shell/shell-rime.c @@ -46,7 +46,7 @@ #include "lib/crc16.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "net/rime/route.h" diff --git a/apps/shell/shell-rsh.c b/apps/shell/shell-rsh.c index e74d882c9..31d778da8 100644 --- a/apps/shell/shell-rsh.c +++ b/apps/shell/shell-rsh.c @@ -40,7 +40,7 @@ #include "contiki.h" #include "shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/meshconn.h" #include diff --git a/apps/shell/shell-sendtest.c b/apps/shell/shell-sendtest.c index e518fbc77..1fa28b3b4 100644 --- a/apps/shell/shell-sendtest.c +++ b/apps/shell/shell-sendtest.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "shell-ps.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #include diff --git a/apps/shell/shell-sky.c b/apps/shell/shell-sky.c index 5230d9910..65c4859ed 100644 --- a/apps/shell/shell-sky.c +++ b/apps/shell/shell-sky.c @@ -42,14 +42,14 @@ #include "dev/watchdog.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" -#include "dev/sht11.h" +#include "dev/sht11/sht11.h" #include "dev/light-sensor.h" #include "dev/battery-sensor.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "net/rime/timesynch.h" #include "sys/node-id.h" diff --git a/apps/shell/shell.c b/apps/shell/shell.c index 7efecdf5f..fd909c791 100644 --- a/apps/shell/shell.c +++ b/apps/shell/shell.c @@ -45,7 +45,7 @@ #include "contiki.h" #include "contiki-lib.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "shell.h" diff --git a/apps/slip-cmd/packetutils.c b/apps/slip-cmd/packetutils.c index 46ca3ad5f..774b1e5c8 100644 --- a/apps/slip-cmd/packetutils.c +++ b/apps/slip-cmd/packetutils.c @@ -30,7 +30,7 @@ #include "contiki.h" #include "net/packetbuf.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ int diff --git a/apps/webbrowser/www.c b/apps/webbrowser/www.c index 995038bd8..e8bd7effe 100644 --- a/apps/webbrowser/www.c +++ b/apps/webbrowser/www.c @@ -36,7 +36,7 @@ #include #include "ctk/ctk.h" -#include "lib/ctk-textentry-cmdline.h" +#include "ctk/ctk-textentry-cmdline.h" #include "contiki-net.h" #include "lib/petsciiconv.h" #include "sys/arg.h" diff --git a/core/contiki-net.h b/core/contiki-net.h index 5e6cddd40..453b5a468 100644 --- a/core/contiki-net.h +++ b/core/contiki-net.h @@ -36,25 +36,25 @@ #include "contiki.h" -#include "net/tcpip.h" -#include "net/uip.h" -#include "net/uip-fw.h" -#include "net/uip-fw-drv.h" -#include "net/uip_arp.h" -#include "net/uiplib.h" -#include "net/uip-udp-packet.h" -#include "net/simple-udp.h" +#include "net/ip/tcpip.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" +#include "net/ipv4/uip-fw-drv.h" +#include "net/ipv4/uip_arp.h" +#include "net/ip/uiplib.h" +#include "net/ip/uip-udp-packet.h" +#include "net/ip/simple-udp.h" #if UIP_CONF_IPV6 -#include "net/uip-icmp6.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-ds6.h" #endif /* UIP_CONF_IPV6 */ -#include "net/resolv.h" +#include "net/ip/resolv.h" -#include "net/psock.h" +#include "net/ip/psock.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" diff --git a/core/lib/ctk-filedialog.c b/core/ctk/ctk-filedialog.c similarity index 99% rename from core/lib/ctk-filedialog.c rename to core/ctk/ctk-filedialog.c index cc88366a1..0bafcc4a8 100644 --- a/core/lib/ctk-filedialog.c +++ b/core/ctk/ctk-filedialog.c @@ -33,7 +33,7 @@ */ #include "contiki.h" -#include "lib/ctk-filedialog.h" +#include "ctk/ctk-filedialog.h" #include "ctk/ctk.h" #include "cfs/cfs.h" diff --git a/core/lib/ctk-filedialog.h b/core/ctk/ctk-filedialog.h similarity index 100% rename from core/lib/ctk-filedialog.h rename to core/ctk/ctk-filedialog.h diff --git a/core/lib/ctk-textentry-checkbox.c b/core/ctk/ctk-textentry-checkbox.c similarity index 100% rename from core/lib/ctk-textentry-checkbox.c rename to core/ctk/ctk-textentry-checkbox.c diff --git a/core/lib/ctk-textentry-checkbox.h b/core/ctk/ctk-textentry-checkbox.h similarity index 100% rename from core/lib/ctk-textentry-checkbox.h rename to core/ctk/ctk-textentry-checkbox.h diff --git a/core/lib/ctk-textentry-cmdline.c b/core/ctk/ctk-textentry-cmdline.c similarity index 98% rename from core/lib/ctk-textentry-cmdline.c rename to core/ctk/ctk-textentry-cmdline.c index 3f003ee71..7a18ff71b 100644 --- a/core/lib/ctk-textentry-cmdline.c +++ b/core/ctk/ctk-textentry-cmdline.c @@ -34,7 +34,7 @@ #include "ctk/ctk.h" -#include "lib/ctk-textentry-cmdline.h" +#include "ctk/ctk-textentry-cmdline.h" /*-----------------------------------------------------------------------------------*/ unsigned char diff --git a/core/lib/ctk-textentry-cmdline.h b/core/ctk/ctk-textentry-cmdline.h similarity index 100% rename from core/lib/ctk-textentry-cmdline.h rename to core/ctk/ctk-textentry-cmdline.h diff --git a/core/lib/ctk-textentry-multiline.c b/core/ctk/ctk-textentry-multiline.c similarity index 98% rename from core/lib/ctk-textentry-multiline.c rename to core/ctk/ctk-textentry-multiline.c index 970910f51..d84a22c62 100644 --- a/core/lib/ctk-textentry-multiline.c +++ b/core/ctk/ctk-textentry-multiline.c @@ -36,7 +36,7 @@ #include "ctk/ctk.h" -#include "lib/ctk-textentry-multiline.h" +#include "ctk/ctk-textentry-multiline.h" /*-----------------------------------------------------------------------------------*/ unsigned char diff --git a/core/lib/ctk-textentry-multiline.h b/core/ctk/ctk-textentry-multiline.h similarity index 100% rename from core/lib/ctk-textentry-multiline.h rename to core/ctk/ctk-textentry-multiline.h diff --git a/core/lib/libconio.c b/core/ctk/libconio/libconio.c similarity index 100% rename from core/lib/libconio.c rename to core/ctk/libconio/libconio.c diff --git a/core/lib/libconio.h b/core/ctk/libconio/libconio.h similarity index 100% rename from core/lib/libconio.h rename to core/ctk/libconio/libconio.h diff --git a/core/dev/slip.c b/core/dev/slip.c index 9535c05b7..22a658dc7 100644 --- a/core/dev/slip.c +++ b/core/dev/slip.c @@ -37,8 +37,8 @@ #include "contiki.h" -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) #include "dev/slip.h" diff --git a/core/lib/print-stats.c b/core/lib/print-stats.c index ce7b0dddf..ac615afbf 100644 --- a/core/lib/print-stats.c +++ b/core/lib/print-stats.c @@ -39,7 +39,7 @@ #include "lib/print-stats.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/energest.h" #include diff --git a/core/lib/strncasecmp.c b/core/lib/strncasecmp/strncasecmp.c similarity index 100% rename from core/lib/strncasecmp.c rename to core/lib/strncasecmp/strncasecmp.c diff --git a/core/net/Makefile.uip b/core/net/Makefile.uip deleted file mode 100644 index 29b5de528..000000000 --- a/core/net/Makefile.uip +++ /dev/null @@ -1,31 +0,0 @@ -NET = \ -dhcpc.c \ -nbr-table.c \ -netstack.c \ -packetbuf.c \ -packetqueue.c \ -psock.c \ -queuebuf.c \ -resolv.c \ -sicslowpan.c \ -simple-udp.c \ -tcpip.c \ -uaodv-rt.c \ -uaodv.c \ -uip-debug.c \ -uip-ds6-route.c \ -uip-ds6-nbr.c \ -uip-ds6.c \ -uip-fw-drv.c \ -uip-fw.c \ -uip-icmp6.c \ -uip-nd6.c \ -uip-neighbor.c \ -uip-over-mesh.c \ -uip-packetqueue.c \ -uip-split.c \ -uip-udp-packet.c \ -uip.c \ -uip6.c \ -uip_arp.c \ -uiplib.c diff --git a/core/net/dhcpc.c b/core/net/ip/dhcpc.c similarity index 99% rename from core/net/dhcpc.c rename to core/net/ip/dhcpc.c index 97a86fd96..46ba826da 100644 --- a/core/net/dhcpc.c +++ b/core/net/ip/dhcpc.c @@ -35,7 +35,7 @@ #include "contiki.h" #include "contiki-net.h" -#include "net/dhcpc.h" +#include "net/ip/dhcpc.h" #define STATE_INITIAL 0 #define STATE_SENDING 1 diff --git a/core/net/dhcpc.h b/core/net/ip/dhcpc.h similarity index 100% rename from core/net/dhcpc.h rename to core/net/ip/dhcpc.h diff --git a/core/net/psock.c b/core/net/ip/psock.c similarity index 99% rename from core/net/psock.c rename to core/net/ip/psock.c index 47893a5de..5b662a827 100644 --- a/core/net/psock.c +++ b/core/net/ip/psock.c @@ -34,7 +34,7 @@ #include -#include "net/psock.h" +#include "net/ip/psock.h" #define STATE_NONE 0 #define STATE_ACKED 1 diff --git a/core/net/psock.h b/core/net/ip/psock.h similarity index 100% rename from core/net/psock.h rename to core/net/ip/psock.h diff --git a/core/net/resolv.c b/core/net/ip/resolv.c similarity index 99% rename from core/net/resolv.c rename to core/net/ip/resolv.c index 7e310b0be..1116d9996 100644 --- a/core/net/resolv.c +++ b/core/net/ip/resolv.c @@ -62,9 +62,9 @@ * */ -#include "net/tcpip.h" -#include "net/resolv.h" -#include "net/uip-udp-packet.h" +#include "net/ip/tcpip.h" +#include "net/ip/resolv.h" +#include "net/ip/uip-udp-packet.h" #include "lib/random.h" #ifndef DEBUG @@ -318,7 +318,7 @@ static const uip_ipaddr_t resolv_mdns_addr = #if UIP_CONF_IPV6 { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb } }; -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #else /* UIP_CONF_IPV6 */ { { 224, 0, 0, 251 } }; #endif /* UIP_CONF_IPV6 */ diff --git a/core/net/resolv.h b/core/net/ip/resolv.h similarity index 100% rename from core/net/resolv.h rename to core/net/ip/resolv.h diff --git a/core/net/simple-udp.c b/core/net/ip/simple-udp.c similarity index 99% rename from core/net/simple-udp.c rename to core/net/ip/simple-udp.c index 61197f452..7c847bf5c 100644 --- a/core/net/simple-udp.c +++ b/core/net/ip/simple-udp.c @@ -42,7 +42,7 @@ */ #include "contiki-net.h" -#include "net/simple-udp.h" +#include "net/ip/simple-udp.h" #include diff --git a/core/net/simple-udp.h b/core/net/ip/simple-udp.h similarity index 99% rename from core/net/simple-udp.h rename to core/net/ip/simple-udp.h index 0198c2f10..e5a9439d7 100644 --- a/core/net/simple-udp.h +++ b/core/net/ip/simple-udp.h @@ -53,7 +53,7 @@ #ifndef SIMPLE_UDP_H #define SIMPLE_UDP_H -#include "net/uip.h" +#include "net/ip/uip.h" struct simple_udp_connection; diff --git a/core/net/slipdev.c b/core/net/ip/slipdev.c similarity index 98% rename from core/net/slipdev.c rename to core/net/ip/slipdev.c index 2ee528fd0..a75f524bf 100644 --- a/core/net/slipdev.c +++ b/core/net/ip/slipdev.c @@ -66,7 +66,6 @@ */ #include "uip.h" -#include "uip-fw.h" #include "slipdev.h" #include /* For memcpy() */ @@ -89,7 +88,7 @@ static uint8_t lastc; * from the uip_buf buffer, and the following bytes (the application * data) are read from the uip_appdata buffer. * - * \return This function will always return UIP_FW_OK. + * \return This function will always return 0. */ /*-----------------------------------------------------------------------------------*/ uint8_t @@ -123,7 +122,7 @@ slipdev_send(void) } slipdev_char_put(SLIP_END); - return UIP_FW_OK; + return 0; } /*-----------------------------------------------------------------------------------*/ /** diff --git a/core/net/slipdev.h b/core/net/ip/slipdev.h similarity index 100% rename from core/net/slipdev.h rename to core/net/ip/slipdev.h diff --git a/core/net/tcpip.c b/core/net/ip/tcpip.c similarity index 99% rename from core/net/tcpip.c rename to core/net/ip/tcpip.c index 5d9d8858a..7a889c84c 100644 --- a/core/net/tcpip.c +++ b/core/net/ip/tcpip.c @@ -39,18 +39,18 @@ */ #include "contiki-net.h" -#include "net/uip-split.h" -#include "net/uip-packetqueue.h" +#include "net/ip/uip-split.h" +#include "net/ip/uip-packetqueue.h" #if UIP_CONF_IPV6 -#include "net/uip-nd6.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-ds6.h" #endif #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if UIP_LOGGING #include diff --git a/core/net/tcpip.h b/core/net/ip/tcpip.h similarity index 99% rename from core/net/tcpip.h rename to core/net/ip/tcpip.h index 1c968f1aa..dcc1ad19a 100644 --- a/core/net/tcpip.h +++ b/core/net/ip/tcpip.h @@ -84,7 +84,7 @@ struct tcpip_uipstate { typedef struct tcpip_uipstate uip_udp_appstate_t; typedef struct tcpip_uipstate uip_tcp_appstate_t; typedef struct tcpip_uipstate uip_icmp6_appstate_t; -#include "net/uip.h" +#include "net/ip/uip.h" void tcpip_uipcall(void); /** diff --git a/core/net/uip-debug.c b/core/net/ip/uip-debug.c similarity index 98% rename from core/net/uip-debug.c rename to core/net/ip/uip-debug.c index 9a4f0cb48..a9a6d5ed0 100644 --- a/core/net/uip-debug.c +++ b/core/net/ip/uip-debug.c @@ -37,7 +37,7 @@ * Joakim Eriksson */ -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ void diff --git a/core/net/uip-debug.h b/core/net/ip/uip-debug.h similarity index 99% rename from core/net/uip-debug.h rename to core/net/ip/uip-debug.h index 8a24f395d..6ffc1e638 100644 --- a/core/net/uip-debug.h +++ b/core/net/ip/uip-debug.h @@ -41,7 +41,7 @@ #ifndef UIP_DEBUG_H #define UIP_DEBUG_H -#include "net/uip.h" +#include "net/ip/uip.h" #include void uip_debug_ipaddr_print(const uip_ipaddr_t *addr); diff --git a/core/net/uip-packetqueue.c b/core/net/ip/uip-packetqueue.c similarity index 97% rename from core/net/uip-packetqueue.c rename to core/net/ip/uip-packetqueue.c index f9b9c2d80..6cacb5f2b 100644 --- a/core/net/uip-packetqueue.c +++ b/core/net/ip/uip-packetqueue.c @@ -1,10 +1,10 @@ #include -#include "net/uip.h" +#include "net/ip/uip.h" #include "lib/memb.h" -#include "net/uip-packetqueue.h" +#include "net/ip/uip-packetqueue.h" #define MAX_NUM_QUEUED_PACKETS 2 MEMB(packets_memb, struct uip_packetqueue_packet, MAX_NUM_QUEUED_PACKETS); diff --git a/core/net/uip-packetqueue.h b/core/net/ip/uip-packetqueue.h similarity index 100% rename from core/net/uip-packetqueue.h rename to core/net/ip/uip-packetqueue.h diff --git a/core/net/uip-split.c b/core/net/ip/uip-split.c similarity index 97% rename from core/net/uip-split.c rename to core/net/ip/uip-split.c index 4d247e478..178d989b0 100644 --- a/core/net/uip-split.c +++ b/core/net/ip/uip-split.c @@ -34,12 +34,12 @@ #include -#include "net/uip-split.h" -#include "net/uip.h" -#include "net/uip-fw.h" -#include "net/uip_arch.h" +#include "net/ip/uip-split.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" +#include "net/ip/uip_arch.h" -#include "net/tcpip.h" +#include "net/ip/tcpip.h" #define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/core/net/uip-split.h b/core/net/ip/uip-split.h similarity index 100% rename from core/net/uip-split.h rename to core/net/ip/uip-split.h diff --git a/core/net/uip-udp-packet.c b/core/net/ip/uip-udp-packet.c similarity index 98% rename from core/net/uip-udp-packet.c rename to core/net/ip/uip-udp-packet.c index 96423bfcb..5b03be54b 100644 --- a/core/net/uip-udp-packet.c +++ b/core/net/ip/uip-udp-packet.c @@ -41,7 +41,7 @@ extern uint16_t uip_slen; -#include "net/uip-udp-packet.h" +#include "net/ip/uip-udp-packet.h" #include diff --git a/core/net/uip-udp-packet.h b/core/net/ip/uip-udp-packet.h similarity index 98% rename from core/net/uip-udp-packet.h rename to core/net/ip/uip-udp-packet.h index 294919f6e..0f5b63bab 100644 --- a/core/net/uip-udp-packet.h +++ b/core/net/ip/uip-udp-packet.h @@ -40,7 +40,7 @@ #ifndef UIP_UDP_PACKET_H_ #define UIP_UDP_PACKET_H_ -#include "net/uip.h" +#include "net/ip/uip.h" void uip_udp_packet_send(struct uip_udp_conn *c, const void *data, int len); void uip_udp_packet_sendto(struct uip_udp_conn *c, const void *data, int len, diff --git a/core/net/uip.h b/core/net/ip/uip.h similarity index 99% rename from core/net/uip.h rename to core/net/ip/uip.h index 3e3d959bc..076734396 100644 --- a/core/net/uip.h +++ b/core/net/ip/uip.h @@ -90,7 +90,7 @@ #endif /*UIP_CONF_IPV6*/ -#include "net/uipopt.h" +#include "net/ip/uipopt.h" /** * Representation of an IP address. @@ -153,7 +153,7 @@ typedef uip_eth_addr uip_lladdr_t; #endif /*UIP_CONF_LL_80211*/ #endif /*UIP_CONF_LL_802154*/ -#include "net/tcpip.h" +#include "net/ip/tcpip.h" /*---------------------------------------------------------------------------*/ /* First, the functions that should be called from the diff --git a/core/net/uip_arch.h b/core/net/ip/uip_arch.h similarity index 99% rename from core/net/uip_arch.h rename to core/net/ip/uip_arch.h index bdef2b512..b4849bb5d 100644 --- a/core/net/uip_arch.h +++ b/core/net/ip/uip_arch.h @@ -60,7 +60,7 @@ #ifndef UIP_ARCH_H_ #define UIP_ARCH_H_ -#include "net/uip.h" +#include "net/ip/uip.h" /** * Carry out a 32-bit addition. diff --git a/core/net/uiplib.c b/core/net/ip/uiplib.c similarity index 98% rename from core/net/uiplib.c rename to core/net/ip/uiplib.c index e01f7d672..44b1b54e1 100644 --- a/core/net/uiplib.c +++ b/core/net/ip/uiplib.c @@ -33,12 +33,12 @@ */ -#include "net/uip.h" -#include "net/uiplib.h" +#include "net/ip/uip.h" +#include "net/ip/uiplib.h" #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*-----------------------------------------------------------------------------------*/ #if UIP_CONF_IPV6 diff --git a/core/net/uiplib.h b/core/net/ip/uiplib.h similarity index 99% rename from core/net/uiplib.h rename to core/net/ip/uiplib.h index 9c40bdc1c..5f053df5d 100644 --- a/core/net/uiplib.h +++ b/core/net/ip/uiplib.h @@ -42,7 +42,7 @@ #ifndef UIPLIB_H_ #define UIPLIB_H_ -#include "net/uip.h" +#include "net/ip/uip.h" /** * \addtogroup uipconvfunc diff --git a/core/net/uipopt.h b/core/net/ip/uipopt.h similarity index 100% rename from core/net/uipopt.h rename to core/net/ip/uipopt.h diff --git a/core/net/uaodv-def.h b/core/net/ipv4/uaodv-def.h similarity index 99% rename from core/net/uaodv-def.h rename to core/net/ipv4/uaodv-def.h index 520e897da..5edb9f6ef 100644 --- a/core/net/uaodv-def.h +++ b/core/net/ipv4/uaodv-def.h @@ -40,7 +40,7 @@ #ifndef UAODV_DEF_H_ #define UAODV_DEF_H_ -#include "net/uip.h" +#include "net/ip/uip.h" #define NUM_PRECURSORS 4 diff --git a/core/net/uaodv-rt.c b/core/net/ipv4/uaodv-rt.c similarity index 99% rename from core/net/uaodv-rt.c rename to core/net/ipv4/uaodv-rt.c index 4fae93322..cad7db73f 100644 --- a/core/net/uaodv-rt.c +++ b/core/net/ipv4/uaodv-rt.c @@ -38,7 +38,7 @@ */ -#include "net/uaodv-rt.h" +#include "net/ipv4/uaodv-rt.h" #include "contiki-net.h" #ifndef UAODV_NUM_RT_ENTRIES diff --git a/core/net/uaodv-rt.h b/core/net/ipv4/uaodv-rt.h similarity index 100% rename from core/net/uaodv-rt.h rename to core/net/ipv4/uaodv-rt.h diff --git a/core/net/uaodv.c b/core/net/ipv4/uaodv.c similarity index 99% rename from core/net/uaodv.c rename to core/net/ipv4/uaodv.c index 89de47f43..230709a61 100644 --- a/core/net/uaodv.c +++ b/core/net/ipv4/uaodv.c @@ -41,14 +41,14 @@ #include #include "contiki.h" -#include "net/uaodv-def.h" -#include "net/uaodv-rt.h" +#include "net/ipv4/uaodv-def.h" +#include "net/ipv4/uaodv-rt.h" #define NDEBUG #include "lib/assert.h" #ifdef CC2420_RADIO -#include "dev/cc2420.h" +#include "cc2420.h" #define RSSI_THRESHOLD -39 /* accept -39 ... xx */ #endif diff --git a/core/net/uaodv.h b/core/net/ipv4/uaodv.h similarity index 100% rename from core/net/uaodv.h rename to core/net/ipv4/uaodv.h diff --git a/core/net/uip-fw-drv.c b/core/net/ipv4/uip-fw-drv.c similarity index 98% rename from core/net/uip-fw-drv.c rename to core/net/ipv4/uip-fw-drv.c index 7324fb7bb..d4f62b945 100644 --- a/core/net/uip-fw-drv.c +++ b/core/net/ipv4/uip-fw-drv.c @@ -32,7 +32,7 @@ * */ -#include "net/uip-fw.h" +#include "net/ipv4/uip-fw.h" #if !UIP_CONF_IPV6 diff --git a/core/net/uip-fw-drv.h b/core/net/ipv4/uip-fw-drv.h similarity index 98% rename from core/net/uip-fw-drv.h rename to core/net/ipv4/uip-fw-drv.h index 478022016..e88b8acf4 100644 --- a/core/net/uip-fw-drv.h +++ b/core/net/ipv4/uip-fw-drv.h @@ -35,7 +35,7 @@ #define UIP_FW_DRV_H_ #include "contiki.h" -#include "net/uip-fw.h" +#include "net/ipv4/uip-fw.h" PROCESS_NAME(uip_fw_process); diff --git a/core/net/uip-fw.c b/core/net/ipv4/uip-fw.c similarity index 99% rename from core/net/uip-fw.c rename to core/net/ipv4/uip-fw.c index 3c668890d..c152231c0 100644 --- a/core/net/uip-fw.c +++ b/core/net/ipv4/uip-fw.c @@ -56,11 +56,11 @@ #include "contiki-conf.h" -#include "net/uip.h" -#include "net/uip_arch.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ip/uip_arch.h" +#include "net/ipv4/uip-fw.h" #ifdef AODV_COMPLIANCE -#include "net/uaodv-def.h" +#include "net/ipv4/uaodv-def.h" #endif /* diff --git a/core/net/uip-fw.h b/core/net/ipv4/uip-fw.h similarity index 99% rename from core/net/uip-fw.h rename to core/net/ipv4/uip-fw.h index d662651b9..8f86241e6 100644 --- a/core/net/uip-fw.h +++ b/core/net/ipv4/uip-fw.h @@ -45,7 +45,7 @@ #ifndef UIP_FW_H_ #define UIP_FW_H_ -#include "net/uip.h" +#include "net/ip/uip.h" /** * Representation of a uIP network interface. diff --git a/core/net/uip-neighbor.c b/core/net/ipv4/uip-neighbor.c similarity index 99% rename from core/net/uip-neighbor.c rename to core/net/ipv4/uip-neighbor.c index 6d996a0f8..dbd21030c 100644 --- a/core/net/uip-neighbor.c +++ b/core/net/ipv4/uip-neighbor.c @@ -38,7 +38,7 @@ * Adam Dunkels */ -#include "net/uip-neighbor.h" +#include "net/ipv4/uip-neighbor.h" #include #include diff --git a/core/net/uip-neighbor.h b/core/net/ipv4/uip-neighbor.h similarity index 98% rename from core/net/uip-neighbor.h rename to core/net/ipv4/uip-neighbor.h index 5825f962d..fffbb2bf4 100644 --- a/core/net/uip-neighbor.h +++ b/core/net/ipv4/uip-neighbor.h @@ -41,7 +41,7 @@ #ifndef UIP_NEIGHBOR_H_ #define UIP_NEIGHBOR_H_ -#include "net/uip.h" +#include "net/ip/uip.h" struct uip_neighbor_addr { #if UIP_NEIGHBOR_CONF_ADDRTYPE diff --git a/core/net/uip-over-mesh.c b/core/net/ipv4/uip-over-mesh.c similarity index 99% rename from core/net/uip-over-mesh.c rename to core/net/ipv4/uip-over-mesh.c index f4a1a74f1..fd07aba8a 100644 --- a/core/net/uip-over-mesh.c +++ b/core/net/ipv4/uip-over-mesh.c @@ -39,8 +39,8 @@ #include -#include "net/uip-fw.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-fw.h" +#include "net/ipv4/uip-over-mesh.h" #include "net/rime/route-discovery.h" #include "net/rime/route.h" #include "net/rime/trickle.h" diff --git a/core/net/uip-over-mesh.h b/core/net/ipv4/uip-over-mesh.h similarity index 96% rename from core/net/uip-over-mesh.h rename to core/net/ipv4/uip-over-mesh.h index 332b7784c..c00b54f41 100644 --- a/core/net/uip-over-mesh.h +++ b/core/net/ipv4/uip-over-mesh.h @@ -40,9 +40,9 @@ #ifndef UIP_OVER_MESH_H_ #define UIP_OVER_MESH_H_ -#include "net/uip.h" -#include "net/uip-fw.h" -#include "net/rime.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" +#include "net/rime/rime.h" void uip_over_mesh_init(uint16_t channels); uint8_t uip_over_mesh_send(void); diff --git a/core/net/uip.c b/core/net/ipv4/uip.c similarity index 99% rename from core/net/uip.c rename to core/net/ipv4/uip.c index 03a2c4f59..7b381461e 100644 --- a/core/net/uip.c +++ b/core/net/ipv4/uip.c @@ -70,10 +70,10 @@ * the packet back to the peer. */ -#include "net/uip.h" -#include "net/uipopt.h" -#include "net/uip_arp.h" -#include "net/uip_arch.h" +#include "net/ip/uip.h" +#include "net/ip/uipopt.h" +#include "net/ipv4/uip_arp.h" +#include "net/ip/uip_arch.h" #if !UIP_CONF_IPV6 /* If UIP_CONF_IPV6 is defined, we compile the uip6.c file instead of this one. Therefore @@ -82,7 +82,7 @@ #if UIP_CONF_IPV6 -#include "net/uip-neighbor.h" +#include "net/ipv4/uip-neighbor.h" #endif /* UIP_CONF_IPV6 */ #include diff --git a/core/net/uip_arp.c b/core/net/ipv4/uip_arp.c similarity index 99% rename from core/net/uip_arp.c rename to core/net/ipv4/uip_arp.c index fdbc7bc20..09cfb49cf 100644 --- a/core/net/uip_arp.c +++ b/core/net/ipv4/uip_arp.c @@ -58,7 +58,7 @@ */ -#include "net/uip_arp.h" +#include "net/ipv4/uip_arp.h" #include diff --git a/core/net/uip_arp.h b/core/net/ipv4/uip_arp.h similarity index 99% rename from core/net/uip_arp.h rename to core/net/ipv4/uip_arp.h index 604a34370..16892bf14 100644 --- a/core/net/uip_arp.h +++ b/core/net/ipv4/uip_arp.h @@ -51,7 +51,7 @@ #ifndef UIP_ARP_H_ #define UIP_ARP_H_ -#include "net/uip.h" +#include "net/ip/uip.h" diff --git a/core/net/sicslowpan.c b/core/net/ipv6/sicslowpan.c similarity index 99% rename from core/net/sicslowpan.c rename to core/net/ipv6/sicslowpan.c index 844064cae..c038c702d 100644 --- a/core/net/sicslowpan.c +++ b/core/net/ipv6/sicslowpan.c @@ -60,11 +60,11 @@ #include "contiki.h" #include "dev/watchdog.h" -#include "net/tcpip.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/rime.h" -#include "net/sicslowpan.h" +#include "net/ip/tcpip.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/rime/rime.h" +#include "net/ipv6/sicslowpan.h" #include "net/netstack.h" #if UIP_CONF_IPV6 @@ -72,7 +72,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if DEBUG /* PRINTFI and PRINTFO are defined for input and output to debug one without changing the timing of the other */ uint8_t p; diff --git a/core/net/sicslowpan.h b/core/net/ipv6/sicslowpan.h similarity index 99% rename from core/net/sicslowpan.h rename to core/net/ipv6/sicslowpan.h index 9905fb707..84f1265c6 100644 --- a/core/net/sicslowpan.h +++ b/core/net/ipv6/sicslowpan.h @@ -47,7 +47,8 @@ #ifndef SICSLOWPAN_H_ #define SICSLOWPAN_H_ -#include "net/uip.h" + +#include "net/ip/uip.h" #include "net/mac/mac.h" /** diff --git a/core/net/uip-ds6-nbr.c b/core/net/ipv6/uip-ds6-nbr.c similarity index 99% rename from core/net/uip-ds6-nbr.c rename to core/net/ipv6/uip-ds6-nbr.c index 2f07154dc..fb03e3c12 100644 --- a/core/net/uip-ds6-nbr.c +++ b/core/net/ipv6/uip-ds6-nbr.c @@ -47,12 +47,12 @@ #include #include #include "lib/list.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/packetbuf.h" -#include "net/uip-ds6-nbr.h" +#include "net/ipv6/uip-ds6-nbr.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #ifdef UIP_CONF_DS6_NEIGHBOR_STATE_CHANGED #define NEIGHBOR_STATE_CHANGED(n) UIP_CONF_DS6_NEIGHBOR_STATE_CHANGED(n) diff --git a/core/net/uip-ds6-nbr.h b/core/net/ipv6/uip-ds6-nbr.h similarity index 97% rename from core/net/uip-ds6-nbr.h rename to core/net/ipv6/uip-ds6-nbr.h index 4fe190533..150ba117a 100644 --- a/core/net/uip-ds6-nbr.h +++ b/core/net/ipv6/uip-ds6-nbr.h @@ -46,14 +46,14 @@ #ifndef UIP_DS6_NEIGHBOR_H_ #define UIP_DS6_NEIGHBOR_H_ -#include "net/uip.h" +#include "net/ip/uip.h" #include "net/nbr-table.h" #include "sys/stimer.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #include "net/nbr-table.h" #if UIP_CONF_IPV6_QUEUE_PKT -#include "net/uip-packetqueue.h" +#include "net/ip/uip-packetqueue.h" #endif /*UIP_CONF_QUEUE_PKT */ /*--------------------------------------------------*/ diff --git a/core/net/uip-ds6-route.c b/core/net/ipv6/uip-ds6-route.c similarity index 99% rename from core/net/uip-ds6-route.c rename to core/net/ipv6/uip-ds6-route.c index 5d692eb42..bcdfcbfd3 100644 --- a/core/net/uip-ds6-route.c +++ b/core/net/ipv6/uip-ds6-route.c @@ -29,8 +29,8 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#include "net/uip-ds6.h" -#include "net/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip.h" #include "lib/list.h" #include "lib/memb.h" @@ -67,7 +67,7 @@ static int num_routes = 0; #undef DEBUG #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static void rm_routelist_callback(nbr_table_item_t *ptr); /*---------------------------------------------------------------------------*/ diff --git a/core/net/uip-ds6-route.h b/core/net/ipv6/uip-ds6-route.h similarity index 100% rename from core/net/uip-ds6-route.h rename to core/net/ipv6/uip-ds6-route.h diff --git a/core/net/uip-ds6.c b/core/net/ipv6/uip-ds6.c similarity index 99% rename from core/net/uip-ds6.c rename to core/net/ipv6/uip-ds6.c index 6e4b86f71..3594f46e1 100644 --- a/core/net/uip-ds6.c +++ b/core/net/ipv6/uip-ds6.c @@ -44,14 +44,14 @@ #include #include #include "lib/random.h" -#include "net/uip-nd6.h" -#include "net/uip-ds6.h" -#include "net/uip-packetqueue.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-packetqueue.h" #if UIP_CONF_IPV6 #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" struct etimer uip_ds6_timer_periodic; /** \brief Timer for maintenance of data structures */ diff --git a/core/net/uip-ds6.h b/core/net/ipv6/uip-ds6.h similarity index 98% rename from core/net/uip-ds6.h rename to core/net/ipv6/uip-ds6.h index 93dcd6868..45ec3c7a0 100644 --- a/core/net/uip-ds6.h +++ b/core/net/ipv6/uip-ds6.h @@ -42,12 +42,12 @@ #ifndef UIP_DS6_H_ #define UIP_DS6_H_ -#include "net/uip.h" +#include "net/ip/uip.h" #include "sys/stimer.h" /* The size of uip_ds6_addr_t depends on UIP_ND6_DEF_MAXDADNS. Include uip-nd6.h to define it. */ -#include "net/uip-nd6.h" -#include "net/uip-ds6-route.h" -#include "net/uip-ds6-nbr.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-ds6-route.h" +#include "net/ipv6/uip-ds6-nbr.h" /*--------------------------------------------------*/ /** Configuration. For all tables (Neighbor cache, Prefix List, Routing Table, @@ -138,7 +138,7 @@ /*--------------------------------------------------*/ #if UIP_CONF_IPV6_QUEUE_PKT -#include "net/uip-packetqueue.h" +#include "net/ip/uip-packetqueue.h" #endif /*UIP_CONF_QUEUE_PKT */ /** \brief A prefix list entry */ diff --git a/core/net/uip-icmp6.c b/core/net/ipv6/uip-icmp6.c similarity index 99% rename from core/net/uip-icmp6.c rename to core/net/ipv6/uip-icmp6.c index d87067c6d..a527ed5ed 100644 --- a/core/net/uip-icmp6.c +++ b/core/net/ipv6/uip-icmp6.c @@ -43,8 +43,8 @@ */ #include -#include "net/uip-ds6.h" -#include "net/uip-icmp6.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ipv6/uip-icmp6.h" #include "contiki-default-conf.h" #define DEBUG 0 diff --git a/core/net/uip-icmp6.h b/core/net/ipv6/uip-icmp6.h similarity index 99% rename from core/net/uip-icmp6.h rename to core/net/ipv6/uip-icmp6.h index a33cdfd0e..9441cbc0e 100644 --- a/core/net/uip-icmp6.h +++ b/core/net/ipv6/uip-icmp6.h @@ -46,7 +46,7 @@ #ifndef ICMP6_H_ #define ICMP6_H_ -#include "net/uip.h" +#include "net/ip/uip.h" /** \name ICMPv6 message types */ diff --git a/core/net/uip-nd6.c b/core/net/ipv6/uip-nd6.c similarity index 99% rename from core/net/uip-nd6.c rename to core/net/ipv6/uip-nd6.c index 4c9c1b775..2eb47f176 100644 --- a/core/net/uip-nd6.c +++ b/core/net/ipv6/uip-nd6.c @@ -69,15 +69,15 @@ */ #include -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-ds6.h" #include "lib/random.h" #if UIP_CONF_IPV6 /*------------------------------------------------------------------*/ #define DEBUG 0 -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if UIP_LOGGING #include diff --git a/core/net/uip-nd6.h b/core/net/ipv6/uip-nd6.h similarity index 99% rename from core/net/uip-nd6.h rename to core/net/ipv6/uip-nd6.h index de6412899..d6719ae33 100644 --- a/core/net/uip-nd6.h +++ b/core/net/ipv6/uip-nd6.h @@ -45,7 +45,7 @@ #ifndef UIP_ND6_H_ #define UIP_ND6_H_ -#include "net/uip.h" +#include "net/ip/uip.h" #include "sys/stimer.h" /** * \name General diff --git a/core/net/uip6.c b/core/net/ipv6/uip6.c similarity index 99% rename from core/net/uip6.c rename to core/net/ipv6/uip6.c index d0b2095ee..fc3d244d2 100644 --- a/core/net/uip6.c +++ b/core/net/ipv6/uip6.c @@ -70,11 +70,11 @@ * the packet back to the peer. */ -#include "net/uip.h" -#include "net/uipopt.h" -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ip/uipopt.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-ds6.h" #include @@ -84,7 +84,7 @@ /*---------------------------------------------------------------------------*/ #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if UIP_CONF_IPV6_RPL #include "rpl/rpl.h" diff --git a/core/net/mac/Makefile.mac b/core/net/mac/Makefile.mac deleted file mode 100644 index e3f04262f..000000000 --- a/core/net/mac/Makefile.mac +++ /dev/null @@ -1,2 +0,0 @@ -CONTIKI_SOURCEFILES += cxmac.c nullmac.c frame802154.c sicslowmac.c nullrdc.c nullrdc-noframer.c mac.c -CONTIKI_SOURCEFILES += framer-nullmac.c framer-802154.c csma.c contikimac.c phase.c mac-sequence.c diff --git a/core/net/mac/contikimac.c b/core/net/mac/contikimac/contikimac.c similarity index 99% rename from core/net/mac/contikimac.c rename to core/net/mac/contikimac/contikimac.c index 626a9daca..67a0d190f 100644 --- a/core/net/mac/contikimac.c +++ b/core/net/mac/contikimac/contikimac.c @@ -45,9 +45,9 @@ #include "dev/watchdog.h" #include "lib/random.h" #include "net/mac/mac-sequence.h" -#include "net/mac/contikimac.h" +#include "net/mac/contikimac/contikimac.h" #include "net/netstack.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/compower.h" #include "sys/pt.h" #include "sys/rtimer.h" diff --git a/core/net/mac/contikimac.h b/core/net/mac/contikimac/contikimac.h similarity index 100% rename from core/net/mac/contikimac.h rename to core/net/mac/contikimac/contikimac.h diff --git a/core/net/mac/cxmac.c b/core/net/mac/cxmac/cxmac.c similarity index 99% rename from core/net/mac/cxmac.c rename to core/net/mac/cxmac/cxmac.c index 1c7bbaf9a..8aa55e66b 100644 --- a/core/net/mac/cxmac.c +++ b/core/net/mac/cxmac/cxmac.c @@ -44,8 +44,8 @@ #include "dev/watchdog.h" #include "net/netstack.h" #include "lib/random.h" -#include "net/mac/cxmac.h" -#include "net/rime.h" +#include "net/mac/cxmac/cxmac.h" +#include "net/rime/rime.h" #include "net/rime/timesynch.h" #include "sys/compower.h" #include "sys/pt.h" diff --git a/core/net/mac/cxmac.h b/core/net/mac/cxmac/cxmac.h similarity index 100% rename from core/net/mac/cxmac.h rename to core/net/mac/cxmac/cxmac.h diff --git a/core/net/mac/frame802154.h b/core/net/mac/frame802154.h index 1103027d0..1c0189194 100644 --- a/core/net/mac/frame802154.h +++ b/core/net/mac/frame802154.h @@ -62,7 +62,7 @@ #define FRAME_802154_H #include "contiki-conf.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #ifdef IEEE802154_CONF_PANID #define IEEE802154_PANID IEEE802154_CONF_PANID diff --git a/core/net/mac/mac-sequence.c b/core/net/mac/mac-sequence.c index be646607f..a9f73289b 100644 --- a/core/net/mac/mac-sequence.c +++ b/core/net/mac/mac-sequence.c @@ -47,7 +47,7 @@ #include "contiki-net.h" #include "net/mac/mac-sequence.h" #include "net/packetbuf.h" -#include "net/rime.h" +#include "net/rime/rime.h" struct seqno { rimeaddr_t sender; diff --git a/core/net/mac/nullmac.c b/core/net/mac/nullmac.c index 785770c58..f65fedfdb 100644 --- a/core/net/mac/nullmac.c +++ b/core/net/mac/nullmac.c @@ -38,6 +38,9 @@ */ #include "net/mac/nullmac.h" +#include "net/netstack.h" +#include "net/ip/uip.h" +#include "net/ip/tcpip.h" #include "net/packetbuf.h" #include "net/netstack.h" diff --git a/core/net/mac/phase.h b/core/net/mac/phase.h index c605d7565..99e3d7672 100644 --- a/core/net/mac/phase.h +++ b/core/net/mac/phase.h @@ -40,7 +40,7 @@ #ifndef PHASE_H #define PHASE_H -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "sys/timer.h" #include "sys/rtimer.h" #include "lib/list.h" diff --git a/core/net/mac/sicslowmac.c b/core/net/mac/sicslowmac/sicslowmac.c similarity index 99% rename from core/net/mac/sicslowmac.c rename to core/net/mac/sicslowmac/sicslowmac.c index 66fdbeab4..097f7eba8 100644 --- a/core/net/mac/sicslowmac.c +++ b/core/net/mac/sicslowmac/sicslowmac.c @@ -44,7 +44,7 @@ */ #include -#include "net/mac/sicslowmac.h" +#include "net/mac/sicslowmac/sicslowmac.h" #include "net/mac/frame802154.h" #include "net/packetbuf.h" #include "net/queuebuf.h" diff --git a/core/net/mac/sicslowmac.h b/core/net/mac/sicslowmac/sicslowmac.h similarity index 100% rename from core/net/mac/sicslowmac.h rename to core/net/mac/sicslowmac/sicslowmac.h diff --git a/core/net/nbr-table.h b/core/net/nbr-table.h index 13130519b..6a65e1fae 100644 --- a/core/net/nbr-table.h +++ b/core/net/nbr-table.h @@ -36,7 +36,7 @@ #define NBR_TABLE_H_ #include "contiki.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/netstack.h" /* Neighbor table size */ diff --git a/core/net/packetbuf.c b/core/net/packetbuf.c index 82f85377c..9df17ebd2 100644 --- a/core/net/packetbuf.c +++ b/core/net/packetbuf.c @@ -46,7 +46,7 @@ #include "contiki-net.h" #include "net/packetbuf.h" -#include "net/rime.h" +#include "net/rime/rime.h" struct packetbuf_attr packetbuf_attrs[PACKETBUF_NUM_ATTRS]; struct packetbuf_addr packetbuf_addrs[PACKETBUF_NUM_ADDRS]; diff --git a/core/net/packetbuf.h b/core/net/packetbuf.h index 12d7b49d5..f321b0ca0 100644 --- a/core/net/packetbuf.h +++ b/core/net/packetbuf.h @@ -53,7 +53,7 @@ #define PACKETBUF_H_ #include "contiki-conf.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" /** * \brief The size of the packetbuf, in bytes diff --git a/core/net/rime/Makefile.rime b/core/net/rime/Makefile.rime deleted file mode 100644 index c99faa3d5..000000000 --- a/core/net/rime/Makefile.rime +++ /dev/null @@ -1,26 +0,0 @@ -ifeq ($(UIP_CONF_IPV6),1) -#RIME_UIP6 = rime-udp.c -RIME_BASE = rimeaddr.c timesynch.c rimestats.c -else -RIME_CHAMELEON = chameleon.c channel.c chameleon-raw.c chameleon-bitopt.c -RIME_BASE = rimeaddr.c rime.c timesynch.c \ - rimestats.c announcement.c polite-announcement.c \ - broadcast-announcement.c -RIME_SINGLEHOP = broadcast.c stbroadcast.c unicast.c stunicast.c \ - runicast.c abc.c \ - rucb.c polite.c ipolite.c -RIME_MULTIHOP = netflood.c multihop.c rmh.c trickle.c -RIME_MESH = mesh.c route.c route-discovery.c -RIME_COLLECT = collect.c collect-neighbor.c neighbor-discovery.c \ - collect-link-estimate.c -RIME_RUDOLPH = rudolph0.c rudolph1.c rudolph2.c -endif # UIP_CONF_IPV6 - -CONTIKI_SOURCEFILES += $(RIME_BASE) \ - $(RIME_SINGLEHOP) \ - $(RIME_MULTIHOP) \ - $(RIME_MESH) \ - $(RIME_COLLECT) \ - $(RIME_RUDOLPH) \ - $(RIME_CHAMELEON) \ - $(RIME_UIP6) diff --git a/core/net/rime/abc.c b/core/net/rime/abc.c index 4478b7716..8f9bef65b 100644 --- a/core/net/rime/abc.c +++ b/core/net/rime/abc.c @@ -46,7 +46,7 @@ */ #include "contiki-net.h" -#include "net/rime.h" +#include "net/rime/rime.h" #define DEBUG 0 diff --git a/core/net/rime/announcement.h b/core/net/rime/announcement.h index e9809249a..e44f92319 100644 --- a/core/net/rime/announcement.h +++ b/core/net/rime/announcement.h @@ -66,7 +66,7 @@ #ifndef ANNOUNCEMENT_H_ #define ANNOUNCEMENT_H_ -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" struct announcement; diff --git a/core/net/rime/broadcast-announcement.c b/core/net/rime/broadcast-announcement.c index e6297225d..89c068139 100644 --- a/core/net/rime/broadcast-announcement.c +++ b/core/net/rime/broadcast-announcement.c @@ -44,7 +44,7 @@ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/announcement.h" #include "net/rime/broadcast.h" #include "lib/random.h" diff --git a/core/net/rime/broadcast.h b/core/net/rime/broadcast.h index 440564d95..f92fb758a 100644 --- a/core/net/rime/broadcast.h +++ b/core/net/rime/broadcast.h @@ -66,7 +66,7 @@ #define BROADCAST_H_ #include "net/rime/abc.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" struct broadcast_conn; diff --git a/core/net/rime/chameleon-bitopt.c b/core/net/rime/chameleon-bitopt.c index 278f51611..4b4c2ce65 100644 --- a/core/net/rime/chameleon-bitopt.c +++ b/core/net/rime/chameleon-bitopt.c @@ -38,7 +38,7 @@ #include "net/rime/chameleon.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include diff --git a/core/net/rime/chameleon-raw.c b/core/net/rime/chameleon-raw.c index 20c276f8b..15b12691a 100644 --- a/core/net/rime/chameleon-raw.c +++ b/core/net/rime/chameleon-raw.c @@ -40,7 +40,7 @@ #include #include "net/rime/chameleon.h" -#include "net/rime.h" +#include "net/rime/rime.h" /* This option enables an optimization where the link addresses are left to the MAC RDC and not encoded in the Chameleon header. diff --git a/core/net/rime/chameleon.c b/core/net/rime/chameleon.c index 60ab8763f..8b1033d83 100644 --- a/core/net/rime/chameleon.c +++ b/core/net/rime/chameleon.c @@ -39,7 +39,7 @@ #include "net/rime/chameleon.h" #include "net/rime/channel.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "lib/list.h" #include diff --git a/core/net/rime/channel.c b/core/net/rime/channel.c index 9e8fa7b15..5fd6f259b 100644 --- a/core/net/rime/channel.c +++ b/core/net/rime/channel.c @@ -38,7 +38,7 @@ */ #include "net/rime/chameleon.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "lib/list.h" LIST(channel_list); diff --git a/core/net/rime/collect-neighbor.h b/core/net/rime/collect-neighbor.h index cc6d11d49..a0a256ef7 100644 --- a/core/net/rime/collect-neighbor.h +++ b/core/net/rime/collect-neighbor.h @@ -51,7 +51,7 @@ #ifndef COLLECT_NEIGHBOR_H_ #define COLLECT_NEIGHBOR_H_ -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/rime/collect-link-estimate.h" #include "lib/list.h" diff --git a/core/net/rime/collect.c b/core/net/rime/collect.c index 4c271e584..2cb5c44fc 100644 --- a/core/net/rime/collect.c +++ b/core/net/rime/collect.c @@ -44,7 +44,7 @@ #include "contiki.h" #include "net/netstack.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/collect.h" #include "net/rime/collect-neighbor.h" #include "net/rime/collect-link-estimate.h" diff --git a/core/net/rime/ipolite.c b/core/net/rime/ipolite.c index af49ecad5..cd4d6e42b 100644 --- a/core/net/rime/ipolite.c +++ b/core/net/rime/ipolite.c @@ -42,7 +42,7 @@ * Adam Dunkels */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/ipolite.h" #include "lib/random.h" diff --git a/core/net/rime/mesh.c b/core/net/rime/mesh.c index f8ea14b51..c4239b2c6 100644 --- a/core/net/rime/mesh.c +++ b/core/net/rime/mesh.c @@ -43,7 +43,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/mesh.h" diff --git a/core/net/rime/multihop.c b/core/net/rime/multihop.c index e1215fbee..18aa0b346 100644 --- a/core/net/rime/multihop.c +++ b/core/net/rime/multihop.c @@ -43,7 +43,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/multihop.h" #include "net/rime/route.h" diff --git a/core/net/rime/multihop.h b/core/net/rime/multihop.h index ccb5d5845..e18e5aaef 100644 --- a/core/net/rime/multihop.h +++ b/core/net/rime/multihop.h @@ -71,7 +71,7 @@ #define MULTIHOP_H_ #include "net/rime/unicast.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" struct multihop_conn; diff --git a/core/net/rime/neighbor-discovery.c b/core/net/rime/neighbor-discovery.c index c4e0cddf1..5b02b60c2 100644 --- a/core/net/rime/neighbor-discovery.c +++ b/core/net/rime/neighbor-discovery.c @@ -44,7 +44,7 @@ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/neighbor-discovery.h" #include "dev/radio-sensor.h" diff --git a/core/net/rime/polite-announcement.c b/core/net/rime/polite-announcement.c index a5c7d9ec3..7fd1d633c 100644 --- a/core/net/rime/polite-announcement.c +++ b/core/net/rime/polite-announcement.c @@ -45,7 +45,7 @@ #include "contiki.h" #include "lib/list.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/announcement.h" #include "net/rime/ipolite.h" diff --git a/core/net/rime/polite.c b/core/net/rime/polite.c index f1cb464b6..2d8ea44bc 100644 --- a/core/net/rime/polite.c +++ b/core/net/rime/polite.c @@ -42,7 +42,7 @@ * Adam Dunkels */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/polite.h" #include "lib/random.h" diff --git a/core/net/rime/rime-udp.c b/core/net/rime/rime-udp.c deleted file mode 100644 index 18ac72913..000000000 --- a/core/net/rime/rime-udp.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2009, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the Contiki operating system. - * - */ - -/** - * \file - * A MAC protocol using UDP over IPv6. - * \author - * Nicolas Tsiftes - */ - -#include - -#include "net/uip.h" -#include "net/uip-udp-packet.h" -#include "net/uip-netif.h" -#include "net/rime/rime-udp.h" -#include "net/packetbuf.h" - -#define DEBUG 0 -#if DEBUG -#include -#define PRINTF(...) printf(__VA_ARGS__) -#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) -#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) -#else -#define PRINTF(...) -#define PRINT6ADDR(addr) -#define PRINTLLADDR(addr) -#endif - -#ifndef RIME_CONF_UDP_PORT -#define RIME_UDP_PORT 9508 -#else -#define RIME_UDP_PORT RIME_CONF_UDP_PORT -#endif /* RIME_CONF_UDP_PORT */ - -static struct uip_udp_conn *broadcast_conn; -static struct uip_udp_conn *unicast_conn; - -static void (* receiver_callback)(const struct mac_driver *); - -PROCESS(rime_udp_process, "Rime over UDP process"); - -PROCESS_THREAD(rime_udp_process, ev, data) -{ - static uip_ipaddr_t ipaddr; - - PROCESS_BEGIN(); - - broadcast_conn = udp_broadcast_new(UIP_HTONS(RIME_UDP_PORT), NULL); - if(broadcast_conn == NULL) { - PRINTF("rime-udp: Failed to allocate a broadcast connection!\n"); - } - - uip_create_unspecified(&ipaddr); - unicast_conn = udp_new(&ipaddr, UIP_HTONS(RIME_UDP_PORT), NULL); - if(unicast_conn == NULL) { - PRINTF("rime-udp: Failed to allocate a unicast connection!\n"); - } - - udp_bind(unicast_conn, UIP_HTONS(RIME_UDP_PORT)); - - while(1) { - PROCESS_WAIT_EVENT_UNTIL(ev == tcpip_event); - if(uip_newdata()) { - packetbuf_clear(); - memmove(packetbuf_hdrptr(), uip_appdata, uip_datalen()); - PRINTF("rime-udp: received %d bytes\n", uip_datalen()); - receiver_callback(&rime_udp_driver); - } - } - - PROCESS_END(); -} -/*---------------------------------------------------------------------------*/ -static void -send_packet(mac_callback_t sent_callback, void *ptr) -{ - const rimeaddr_t *addr; - - addr = packetbuf_addr(PACKETBUF_ADDR_RECEIVER); - PRINTF("rime-udp: Sending %d bytes to %d.%d\n", packetbuf_totlen(), - addr->u8[0], addr->u8[1]); - - if(rimeaddr_cmp(&rimeaddr_null, addr)) { - uip_udp_packet_send(broadcast_conn, - packetbuf_hdrptr(), packetbuf_totlen()); - mac_call_sent_callback(sent_callback, ptr, MAC_TX_OK, 1); - } else { - uip_ip6addr(&unicast_conn->ripaddr, 0xfe80, 0, 0, 0, 0, 0, 0, 0); - uip_netif_addr_autoconf_set(&unicast_conn->ripaddr, (uip_lladdr_t *)addr); - uip_udp_packet_send(unicast_conn, - packetbuf_hdrptr(), packetbuf_totlen()); - uip_create_unspecified(&unicast_conn->ripaddr); - } - return; -} -/*---------------------------------------------------------------------------*/ -static int -input_packet(void) -{ - packetbuf_set_datalen(uip_datalen()); - return uip_datalen(); -} -/*---------------------------------------------------------------------------*/ -static void -set_receive_function(void (* recv)(const struct mac_driver *)) -{ - receiver_callback = recv; -} -/*---------------------------------------------------------------------------*/ -static int -on(void) -{ - return 1; -} -/*---------------------------------------------------------------------------*/ -static int -off(int keep_radio_on) -{ - return 0; -} -/*---------------------------------------------------------------------------*/ -static unsigned short -check_interval(void) -{ - return 0; -} -/*---------------------------------------------------------------------------*/ -static int -init(void) -{ - process_start(&rime_udp_process, NULL); - return 1; -} -/*---------------------------------------------------------------------------*/ -const struct mac_driver rime_udp_driver = { - "rime-udp", - init, - send_packet, - input_packet, - on, - off, - check_interval, -}; -/*---------------------------------------------------------------------------*/ diff --git a/core/net/rime/rime-udp.h b/core/net/rime/rime-udp.h deleted file mode 100644 index 35a446e3b..000000000 --- a/core/net/rime/rime-udp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2009, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the Contiki operating system. - * - */ - -/** - * \file - * A MAC protocol using UDP over IPv6. - * \author - * Nicolas Tsiftes - */ - -#ifndef UDPMAC_H_ -#define UDPMAC_H_ - -#include "net/mac/mac.h" -#include "dev/radio.h" - -extern const struct mac_driver rime_udp_driver; - -#endif /* UDPMAC_H_ */ diff --git a/core/net/rime/rime.c b/core/net/rime/rime.c index 49172e57a..8a45e8177 100644 --- a/core/net/rime/rime.c +++ b/core/net/rime/rime.c @@ -51,7 +51,7 @@ #endif #include "net/netstack.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/chameleon.h" #include "net/rime/route.h" #include "net/rime/announcement.h" diff --git a/core/net/rime.h b/core/net/rime/rime.h similarity index 99% rename from core/net/rime.h rename to core/net/rime/rime.h index 1087f7482..bfa86b725 100644 --- a/core/net/rime.h +++ b/core/net/rime/rime.h @@ -55,7 +55,7 @@ #include "net/rime/polite-announcement.h" #include "net/rime/polite.h" #include "net/queuebuf.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/packetbuf.h" #include "net/rime/rimestats.h" #include "net/rime/rmh.h" diff --git a/core/net/rime/rmh.c b/core/net/rime/rmh.c index a3a05b457..15000848d 100644 --- a/core/net/rime/rmh.c +++ b/core/net/rime/rmh.c @@ -43,7 +43,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/rmh.h" struct data_hdr { diff --git a/core/net/rime/rmh.h b/core/net/rime/rmh.h index a1216af33..cd4bcab59 100644 --- a/core/net/rime/rmh.h +++ b/core/net/rime/rmh.h @@ -66,7 +66,7 @@ #define RMH_H_ #include "net/rime/runicast.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" struct rmh_conn; diff --git a/core/net/rime/route-discovery.c b/core/net/rime/route-discovery.c index 215b1ae7d..cf72b3992 100644 --- a/core/net/rime/route-discovery.c +++ b/core/net/rime/route-discovery.c @@ -43,7 +43,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/route.h" #include "net/rime/route-discovery.h" diff --git a/core/net/rime/route.h b/core/net/rime/route.h index caa65ba70..bc6824d11 100644 --- a/core/net/rime/route.h +++ b/core/net/rime/route.h @@ -51,7 +51,7 @@ #ifndef ROUTE_H_ #define ROUTE_H_ -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" struct route_entry { struct route_entry *next; diff --git a/core/net/rime/rucb.c b/core/net/rime/rucb.c index b0593ddb3..ab9f8ebc4 100644 --- a/core/net/rime/rucb.c +++ b/core/net/rime/rucb.c @@ -38,7 +38,7 @@ */ #include "net/rime/rucb.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #define MAX_TRANSMISSIONS 8 diff --git a/core/net/rime/rudolph0.c b/core/net/rime/rudolph0.c index d74566360..d1f7d876f 100644 --- a/core/net/rime/rudolph0.c +++ b/core/net/rime/rudolph0.c @@ -44,7 +44,7 @@ #include /* for offsetof */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/rudolph0.h" #define STEADY_TIME CLOCK_SECOND * 2 diff --git a/core/net/rime/rudolph1.c b/core/net/rime/rudolph1.c index c195946f5..ffaedbdeb 100644 --- a/core/net/rime/rudolph1.c +++ b/core/net/rime/rudolph1.c @@ -45,7 +45,7 @@ #include #include /* for offsetof */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/rudolph1.h" #include "cfs/cfs.h" diff --git a/core/net/rime/rudolph2.c b/core/net/rime/rudolph2.c index 8c0968902..8502f064d 100644 --- a/core/net/rime/rudolph2.c +++ b/core/net/rime/rudolph2.c @@ -51,7 +51,7 @@ #include #include /* for offsetof */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/polite.h" #include "net/rime/rudolph2.h" #include "cfs/cfs.h" diff --git a/core/net/rime/runicast.c b/core/net/rime/runicast.c index 88a98c176..575e32546 100644 --- a/core/net/rime/runicast.c +++ b/core/net/rime/runicast.c @@ -44,7 +44,7 @@ */ #include "net/rime/runicast.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include diff --git a/core/net/rime/stbroadcast.c b/core/net/rime/stbroadcast.c index fa56b9bc9..a0a71d18e 100644 --- a/core/net/rime/stbroadcast.c +++ b/core/net/rime/stbroadcast.c @@ -44,7 +44,7 @@ */ #include "net/rime/stbroadcast.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include /*---------------------------------------------------------------------------*/ diff --git a/core/net/rime/stunicast.c b/core/net/rime/stunicast.c index cf3992417..658e0f66c 100644 --- a/core/net/rime/stunicast.c +++ b/core/net/rime/stunicast.c @@ -43,7 +43,7 @@ */ #include "net/rime/stunicast.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include #define DEBUG 0 diff --git a/core/net/rime/timesynch.c b/core/net/rime/timesynch.c index 154ecd822..f0a2980dd 100644 --- a/core/net/rime/timesynch.c +++ b/core/net/rime/timesynch.c @@ -45,7 +45,7 @@ #include "contiki.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/timesynch.h" #include diff --git a/core/net/rime/unicast.c b/core/net/rime/unicast.c index d2a15fedf..97a1272c1 100644 --- a/core/net/rime/unicast.c +++ b/core/net/rime/unicast.c @@ -43,7 +43,7 @@ * Adam Dunkels */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/unicast.h" #include diff --git a/core/net/rime/rimeaddr.c b/core/net/rimeaddr.c similarity index 98% rename from core/net/rime/rimeaddr.c rename to core/net/rimeaddr.c index d0293018b..8bc43eb47 100644 --- a/core/net/rime/rimeaddr.c +++ b/core/net/rimeaddr.c @@ -42,7 +42,7 @@ * Adam Dunkels */ -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include rimeaddr_t rimeaddr_node_addr; diff --git a/core/net/rime/rimeaddr.h b/core/net/rimeaddr.h similarity index 100% rename from core/net/rime/rimeaddr.h rename to core/net/rimeaddr.h diff --git a/core/net/rpl/Makefile.rpl b/core/net/rpl/Makefile.rpl deleted file mode 100644 index f5852e13b..000000000 --- a/core/net/rpl/Makefile.rpl +++ /dev/null @@ -1,2 +0,0 @@ -CONTIKI_SOURCEFILES += rpl.c rpl-dag.c rpl-icmp6.c rpl-timers.c \ - rpl-mrhof.c rpl-ext-header.c diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 8f228e37b..6821b45de 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -43,8 +43,8 @@ #include "contiki.h" #include "net/rpl/rpl-private.h" -#include "net/uip.h" -#include "net/uip-nd6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-nd6.h" #include "net/nbr-table.h" #include "lib/list.h" #include "lib/memb.h" @@ -54,7 +54,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if UIP_CONF_IPV6 /*---------------------------------------------------------------------------*/ diff --git a/core/net/rpl/rpl-ext-header.c b/core/net/rpl/rpl-ext-header.c index 310c056cb..72289e0a4 100644 --- a/core/net/rpl/rpl-ext-header.c +++ b/core/net/rpl/rpl-ext-header.c @@ -42,13 +42,13 @@ * Nicolas Tsiftes . */ -#include "net/uip.h" -#include "net/tcpip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ip/tcpip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl-private.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include #include diff --git a/core/net/rpl/rpl-icmp6.c b/core/net/rpl/rpl-icmp6.c index f1d5a5e04..1ee1678b1 100644 --- a/core/net/rpl/rpl-icmp6.c +++ b/core/net/rpl/rpl-icmp6.c @@ -42,11 +42,11 @@ * Mathieu Pouillot */ -#include "net/tcpip.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-nd6.h" -#include "net/uip-icmp6.h" +#include "net/ip/tcpip.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ipv6/uip-nd6.h" +#include "net/ipv6/uip-icmp6.h" #include "net/rpl/rpl-private.h" #include "net/packetbuf.h" @@ -55,7 +55,7 @@ #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #if UIP_CONF_IPV6 /*---------------------------------------------------------------------------*/ diff --git a/core/net/rpl/rpl-mrhof.c b/core/net/rpl/rpl-mrhof.c index 8154c5b62..9d75f319b 100644 --- a/core/net/rpl/rpl-mrhof.c +++ b/core/net/rpl/rpl-mrhof.c @@ -48,7 +48,7 @@ #include "net/nbr-table.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static void reset(rpl_dag_t *); static void neighbor_link_callback(rpl_parent_t *, int, int); diff --git a/core/net/rpl/rpl-of0.c b/core/net/rpl/rpl-of0.c index b67456bbc..94d1ebae6 100644 --- a/core/net/rpl/rpl-of0.c +++ b/core/net/rpl/rpl-of0.c @@ -42,7 +42,7 @@ #include "net/rpl/rpl-private.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static void reset(rpl_dag_t *); static rpl_parent_t *best_parent(rpl_parent_t *, rpl_parent_t *); diff --git a/core/net/rpl/rpl-private.h b/core/net/rpl/rpl-private.h index 0aaee680e..acabda4b7 100644 --- a/core/net/rpl/rpl-private.h +++ b/core/net/rpl/rpl-private.h @@ -40,10 +40,10 @@ #include "net/rpl/rpl.h" #include "lib/list.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "sys/clock.h" #include "sys/ctimer.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" /*---------------------------------------------------------------------------*/ /** \brief Is IPv6 address addr the link-local, all-RPL-nodes diff --git a/core/net/rpl/rpl-timers.c b/core/net/rpl/rpl-timers.c index acc1badf0..4465bd81b 100644 --- a/core/net/rpl/rpl-timers.c +++ b/core/net/rpl/rpl-timers.c @@ -47,7 +47,7 @@ #if UIP_CONF_IPV6 #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ static struct ctimer periodic_timer; diff --git a/core/net/rpl/rpl.c b/core/net/rpl/rpl.c index 7e3111d65..48ee3c7ad 100644 --- a/core/net/rpl/rpl.c +++ b/core/net/rpl/rpl.c @@ -40,13 +40,13 @@ * \author Joakim Eriksson , Nicolas Tsiftes */ -#include "net/uip.h" -#include "net/tcpip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ip/tcpip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl-private.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include #include diff --git a/core/net/rpl/rpl.h b/core/net/rpl/rpl.h index 7d2a5ee70..562961d84 100644 --- a/core/net/rpl/rpl.h +++ b/core/net/rpl/rpl.h @@ -41,8 +41,8 @@ #include "rpl-conf.h" #include "lib/list.h" -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "sys/ctimer.h" /*---------------------------------------------------------------------------*/ diff --git a/cpu/6502/Makefile.6502 b/cpu/6502/Makefile.6502 index 961f714c5..dc90fac9d 100644 --- a/cpu/6502/Makefile.6502 +++ b/cpu/6502/Makefile.6502 @@ -68,30 +68,5 @@ CFLAGS += -t $(TARGET) -Or -W -unused-param,-unused-var,-const-comparison LDFLAGS = $(STARTADDR_FLAG) -t $(TARGET) -m contiki-$(TARGET).map -D __STACKSIZE__=0x200 AROPTS = a -### Compilation rules - -.SUFFIXES: - -CUSTOM_RULE_C_TO_OBJECTDIR_O = 1 -$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) -c -o $@ $(CFLAGS) --create-dep $(@:.o=.d) $< - -CUSTOM_RULE_C_TO_CO = 1 -%.co: %.c - $(TRACE_CC) - $(Q)$(CC) -c -o $@ $(CFLAGS) -DAUTOSTART_ENABLE --create-dep $(@:.o=.d) $< - -CUSTOM_RULE_LINK = 1 -%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a - $(TRACE_LD) - $(Q)$(LD) -o $@ $(LDFLAGS) -u _main $^ $(TARGET).lib - -%.eth: $(OBJECTDIR)/%.o - $(TRACE_LD) - $(Q)$(LD) -o $@ -t module -m $@.map $< - -ifdef ETHERNET -$(ETHERNET)-eth.S: $(ETHERNET).eth - co65 -o $@ --code-label _$(ETHERNET) $< -endif +## Default modules +MODULES += core/net/ipv4 core/ctk core/net core/net/ip diff --git a/cpu/6502/Makefile.customrules-6502 b/cpu/6502/Makefile.customrules-6502 new file mode 100644 index 000000000..ce810a352 --- /dev/null +++ b/cpu/6502/Makefile.customrules-6502 @@ -0,0 +1,27 @@ +### Compilation rules + +.SUFFIXES: + +CUSTOM_RULE_C_TO_OBJECTDIR_O = 1 +$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) -c -o $@ $(CFLAGS) --create-dep $(@:.o=.d) $< + +CUSTOM_RULE_C_TO_CO = 1 +%.co: %.c + $(TRACE_CC) + $(Q)$(CC) -c -o $@ $(CFLAGS) -DAUTOSTART_ENABLE --create-dep $(@:.o=.d) $< + +CUSTOM_RULE_LINK = 1 +%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a + $(TRACE_LD) + $(Q)$(LD) -o $@ $(LDFLAGS) -u _main $^ $(TARGET).lib + +%.eth: $(OBJECTDIR)/%.o + $(TRACE_LD) + $(Q)$(LD) -o $@ -t module -m $@.map $< + +ifdef ETHERNET +$(ETHERNET)-eth.S: $(ETHERNET).eth + co65 -o $@ --code-label _$(ETHERNET) $< +endif diff --git a/cpu/6502/ipconfig/ipconfig.c b/cpu/6502/ipconfig/ipconfig.c index 6af051f50..d21994032 100644 --- a/cpu/6502/ipconfig/ipconfig.c +++ b/cpu/6502/ipconfig/ipconfig.c @@ -35,7 +35,7 @@ #include "contiki-net.h" #include "ctk/ctk.h" #include "cfs/cfs.h" -#include "net/dhcpc.h" +#include "net/ip/dhcpc.h" static struct ctk_window window; diff --git a/cpu/6502/lib/log.c b/cpu/6502/lib/log.c index ab95fc52a..93ed0eeda 100644 --- a/cpu/6502/lib/log.c +++ b/cpu/6502/lib/log.c @@ -35,7 +35,7 @@ #include #include -#include "net/uip.h" +#include "net/ip/uip.h" #include "sys/log.h" /*-----------------------------------------------------------------------------------*/ diff --git a/cpu/6502/net/ethernet-drv.c b/cpu/6502/net/ethernet-drv.c index 6c54022bb..e12122001 100644 --- a/cpu/6502/net/ethernet-drv.c +++ b/cpu/6502/net/ethernet-drv.c @@ -34,7 +34,7 @@ #include "contiki-net.h" #include "net/ethernet.h" -#include "net/uip-neighbor.h" +#include "net/ipv4/uip-neighbor.h" #include "net/ethernet-drv.h" diff --git a/cpu/6502/net/uip_arch.c b/cpu/6502/net/uip_arch.c index ae75db322..2176bd2c9 100644 --- a/cpu/6502/net/uip_arch.c +++ b/cpu/6502/net/uip_arch.c @@ -32,8 +32,8 @@ */ -#include "net/uip.h" -#include "net/uip_arch.h" +#include "net/ip/uip.h" +#include "net/ip/uip_arch.h" #define BUF ((uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) #define IP_PROTO_TCP 6 diff --git a/cpu/arm/common/usb/cdc-eth/cdc-eth.c b/cpu/arm/common/usb/cdc-eth/cdc-eth.c index e46b978d0..2d720ce20 100644 --- a/cpu/arm/common/usb/cdc-eth/cdc-eth.c +++ b/cpu/arm/common/usb/cdc-eth/cdc-eth.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #define DATA_IN 0x81 #define DATA_OUT 0x02 diff --git a/cpu/arm/common/usb/cdc-eth/cdc-eth.h b/cpu/arm/common/usb/cdc-eth/cdc-eth.h index 3e8cfb458..829d4654b 100644 --- a/cpu/arm/common/usb/cdc-eth/cdc-eth.h +++ b/cpu/arm/common/usb/cdc-eth/cdc-eth.h @@ -1,7 +1,7 @@ #ifndef CDC_ETH_H_NUI0ULFC7C__ #define CDC_ETH_H_NUI0ULFC7C__ -#include +#include /* Should be called before usb_cdc_eth_setup */ void diff --git a/cpu/avr/cc2420_spi.c b/cpu/avr/cc2420_spi.c index bb9f86845..00156839f 100644 --- a/cpu/avr/cc2420_spi.c +++ b/cpu/avr/cc2420_spi.c @@ -34,7 +34,7 @@ #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" void __cc2420_arch_init(void) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 2a8209129..1cd207356 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -114,66 +114,3 @@ CONTIKI_OBJECTFILES = $(addprefix $(OBJECTDIR)/, \ PROJECT_OBJECTFILES = $(addprefix $(OBJECTDIR)/, \ $(call oname, $(PROJECT_SOURCEFILES))) -### Compilation rules - -SEGMENT_RULE_FILES = $(foreach dir, . $(CONTIKI_PLATFORM_DIRS) \ - $(CONTIKI_CPU_DIRS_LIST), $(wildcard $(dir)/segment.rules) ) - -# NB: Assumes SEGMENT_RULES was not overridden and is in $(OBJECTDIR) -$(SEGMENT_RULES): $(SEGMENT_RULE_FILES) | $(OBJECTDIR) - cat $(SEGMENT_RULE_FILES) | \ - sed -e 's/#.*$$//' -e 's/^\s*//' -e '/^$$/d' > $@ - -CUSTOM_RULE_LINK=1 -CUSTOM_RULE_C_TO_OBJECTDIR_O=1 -CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 - -$(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ - @$(FINALIZE_SDCC_DEPENDENCY) - -contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ - $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) - rm -f $@ - for target in $^; do echo $$target >> $@; done - -.PRECIOUS: %.$(TARGET) %.hex - -# build app/example local object files. We need a separate rule so that we can -# pass -DAUTOSTART_ENABLE for those files only -$(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ - -# .ihx is the sdcc binary output file -%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib -# Automatic bank relocation when building banked code -ifeq ($(HAVE_BANKING),1) - @echo "\nFirst Link" - @echo "===============" - $(TRACE_LD) - $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib - @echo "\nBank Allocation" - @echo "===============" - python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) - @echo "\nFinal Link" - @echo "===============" -endif - $(TRACE_LD) - $(Q)$(LD) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib - -# Pack the hex file for programmers which dislike SDCC output hex format -%.hex: %.ihx - @echo "\nPack hex file" - @echo "===============" -ifeq ($(HAVE_BANKING),1) - srec_cat -disable_sequence_warnings $< -intel -crop 0x10000 0x1FFFF -offset -0x10000 -o bank1.hex -intel - srec_cat -disable_sequence_warnings $< -intel -crop 0x20000 0x2FFFF -offset -0x18000 -o bank2.hex -intel - srec_cat -disable_sequence_warnings $< -intel -crop 0x30000 0x3FFFF -offset -0x20000 -o bank3.hex -intel - srec_cat -disable_sequence_warnings $< -intel -crop 0x00000 0x0FFFF -o home.ihx -intel - srec_cat home.ihx -intel bank1.hex -intel bank2.hex -intel bank3.hex -intel -o $@ -intel - rm -f home.ihx bank1.hex bank2.hex bank3.hex -else - $(PACKIHX) $< > $@ -endif diff --git a/cpu/cc2430/Makefile.customrules-cc2430 b/cpu/cc2430/Makefile.customrules-cc2430 new file mode 100644 index 000000000..68ed21c60 --- /dev/null +++ b/cpu/cc2430/Makefile.customrules-cc2430 @@ -0,0 +1,63 @@ +### Compilation rules + +SEGMENT_RULE_FILES = $(foreach dir, . $(CONTIKI_PLATFORM_DIRS) \ + $(CONTIKI_CPU_DIRS_LIST), $(wildcard $(dir)/segment.rules) ) + +# NB: Assumes SEGMENT_RULES was not overridden and is in $(OBJECTDIR) +$(SEGMENT_RULES): $(SEGMENT_RULE_FILES) | $(OBJECTDIR) + cat $(SEGMENT_RULE_FILES) | \ + sed -e 's/#.*$$//' -e 's/^\s*//' -e '/^$$/d' > $@ + +CUSTOM_RULE_LINK=1 +CUSTOM_RULE_C_TO_OBJECTDIR_O=1 +CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 + +$(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ + @$(FINALIZE_SDCC_DEPENDENCY) + +contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ + $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) + rm -f $@ + for target in $^; do echo $$target >> $@; done + +.PRECIOUS: %.$(TARGET) %.hex + +# build app/example local object files. We need a separate rule so that we can +# pass -DAUTOSTART_ENABLE for those files only +$(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ + +# .ihx is the sdcc binary output file +%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib +# Automatic bank relocation when building banked code +ifeq ($(HAVE_BANKING),1) + @echo "\nFirst Link" + @echo "===============" + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + @echo "\nBank Allocation" + @echo "===============" + python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) + @echo "\nFinal Link" + @echo "===============" +endif + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + +# Pack the hex file for programmers which dislike SDCC output hex format +%.hex: %.ihx + @echo "\nPack hex file" + @echo "===============" +ifeq ($(HAVE_BANKING),1) + srec_cat -disable_sequence_warnings $< -intel -crop 0x10000 0x1FFFF -offset -0x10000 -o bank1.hex -intel + srec_cat -disable_sequence_warnings $< -intel -crop 0x20000 0x2FFFF -offset -0x18000 -o bank2.hex -intel + srec_cat -disable_sequence_warnings $< -intel -crop 0x30000 0x3FFFF -offset -0x20000 -o bank3.hex -intel + srec_cat -disable_sequence_warnings $< -intel -crop 0x00000 0x0FFFF -o home.ihx -intel + srec_cat home.ihx -intel bank1.hex -intel bank2.hex -intel bank3.hex -intel -o $@ -intel + rm -f home.ihx bank1.hex bank2.hex bank3.hex +else + $(PACKIHX) $< > $@ +endif diff --git a/cpu/cc2538/dev/cc2538-rf.c b/cpu/cc2538/dev/cc2538-rf.c index 226d8be9f..bfaa81858 100644 --- a/cpu/cc2538/dev/cc2538-rf.c +++ b/cpu/cc2538/dev/cc2538-rf.c @@ -41,7 +41,7 @@ #include "sys/rtimer.h" #include "net/packetbuf.h" #include "net/rime/rimestats.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/netstack.h" #include "sys/energest.h" #include "dev/cc2538-rf.h" diff --git a/cpu/cc2538/ieee-addr.c b/cpu/cc2538/ieee-addr.c index dd5a391da..bf63a8114 100644 --- a/cpu/cc2538/ieee-addr.c +++ b/cpu/cc2538/ieee-addr.c @@ -36,7 +36,7 @@ * Driver for the cc2538 IEEE addresses */ #include "contiki-conf.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "ieee-addr.h" #include diff --git a/cpu/cc2538/usb/usb-serial.c b/cpu/cc2538/usb/usb-serial.c index 46bcee29e..b27ba7d70 100644 --- a/cpu/cc2538/usb/usb-serial.c +++ b/cpu/cc2538/usb/usb-serial.c @@ -46,7 +46,7 @@ */ #include "contiki.h" #include "sys/process.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "usb-api.h" #include "usb.h" #include "usb-arch.h" diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index 25f993df9..9d3c3a819 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -135,83 +135,3 @@ CONTIKI_OBJECTFILES = $(addprefix $(OBJECTDIR)/, \ PROJECT_OBJECTFILES = $(addprefix $(OBJECTDIR)/, \ $(call oname, $(PROJECT_SOURCEFILES))) -### Compilation rules - -SEGMENT_RULE_FILES = $(foreach dir, . $(CONTIKI_PLATFORM_DIRS) \ - $(CONTIKI_CPU_DIRS_LIST), $(wildcard $(dir)/segment.rules) ) - -# NB: Assumes SEGMENT_RULES was not overridden and is in $(OBJECTDIR) -$(SEGMENT_RULES): $(SEGMENT_RULE_FILES) | $(OBJECTDIR) - cat $(SEGMENT_RULE_FILES) | \ - sed -e 's/#.*$$//' -e 's/^\s*//' -e '/^$$/d' > $@ - -CUSTOM_RULE_LINK=1 -CUSTOM_RULE_C_TO_OBJECTDIR_O=1 -CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 - -$(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ - @$(FINALIZE_SDCC_DEPENDENCY) - -contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ - $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) - rm -f $@ - for target in $^; do echo $$target >> $@; done - -.PRECIOUS: %.$(TARGET) %.hex - -# build app/example local object files. We need a separate rule so that we can -# pass -DAUTOSTART_ENABLE for those files only -$(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ - -# .ihx is the sdcc binary output file -ifeq ($(HAVE_BANKING),1) -### Build bankable firmware -%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib - @echo "\nFirst Link" - @echo "===============" - $(TRACE_LD) - $(Q)$(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib - -%.flags: %.ihx -### Allocate modules to banks and relocate object files - @echo "\nBank Allocation" - @echo "===============" - python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) - -%.banked-hex: %.flags -### Link again with new bank allocations - @echo "\nFinal Link" - @echo "===============" - $(TRACE_LD) - $(Q)$(LD) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib - -%.hex: %.banked-hex -### Post-process the hex file for programmers which dislike SDCC output hex format - $(eval BANKS := $(shell egrep '(^BANK[0-9])=' $(@:.hex=.map) | sed -e 's/BANK\([0-9]\).*/\1/' | uniq)) - $(eval FILES := $(addsuffix .hex,$(addprefix bank,$(BANKS)))) - @echo "\nPack hex file" - @echo "===============" - @for bank in $(BANKS); do \ - echo $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel \ - -crop 0x"$$bank"8000 "0x"$$bank"FFFF" \ - -offset -$$((0x8000 * $$bank + 0x08000)) -o bank"$$bank".hex -intel; \ - $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel \ - -crop 0x"$$bank"8000 "0x"$$bank"FFFF" \ - -offset -$$((0x8000 * $$bank + 0x08000)) -o bank"$$bank".hex -intel; \ - done - $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel -crop 0x00000 0x07FFF -o home.ihx -intel - srec_cat home.ihx -intel $(foreach file,$(FILES),$(file) -intel) -o $@ -intel - rm -f home.ihx $(FILES) -else -### Build non-banked firmware -%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib - $(TRACE_LD) - $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib - -%.hex: %.ihx - $(PACKIHX) $< > $@ -endif diff --git a/cpu/cc253x/Makefile.customrules-cc253x b/cpu/cc253x/Makefile.customrules-cc253x new file mode 100644 index 000000000..e30b2795e --- /dev/null +++ b/cpu/cc253x/Makefile.customrules-cc253x @@ -0,0 +1,80 @@ +### Compilation rules + +SEGMENT_RULE_FILES = $(foreach dir, . $(CONTIKI_PLATFORM_DIRS) \ + $(CONTIKI_CPU_DIRS_LIST), $(wildcard $(dir)/segment.rules) ) + +# NB: Assumes SEGMENT_RULES was not overridden and is in $(OBJECTDIR) +$(SEGMENT_RULES): $(SEGMENT_RULE_FILES) | $(OBJECTDIR) + cat $(SEGMENT_RULE_FILES) | \ + sed -e 's/#.*$$//' -e 's/^\s*//' -e '/^$$/d' > $@ + +CUSTOM_RULE_LINK=1 +CUSTOM_RULE_C_TO_OBJECTDIR_O=1 +CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 + +$(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ + @$(FINALIZE_SDCC_DEPENDENCY) + +contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ + $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) + rm -f $@ + for target in $^; do echo $$target >> $@; done + +.PRECIOUS: %.$(TARGET) %.hex + +# build app/example local object files. We need a separate rule so that we can +# pass -DAUTOSTART_ENABLE for those files only +$(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ + +# .ihx is the sdcc binary output file +ifeq ($(HAVE_BANKING),1) +### Build bankable firmware +%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib + @echo "\nFirst Link" + @echo "===============" + $(TRACE_LD) + $(Q)$(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + +%.flags: %.ihx +### Allocate modules to banks and relocate object files + @echo "\nBank Allocation" + @echo "===============" + python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) + +%.banked-hex: %.flags +### Link again with new bank allocations + @echo "\nFinal Link" + @echo "===============" + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + +%.hex: %.banked-hex +### Post-process the hex file for programmers which dislike SDCC output hex format + $(eval BANKS := $(shell egrep '(^BANK[0-9])=' $(@:.hex=.map) | sed -e 's/BANK\([0-9]\).*/\1/' | uniq)) + $(eval FILES := $(addsuffix .hex,$(addprefix bank,$(BANKS)))) + @echo "\nPack hex file" + @echo "===============" + @for bank in $(BANKS); do \ + echo $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel \ + -crop 0x"$$bank"8000 "0x"$$bank"FFFF" \ + -offset -$$((0x8000 * $$bank + 0x08000)) -o bank"$$bank".hex -intel; \ + $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel \ + -crop 0x"$$bank"8000 "0x"$$bank"FFFF" \ + -offset -$$((0x8000 * $$bank + 0x08000)) -o bank"$$bank".hex -intel; \ + done + $(SREC_CAT) $(SREC_FLAGS) $(@:.hex=.banked-hex) -intel -crop 0x00000 0x07FFF -o home.ihx -intel + srec_cat home.ihx -intel $(foreach file,$(FILES),$(file) -intel) -o $@ -intel + rm -f home.ihx $(FILES) +else +### Build non-banked firmware +%.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + +%.hex: %.ihx + $(PACKIHX) $< > $@ +endif diff --git a/cpu/cc253x/dev/cc2530-rf.c b/cpu/cc253x/dev/cc2530-rf.c index 25b16ea84..4a5ccc9fb 100644 --- a/cpu/cc253x/dev/cc2530-rf.c +++ b/cpu/cc253x/dev/cc2530-rf.c @@ -46,7 +46,7 @@ #include "net/packetbuf.h" #include "net/rime/rimestats.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/netstack.h" #include diff --git a/cpu/mc1322x/config.c b/cpu/mc1322x/config.c index 2d7b10049..10fdb5f5d 100644 --- a/cpu/mc1322x/config.c +++ b/cpu/mc1322x/config.c @@ -5,7 +5,7 @@ /* debug */ #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" mc1322xConfig mc1322x_config; diff --git a/cpu/mc1322x/contiki-maca.c b/cpu/mc1322x/contiki-maca.c index 04de71608..87465228b 100644 --- a/cpu/mc1322x/contiki-maca.c +++ b/cpu/mc1322x/contiki-maca.c @@ -39,7 +39,7 @@ /* debug */ #define DEBUG DEBUG_ANNOTATE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /* contiki */ #include "radio.h" diff --git a/cpu/mc1322x/init.c b/cpu/mc1322x/init.c index c14b3f9ea..e3e58d467 100644 --- a/cpu/mc1322x/init.c +++ b/cpu/mc1322x/init.c @@ -2,7 +2,7 @@ /* debug */ #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /* contiki */ #include "sys/process.h" diff --git a/cpu/msp430/cc2420-arch-sfd.c b/cpu/msp430/cc2420-arch-sfd.c index a71015b9e..49c979ce2 100644 --- a/cpu/msp430/cc2420-arch-sfd.c +++ b/cpu/msp430/cc2420-arch-sfd.c @@ -30,7 +30,7 @@ #include "contiki.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "isr_compat.h" extern volatile uint8_t cc2420_sfd_counter; diff --git a/cpu/msp430/cc2420-arch.c b/cpu/msp430/cc2420-arch.c index 7b429e0c0..7da8892a9 100644 --- a/cpu/msp430/cc2420-arch.c +++ b/cpu/msp430/cc2420-arch.c @@ -32,7 +32,7 @@ #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "isr_compat.h" #ifdef CC2420_CONF_SFD_TIMESTAMPS diff --git a/cpu/msp430/cc2520-arch-sfd.c b/cpu/msp430/cc2520-arch-sfd.c index ff47a48c8..5eb35cedb 100644 --- a/cpu/msp430/cc2520-arch-sfd.c +++ b/cpu/msp430/cc2520-arch-sfd.c @@ -29,7 +29,7 @@ #include "contiki.h" #include "dev/spi.h" -#include "dev/cc2520.h" +#include "dev/cc2520/cc2520.h" #include "isr_compat.h" extern volatile uint8_t cc2520_sfd_counter; diff --git a/cpu/msp430/cc2520-arch.c b/cpu/msp430/cc2520-arch.c index e8792b86a..d57e7571a 100644 --- a/cpu/msp430/cc2520-arch.c +++ b/cpu/msp430/cc2520-arch.c @@ -31,7 +31,7 @@ #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2520.h" +#include "dev/cc2520/cc2520.h" #include "isr_compat.h" #ifdef CC2520_CONF_SFD_TIMESTAMPS diff --git a/cpu/msp430/loader-arch.c b/cpu/msp430/loader-arch.c index d03d078f8..60413936a 100644 --- a/cpu/msp430/loader-arch.c +++ b/cpu/msp430/loader-arch.c @@ -33,7 +33,7 @@ #include "contiki.h" #include "sys/clock.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/leds.h" #include "dev/eeprom.h" diff --git a/cpu/msp430/uip-ipchksum.c b/cpu/msp430/uip-ipchksum.c index 80a616ffe..9f12a6749 100644 --- a/cpu/msp430/uip-ipchksum.c +++ b/cpu/msp430/uip-ipchksum.c @@ -35,7 +35,7 @@ * uIP checksum calculation for MSP430 */ -#include "net/uip.h" +#include "net/ip/uip.h" #define asmv(arg) __asm__ __volatile__(arg) /*---------------------------------------------------------------------------*/ diff --git a/cpu/native/net/tapdev-drv.c b/cpu/native/net/tapdev-drv.c index 8984dba01..0588030cb 100644 --- a/cpu/native/net/tapdev-drv.c +++ b/cpu/native/net/tapdev-drv.c @@ -31,8 +31,8 @@ */ #include "contiki-net.h" -#include "net/uip.h" -#include "net/uipopt.h" +#include "net/ip/uip.h" +#include "net/ip/uipopt.h" #if UIP_CONF_IPV6 #include "tapdev6.h" diff --git a/cpu/native/net/tapdev.c b/cpu/native/net/tapdev.c index 8ac8e514a..7ddf7ea10 100644 --- a/cpu/native/net/tapdev.c +++ b/cpu/native/net/tapdev.c @@ -33,8 +33,8 @@ * */ -#include "net/uip.h" -#include "net/uipopt.h" +#include "net/ip/uip.h" +#include "net/ip/uipopt.h" #if !UIP_CONF_IPV6 diff --git a/cpu/native/net/tapdev6.c b/cpu/native/net/tapdev6.c index 22815dd42..41fbd7ae6 100644 --- a/cpu/native/net/tapdev6.c +++ b/cpu/native/net/tapdev6.c @@ -33,8 +33,8 @@ * */ -#include "net/uip.h" -#include "net/uipopt.h" +#include "net/ip/uip.h" +#include "net/ip/uipopt.h" #if UIP_CONF_IPV6 diff --git a/cpu/native/net/wpcap-drv.c b/cpu/native/net/wpcap-drv.c index d9a1fd0e1..3362ec9c5 100644 --- a/cpu/native/net/wpcap-drv.c +++ b/cpu/native/net/wpcap-drv.c @@ -31,7 +31,7 @@ */ #include "contiki-net.h" -#include "net/uip-neighbor.h" +#include "net/ipv4/uip-neighbor.h" #include "net/wpcap.h" #include "net/wpcap-drv.h" diff --git a/cpu/stm32w108/clock.c b/cpu/stm32w108/clock.c index 65b8c4d64..f4a17ad53 100644 --- a/cpu/stm32w108/clock.c +++ b/cpu/stm32w108/clock.c @@ -56,7 +56,7 @@ #include "dev/stm32w-radio.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*--------------------------------------------------------------------------*/ /* The value that will be load in the SysTick value register. */ diff --git a/cpu/stm32w108/uip-arch.c b/cpu/stm32w108/uip-arch.c index 15a27206c..f913f0610 100644 --- a/cpu/stm32w108/uip-arch.c +++ b/cpu/stm32w108/uip-arch.c @@ -42,8 +42,8 @@ * Salvatore Pitrulli */ -#include "net/uip.h" -#include "net/uip_arch.h" +#include "net/ip/uip.h" +#include "net/ip/uip_arch.h" #if UIP_TCP void diff --git a/core/dev/cc2420-aes.c b/dev/cc2420/cc2420-aes.c similarity index 98% rename from core/dev/cc2420-aes.c rename to dev/cc2420/cc2420-aes.c index 9e464c4af..3f0ad199c 100644 --- a/core/dev/cc2420-aes.c +++ b/dev/cc2420/cc2420-aes.c @@ -38,8 +38,8 @@ */ #include "contiki.h" -#include "dev/cc2420.h" -#include "dev/cc2420-aes.h" +#include "cc2420.h" +#include "cc2420-aes.h" #include "dev/spi.h" #define KEYLEN 16 diff --git a/core/dev/cc2420-aes.h b/dev/cc2420/cc2420-aes.h similarity index 100% rename from core/dev/cc2420-aes.h rename to dev/cc2420/cc2420-aes.h diff --git a/core/dev/cc2420.c b/dev/cc2420/cc2420.c similarity index 99% rename from core/dev/cc2420.c rename to dev/cc2420/cc2420.c index 63b0bbe9a..f3f1cc7cf 100644 --- a/core/dev/cc2420.c +++ b/dev/cc2420/cc2420.c @@ -43,8 +43,8 @@ #include "dev/leds.h" #include "dev/spi.h" -#include "dev/cc2420.h" -#include "dev/cc2420_const.h" +#include "cc2420.h" +#include "cc2420_const.h" #include "net/packetbuf.h" #include "net/rime/rimestats.h" diff --git a/core/dev/cc2420.h b/dev/cc2420/cc2420.h similarity index 99% rename from core/dev/cc2420.h rename to dev/cc2420/cc2420.h index 9fd09d88b..0aaacae27 100644 --- a/core/dev/cc2420.h +++ b/dev/cc2420/cc2420.h @@ -44,7 +44,7 @@ #include "contiki.h" #include "dev/spi.h" #include "dev/radio.h" -#include "dev/cc2420_const.h" +#include "cc2420_const.h" int cc2420_init(void); diff --git a/core/dev/cc2420_const.h b/dev/cc2420/cc2420_const.h similarity index 100% rename from core/dev/cc2420_const.h rename to dev/cc2420/cc2420_const.h diff --git a/core/dev/cc2520.c b/dev/cc2520/cc2520.c similarity index 99% rename from core/dev/cc2520.c rename to dev/cc2520/cc2520.c index cd0db14d6..561236b08 100644 --- a/core/dev/cc2520.c +++ b/dev/cc2520/cc2520.c @@ -35,8 +35,8 @@ #include "contiki.h" #include "dev/spi.h" -#include "dev/cc2520.h" -#include "dev/cc2520_const.h" +#include "dev/cc2520/cc2520.h" +#include "dev/cc2520/cc2520_const.h" #include "net/packetbuf.h" #include "net/rime/rimestats.h" diff --git a/core/dev/cc2520.h b/dev/cc2520/cc2520.h similarity index 99% rename from core/dev/cc2520.h rename to dev/cc2520/cc2520.h index 032b32b8d..18a43649a 100644 --- a/core/dev/cc2520.h +++ b/dev/cc2520/cc2520.h @@ -43,7 +43,7 @@ #include "contiki.h" #include "dev/spi.h" #include "dev/radio.h" -#include "dev/cc2520_const.h" +#include "dev/cc2520/cc2520_const.h" int cc2520_init(void); diff --git a/core/dev/cc2520_const.h b/dev/cc2520/cc2520_const.h similarity index 100% rename from core/dev/cc2520_const.h rename to dev/cc2520/cc2520_const.h diff --git a/core/dev/ds2411.c b/dev/ds2411/ds2411.c similarity index 99% rename from core/dev/ds2411.c rename to dev/ds2411/ds2411.c index 124d7a8d0..09c3f287f 100644 --- a/core/dev/ds2411.c +++ b/dev/ds2411/ds2411.c @@ -50,7 +50,7 @@ #include #include "contiki.h" -#include "dev/ds2411.h" +#include "dev/ds2411/ds2411.h" unsigned char ds2411_id[8]; diff --git a/core/dev/ds2411.h b/dev/ds2411/ds2411.h similarity index 100% rename from core/dev/ds2411.h rename to dev/ds2411/ds2411.h diff --git a/core/dev/sht11-sensor.c b/dev/sht11/sht11-sensor.c similarity index 97% rename from core/dev/sht11-sensor.c rename to dev/sht11/sht11-sensor.c index 9968416d7..cbe472218 100644 --- a/core/dev/sht11-sensor.c +++ b/dev/sht11/sht11-sensor.c @@ -34,8 +34,8 @@ #include "contiki.h" #include "lib/sensors.h" -#include "dev/sht11.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11.h" +#include "dev/sht11/sht11-sensor.h" const struct sensors_sensor sht11_sensor; diff --git a/core/dev/sht11-sensor.h b/dev/sht11/sht11-sensor.h similarity index 100% rename from core/dev/sht11-sensor.h rename to dev/sht11/sht11-sensor.h diff --git a/core/dev/sht11.c b/dev/sht11/sht11.c similarity index 99% rename from core/dev/sht11.c rename to dev/sht11/sht11.c index d8abc7e68..f6780d0a0 100644 --- a/core/dev/sht11.c +++ b/dev/sht11/sht11.c @@ -35,7 +35,7 @@ #include "contiki.h" #include -#include +#include "dev/sht11/sht11.h" #include "sht11-arch.h" #define DEBUG 0 diff --git a/core/dev/sht11.h b/dev/sht11/sht11.h similarity index 100% rename from core/dev/sht11.h rename to dev/sht11/sht11.h diff --git a/examples/antelope/netdb/netdb-client.c b/examples/antelope/netdb/netdb-client.c index 370a40b02..5e6e808fc 100644 --- a/examples/antelope/netdb/netdb-client.c +++ b/examples/antelope/netdb/netdb-client.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "dev/serial-line.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/mesh.h" #include "antelope.h" diff --git a/examples/antelope/netdb/netdb-server.c b/examples/antelope/netdb/netdb-server.c index f575c958b..c498c493f 100644 --- a/examples/antelope/netdb/netdb-server.c +++ b/examples/antelope/netdb/netdb-server.c @@ -39,9 +39,9 @@ #include "contiki.h" #include "dev/serial-line.h" -#include "dev/sht11.h" +#include "dev/sht11/sht11.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/mesh.h" #include "antelope.h" diff --git a/examples/cc2530dk/border-router/border-router.c b/examples/cc2530dk/border-router/border-router.c index c524a6f74..bc3bb1ba4 100644 --- a/examples/cc2530dk/border-router/border-router.c +++ b/examples/cc2530dk/border-router/border-router.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "net/rpl/rpl.h" #include "dev/watchdog.h" #include "dev/slip.h" diff --git a/examples/cc2530dk/border-router/slip-bridge.c b/examples/cc2530dk/border-router/slip-bridge.c index 0a37b85dd..98aee3bf9 100644 --- a/examples/cc2530dk/border-router/slip-bridge.c +++ b/examples/cc2530dk/border-router/slip-bridge.c @@ -38,8 +38,8 @@ * Nicolas Tsiftes */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl.h" #include "dev/slip.h" #include @@ -47,7 +47,7 @@ #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" void set_prefix_64(uip_ipaddr_t *); diff --git a/examples/cc2530dk/sniffer/sniffer.c b/examples/cc2530dk/sniffer/sniffer.c index 2183f88d7..7ad375d88 100644 --- a/examples/cc2530dk/sniffer/sniffer.c +++ b/examples/cc2530dk/sniffer/sniffer.c @@ -31,7 +31,7 @@ #include "cc253x.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ PROCESS(sniffer_process, "Sniffer process"); diff --git a/examples/cc2530dk/udp-ipv6/client.c b/examples/cc2530dk/udp-ipv6/client.c index afbe758ef..77d50b0df 100644 --- a/examples/cc2530dk/udp-ipv6/client.c +++ b/examples/cc2530dk/udp-ipv6/client.c @@ -37,7 +37,7 @@ #include "debug.h" #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define SEND_INTERVAL 2 * CLOCK_SECOND #define MAX_PAYLOAD_LEN 40 diff --git a/examples/cc2530dk/udp-ipv6/ping6.c b/examples/cc2530dk/udp-ipv6/ping6.c index e6b9e6537..e19a36895 100644 --- a/examples/cc2530dk/udp-ipv6/ping6.c +++ b/examples/cc2530dk/udp-ipv6/ping6.c @@ -37,7 +37,7 @@ #include "debug.h" #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define PING6_NB 5 #define PING6_DATALEN 16 diff --git a/examples/cc2530dk/udp-ipv6/server.c b/examples/cc2530dk/udp-ipv6/server.c index f341472e9..0b61194aa 100644 --- a/examples/cc2530dk/udp-ipv6/server.c +++ b/examples/cc2530dk/udp-ipv6/server.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "dev/watchdog.h" #include "dev/leds.h" #include "net/rpl/rpl.h" diff --git a/examples/cc2538dk/sniffer/sniffer.c b/examples/cc2538dk/sniffer/sniffer.c index 9d257b8ad..3f042bf07 100644 --- a/examples/cc2538dk/sniffer/sniffer.c +++ b/examples/cc2538dk/sniffer/sniffer.c @@ -48,7 +48,7 @@ #include "contiki.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ PROCESS(sniffer_process, "Sniffer process"); AUTOSTART_PROCESSES(&sniffer_process); diff --git a/examples/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c b/examples/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c index 57b275458..655491b13 100644 --- a/examples/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c +++ b/examples/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c @@ -47,7 +47,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "dev/watchdog.h" #include "dev/leds.h" #include "net/rpl/rpl.h" diff --git a/examples/er-rest-example/er-example-server.c b/examples/er-rest-example/er-example-server.c index 36fbb5635..aae05acf9 100644 --- a/examples/er-rest-example/er-example-server.c +++ b/examples/er-rest-example/er-example-server.c @@ -75,7 +75,7 @@ #include "dev/battery-sensor.h" #endif #if defined (PLATFORM_HAS_SHT11) -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #endif #if defined (PLATFORM_HAS_RADIO) #include "dev/radio-sensor.h" diff --git a/examples/example-shell/example-shell.c b/examples/example-shell/example-shell.c index 97943a308..24b7c2a05 100644 --- a/examples/example-shell/example-shell.c +++ b/examples/example-shell/example-shell.c @@ -41,7 +41,7 @@ #include "shell.h" #include "serial-shell.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/leds.h" #include "net/rime/timesynch.h" diff --git a/examples/ipv6/json-ws/json-ws-udp.c b/examples/ipv6/json-ws/json-ws-udp.c index f43a6f29a..73112b8a6 100644 --- a/examples/ipv6/json-ws/json-ws-udp.c +++ b/examples/ipv6/json-ws/json-ws-udp.c @@ -48,7 +48,7 @@ #include #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static struct uip_udp_conn *client_conn; static uip_ipaddr_t server_ipaddr; diff --git a/examples/ipv6/json-ws/websense-sky.c b/examples/ipv6/json-ws/websense-sky.c index 83375bdd6..a203a6081 100644 --- a/examples/ipv6/json-ws/websense-sky.c +++ b/examples/ipv6/json-ws/websense-sky.c @@ -40,7 +40,7 @@ #include "contiki.h" #include "dev/leds.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "jsontree.h" #include "json-ws.h" #include diff --git a/examples/ipv6/native-border-router/border-router-cmds.c b/examples/ipv6/native-border-router/border-router-cmds.c index eec4646ab..68f7af48c 100644 --- a/examples/ipv6/native-border-router/border-router-cmds.c +++ b/examples/ipv6/native-border-router/border-router-cmds.c @@ -41,11 +41,11 @@ #include "border-router-cmds.h" #include "dev/serial-line.h" #include "net/rpl/rpl.h" -#include "net/uiplib.h" +#include "net/ip/uiplib.h" #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" uint8_t command_context; diff --git a/examples/ipv6/native-border-router/border-router.c b/examples/ipv6/native-border-router/border-router.c index ba03a8356..b0c43e5c2 100644 --- a/examples/ipv6/native-border-router/border-router.c +++ b/examples/ipv6/native-border-router/border-router.c @@ -41,8 +41,8 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl.h" #include "net/netstack.h" @@ -57,7 +57,7 @@ #include #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define MAX_SENSORS 4 diff --git a/examples/ipv6/native-border-router/border-router.h b/examples/ipv6/native-border-router/border-router.h index 4677085cc..68420320d 100644 --- a/examples/ipv6/native-border-router/border-router.h +++ b/examples/ipv6/native-border-router/border-router.h @@ -38,7 +38,7 @@ #define BORDER_ROUTER_H_ #include "contiki.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include int border_router_cmd_handler(const uint8_t *data, int len); diff --git a/examples/ipv6/native-border-router/tun-bridge.c b/examples/ipv6/native-border-router/tun-bridge.c index 970b4cc79..22cb4289b 100644 --- a/examples/ipv6/native-border-router/tun-bridge.c +++ b/examples/ipv6/native-border-router/tun-bridge.c @@ -33,8 +33,8 @@ * Joakim Eriksson */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include #include #include @@ -52,7 +52,7 @@ #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #ifdef linux #include diff --git a/examples/ipv6/rpl-border-router/border-router.c b/examples/ipv6/rpl-border-router/border-router.c index 4128cac38..53f5c230e 100644 --- a/examples/ipv6/rpl-border-router/border-router.c +++ b/examples/ipv6/rpl-border-router/border-router.c @@ -38,8 +38,8 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl.h" #include "net/netstack.h" @@ -52,7 +52,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" uint16_t dag_id[] = {0x1111, 0x1100, 0, 0, 0, 0, 0, 0x0011}; diff --git a/examples/ipv6/rpl-border-router/slip-bridge.c b/examples/ipv6/rpl-border-router/slip-bridge.c index ebf4f3c36..52b4a4060 100644 --- a/examples/ipv6/rpl-border-router/slip-bridge.c +++ b/examples/ipv6/rpl-border-router/slip-bridge.c @@ -38,8 +38,8 @@ * Nicolas Tsiftes */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "dev/slip.h" #include "dev/uart1.h" #include @@ -47,7 +47,7 @@ #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" void set_prefix_64(uip_ipaddr_t *); diff --git a/examples/ipv6/rpl-collect/collect-common.h b/examples/ipv6/rpl-collect/collect-common.h index 2c5eff394..3211bec15 100644 --- a/examples/ipv6/rpl-collect/collect-common.h +++ b/examples/ipv6/rpl-collect/collect-common.h @@ -39,7 +39,7 @@ #define COLLECT_COMMON_H_ #include "contiki.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" void collect_common_net_init(void); void collect_common_net_print(void); diff --git a/examples/ipv6/rpl-collect/udp-sender.c b/examples/ipv6/rpl-collect/udp-sender.c index cc8ed3bc1..fa13725fa 100644 --- a/examples/ipv6/rpl-collect/udp-sender.c +++ b/examples/ipv6/rpl-collect/udp-sender.c @@ -28,9 +28,9 @@ */ #include "contiki.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-udp-packet.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-udp-packet.h" #include "net/rpl/rpl.h" #include "dev/serial-line.h" #if CONTIKI_TARGET_Z1 @@ -48,7 +48,7 @@ #define UDP_SERVER_PORT 5688 #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" static struct uip_udp_conn *client_conn; static uip_ipaddr_t server_ipaddr; diff --git a/examples/ipv6/rpl-collect/udp-sink.c b/examples/ipv6/rpl-collect/udp-sink.c index b2251b4ff..c26ead298 100644 --- a/examples/ipv6/rpl-collect/udp-sink.c +++ b/examples/ipv6/rpl-collect/udp-sink.c @@ -30,9 +30,9 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "net/rpl/rpl.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/netstack.h" #include "dev/button-sensor.h" @@ -50,7 +50,7 @@ #include "collect-view.h" #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/examples/ipv6/rpl-udp/udp-client.c b/examples/ipv6/rpl-udp/udp-client.c index 5a993e3c7..c16b0ba48 100644 --- a/examples/ipv6/rpl-udp/udp-client.c +++ b/examples/ipv6/rpl-udp/udp-client.c @@ -30,9 +30,9 @@ #include "contiki.h" #include "lib/random.h" #include "sys/ctimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-udp-packet.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-udp-packet.h" #include "sys/ctimer.h" #ifdef WITH_COMPOWER #include "powertrace.h" @@ -46,7 +46,7 @@ #define UDP_EXAMPLE_ID 190 #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #ifndef PERIOD #define PERIOD 60 diff --git a/examples/ipv6/rpl-udp/udp-server.c b/examples/ipv6/rpl-udp/udp-server.c index 0e6c88b3b..b735d3bb2 100644 --- a/examples/ipv6/rpl-udp/udp-server.c +++ b/examples/ipv6/rpl-udp/udp-server.c @@ -30,7 +30,7 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "net/rpl/rpl.h" #include "net/netstack.h" @@ -41,7 +41,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/examples/ipv6/simple-udp-rpl/broadcast-example.c b/examples/ipv6/simple-udp-rpl/broadcast-example.c index b394a8e3d..31f86e34a 100644 --- a/examples/ipv6/simple-udp-rpl/broadcast-example.c +++ b/examples/ipv6/simple-udp-rpl/broadcast-example.c @@ -34,8 +34,8 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "simple-udp.h" diff --git a/examples/ipv6/simple-udp-rpl/unicast-receiver.c b/examples/ipv6/simple-udp-rpl/unicast-receiver.c index 207c0fd27..1100886b4 100644 --- a/examples/ipv6/simple-udp-rpl/unicast-receiver.c +++ b/examples/ipv6/simple-udp-rpl/unicast-receiver.c @@ -34,9 +34,9 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-debug.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-debug.h" #include "simple-udp.h" #include "servreg-hack.h" diff --git a/examples/ipv6/simple-udp-rpl/unicast-sender.c b/examples/ipv6/simple-udp-rpl/unicast-sender.c index 7726c6ea9..60cb91204 100644 --- a/examples/ipv6/simple-udp-rpl/unicast-sender.c +++ b/examples/ipv6/simple-udp-rpl/unicast-sender.c @@ -34,9 +34,9 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-debug.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-debug.h" #include "sys/node-id.h" diff --git a/examples/ipv6/sky-websense/sky-websense.c b/examples/ipv6/sky-websense/sky-websense.c index 1949a190f..2cc8c5522 100644 --- a/examples/ipv6/sky-websense/sky-websense.c +++ b/examples/ipv6/sky-websense/sky-websense.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "httpd-simple.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "dev/light-sensor.h" #include "dev/leds.h" #include diff --git a/examples/ipv6/sky-websense/wget.c b/examples/ipv6/sky-websense/wget.c index 857c79a15..c7527b649 100644 --- a/examples/ipv6/sky-websense/wget.c +++ b/examples/ipv6/sky-websense/wget.c @@ -41,7 +41,7 @@ #include "dev/leds.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define DEBUG_LEDS 0 #undef LEDS_ON diff --git a/examples/ipv6/slip-radio/slip-net.c b/examples/ipv6/slip-radio/slip-net.c index 68b2aebc0..1482aefed 100644 --- a/examples/ipv6/slip-radio/slip-net.c +++ b/examples/ipv6/slip-radio/slip-net.c @@ -29,7 +29,7 @@ #include "contiki.h" #include "net/netstack.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "net/packetbuf.h" #include "dev/slip.h" #include diff --git a/examples/ipv6/slip-radio/slip-radio-cc2420.c b/examples/ipv6/slip-radio/slip-radio-cc2420.c index 7d7676e1f..f49e3c4e9 100644 --- a/examples/ipv6/slip-radio/slip-radio-cc2420.c +++ b/examples/ipv6/slip-radio/slip-radio-cc2420.c @@ -32,7 +32,7 @@ */ #include "contiki.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "cmd.h" #include diff --git a/examples/ipv6/slip-radio/slip-radio-sky-sensors.c b/examples/ipv6/slip-radio/slip-radio-sky-sensors.c index a88d7b9d3..9cf238741 100644 --- a/examples/ipv6/slip-radio/slip-radio-sky-sensors.c +++ b/examples/ipv6/slip-radio/slip-radio-sky-sensors.c @@ -29,7 +29,7 @@ #include "contiki.h" #include "lib/sensors.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "slip-radio.h" #include "cmd.h" #include diff --git a/examples/ipv6/slip-radio/slip-radio.c b/examples/ipv6/slip-radio/slip-radio.c index 42ec17628..5223d57a6 100644 --- a/examples/ipv6/slip-radio/slip-radio.c +++ b/examples/ipv6/slip-radio/slip-radio.c @@ -35,15 +35,15 @@ * Joakim Eriksson */ #include "contiki.h" -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "dev/slip.h" #include #include "net/netstack.h" #include "net/packetbuf.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "cmd.h" #include "slip-radio.h" #include "packetutils.h" diff --git a/examples/mbxxx/udp-ipv6-sleep/udp-client.c b/examples/mbxxx/udp-ipv6-sleep/udp-client.c index 5b1511ad5..4408a2c19 100644 --- a/examples/mbxxx/udp-ipv6-sleep/udp-client.c +++ b/examples/mbxxx/udp-ipv6-sleep/udp-client.c @@ -37,7 +37,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define SEND_INTERVAL 25 * CLOCK_SECOND diff --git a/examples/mbxxx/udp-ipv6-sleep/udp-server.c b/examples/mbxxx/udp-ipv6-sleep/udp-server.c index 1dc9279a5..68fc1915c 100644 --- a/examples/mbxxx/udp-ipv6-sleep/udp-server.c +++ b/examples/mbxxx/udp-ipv6-sleep/udp-server.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/examples/powertrace/example-powertrace.c b/examples/powertrace/example-powertrace.c index 895c3c7cb..b75d6c83f 100644 --- a/examples/powertrace/example-powertrace.c +++ b/examples/powertrace/example-powertrace.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "random.h" #include "powertrace.h" diff --git a/examples/ravenusbstick/Makefile.ravenusbstick b/examples/ravenusbstick/Makefile.ravenusbstick index 70f160a3c..9f8bc1ef0 100644 --- a/examples/ravenusbstick/Makefile.ravenusbstick +++ b/examples/ravenusbstick/Makefile.ravenusbstick @@ -10,4 +10,8 @@ CFLAGS=-DUIP_CONF_IPV6=0 -DUIP_CONF_IPV6_RPL=0 CONTIKI = ../.. +MODULES+=core/net/mac/sicslowmac core/net/mac + +PROJECT_SOURCEFILES += fakeuip.c + include $(CONTIKI)/Makefile.include diff --git a/examples/rest-example/rest-server-example.c b/examples/rest-example/rest-server-example.c index d13d9c1d9..24b33ff15 100644 --- a/examples/rest-example/rest-server-example.c +++ b/examples/rest-example/rest-server-example.c @@ -12,7 +12,7 @@ #include "dev/battery-sensor.h" #endif #if defined (PLATFORM_HAS_SHT11) -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #endif #if defined (PLATFORM_HAS_LEDS) #include "dev/leds.h" diff --git a/examples/rime/example-abc.c b/examples/rime/example-abc.c index 3a844836e..655be86df 100644 --- a/examples/rime/example-abc.c +++ b/examples/rime/example-abc.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "random.h" #include "dev/button-sensor.h" diff --git a/examples/rime/example-announcement.c b/examples/rime/example-announcement.c index 125d69fa0..a1f362614 100644 --- a/examples/rime/example-announcement.c +++ b/examples/rime/example-announcement.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/announcement.h" diff --git a/examples/rime/example-broadcast.c b/examples/rime/example-broadcast.c index 07ea2d340..c7321e895 100644 --- a/examples/rime/example-broadcast.c +++ b/examples/rime/example-broadcast.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "random.h" #include "dev/button-sensor.h" diff --git a/examples/rime/example-collect.c b/examples/rime/example-collect.c index 6f4953465..a5670e36f 100644 --- a/examples/rime/example-collect.c +++ b/examples/rime/example-collect.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/collect.h" #include "dev/leds.h" #include "dev/button-sensor.h" diff --git a/examples/rime/example-mesh.c b/examples/rime/example-mesh.c index 4596ca54a..94fe1bce8 100644 --- a/examples/rime/example-mesh.c +++ b/examples/rime/example-mesh.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/mesh.h" #include "dev/button-sensor.h" diff --git a/examples/rime/example-multihop.c b/examples/rime/example-multihop.c index fb64b5a81..bffe45c83 100644 --- a/examples/rime/example-multihop.c +++ b/examples/rime/example-multihop.c @@ -71,7 +71,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "lib/list.h" #include "lib/memb.h" #include "lib/random.h" diff --git a/examples/rime/example-neighbors.c b/examples/rime/example-neighbors.c index 9126d343b..71d95dc97 100644 --- a/examples/rime/example-neighbors.c +++ b/examples/rime/example-neighbors.c @@ -56,7 +56,7 @@ #include "lib/list.h" #include "lib/memb.h" #include "lib/random.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include diff --git a/examples/rime/example-rudolph2.c b/examples/rime/example-rudolph2.c index e26f7e9ea..d55eda9d4 100644 --- a/examples/rime/example-rudolph2.c +++ b/examples/rime/example-rudolph2.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/rudolph2.h" #include "dev/button-sensor.h" diff --git a/examples/rime/example-runicast.c b/examples/rime/example-runicast.c index c0a3b8ec9..a84c7d07e 100644 --- a/examples/rime/example-runicast.c +++ b/examples/rime/example-runicast.c @@ -40,7 +40,7 @@ #include #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "lib/list.h" #include "lib/memb.h" diff --git a/examples/rime/example-unicast.c b/examples/rime/example-unicast.c index 496841ed2..71dbbcbee 100644 --- a/examples/rime/example-unicast.c +++ b/examples/rime/example-unicast.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/button-sensor.h" diff --git a/examples/sensinode/border-router/border-router.c b/examples/sensinode/border-router/border-router.c index 9cab28e42..028a2f770 100644 --- a/examples/sensinode/border-router/border-router.c +++ b/examples/sensinode/border-router/border-router.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "net/rpl/rpl.h" #include "dev/watchdog.h" #include "dev/slip.h" diff --git a/examples/sensinode/border-router/slip-bridge.c b/examples/sensinode/border-router/slip-bridge.c index ac7c67d14..fc9f95a28 100644 --- a/examples/sensinode/border-router/slip-bridge.c +++ b/examples/sensinode/border-router/slip-bridge.c @@ -38,8 +38,8 @@ * Nicolas Tsiftes */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl.h" #include "dev/slip.h" #include "dev/uart1.h" @@ -48,7 +48,7 @@ #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" void set_prefix_64(uip_ipaddr_t *); diff --git a/examples/sensinode/broadcast-rime.c b/examples/sensinode/broadcast-rime.c index dd6b96867..bea4a9187 100644 --- a/examples/sensinode/broadcast-rime.c +++ b/examples/sensinode/broadcast-rime.c @@ -37,7 +37,7 @@ * Adam Dunkels */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "lib/random.h" #include "net/rime/rimestats.h" #include "dev/leds.h" diff --git a/examples/sensinode/cc2431-location-engine/blind-node.c b/examples/sensinode/cc2431-location-engine/blind-node.c index 7fd40623d..2b6f420ea 100644 --- a/examples/sensinode/cc2431-location-engine/blind-node.c +++ b/examples/sensinode/cc2431-location-engine/blind-node.c @@ -55,7 +55,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "cc2431_loc_eng.h" #include "cc2430_sfr.h" diff --git a/examples/sensinode/sensors-ipv6/sensors-ipv6.c b/examples/sensinode/sensors-ipv6/sensors-ipv6.c index 839daf50e..1b563975b 100644 --- a/examples/sensinode/sensors-ipv6/sensors-ipv6.c +++ b/examples/sensinode/sensors-ipv6/sensors-ipv6.c @@ -51,7 +51,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "dev/watchdog.h" #include "dev/leds.h" #include "net/rpl/rpl.h" diff --git a/examples/sensinode/sensors/sensors-example.c b/examples/sensinode/sensors/sensors-example.c index 9dbba9793..f138916dc 100644 --- a/examples/sensinode/sensors/sensors-example.c +++ b/examples/sensinode/sensors/sensors-example.c @@ -81,7 +81,7 @@ #include "contiki.h" #include "contiki-conf.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/leds.h" #include "dev/watchdog.h" #include "lib/random.h" diff --git a/examples/sensinode/sniffer/sniffer.c b/examples/sensinode/sniffer/sniffer.c index ffde21209..74d24588e 100644 --- a/examples/sensinode/sniffer/sniffer.c +++ b/examples/sensinode/sniffer/sniffer.c @@ -31,7 +31,7 @@ #include "cc2430_sfr.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ PROCESS(sniffer_process, "Sniffer process"); diff --git a/examples/sensinode/udp-ipv6/client.c b/examples/sensinode/udp-ipv6/client.c index 8ad6520d5..8308d13a8 100644 --- a/examples/sensinode/udp-ipv6/client.c +++ b/examples/sensinode/udp-ipv6/client.c @@ -44,7 +44,7 @@ #endif #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define SEND_INTERVAL 2 * CLOCK_SECOND #define MAX_PAYLOAD_LEN 40 diff --git a/examples/sensinode/udp-ipv6/ping6.c b/examples/sensinode/udp-ipv6/ping6.c index ab5c4f81b..1acccd371 100644 --- a/examples/sensinode/udp-ipv6/ping6.c +++ b/examples/sensinode/udp-ipv6/ping6.c @@ -39,7 +39,7 @@ #endif #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define PING6_NB 5 #define PING6_DATALEN 16 diff --git a/examples/sensinode/udp-ipv6/server.c b/examples/sensinode/udp-ipv6/server.c index 5033d8ac1..fcdc0fec8 100644 --- a/examples/sensinode/udp-ipv6/server.c +++ b/examples/sensinode/udp-ipv6/server.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "dev/watchdog.h" #include "dev/leds.h" #include "net/rpl/rpl.h" diff --git a/examples/servreg-hack/example-servreg-client.c b/examples/servreg-hack/example-servreg-client.c index 0ea55d8ac..108d40aeb 100644 --- a/examples/servreg-hack/example-servreg-client.c +++ b/examples/servreg-hack/example-servreg-client.c @@ -39,8 +39,8 @@ #include "contiki.h" #include "contiki-lib.h" -#include "net/uip-debug.h" -#include "net/uip-ds6.h" +#include "net/ip/uip-debug.h" +#include "net/ipv6/uip-ds6.h" #include "servreg-hack.h" #include /* For printf() */ diff --git a/examples/servreg-hack/example-servreg-server.c b/examples/servreg-hack/example-servreg-server.c index 7af624f9a..01dd7175a 100644 --- a/examples/servreg-hack/example-servreg-server.c +++ b/examples/servreg-hack/example-servreg-server.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "contiki-lib.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #include "servreg-hack.h" #include /* For printf() */ diff --git a/examples/sky-ip/ajax-cgi.c b/examples/sky-ip/ajax-cgi.c index e1a835441..f8e4d0a32 100644 --- a/examples/sky-ip/ajax-cgi.c +++ b/examples/sky-ip/ajax-cgi.c @@ -103,7 +103,7 @@ httpd_cgi_add(struct httpd_cgi_call *c) } /*---------------------------------------------------------------------------*/ #if CONTIKI_TARGET_SKY -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" #include "dev/light-sensor.h" #endif /* CONTIKI_TARGET_SKY */ diff --git a/examples/sky-ip/sky-telnet-server.c b/examples/sky-ip/sky-telnet-server.c index 41324a6b4..71e4c7f95 100644 --- a/examples/sky-ip/sky-telnet-server.c +++ b/examples/sky-ip/sky-telnet-server.c @@ -43,7 +43,7 @@ #include "contiki.h" #include "contiki-net.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include /*---------------------------------------------------------------------------*/ diff --git a/examples/sky-ip/telnet-webserver.c b/examples/sky-ip/telnet-webserver.c index 7678ce06b..994cf221d 100644 --- a/examples/sky-ip/telnet-webserver.c +++ b/examples/sky-ip/telnet-webserver.c @@ -43,7 +43,7 @@ #include "contiki.h" #include "contiki-net.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include /*---------------------------------------------------------------------------*/ diff --git a/examples/sky-ip/telnet.c b/examples/sky-ip/telnet.c index 2154704b7..02ed7bb22 100644 --- a/examples/sky-ip/telnet.c +++ b/examples/sky-ip/telnet.c @@ -42,7 +42,7 @@ #include "contiki.h" #include "contiki-net.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include /*---------------------------------------------------------------------------*/ diff --git a/examples/sky-shell-exec/sky-shell-exec.c b/examples/sky-shell-exec/sky-shell-exec.c index f1059f33a..bab3969c0 100644 --- a/examples/sky-shell-exec/sky-shell-exec.c +++ b/examples/sky-shell-exec/sky-shell-exec.c @@ -36,11 +36,11 @@ #include "dev/watchdog.h" -#include "net/rime.h" -#include "dev/cc2420.h" +#include "net/rime/rime.h" +#include "cc2420.h" #include "dev/leds.h" #include "dev/light.h" -#include "dev/sht11.h" +#include "dev/sht11/sht11.h" #include "dev/battery-sensor.h" #include "net/rime/timesynch.h" diff --git a/examples/sky-shell/sky-shell.c b/examples/sky-shell/sky-shell.c index 7313783ef..c0c38c3ef 100644 --- a/examples/sky-shell/sky-shell.c +++ b/examples/sky-shell/sky-shell.c @@ -42,7 +42,7 @@ #include "serial-shell.h" #include "collect-view.h" -#include "net/rime.h" +#include "net/rime/rime.h" /*---------------------------------------------------------------------------*/ PROCESS(sky_shell_process, "Sky Contiki shell"); diff --git a/examples/sky/radio-test.c b/examples/sky/radio-test.c index 9d13ec447..8daf9f4c3 100644 --- a/examples/sky/radio-test.c +++ b/examples/sky/radio-test.c @@ -44,10 +44,10 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/leds.h" #include "dev/button-sensor.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include #include diff --git a/examples/sky/rssi-scanner.c b/examples/sky/rssi-scanner.c index bbc8b00f0..92da5aa3e 100644 --- a/examples/sky/rssi-scanner.c +++ b/examples/sky/rssi-scanner.c @@ -39,12 +39,12 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "dev/leds.h" -#include "dev/cc2420.h" -#include "dev/cc2420_const.h" +#include "cc2420.h" +#include "cc2420_const.h" #include "dev/spi.h" #include diff --git a/examples/sky/sky-collect.c b/examples/sky/sky-collect.c index 5bcd1af8b..e79fb02ef 100644 --- a/examples/sky/sky-collect.c +++ b/examples/sky/sky-collect.c @@ -39,16 +39,16 @@ #include "contiki.h" #include "net/netstack.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/rime/collect.h" #include "net/rime/collect-neighbor.h" #include "net/rime/timesynch.h" #include "dev/leds.h" #include "dev/button-sensor.h" #include "dev/light-sensor.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include #include #include "contiki-net.h" diff --git a/examples/sky/tcprudolph0.c b/examples/sky/tcprudolph0.c index 3deaa0944..1dfea085f 100644 --- a/examples/sky/tcprudolph0.c +++ b/examples/sky/tcprudolph0.c @@ -37,7 +37,7 @@ #include "sys/etimer.h" #include "loader/elfloader.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/leds.h" diff --git a/examples/trickle-library/trickle-library.c b/examples/trickle-library/trickle-library.c index 4f81cb39f..6d716066e 100644 --- a/examples/trickle-library/trickle-library.c +++ b/examples/trickle-library/trickle-library.c @@ -42,7 +42,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /* Trickle variables and constants */ static struct trickle_timer tt; diff --git a/examples/udp-ipv6/udp-client.c b/examples/udp-ipv6/udp-client.c index 656929b46..7f9b7659e 100644 --- a/examples/udp-ipv6/udp-client.c +++ b/examples/udp-ipv6/udp-client.c @@ -30,13 +30,13 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/resolv.h" +#include "net/ip/resolv.h" #include #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define SEND_INTERVAL 15 * CLOCK_SECOND #define MAX_PAYLOAD_LEN 40 diff --git a/examples/udp-ipv6/udp-server.c b/examples/udp-ipv6/udp-server.c index 8c88cf704..c56720f9a 100644 --- a/examples/udp-ipv6/udp-server.c +++ b/examples/udp-ipv6/udp-server.c @@ -34,7 +34,7 @@ #include #define DEBUG DEBUG_PRINT -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/examples/z1/ipv6/z1-websense/wget.c b/examples/z1/ipv6/z1-websense/wget.c index 75eb7cfd6..3d9b56974 100644 --- a/examples/z1/ipv6/z1-websense/wget.c +++ b/examples/z1/ipv6/z1-websense/wget.c @@ -41,7 +41,7 @@ #include "dev/leds.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define DEBUG_LEDS 0 #undef LEDS_ON diff --git a/examples/z1/ipv6/z1-websense/z1-websense.c b/examples/z1/ipv6/z1-websense/z1-websense.c index 0de72e69f..5e8bedb1e 100644 --- a/examples/z1/ipv6/z1-websense/z1-websense.c +++ b/examples/z1/ipv6/z1-websense/z1-websense.c @@ -43,7 +43,7 @@ #include "webserver-nogui.h" #include "dev/temperature-sensor.h" #include "dev/battery-sensor.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" #include diff --git a/examples/z1/rssi_scanner/rssi-scanner.c b/examples/z1/rssi_scanner/rssi-scanner.c index 77353a298..bbca9cdb6 100644 --- a/examples/z1/rssi_scanner/rssi-scanner.c +++ b/examples/z1/rssi_scanner/rssi-scanner.c @@ -39,12 +39,12 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "dev/leds.h" -#include "dev/cc2420.h" -#include "dev/cc2420_const.h" +#include "cc2420.h" +#include "cc2420_const.h" #include "dev/spi.h" #include diff --git a/examples/z1/test-sht11.c b/examples/z1/test-sht11.c index 9bf48d04b..ff812eec3 100644 --- a/examples/z1/test-sht11.c +++ b/examples/z1/test-sht11.c @@ -39,7 +39,7 @@ */ #include "contiki.h" -#include "dev/sht11.h" +#include "dev/sht11/sht11.h" #include diff --git a/examples/z1/tutorials/example-unicast-temp.c b/examples/z1/tutorials/example-unicast-temp.c index 2ba5dc51b..9c43bebb7 100644 --- a/examples/z1/tutorials/example-unicast-temp.c +++ b/examples/z1/tutorials/example-unicast-temp.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/button-sensor.h" diff --git a/examples/z1/tutorials/example-unicast2.c b/examples/z1/tutorials/example-unicast2.c index b6b63be81..98383330b 100644 --- a/examples/z1/tutorials/example-unicast2.c +++ b/examples/z1/tutorials/example-unicast2.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/button-sensor.h" diff --git a/platform/apple2enh/Makefile.customrules-apple2enh b/platform/apple2enh/Makefile.customrules-apple2enh new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/apple2enh/Makefile.customrules-apple2enh @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/atarixl/Makefile.customrules-atarixl b/platform/atarixl/Makefile.customrules-atarixl new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/atarixl/Makefile.customrules-atarixl @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/avr-atmega128rfa1/contiki-main.c b/platform/avr-atmega128rfa1/contiki-main.c index 2bdf759ff..f755b78e4 100644 --- a/platform/avr-atmega128rfa1/contiki-main.c +++ b/platform/avr-atmega128rfa1/contiki-main.c @@ -59,7 +59,7 @@ #include "radio/rf230bb/rf230bb.h" #include "net/mac/frame802154.h" #include "net/mac/framer-802154.h" -#include "net/sicslowpan.h" +#include "net/ipv6/sicslowpan.h" #include "contiki.h" #include "contiki-net.h" @@ -88,7 +88,7 @@ #include "net/rime/rime-udp.h" #endif -#include "net/rime.h" +#include "net/rime/rime.h" /* Track interrupt flow through mac, rdc and radio driver */ //#define DEBUGFLOWSIZE 32 diff --git a/platform/avr-raven/Makefile.avr-raven b/platform/avr-raven/Makefile.avr-raven index 23544ec03..d13307c0b 100644 --- a/platform/avr-raven/Makefile.avr-raven +++ b/platform/avr-raven/Makefile.avr-raven @@ -34,3 +34,5 @@ AVRDUDE_MCU=m1284p include $(CONTIKIAVR)/Makefile.avr include $(CONTIKIAVR)/radio/Makefile.radio + +MODULES += core/net/ipv6 core/net/ipv4 core/net/ip core/net/mac core/net core/net/rime core/net/mac/sicslowmac diff --git a/platform/avr-raven/contiki-raven-main.c b/platform/avr-raven/contiki-raven-main.c index 7f7a4603e..70fe8e606 100644 --- a/platform/avr-raven/contiki-raven-main.c +++ b/platform/avr-raven/contiki-raven-main.c @@ -69,7 +69,7 @@ unsigned char debugflowsize,debugflow[DEBUGFLOWSIZE]; #include "radio/rf230bb/rf230bb.h" #include "net/mac/frame802154.h" #include "net/mac/framer-802154.h" -#include "net/sicslowpan.h" +#include "net/ipv6/sicslowpan.h" #else //radio driver using Atmel/Cisco 802.15.4'ish MAC #include @@ -106,7 +106,7 @@ unsigned char debugflowsize,debugflow[DEBUGFLOWSIZE]; #include "net/rime/rime-udp.h" #endif -#include "net/rime.h" +#include "net/rime/rime.h" #include "params.h" diff --git a/platform/avr-ravenusb/Makefile.avr-ravenusb b/platform/avr-ravenusb/Makefile.avr-ravenusb index 23e3b6f6b..5ed9f6b4f 100644 --- a/platform/avr-ravenusb/Makefile.avr-ravenusb +++ b/platform/avr-ravenusb/Makefile.avr-ravenusb @@ -1,3 +1,4 @@ + CONTIKI_TARGET_DIRS = . apps net loader dev/usb dev/serial CONTIKI_CORE=contiki-raven-main CONTIKI_TARGET_MAIN = ${CONTIKI_CORE}.o @@ -39,7 +40,8 @@ CONTIKIBOARD=. CONTIKI_PLAT_DEFS = -DF_CPU=8000000UL -DAVRGCC -DAUTO_CRC_PADDING=2 -DJACKDAW=1 #The no-net build using fakeuip.c is always ipv6 -ifdef CONTIKI_NO_NET +CFLAGS += -I$(CONTIKI)/core/net/ipv6 -I$(CONTIKI)/core/net/ip -I$(CONTIKI)/core/net/ipv4 +ifdef CONTIKI_NO_NET CONTIKI_PLAT_DEFS+= -DUIP_CONF_IPV6=1 endif @@ -64,3 +66,10 @@ AVRDUDE_OPTIONS=-V include $(CONTIKIAVR)/Makefile.avr include $(CONTIKIAVR)/radio/Makefile.radio +ifndef CONTIKI_NO_NET +MODULES+=core/net/ip core/net/ipv4 core/net core/net/ipv6 \ + core/net/rime core/net/mac core/net/mac/sicslowmac +else +vpath %.c $(CONTIKI)/core/net/ipv6 +CONTIKI_SOURCEFILES += sicslowpan.c rimeaddr.c +endif diff --git a/platform/avr-ravenusb/contiki-conf.h b/platform/avr-ravenusb/contiki-conf.h index 8b0a5d0a3..3a46ba164 100644 --- a/platform/avr-ravenusb/contiki-conf.h +++ b/platform/avr-ravenusb/contiki-conf.h @@ -374,6 +374,7 @@ typedef unsigned short uip_stats_t; //#pragma mark RPL Settings /* ************************************************************************** */ +#define UIP_CONF_IPV6_RPL 0 #if UIP_CONF_IPV6_RPL /* Not completely working yet. Works on Ubuntu after $ifconfig usb0 -arp to drop the neighbor solitications */ diff --git a/platform/avr-ravenusb/sicslow_ethernet.c b/platform/avr-ravenusb/sicslow_ethernet.c index 7159b7d4d..336aa28a4 100644 --- a/platform/avr-ravenusb/sicslow_ethernet.c +++ b/platform/avr-ravenusb/sicslow_ethernet.c @@ -226,7 +226,7 @@ #include "uip.h" #include "uip_arp.h" //For ethernet header structure -#include "net/rime.h" +#include "net/rime/rime.h" #include "sicslowpan.h" #include "sicslow_ethernet.h" #if !RF230BB @@ -575,8 +575,8 @@ int8_t mac_translateIPLinkLayer(lltype_t target) } -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" typedef struct { uint8_t type; diff --git a/platform/avr-rcb/contiki-rcb-main.c b/platform/avr-rcb/contiki-rcb-main.c index 24d3cd07e..4a6a98e22 100644 --- a/platform/avr-rcb/contiki-rcb-main.c +++ b/platform/avr-rcb/contiki-rcb-main.c @@ -44,7 +44,7 @@ #include "radio/rf230bb/rf230bb.h" #include "net/mac/frame802154.h" #include "net/mac/framer-802154.h" -#include "net/sicslowpan.h" +#include "net/ipv6/sicslowpan.h" #else //radio driver using Atmel/Cisco 802.15.4'ish MAC #include #include "mac.h" diff --git a/platform/avr-zigbit/contiki-avr-zigbit-main.c b/platform/avr-zigbit/contiki-avr-zigbit-main.c index 7eead3ff8..42aad02f9 100644 --- a/platform/avr-zigbit/contiki-avr-zigbit-main.c +++ b/platform/avr-zigbit/contiki-avr-zigbit-main.c @@ -55,7 +55,7 @@ #include "radio/rf230bb/rf230bb.h" #include "net/mac/frame802154.h" #include "net/mac/framer-802154.h" -#include "net/sicslowpan.h" +#include "net/ipv6/sicslowpan.h" #else //radio driver using Atmel/Cisco 802.15.4'ish MAC #include #include "mac.h" diff --git a/platform/c128/Makefile.customrules-c128 b/platform/c128/Makefile.customrules-c128 new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/c128/Makefile.customrules-c128 @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/c64/Makefile.customrules-c64 b/platform/c64/Makefile.customrules-c64 new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/c64/Makefile.customrules-c64 @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/cc2530dk/Makefile.cc2530dk b/platform/cc2530dk/Makefile.cc2530dk index 2ef71e6f3..a163a2aef 100644 --- a/platform/cc2530dk/Makefile.cc2530dk +++ b/platform/cc2530dk/Makefile.cc2530dk @@ -45,3 +45,6 @@ FORCE: ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/cpu/cc253x include $(CONTIKI_CPU)/Makefile.cc253x + +# Default modules +MODULES += core/net/ip core/net/ipv6 core/net/rime core/net core/net/mac core/net/rpl diff --git a/platform/cc2530dk/Makefile.customrules-cc2530dk b/platform/cc2530dk/Makefile.customrules-cc2530dk new file mode 100644 index 000000000..b723c08b8 --- /dev/null +++ b/platform/cc2530dk/Makefile.customrules-cc2530dk @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-cc253x diff --git a/platform/cc2530dk/contiki-main.c b/platform/cc2530dk/contiki-main.c index 1935470bc..9e9373f04 100644 --- a/platform/cc2530dk/contiki-main.c +++ b/platform/cc2530dk/contiki-main.c @@ -16,7 +16,7 @@ #include "dev/button-sensor.h" #include "dev/adc-sensor.h" #include "dev/leds-arch.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "net/mac/frame802154.h" #include "debug.h" diff --git a/platform/cc2530dk/uip-debug.c b/platform/cc2530dk/uip-debug.c index d8e04f6d5..ee7942664 100644 --- a/platform/cc2530dk/uip-debug.c +++ b/platform/cc2530dk/uip-debug.c @@ -37,7 +37,7 @@ * Joakim Eriksson */ -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "debug.h" /*---------------------------------------------------------------------------*/ void diff --git a/platform/cc2530dk/viztool.c b/platform/cc2530dk/viztool.c index a88b08790..e6b2fbed3 100644 --- a/platform/cc2530dk/viztool.c +++ b/platform/cc2530dk/viztool.c @@ -41,12 +41,12 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip-ds6-route.h" +#include "net/ipv6/uip-ds6-route.h" #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) diff --git a/platform/cc2538dk/Makefile.cc2538dk b/platform/cc2538dk/Makefile.cc2538dk index b350c2fc2..397fbb978 100644 --- a/platform/cc2538dk/Makefile.cc2538dk +++ b/platform/cc2538dk/Makefile.cc2538dk @@ -25,3 +25,6 @@ endif ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/cpu/cc2538 include $(CONTIKI_CPU)/Makefile.cc2538 + +MODULES += core/net core/net/ipv6 core/net/mac core/net/ip \ + core/net/rpl core/net/rime core/net/mac/contikimac diff --git a/platform/cc2538dk/contiki-main.c b/platform/cc2538dk/contiki-main.c index 1b76d3bba..689e8a2f5 100644 --- a/platform/cc2538dk/contiki-main.c +++ b/platform/cc2538dk/contiki-main.c @@ -59,8 +59,8 @@ #include "lib/random.h" #include "net/netstack.h" #include "net/queuebuf.h" -#include "net/tcpip.h" -#include "net/uip.h" +#include "net/ip/tcpip.h" +#include "net/ip/uip.h" #include "net/mac/frame802154.h" #include "cpu.h" #include "reg.h" diff --git a/platform/cooja/Makefile.cooja b/platform/cooja/Makefile.cooja index d8fa83d63..1426bf7cc 100644 --- a/platform/cooja/Makefile.cooja +++ b/platform/cooja/Makefile.cooja @@ -60,7 +60,7 @@ COOJA_NET = uip-driver.c # (COOJA_SOURCEFILES contains additional sources set from simulator) CONTIKI_TARGET_SOURCEFILES = \ $(COOJA_BASE) $(COOJA_INTFS) $(COOJA_CORE) $(COOJA_NET) $(COOJA_SOURCEFILES) - + CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) .SUFFIXES: @@ -88,44 +88,5 @@ ifeq ($(UIP_CONF_IPV6),1) endif # UIP_CONF_RPL endif # UIP_CONF_IPV6 -REDEF_PRINTF=1 # Redefine functions to enable printf()s inside Cooja - -### Define custom targets - -# NB: Assumes ARCHIVE was not overridden and is in $(OBJECTDIR) -$(ARCHIVE): ${addprefix $(OBJECTDIR)/, $(CONTIKI_SOURCEFILES:.c=.o)} | $(OBJECTDIR) - $(AR_COMMAND_1) $^ $(AR_COMMAND_2) - -# NB: Assumes JNILIB was not overridden and is in $(OBJECTDIR) -$(JNILIB): $(CONTIKI_APP_OBJ) $(MAIN_OBJ) $(PROJECT_OBJECTFILES) $(ARCHIVE) | $(OBJECTDIR) -ifdef SYMBOLS - @echo Generating symbols - # Recreate symbols file and relink with final memory layout (twice) - ${CONTIKI}/tools/make-symbols-nm $(JNILIB) - $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o - $(LINK_COMMAND_1) $^ $(LINK_COMMAND_2) - ${CONTIKI}/tools/make-symbols-nm $(JNILIB) - $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o -endif ## SYMBOLS -ifdef REDEF_PRINTF - @echo Redefining printf - -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym printf=log_printf $(OBJ); ) - -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym puts=log_puts $(OBJ); ) - -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym putchar=log_putchar $(OBJ); ) -endif ## REDEF_PRINTF - $(LINK_COMMAND_1) $^ $(LINK_COMMAND_2) - -.PHONY: $(CONTIKI_APP).cooja -$(CONTIKI_APP).cooja: $(JNILIB) - cp $(JNILIB) $@ - rm $(CONTIKI_APP_OBJ) - -# Trickiness: GNU make matches this against the file base name. -# Assume that the directory part is the standard location. -mtype%.o: contiki-cooja-main.o | $(OBJECTDIR) - mv contiki-cooja-main.o $@ - -symbols.c: - # Create initial symbol files if not existing - cp ${CONTIKI}/tools/empty-symbols.c symbols.c - cp ${CONTIKI}/tools/empty-symbols.h symbols.h +MODULES += core/net core/net/ip core/net/ipv4 \ + core/net/ipv6 core/net/mac core/net/rime core/net/rpl diff --git a/platform/cooja/Makefile.customrules-cooja b/platform/cooja/Makefile.customrules-cooja new file mode 100755 index 000000000..2d594d14b --- /dev/null +++ b/platform/cooja/Makefile.customrules-cooja @@ -0,0 +1,49 @@ +### Define custom targets + +CUSTOM_RULE_C_TO_CE=1 +#CUSTOM_RULE_C_TO_OBJECTDIR_O=1 +CUSTOM_RULE_S_TO_OBJECTDIR_O=1 +#CUSTOM_RULE_C_TO_O=1 +#CUSTOM_RULE_C_TO_CO=1 +CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 +CUSTOM_RULE_LINK=1 + +REDEF_PRINTF=1 # Redefine functions to enable printf()s inside Cooja + +# NB: Assumes ARCHIVE was not overridden and is in $(OBJECTDIR) +$(ARCHIVE): $(CONTIKI_OBJECTFILES) | $(OBJECTDIR) + $(AR_COMMAND_1) $^ $(AR_COMMAND_2) + +# NB: Assumes JNILIB was not overridden and is in $(OBJECTDIR) +$(JNILIB): $(CONTIKI_APP_OBJ) $(MAIN_OBJ) $(PROJECT_OBJECTFILES) $(ARCHIVE) | $(OBJECTDIR) +ifdef SYMBOLS + @echo Generating symbols + # Recreate symbols file and relink with final memory layout (twice) + ${CONTIKI}/tools/make-symbols-nm $(JNILIB) + $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o + $(LINK_COMMAND_1) $^ $(LINK_COMMAND_2) + ${CONTIKI}/tools/make-symbols-nm $(JNILIB) + $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o +endif ## SYMBOLS +ifdef REDEF_PRINTF + @echo Redefining printf + -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym printf=log_printf $(OBJ); ) + -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym puts=log_puts $(OBJ); ) + -$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym putchar=log_putchar $(OBJ); ) +endif ## REDEF_PRINTF + $(LINK_COMMAND_1) $^ $(LINK_COMMAND_2) + +.PHONY: $(CONTIKI_APP).cooja +$(CONTIKI_APP).cooja: $(JNILIB) + cp $(JNILIB) $@ + rm $(CONTIKI_APP_OBJ) + +# Trickiness: GNU make matches this against the file base name. +# Assume that the directory part is the standard location. +mtype%.o: contiki-cooja-main.o | $(OBJECTDIR) + mv contiki-cooja-main.o $@ + +symbols.c: + # Create initial symbol files if not existing + cp ${CONTIKI}/tools/empty-symbols.c symbols.c + cp ${CONTIKI}/tools/empty-symbols.h symbols.h diff --git a/platform/cooja/contiki-cooja-main.c b/platform/cooja/contiki-cooja-main.c index 79a7b1992..7cc3ecd66 100644 --- a/platform/cooja/contiki-cooja-main.c +++ b/platform/cooja/contiki-cooja-main.c @@ -49,7 +49,7 @@ #include "lib/random.h" #include "lib/simEnvChange.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "dev/serial-line.h" @@ -80,10 +80,10 @@ #if WITH_UIP #include "dev/rs232.h" #include "dev/slip.h" -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(0,0,0,0, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = @@ -97,8 +97,8 @@ static uint8_t is_gateway; #define WITH_UIP6 0 #endif #if WITH_UIP6 -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #define PRINT6ADDR(addr) printf("%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15]) #endif /* WITH_UIP6 */ diff --git a/platform/cooja/dev/ip.c b/platform/cooja/dev/ip.c index b05af08a0..de513d074 100644 --- a/platform/cooja/dev/ip.c +++ b/platform/cooja/dev/ip.c @@ -31,7 +31,7 @@ #include "dev/ip.h" #include "lib/simEnvChange.h" -#include "net/uip.h" +#include "net/ip/uip.h" const struct simInterface ip_interface; diff --git a/platform/cooja/net/radio-uip-uaodv.c b/platform/cooja/net/radio-uip-uaodv.c index 9d29048c5..02c49994e 100644 --- a/platform/cooja/net/radio-uip-uaodv.c +++ b/platform/cooja/net/radio-uip-uaodv.c @@ -31,10 +31,10 @@ */ #include "radio-uip-uaodv.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "net/uaodv.h" -#include "net/uaodv-rt.h" -#include "net/uaodv-def.h" +#include "net/ipv4/uaodv-rt.h" +#include "net/ipv4/uaodv-def.h" #include "lib/crc16.h" #include "list.h" #include diff --git a/platform/cooja/net/uip-driver.c b/platform/cooja/net/uip-driver.c index 80ea47893..39dbd6e01 100644 --- a/platform/cooja/net/uip-driver.c +++ b/platform/cooja/net/uip-driver.c @@ -37,8 +37,8 @@ */ #include "net/netstack.h" -#include "net/uip.h" -#include "net/tcpip.h" +#include "net/ip/uip.h" +#include "net/ip/tcpip.h" #include "net/packetbuf.h" #include "net/uip-driver.h" #include diff --git a/platform/cooja/testapps/testuaodv.c b/platform/cooja/testapps/testuaodv.c index be7a0fa2d..771a94fce 100644 --- a/platform/cooja/testapps/testuaodv.c +++ b/platform/cooja/testapps/testuaodv.c @@ -29,12 +29,12 @@ */ #include -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/button-sensor.h" #include "dev/leds.h" #include "net/uaodv.h" -#include "net/uaodv-rt.h" +#include "net/ipv4/uaodv-rt.h" #include diff --git a/platform/cooja/testapps/testuip.c b/platform/cooja/testapps/testuip.c index aa92d65ed..727fdd26d 100644 --- a/platform/cooja/testapps/testuip.c +++ b/platform/cooja/testapps/testuip.c @@ -29,7 +29,7 @@ */ #include -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/button-sensor.h" #include "dev/leds.h" diff --git a/platform/econotag/Makefile.econotag b/platform/econotag/Makefile.econotag index 99f837501..8e6939f9c 100644 --- a/platform/econotag/Makefile.econotag +++ b/platform/econotag/Makefile.econotag @@ -20,3 +20,5 @@ endif include $(CONTIKIMC1322X)/Makefile.mc1322x +MODULES+=core/net/ip core/net/ipv4 core/net core/net/rpl \ + core/net/ipv6 core/net/rime core/net/mac diff --git a/platform/econotag/contiki-conf.h b/platform/econotag/contiki-conf.h index 5e1675dc4..0f3627a92 100644 --- a/platform/econotag/contiki-conf.h +++ b/platform/econotag/contiki-conf.h @@ -126,7 +126,7 @@ #define NETSTACK_CONF_NETWORK rime_driver #define NETSTACK_CONF_MAC csma_driver -#define NETSTACK_CONF_RDC sicslowmac_driver +#define NETSTACK_CONF_RDC nullrdc_driver #define NETSTACK_CONF_RADIO contiki_maca_driver #define NETSTACK_CONF_FRAMER framer_802154 diff --git a/platform/econotag/main.c b/platform/econotag/main.c index cb31944fe..2e20a5ffa 100644 --- a/platform/econotag/main.c +++ b/platform/econotag/main.c @@ -34,12 +34,12 @@ /* debug */ #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /* contiki */ #include "contiki.h" #include "dev/button-sensor.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "net/netstack.h" /* mc1322x */ diff --git a/platform/econotag/platform_prints.c b/platform/econotag/platform_prints.c index d8b960770..c0a2cd4fc 100644 --- a/platform/econotag/platform_prints.c +++ b/platform/econotag/platform_prints.c @@ -3,7 +3,7 @@ #include "contiki.h" #include "net/netstack.h" -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" void print_processes(struct process * const processes[]) diff --git a/platform/eval-adf7xxxmb4z/Makefile.eval-adf7xxxmb4z b/platform/eval-adf7xxxmb4z/Makefile.eval-adf7xxxmb4z index d872d2d07..ff62e000f 100644 --- a/platform/eval-adf7xxxmb4z/Makefile.eval-adf7xxxmb4z +++ b/platform/eval-adf7xxxmb4z/Makefile.eval-adf7xxxmb4z @@ -61,3 +61,6 @@ PROG_UART ?= /dev/ttyUSB1 run: $(CONTIKI_PROJECT).$(TARGET).srec ~/adi-contiki/github/rl78flash/rl78flash -vv -i -m3 $(PROG_UART) -b500000 -a $< + +MODULES+=core/net/ip core/net/ipv4 core/net core/net/rpl \ + core/net/ipv6 core/net/rime core/net/mac core/net/mac/sicslowmac diff --git a/platform/eval-adf7xxxmb4z/contiki-main.c b/platform/eval-adf7xxxmb4z/contiki-main.c index 62a22d723..fca37a02b 100644 --- a/platform/eval-adf7xxxmb4z/contiki-main.c +++ b/platform/eval-adf7xxxmb4z/contiki-main.c @@ -41,15 +41,15 @@ #include "dev/serial-line.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/button-sensor.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "uart0.h" #include "contiki-uart.h" #include "watchdog.h" diff --git a/platform/exp5438/Makefile.exp5438 b/platform/exp5438/Makefile.exp5438 index aea4efa49..380012c36 100644 --- a/platform/exp5438/Makefile.exp5438 +++ b/platform/exp5438/Makefile.exp5438 @@ -1,6 +1,10 @@ # $Id: Makefile.z1,v 1.4 2010/11/07 08:40:24 enricmcalvo Exp $ # msp430flasher -n msp430x5437 -w "Firmware.txt" -v -z [VCC] +MODULES += core/net core/net/ip core/net/ipv6 core/net/ipv4 \ + core/net/mac core/net/rpl core/net/rime core/net/mac/contikimac \ + dev/cc2420 + ifdef IAR CFLAGS+=-e --vla -Ohz --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 --core=430X --data_model small --double=32 -D__MSP430F5438A__=1 #CFLAGS+=--no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --debug -D__MSP430F5438A__ -e --double=32 --dlib_config 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Evaluation\430\LIB\DLIB\dl430xsfn.h' --core=430X --data_model=small -Ol --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 diff --git a/platform/exp5438/cc2420-arch.c b/platform/exp5438/cc2420-arch.c index b1c586b16..d50878c78 100644 --- a/platform/exp5438/cc2420-arch.c +++ b/platform/exp5438/cc2420-arch.c @@ -33,7 +33,7 @@ #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" #include "isr_compat.h" diff --git a/platform/exp5438/contiki-exp5438-main.c b/platform/exp5438/contiki-exp5438-main.c index de5dab975..61ac1551a 100644 --- a/platform/exp5438/contiki-exp5438-main.c +++ b/platform/exp5438/contiki-exp5438-main.c @@ -34,7 +34,7 @@ #include #include "dev/button-sensor.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/flash.h" #include "dev/leds.h" #include "dev/serial-line.h" @@ -46,7 +46,7 @@ #include "lib/sensors.h" #include "net/mac/frame802154.h" #include "net/netstack.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/autostart.h" #include "sys/node-id.h" @@ -54,7 +54,7 @@ #include "duty-cycle-scroller.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ diff --git a/platform/exp5438/msp430.c b/platform/exp5438/msp430.c index 838b41c12..0fe1ecd36 100644 --- a/platform/exp5438/msp430.c +++ b/platform/exp5438/msp430.c @@ -32,7 +32,7 @@ #include "contiki.h" #include "dev/watchdog.h" #include "dev/leds.h" -#include "net/uip.h" +#include "net/ip/uip.h" static unsigned long dco_speed; diff --git a/platform/iris/contiki-iris-main.c b/platform/iris/contiki-iris-main.c index a5bdf4cc2..26a2c81bc 100644 --- a/platform/iris/contiki-iris-main.c +++ b/platform/iris/contiki-iris-main.c @@ -45,7 +45,7 @@ #include "contiki.h" #include "contiki-lib.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/leds.h" #include "dev/rs232.h" #include "dev/watchdog.h" diff --git a/platform/iris/init-net.c b/platform/iris/init-net.c index 7f9d1fd34..7ec9cd5f1 100644 --- a/platform/iris/init-net.c +++ b/platform/iris/init-net.c @@ -54,14 +54,14 @@ #include "sys/node-id.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ #if WITH_UIP -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(192,168,1,2, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = diff --git a/platform/mbxxx/Makefile.mbxxx b/platform/mbxxx/Makefile.mbxxx index 752b2576b..68905e295 100644 --- a/platform/mbxxx/Makefile.mbxxx +++ b/platform/mbxxx/Makefile.mbxxx @@ -20,3 +20,6 @@ SERIALDUMP = $(CONTIKI)/tools/stm32w/serialdump-linux ifeq ($(HOST_OS),Windows) SERIALDUMP = $(CONTIKI)/tools/stm32w/serialdump-windows endif + +MODULES+=core/net/ip core/net/ipv4 core/net core/net/ipv6 \ + core/net/rpl core/net/rime core/net/mac core/net/mac/contikimac diff --git a/platform/mbxxx/clock.c b/platform/mbxxx/clock.c index 2a01eb8b7..cc9a1406b 100644 --- a/platform/mbxxx/clock.c +++ b/platform/mbxxx/clock.c @@ -57,7 +57,7 @@ #include "dev/stm32w-radio.h" #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" // The value that will be load in the SysTick value register. #define RELOAD_VALUE 24000-1 // 1 ms with a 24 MHz clock diff --git a/platform/mbxxx/contiki-conf.h b/platform/mbxxx/contiki-conf.h index d6fc2b823..56fe8f1bf 100644 --- a/platform/mbxxx/contiki-conf.h +++ b/platform/mbxxx/contiki-conf.h @@ -87,7 +87,7 @@ //#define NETSTACK_CONF_MAC csma_driver //#define NETSTACK_CONF_RDC contikimac_driver #define NETSTACK_CONF_MAC nullmac_driver -#define NETSTACK_CONF_RDC sicslowmac_driver +#define NETSTACK_CONF_RDC nullrdc_driver #define NETSTACK_CONF_FRAMER framer_802154 #define NETSTACK_CONF_RADIO stm32w_radio_driver diff --git a/platform/mbxxx/contiki-main.c b/platform/mbxxx/contiki-main.c index 329c80f95..f93468955 100644 --- a/platform/mbxxx/contiki-main.c +++ b/platform/mbxxx/contiki-main.c @@ -68,13 +68,12 @@ #include "dev/stm32w-radio.h" #include "net/netstack.h" -#include "net/rime/rimeaddr.h" -#include "net/rime.h" -#include "net/rime/rime-udp.h" -#include "net/uip.h" +#include "net/rimeaddr.h" +#include "net/rime/rime.h" +#include "net/ip/uip.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ #define DEBUG 1 diff --git a/platform/micaz/Makefile.micaz b/platform/micaz/Makefile.micaz index 49499cf1a..cdfea9e74 100644 --- a/platform/micaz/Makefile.micaz +++ b/platform/micaz/Makefile.micaz @@ -45,3 +45,5 @@ ifneq ($(strip $(HAVE_PRGBOARD_FILE)), ) include $(PRGBOARD_FILE) endif +MODULES += core/net core/net/ip core/net/ipv6 core/net/ipv4 core/net/rime \ + core/net/mac core/net/rpl core/net/mac/cxmac dev/cc2420 diff --git a/platform/micaz/contiki-micaz-main.c b/platform/micaz/contiki-micaz-main.c index 4d09aca6f..488503df4 100644 --- a/platform/micaz/contiki-micaz-main.c +++ b/platform/micaz/contiki-micaz-main.c @@ -45,7 +45,7 @@ #include "contiki.h" #include "contiki-lib.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "dev/leds.h" #include "dev/rs232.h" #include "dev/watchdog.h" diff --git a/platform/micaz/dev/cc2420-arch.c b/platform/micaz/dev/cc2420-arch.c index 7b8ae9be5..9a55e015d 100644 --- a/platform/micaz/dev/cc2420-arch.c +++ b/platform/micaz/dev/cc2420-arch.c @@ -38,7 +38,7 @@ #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" void diff --git a/platform/micaz/init-net.c b/platform/micaz/init-net.c index 6e67c43ae..bb656c37c 100644 --- a/platform/micaz/init-net.c +++ b/platform/micaz/init-net.c @@ -43,7 +43,7 @@ #include #include "contiki.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/rs232.h" #include "dev/slip.h" #include "dev/leds.h" @@ -54,14 +54,14 @@ #include "sys/node-id.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ #if WITH_UIP -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(192,168,1,2, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = diff --git a/platform/minimal-net/Makefile.minimal-net b/platform/minimal-net/Makefile.minimal-net index 034551781..9a37adf52 100644 --- a/platform/minimal-net/Makefile.minimal-net +++ b/platform/minimal-net/Makefile.minimal-net @@ -28,3 +28,5 @@ endif ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/cpu/native include $(CONTIKI)/cpu/native/Makefile.native + +MODULES+=core/net/ip core/net/ipv4 core/net core/net/ipv6 core/net/rime diff --git a/platform/minimal-net/contiki-main.c b/platform/minimal-net/contiki-main.c index 511c43372..d8158605e 100644 --- a/platform/minimal-net/contiki-main.c +++ b/platform/minimal-net/contiki-main.c @@ -46,7 +46,7 @@ #include "dev/serial-line.h" -#include "net/uip.h" +#include "net/ip/uip.h" #ifdef __CYGWIN__ #include "net/wpcap-drv.h" #else /* __CYGWIN__ */ diff --git a/platform/native/Makefile.native b/platform/native/Makefile.native index 8d4329130..36fb375c8 100644 --- a/platform/native/Makefile.native +++ b/platform/native/Makefile.native @@ -46,3 +46,4 @@ CURSES_LIBS ?= -lncurses TARGET_LIBFILES += $(CURSES_LIBS) +MODULES+=core/net/ip core/net/ipv4 core/net core/net/ipv6 core/net/rime core/net/mac diff --git a/platform/native/contiki-main.c b/platform/native/contiki-main.c index 52c2680b3..8acf47eb3 100644 --- a/platform/native/contiki-main.c +++ b/platform/native/contiki-main.c @@ -48,17 +48,17 @@ #include "dev/serial-line.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/button-sensor.h" #include "dev/pir-sensor.h" #include "dev/vib-sensor.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ -#include "net/rime.h" +#include "net/rime/rime.h" #ifdef SELECT_CONF_MAX #define SELECT_MAX SELECT_CONF_MAX diff --git a/platform/sensinode/Makefile.customrules-sensinode b/platform/sensinode/Makefile.customrules-sensinode new file mode 100644 index 000000000..13ec8cf5e --- /dev/null +++ b/platform/sensinode/Makefile.customrules-sensinode @@ -0,0 +1 @@ +include $(CONTIKI)/cpu/cc2430/Makefile.customrules-cc2430 diff --git a/platform/sensinode/Makefile.sensinode b/platform/sensinode/Makefile.sensinode index d37dafdd8..3cb297544 100644 --- a/platform/sensinode/Makefile.sensinode +++ b/platform/sensinode/Makefile.sensinode @@ -87,3 +87,5 @@ CONTIKI_CPU=$(CONTIKI)/cpu/cc2430 include $(CONTIKI)/cpu/cc2430/Makefile.cc2430 contiki-$(TARGET).a:# $(addprefix $(OBJECTDIR)/,symbols.rel) + +MODULES += core/net/ipv6 core/net/ipv4 core/net/rime core/net core/net/mac core/net/rpl diff --git a/platform/sensinode/contiki-sensinode-main.c b/platform/sensinode/contiki-sensinode-main.c index a13e440d2..18b95620c 100644 --- a/platform/sensinode/contiki-sensinode-main.c +++ b/platform/sensinode/contiki-sensinode-main.c @@ -12,7 +12,7 @@ #include "dev/cc2430_rf.h" #include "dev/watchdog.h" #include "dev/lpm.h" -#include "net/rime.h" +#include "net/rime/rime.h" #include "net/netstack.h" #include "net/mac/frame802154.h" #include "debug.h" diff --git a/platform/sensinode/disco.c b/platform/sensinode/disco.c index ccfbf3f09..63d95c6b9 100644 --- a/platform/sensinode/disco.c +++ b/platform/sensinode/disco.c @@ -63,7 +63,7 @@ #include "disco.h" /*---------------------------------------------------------------------------*/ #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" /*---------------------------------------------------------------------------*/ #if BATMON_CONF_ENABLED void batmon_log(uint8_t trigger); diff --git a/platform/sensinode/uip-debug.c b/platform/sensinode/uip-debug.c index d8e04f6d5..ee7942664 100644 --- a/platform/sensinode/uip-debug.c +++ b/platform/sensinode/uip-debug.c @@ -37,7 +37,7 @@ * Joakim Eriksson */ -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "debug.h" /*---------------------------------------------------------------------------*/ void diff --git a/platform/sensinode/viztool.c b/platform/sensinode/viztool.c index a88b08790..e6b2fbed3 100644 --- a/platform/sensinode/viztool.c +++ b/platform/sensinode/viztool.c @@ -41,12 +41,12 @@ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" -#include "net/uip-ds6-route.h" +#include "net/ipv6/uip-ds6-route.h" #include #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) #define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len]) diff --git a/platform/sky/Makefile.sky b/platform/sky/Makefile.sky index 8c39a6c28..bcceba92f 100644 --- a/platform/sky/Makefile.sky +++ b/platform/sky/Makefile.sky @@ -10,3 +10,7 @@ endif include $(CONTIKI)/platform/sky/Makefile.common +MODULES += core/net/ipv6 core/net/ipv4 core/net/rime core/net/mac \ + core/net core/net/ip core/net/rpl \ + core/net/mac/contikimac core/net/mac/cxmac \ + dev/cc2420 dev/sht11 dev/ds2411 diff --git a/platform/sky/contiki-sky-main.c b/platform/sky/contiki-sky-main.c index ff1551a94..932183931 100644 --- a/platform/sky/contiki-sky-main.c +++ b/platform/sky/contiki-sky-main.c @@ -31,8 +31,8 @@ #include #include #include "contiki.h" -#include "dev/cc2420.h" -#include "dev/ds2411.h" +#include "cc2420.h" +#include "dev/ds2411/ds2411.h" #include "dev/leds.h" #include "dev/serial-line.h" #include "dev/slip.h" @@ -44,10 +44,10 @@ #include "net/mac/frame802154.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/node-id.h" #include "cfs-coffee-arch.h" @@ -77,10 +77,10 @@ extern int msp430_dco_required; #endif #if WITH_UIP -#include "net/uip.h" -#include "net/uip-fw.h" -#include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" +#include "net/ipv4/uip-fw-drv.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(192,168,1,2, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = diff --git a/platform/sky/dev/radio-sensor.c b/platform/sky/dev/radio-sensor.c index 54cbfc7f1..cf2b60ec4 100644 --- a/platform/sky/dev/radio-sensor.c +++ b/platform/sky/dev/radio-sensor.c @@ -31,7 +31,7 @@ */ #include "lib/sensors.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/radio-sensor.h" const struct sensors_sensor radio_sensor; diff --git a/platform/wismote/Makefile.wismote b/platform/wismote/Makefile.wismote index 0c076652d..ea6547371 100644 --- a/platform/wismote/Makefile.wismote +++ b/platform/wismote/Makefile.wismote @@ -58,3 +58,7 @@ contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o} %.upload-clean: %.hex msp430flasher -n msp430x5437 -w $< -v -z [VCC] + +MODULES += core/net core/net/ip core/net/ipv6 core/net/ipv4 core/net/mac \ + core/net/rime core/net/mac/contikimac core/net/rpl \ + dev/cc2520 dev/sht11 diff --git a/platform/wismote/contiki-wismote-main.c b/platform/wismote/contiki-wismote-main.c index 6e594db39..edbaf22ec 100644 --- a/platform/wismote/contiki-wismote-main.c +++ b/platform/wismote/contiki-wismote-main.c @@ -32,7 +32,7 @@ #include #include -#include "dev/cc2520.h" +#include "dev/cc2520/cc2520.h" //#include "dev/ds2411.h" #include "dev/leds.h" #include "dev/serial-line.h" @@ -45,10 +45,10 @@ #include "net/mac/frame802154.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/node-id.h" #include "sys/autostart.h" @@ -71,10 +71,10 @@ extern const struct uip_router UIP_ROUTER_MODULE; #endif #if WITH_UIP -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(192,168,1,2, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = diff --git a/platform/wismote/dev/radio-sensor.c b/platform/wismote/dev/radio-sensor.c index 4e0e48ce3..0288e26d2 100644 --- a/platform/wismote/dev/radio-sensor.c +++ b/platform/wismote/dev/radio-sensor.c @@ -31,7 +31,7 @@ */ #include "lib/sensors.h" -#include "dev/cc2520.h" +#include "dev/cc2520/cc2520.h" #include "dev/radio-sensor.h" const struct sensors_sensor radio_sensor; diff --git a/platform/z1/Makefile.z1 b/platform/z1/Makefile.z1 index 8205f96d2..03695479b 100644 --- a/platform/z1/Makefile.z1 +++ b/platform/z1/Makefile.z1 @@ -4,3 +4,7 @@ CONTIKI_TARGET_SOURCEFILES += contiki-z1-platform.c CLEAN += *.z1 include $(CONTIKI)/platform/z1/Makefile.common + +MODULES += core/net core/net/ip core/net/ipv6 core/net/ipv4 core/net/rpl \ + core/net/rime core/net/mac core/net/mac/contikimac \ + dev/cc2420 dev/sht11 diff --git a/platform/z1/contiki-z1-main.c b/platform/z1/contiki-z1-main.c index ecf970d77..031dd7e8d 100644 --- a/platform/z1/contiki-z1-main.c +++ b/platform/z1/contiki-z1-main.c @@ -33,7 +33,7 @@ #include #include "contiki.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/leds.h" #include "dev/serial-line.h" #include "dev/slip.h" @@ -48,10 +48,10 @@ #include "sys/clock.h" #if WITH_UIP6 -#include "net/uip-ds6.h" +#include "net/ipv6/uip-ds6.h" #endif /* WITH_UIP6 */ -#include "net/rime.h" +#include "net/rime/rime.h" #include "sys/node-id.h" #include "cfs-coffee-arch.h" @@ -60,7 +60,7 @@ #include "dev/battery-sensor.h" #include "dev/button-sensor.h" -#include "dev/sht11-sensor.h" +#include "dev/sht11/sht11-sensor.h" SENSORS(&button_sensor); @@ -75,10 +75,10 @@ static struct timer mgt_timer; #endif #if WITH_UIP -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #include "net/uip-fw-drv.h" -#include "net/uip-over-mesh.h" +#include "net/ipv4/uip-over-mesh.h" static struct uip_fw_netif slipif = {UIP_FW_NETIF(192,168,1,2, 255,255,255,255, slip_send)}; static struct uip_fw_netif meshif = diff --git a/platform/z1/dev/cc2420-arch.c b/platform/z1/dev/cc2420-arch.c index 35994c12d..bc345e29f 100644 --- a/platform/z1/dev/cc2420-arch.c +++ b/platform/z1/dev/cc2420-arch.c @@ -31,7 +31,7 @@ #include "contiki.h" #include "contiki-net.h" #include "dev/spi.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "isr_compat.h" #ifndef CONF_SFD_TIMESTAMPS diff --git a/platform/z1/dev/radio-sensor.c b/platform/z1/dev/radio-sensor.c index 54cbfc7f1..cf2b60ec4 100644 --- a/platform/z1/dev/radio-sensor.c +++ b/platform/z1/dev/radio-sensor.c @@ -31,7 +31,7 @@ */ #include "lib/sensors.h" -#include "dev/cc2420.h" +#include "cc2420.h" #include "dev/radio-sensor.h" const struct sensors_sensor radio_sensor; diff --git a/regression-tests/12-rpl/code/receiver-node.c b/regression-tests/12-rpl/code/receiver-node.c index fbbc14983..25e1e6758 100644 --- a/regression-tests/12-rpl/code/receiver-node.c +++ b/regression-tests/12-rpl/code/receiver-node.c @@ -31,9 +31,9 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-debug.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-debug.h" #include "simple-udp.h" diff --git a/regression-tests/12-rpl/code/root-node.c b/regression-tests/12-rpl/code/root-node.c index e547e7479..0609e1bd8 100644 --- a/regression-tests/12-rpl/code/root-node.c +++ b/regression-tests/12-rpl/code/root-node.c @@ -32,9 +32,9 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-debug.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-debug.h" #include "simple-udp.h" diff --git a/regression-tests/12-rpl/code/sender-node.c b/regression-tests/12-rpl/code/sender-node.c index 584c0dd85..08d81b62d 100644 --- a/regression-tests/12-rpl/code/sender-node.c +++ b/regression-tests/12-rpl/code/sender-node.c @@ -32,9 +32,9 @@ #include "lib/random.h" #include "sys/ctimer.h" #include "sys/etimer.h" -#include "net/uip.h" -#include "net/uip-ds6.h" -#include "net/uip-debug.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" +#include "net/ip/uip-debug.h" #include "simple-udp.h" diff --git a/regression-tests/17-slip-radio/code/wait-dag.c b/regression-tests/17-slip-radio/code/wait-dag.c index f1664b389..e792665d0 100644 --- a/regression-tests/17-slip-radio/code/wait-dag.c +++ b/regression-tests/17-slip-radio/code/wait-dag.c @@ -34,11 +34,11 @@ #include "contiki-lib.h" #include "contiki-net.h" #include "net/rpl/rpl.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include #define DEBUG DEBUG_FULL -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #define INTERVAL 5 * CLOCK_SECOND diff --git a/tools/sky/uip6-bridge/dev/slip.c b/tools/sky/uip6-bridge/dev/slip.c index 9b915ac5f..8c63da078 100644 --- a/tools/sky/uip6-bridge/dev/slip.c +++ b/tools/sky/uip6-bridge/dev/slip.c @@ -34,11 +34,11 @@ #include #include -#include "dev/ds2411.h" +#include "dev/ds2411/ds2411.h" #include "contiki.h" -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) #include "dev/slip.h" diff --git a/tools/sky/uip6-bridge/fakeuip.c b/tools/sky/uip6-bridge/fakeuip.c index af4c8ad3a..45f22ca11 100644 --- a/tools/sky/uip6-bridge/fakeuip.c +++ b/tools/sky/uip6-bridge/fakeuip.c @@ -4,8 +4,8 @@ * to get a few things */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/tools/sky/uip6-bridge/sicslow_ethernet.c b/tools/sky/uip6-bridge/sicslow_ethernet.c index 458468a2d..7726e41f5 100644 --- a/tools/sky/uip6-bridge/sicslow_ethernet.c +++ b/tools/sky/uip6-bridge/sicslow_ethernet.c @@ -145,8 +145,8 @@ #include "uip.h" #include "uip_arp.h" /* For ethernet header structure */ -#include "net/rime.h" -#include "net/sicslowpan.h" +#include "net/rime/rime.h" +#include "net/ipv6/sicslowpan.h" #include "sicslow_ethernet.h" #include @@ -372,8 +372,8 @@ int8_t mac_translateIPLinkLayer(lltype_t target) } -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" typedef struct { uint8_t type; diff --git a/tools/sky/uip6-bridge/uip6-bridge-tap.c b/tools/sky/uip6-bridge/uip6-bridge-tap.c index 375c5e045..e0e413ffb 100644 --- a/tools/sky/uip6-bridge/uip6-bridge-tap.c +++ b/tools/sky/uip6-bridge/uip6-bridge-tap.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/slip.h" #include "dev/leds.h" #include "sicslow_ethernet.h" diff --git a/tools/stm32w/uip6_bridge/dev/slip.c b/tools/stm32w/uip6_bridge/dev/slip.c index 5dc043d96..56fe77526 100644 --- a/tools/stm32w/uip6_bridge/dev/slip.c +++ b/tools/stm32w/uip6_bridge/dev/slip.c @@ -36,11 +36,11 @@ #include #include "contiki.h" -#include "net/rime/rimeaddr.h" +#include "net/rimeaddr.h" #include "sys/ctimer.h" -#include "net/uip.h" -#include "net/uip-fw.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip-fw.h" #define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) #include "dev/slip.h" diff --git a/tools/stm32w/uip6_bridge/fakeuip.c b/tools/stm32w/uip6_bridge/fakeuip.c index 9702cce57..e356a6469 100644 --- a/tools/stm32w/uip6_bridge/fakeuip.c +++ b/tools/stm32w/uip6_bridge/fakeuip.c @@ -4,8 +4,8 @@ * to get a few things */ -#include "net/uip.h" -#include "net/uip-ds6.h" +#include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/tools/stm32w/uip6_bridge/sicslow_ethernet.c b/tools/stm32w/uip6_bridge/sicslow_ethernet.c index e49081bd6..917e5f754 100644 --- a/tools/stm32w/uip6_bridge/sicslow_ethernet.c +++ b/tools/stm32w/uip6_bridge/sicslow_ethernet.c @@ -148,10 +148,10 @@ * Modified! 0xff and 0xfe are sobstituted by 0x02 and 0x00. */ -#include "net/uip.h" -#include "net/uip_arp.h" /* For ethernet header structure */ -#include "net/rime.h" -#include "net/sicslowpan.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip_arp.h" /* For ethernet header structure */ +#include "net/rime/rime.h" +#include "net/ipv6/sicslowpan.h" #include "sicslow_ethernet.h" #include "dev/stm32w-radio.h" #include "net/mac/frame802154.h" @@ -399,8 +399,8 @@ int8_t mac_translateIPLinkLayer(lltype_t target) } -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" typedef struct { uint8_t type; diff --git a/tools/stm32w/uip6_bridge/uip6-bridge-tap.c b/tools/stm32w/uip6_bridge/uip6-bridge-tap.c index e5d2cb695..6fea42db2 100644 --- a/tools/stm32w/uip6_bridge/uip6-bridge-tap.c +++ b/tools/stm32w/uip6_bridge/uip6-bridge-tap.c @@ -38,7 +38,7 @@ */ #include "contiki.h" -#include "net/uip.h" +#include "net/ip/uip.h" #include "dev/slip.h" #include "dev/leds.h" #include "sicslow_ethernet.h" diff --git a/tools/stm32w/wpcapslip6/fakeuip.c b/tools/stm32w/wpcapslip6/fakeuip.c index 401b60770..73d103cdf 100644 --- a/tools/stm32w/wpcapslip6/fakeuip.c +++ b/tools/stm32w/wpcapslip6/fakeuip.c @@ -5,7 +5,7 @@ #define UIP_CONF_IPV6 1 -#include "net/uip.h" +#include "net/ip/uip.h" #include #include diff --git a/tools/stm32w/wpcapslip6/ip-process.c b/tools/stm32w/wpcapslip6/ip-process.c index 50b2cd84a..ccd73d0e7 100644 --- a/tools/stm32w/wpcapslip6/ip-process.c +++ b/tools/stm32w/wpcapslip6/ip-process.c @@ -6,7 +6,7 @@ #define DEBUG DEBUG_NONE -#include "net/uip-debug.h" +#include "net/ip/uip-debug.h" #include "ip-process.h" @@ -46,8 +46,8 @@ int8_t mac_translateIPLinkLayer() return 0; } -#include "net/uip-icmp6.h" -#include "net/uip-nd6.h" +#include "net/ipv6/uip-icmp6.h" +#include "net/ipv6/uip-nd6.h" typedef struct { uint8_t type; diff --git a/tools/stm32w/wpcapslip6/wpcap6.c b/tools/stm32w/wpcapslip6/wpcap6.c index 163a9cfbe..29310801a 100644 --- a/tools/stm32w/wpcapslip6/wpcap6.c +++ b/tools/stm32w/wpcapslip6/wpcap6.c @@ -119,8 +119,8 @@ static int (* pcap_sendpacket)(struct pcap *, unsigned char *, int); #define BUFSIZE 1514 -#include "net/uip.h" -#include "net/uip_arp.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip_arp.h" struct uip_eth_addr uip_lladdr = {{0,0,0,0,0,0}}; diff --git a/tools/stm32w/wpcapslip6/wpcapslip6.c b/tools/stm32w/wpcapslip6/wpcapslip6.c index 6b4c0cb5c..08d0c4843 100755 --- a/tools/stm32w/wpcapslip6/wpcapslip6.c +++ b/tools/stm32w/wpcapslip6/wpcapslip6.c @@ -69,7 +69,7 @@ #include -#include "net/uip_arp.h" +#include "net/ipv4/uip_arp.h" #include "ip-process.h" diff --git a/tools/wpcapslip/wpcap.c b/tools/wpcapslip/wpcap.c index ba641e4d7..5584557a9 100644 --- a/tools/wpcapslip/wpcap.c +++ b/tools/wpcapslip/wpcap.c @@ -114,8 +114,8 @@ static int (* pcap_sendpacket)(struct pcap *, unsigned char *, int); #define ARP_HWTYPE_ETH 1 -#include "net/uip.h" -#include "net/uip_arp.h" +#include "net/ip/uip.h" +#include "net/ipv4/uip_arp.h" struct ethip_hdr { struct uip_eth_hdr ethhdr;