diff --git a/apps/deluge/deluge.c b/apps/deluge/deluge.c index d20875ecb..686d4a514 100644 --- a/apps/deluge/deluge.c +++ b/apps/deluge/deluge.c @@ -46,7 +46,7 @@ #include "loader/elfloader.h" #include "lib/crc16.h" #include "lib/random.h" -#include "node-id.h" +#include "sys/node-id.h" #include "deluge.h" #if NETSIM diff --git a/apps/rest-common/static-routing.c b/apps/rest-common/static-routing.c index 1be139f89..1d297b2db 100644 --- a/apps/rest-common/static-routing.c +++ b/apps/rest-common/static-routing.c @@ -24,7 +24,7 @@ #if !UIP_CONF_IPV6_RPL #include "contiki-net.h" -#include "node-id.h" +#include "sys/node-id.h" void set_global_address(void) { diff --git a/apps/shell/shell-sky.c b/apps/shell/shell-sky.c index 17883fc27..5230d9910 100644 --- a/apps/shell/shell-sky.c +++ b/apps/shell/shell-sky.c @@ -52,7 +52,7 @@ #include "dev/sht11-sensor.h" #include "net/rime/timesynch.h" -#include "node-id.h" +#include "sys/node-id.h" #include #include diff --git a/core/net/mac/ctdma_mac.c b/core/net/mac/ctdma_mac.c index 80c5d4de6..72960086c 100644 --- a/core/net/mac/ctdma_mac.c +++ b/core/net/mac/ctdma_mac.c @@ -39,7 +39,7 @@ #include "lib/memb.h" #include "lib/list.h" #include "dev/leds.h" -#include "node-id.h" +#include "sys/node-id.h" #include #include diff --git a/core/net/mac/tdma_mac.c b/core/net/mac/tdma_mac.c index ad1ea370c..34ac29ba4 100644 --- a/core/net/mac/tdma_mac.c +++ b/core/net/mac/tdma_mac.c @@ -39,7 +39,7 @@ #include "lib/memb.h" #include "lib/list.h" #include "dev/leds.h" -#include "node-id.h" +#include "sys/node-id.h" #include #include diff --git a/platform/redbee-econotag/node-id.h b/core/sys/node-id.h similarity index 100% rename from platform/redbee-econotag/node-id.h rename to core/sys/node-id.h diff --git a/examples/er-rest-example/static-routing.c b/examples/er-rest-example/static-routing.c index 628594892..00b6c68be 100644 --- a/examples/er-rest-example/static-routing.c +++ b/examples/er-rest-example/static-routing.c @@ -21,7 +21,7 @@ #endif #include "contiki-net.h" -#include "node-id.h" +#include "sys/node-id.h" int node_rank; diff --git a/examples/ipv6/simple-udp-rpl/unicast-sender.c b/examples/ipv6/simple-udp-rpl/unicast-sender.c index c984b12d5..7726c6ea9 100644 --- a/examples/ipv6/simple-udp-rpl/unicast-sender.c +++ b/examples/ipv6/simple-udp-rpl/unicast-sender.c @@ -38,7 +38,7 @@ #include "net/uip-ds6.h" #include "net/uip-debug.h" -#include "node-id.h" +#include "sys/node-id.h" #include "simple-udp.h" #include "servreg-hack.h" diff --git a/examples/rime/example-rucb.c b/examples/rime/example-rucb.c index 7134e3cdd..f93c892b6 100644 --- a/examples/rime/example-rucb.c +++ b/examples/rime/example-rucb.c @@ -104,7 +104,7 @@ const static struct rucb_callbacks rucb_call = {write_chunk, read_chunk, NULL}; static struct rucb_conn rucb; /*---------------------------------------------------------------------------*/ -#include "node-id.h" +#include "sys/node-id.h" PROCESS_THREAD(example_rucb_process, ev, data) { diff --git a/examples/rime/example-rudolph2.c b/examples/rime/example-rudolph2.c index 425e69ddf..e26f7e9ea 100644 --- a/examples/rime/example-rudolph2.c +++ b/examples/rime/example-rudolph2.c @@ -140,7 +140,7 @@ const static struct rudolph2_callbacks rudolph2_call = {write_chunk, read_chunk}; static struct rudolph2_conn rudolph2; /*---------------------------------------------------------------------------*/ -#include "node-id.h" +#include "sys/node-id.h" PROCESS_THREAD(example_rudolph2_process, ev, data) { diff --git a/examples/sky/test-deluge.c b/examples/sky/test-deluge.c index 7d95b103b..3bb9bb5e8 100644 --- a/examples/sky/test-deluge.c +++ b/examples/sky/test-deluge.c @@ -40,7 +40,7 @@ #include "contiki.h" #include "cfs/cfs.h" #include "deluge.h" -#include "node-id.h" +#include "sys/node-id.h" #include #include diff --git a/examples/udp-stream/udp-stream.c b/examples/udp-stream/udp-stream.c index 986fe5e6e..c10e8d6a5 100644 --- a/examples/udp-stream/udp-stream.c +++ b/examples/udp-stream/udp-stream.c @@ -41,7 +41,7 @@ #include "contiki-net.h" #include "uip.h" #include "net/rpl/rpl.h" -#include "node-id.h" +#include "sys/node-id.h" #include "servreg-hack.h" #include "cfs/cfs.h" diff --git a/platform/avr-raven/node-id.h b/platform/avr-raven/node-id.h deleted file mode 100644 index 6c3a2d9c7..000000000 --- a/platform/avr-raven/node-id.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef NODE_ID_H -#define NODE_ID_H - -#include "contiki-conf.h" - -void node_id_restore(void); -void node_id_burn(uint16_t node_id); - -extern uint16_t node_id; - -#endif /* !NODE_ID_H */ diff --git a/platform/cooja/contiki-cooja-main.c b/platform/cooja/contiki-cooja-main.c index d5a2db42e..4bf54c95d 100644 --- a/platform/cooja/contiki-cooja-main.c +++ b/platform/cooja/contiki-cooja-main.c @@ -58,7 +58,7 @@ #include "dev/pir-sensor.h" #include "dev/vib-sensor.h" -#include "node-id.h" +#include "sys/node-id.h" /* JNI-defined functions, depends on the environment variable CLASSNAME */ diff --git a/platform/cooja/node-id.h b/platform/cooja/sys/node-id.h similarity index 100% rename from platform/cooja/node-id.h rename to platform/cooja/sys/node-id.h diff --git a/platform/esb/apps/burn-nodeid.c b/platform/esb/apps/burn-nodeid.c index 99afb0a96..a157baebd 100644 --- a/platform/esb/apps/burn-nodeid.c +++ b/platform/esb/apps/burn-nodeid.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki.h" #include "dev/esb-sensors.h" #include "dev/rs232.h" diff --git a/platform/esb/contiki-esb.h b/platform/esb/contiki-esb.h index 0101318ef..7f385867c 100644 --- a/platform/esb/contiki-esb.h +++ b/platform/esb/contiki-esb.h @@ -46,7 +46,7 @@ #include "dev/serial-line.h" #include "dev/slip.h" -#include "node-id.h" +#include "sys/node-id.h" #include "dev/vib-sensor.h" #include "dev/pir-sensor.h" @@ -63,7 +63,7 @@ #include "dev/leds.h" -#include "node-id.h" +#include "sys/node-id.h" void msp430_cpu_init(void); void init_lowlevel(void); diff --git a/platform/esb/node-id.c b/platform/esb/node-id.c index 4771bc42f..14dc735d5 100644 --- a/platform/esb/node-id.c +++ b/platform/esb/node-id.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki-conf.h" #include "dev/eeprom.h" diff --git a/platform/esb/node-id.h b/platform/esb/node-id.h deleted file mode 100644 index 2ee668881..000000000 --- a/platform/esb/node-id.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef __NODE_ID_H__ -#define __NODE_ID_H__ - -void node_id_restore(void); -void node_id_burn(unsigned short node_id); - -extern unsigned short node_id; - -#endif /* __NODE_ID_H__ */ diff --git a/platform/exp5438/contiki-exp5438-main.c b/platform/exp5438/contiki-exp5438-main.c index 0e8bda1d6..f4369f0b8 100644 --- a/platform/exp5438/contiki-exp5438-main.c +++ b/platform/exp5438/contiki-exp5438-main.c @@ -50,7 +50,7 @@ #include "sys/autostart.h" #include "sys/profile.h" -#include "node-id.h" +#include "sys/node-id.h" #include "lcd.h" #include "duty-cycle-scroller.h" diff --git a/platform/exp5438/node-id.c b/platform/exp5438/node-id.c index 65fc1aac3..7f88f82f2 100644 --- a/platform/exp5438/node-id.c +++ b/platform/exp5438/node-id.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki-conf.h" #include "dev/xmem.h" #include diff --git a/platform/exp5438/node-id.h b/platform/exp5438/node-id.h deleted file mode 100644 index b31fbab6b..000000000 --- a/platform/exp5438/node-id.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2006, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef __NODE_ID_H__ -#define __NODE_ID_H__ - -void node_id_restore(void); -void node_id_burn(unsigned short node_id); - -extern unsigned short node_id; -extern unsigned char node_mac[8]; - -#endif /* __NODE_ID_H__ */ diff --git a/platform/iris/contiki-iris-main.c b/platform/iris/contiki-iris-main.c index f72971de4..a5bdf4cc2 100644 --- a/platform/iris/contiki-iris-main.c +++ b/platform/iris/contiki-iris-main.c @@ -53,7 +53,7 @@ #include "init-net.h" #include "dev/ds2401.h" -#include "node-id.h" +#include "sys/node-id.h" /*---------------------------------------------------------------------------*/ void diff --git a/platform/iris/init-net.c b/platform/iris/init-net.c index f5e3f6556..7f9d1fd34 100644 --- a/platform/iris/init-net.c +++ b/platform/iris/init-net.c @@ -51,7 +51,7 @@ #include "net/mac/frame802154.h" #include "dev/ds2401.h" -#include "node-id.h" +#include "sys/node-id.h" #if WITH_UIP6 #include "net/uip-ds6.h" diff --git a/platform/iris/node-id.c b/platform/iris/node-id.c index dffa514bd..84118cb40 100644 --- a/platform/iris/node-id.c +++ b/platform/iris/node-id.c @@ -31,7 +31,7 @@ * @(#)$$ */ -#include "node-id.h" +#include "sys/node-id.h" uint16_t node_id = 0; diff --git a/platform/iris/node-id.h b/platform/iris/node-id.h deleted file mode 100644 index 6c3a2d9c7..000000000 --- a/platform/iris/node-id.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef NODE_ID_H -#define NODE_ID_H - -#include "contiki-conf.h" - -void node_id_restore(void); -void node_id_burn(uint16_t node_id); - -extern uint16_t node_id; - -#endif /* !NODE_ID_H */ diff --git a/platform/micaz/contiki-micaz-main.c b/platform/micaz/contiki-micaz-main.c index a2fdba71d..4d09aca6f 100644 --- a/platform/micaz/contiki-micaz-main.c +++ b/platform/micaz/contiki-micaz-main.c @@ -53,7 +53,7 @@ #include "init-net.h" #include "dev/ds2401.h" -#include "node-id.h" +#include "sys/node-id.h" /*---------------------------------------------------------------------------*/ void diff --git a/platform/micaz/init-net.c b/platform/micaz/init-net.c index 695b4e3ca..4bfebd1c4 100644 --- a/platform/micaz/init-net.c +++ b/platform/micaz/init-net.c @@ -51,7 +51,7 @@ #include "net/mac/frame802154.h" #include "dev/ds2401.h" -#include "node-id.h" +#include "sys/node-id.h" #if WITH_UIP6 #include "net/uip-ds6.h" diff --git a/platform/micaz/node-id.c b/platform/micaz/node-id.c index dffa514bd..84118cb40 100644 --- a/platform/micaz/node-id.c +++ b/platform/micaz/node-id.c @@ -31,7 +31,7 @@ * @(#)$$ */ -#include "node-id.h" +#include "sys/node-id.h" uint16_t node_id = 0; diff --git a/platform/micaz/node-id.h b/platform/micaz/node-id.h deleted file mode 100644 index 6c3a2d9c7..000000000 --- a/platform/micaz/node-id.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef NODE_ID_H -#define NODE_ID_H - -#include "contiki-conf.h" - -void node_id_restore(void); -void node_id_burn(uint16_t node_id); - -extern uint16_t node_id; - -#endif /* !NODE_ID_H */ diff --git a/platform/msb430/apps/test-abc.c b/platform/msb430/apps/test-abc.c index 30f3c959c..5f2f7180a 100644 --- a/platform/msb430/apps/test-abc.c +++ b/platform/msb430/apps/test-abc.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "net/rime.h" -#include "node-id.h" +#include "sys/node-id.h" #include diff --git a/platform/msb430/contiki-msb430.h b/platform/msb430/contiki-msb430.h index 33fcb8bd8..80afabd21 100644 --- a/platform/msb430/contiki-msb430.h +++ b/platform/msb430/contiki-msb430.h @@ -49,7 +49,7 @@ #include "lib/sensors.h" #include "net/rime.h" -#include "node-id.h" +#include "sys/node-id.h" #if WITH_SD #include "dev/sd.h" diff --git a/platform/msb430/init-net-uip.c b/platform/msb430/init-net-uip.c index 672b13d7d..66ee618cd 100644 --- a/platform/msb430/init-net-uip.c +++ b/platform/msb430/init-net-uip.c @@ -39,7 +39,7 @@ #include "contiki.h" #include "contiki-net.h" -#include "node-id.h" +#include "sys/node-id.h" #include "dev/slip.h" #include "dev/cc1020-uip.h" #include "contiki-msb430.h" diff --git a/platform/msb430/node-id.c b/platform/msb430/node-id.c index f45ea528b..62691813e 100644 --- a/platform/msb430/node-id.c +++ b/platform/msb430/node-id.c @@ -30,7 +30,7 @@ * */ -#include "node-id.h" +#include "sys/node-id.h" #include "dev/infomem.h" uint16_t node_id = 0; diff --git a/platform/msb430/node-id.h b/platform/msb430/node-id.h deleted file mode 100644 index 6c3a2d9c7..000000000 --- a/platform/msb430/node-id.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2005, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef NODE_ID_H -#define NODE_ID_H - -#include "contiki-conf.h" - -void node_id_restore(void); -void node_id_burn(uint16_t node_id); - -extern uint16_t node_id; - -#endif /* !NODE_ID_H */ diff --git a/platform/sky/apps/burn-nodeid.c b/platform/sky/apps/burn-nodeid.c index 5da18edf8..128ba2ba9 100644 --- a/platform/sky/apps/burn-nodeid.c +++ b/platform/sky/apps/burn-nodeid.c @@ -39,7 +39,7 @@ #include "dev/leds.h" #include "dev/watchdog.h" -#include "node-id.h" +#include "sys/node-id.h" #include "contiki.h" #include "sys/etimer.h" diff --git a/platform/sky/contiki-sky-main.c b/platform/sky/contiki-sky-main.c index b6cc3ee4d..ad042b588 100644 --- a/platform/sky/contiki-sky-main.c +++ b/platform/sky/contiki-sky-main.c @@ -49,7 +49,7 @@ #include "net/rime.h" -#include "node-id.h" +#include "sys/node-id.h" #include "cfs-coffee-arch.h" #include "cfs/cfs-coffee.h" #include "sys/autostart.h" diff --git a/platform/sky/node-id.c b/platform/sky/node-id.c index b57884bb3..dcdabfa84 100644 --- a/platform/sky/node-id.c +++ b/platform/sky/node-id.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki-conf.h" #include "dev/xmem.h" diff --git a/platform/sky/node-id.h b/platform/sky/node-id.h deleted file mode 100644 index f0435228a..000000000 --- a/platform/sky/node-id.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2006, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef __NODE_ID_H__ -#define __NODE_ID_H__ - -void node_id_restore(void); -void node_id_burn(unsigned short node_id); - -extern unsigned short node_id; - -#endif /* __NODE_ID_H__ */ diff --git a/platform/wismote/contiki-wismote-main.c b/platform/wismote/contiki-wismote-main.c index 828a74ff6..2bb6dbef3 100644 --- a/platform/wismote/contiki-wismote-main.c +++ b/platform/wismote/contiki-wismote-main.c @@ -50,7 +50,7 @@ #include "net/rime.h" -#include "node-id.h" +#include "sys/node-id.h" #include "sys/autostart.h" #include "sys/profile.h" diff --git a/platform/wismote/node-id.c b/platform/wismote/node-id.c index a0614574d..994587c45 100644 --- a/platform/wismote/node-id.c +++ b/platform/wismote/node-id.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki-conf.h" #include "dev/xmem.h" diff --git a/platform/wismote/node-id.h b/platform/wismote/node-id.h deleted file mode 100644 index f0435228a..000000000 --- a/platform/wismote/node-id.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2006, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef __NODE_ID_H__ -#define __NODE_ID_H__ - -void node_id_restore(void); -void node_id_burn(unsigned short node_id); - -extern unsigned short node_id; - -#endif /* __NODE_ID_H__ */ diff --git a/platform/z1/apps/burn-nodeid.c b/platform/z1/apps/burn-nodeid.c index b12b6e274..6f5469f1a 100644 --- a/platform/z1/apps/burn-nodeid.c +++ b/platform/z1/apps/burn-nodeid.c @@ -39,7 +39,7 @@ #include "dev/leds.h" #include "dev/watchdog.h" -#include "node-id.h" +#include "sys/node-id.h" #include "contiki.h" #include "sys/etimer.h" diff --git a/platform/z1/contiki-z1-main.c b/platform/z1/contiki-z1-main.c index d4ee19c36..5e9660216 100644 --- a/platform/z1/contiki-z1-main.c +++ b/platform/z1/contiki-z1-main.c @@ -53,7 +53,7 @@ #include "net/rime.h" -#include "node-id.h" +#include "sys/node-id.h" #include "cfs-coffee-arch.h" #include "cfs/cfs-coffee.h" #include "sys/autostart.h" @@ -66,6 +66,7 @@ SENSORS(&button_sensor); +extern unsigned char node_mac[8]; #if DCOSYNCH_CONF_ENABLED static struct timer mgt_timer; diff --git a/platform/z1/node-id.c b/platform/z1/node-id.c index 344a1b8b6..fb0c72582 100644 --- a/platform/z1/node-id.c +++ b/platform/z1/node-id.c @@ -37,7 +37,7 @@ * Adam Dunkels */ -#include "node-id.h" +#include "sys/node-id.h" #include "contiki-conf.h" #include "dev/xmem.h" #include diff --git a/platform/z1/node-id.h b/platform/z1/node-id.h deleted file mode 100644 index b31fbab6b..000000000 --- a/platform/z1/node-id.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2006, 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. - * - * Author: Adam Dunkels - * - */ - -#ifndef __NODE_ID_H__ -#define __NODE_ID_H__ - -void node_id_restore(void); -void node_id_burn(unsigned short node_id); - -extern unsigned short node_id; -extern unsigned char node_mac[8]; - -#endif /* __NODE_ID_H__ */