diff --git a/Makefile.dep b/Makefile.dep index b3f0f1ca11e3a7e648598db6b1091d7c6b797641..601a08619d5c2ebb9ab33989ab06adfb4c5b6e67 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -39,4 +39,7 @@ ifneq (,$(findstring sixlowpan,$(USEMODULE))) ifeq (,$(findstring ieee802154,$(USEMODULE))) USEMODULE += ieee802154 endif + ifeq (,$(findstring net_help,$(USEMODULE))) + USEMODULE += net_help + endif endif diff --git a/sys/net/destiny/Makefile b/sys/net/destiny/Makefile index 7dce69248eb8e2eab2366c49d09161d715d27712..7827885383ef899c0241b6d84e27a3dbc4d053a8 100644 --- a/sys/net/destiny/Makefile +++ b/sys/net/destiny/Makefile @@ -1,4 +1,4 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net +INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net/destiny -I$(RIOTBASE)/sys/net/sixlowpan/include -I$(RIOTBASE)/sys/net/net_help/ include $(RIOTBASE)/Makefile.base diff --git a/sys/net/destiny/socket.h b/sys/net/destiny/socket.h index 5fb61ab5411c06121d8117828dd07391c570a572..21a8595da4597d2c9660a68005e0e5c8d278e542 100644 --- a/sys/net/destiny/socket.h +++ b/sys/net/destiny/socket.h @@ -23,7 +23,7 @@ #include "tcp.h" #include "udp.h" #include "in.h" -#include "../sixlowpan/sixlowip.h" +#include "ipv6.h" /* * POSIX compatibility diff --git a/sys/net/destiny/tcp.c b/sys/net/destiny/tcp.c index 4145e4f1cba4ba2a578311af9e5175f4447cea15..ca69f8e7bacc98f03f84c45ff94ec027e1df2f1c 100644 --- a/sys/net/destiny/tcp.c +++ b/sys/net/destiny/tcp.c @@ -30,7 +30,7 @@ #include "socket.h" #include "../net_help/net_help.h" #include "../net_help/msg_help.h" -#include "../sixlowpan/sixlowpan.h" +#include "sixlowpan.h" void printTCPHeader(tcp_hdr_t *tcp_header) { diff --git a/sys/net/destiny/tcp.h b/sys/net/destiny/tcp.h index 6b58a29f72283fd98ca8ee684c6fecde1b87253a..3042ba692d573c75b56783db2b91cc94bacfd41d 100644 --- a/sys/net/destiny/tcp.h +++ b/sys/net/destiny/tcp.h @@ -78,7 +78,7 @@ enum tcp_codes { #define TCP_STACK_SIZE 1024 -#include "../sixlowpan/sixlowip.h" +#include "ipv6.h" typedef struct __attribute__((packed)) tcp_mms_o_t { uint8_t kind; diff --git a/sys/net/destiny/tcp_hc.c b/sys/net/destiny/tcp_hc.c index 707b7af54948a53bf17ee6641db96dc6672eb54a..61086c9e5149dbe859a38a38d706caf423419a34 100644 --- a/sys/net/destiny/tcp_hc.c +++ b/sys/net/destiny/tcp_hc.c @@ -23,7 +23,7 @@ #include "tcp_hc.h" #include "socket.h" #include "tcp.h" -#include "../sixlowpan/sixlowip.h" +#include "ipv6.h" #include "../net_help/net_help.h" #ifdef TCP_HC diff --git a/sys/net/destiny/tcp_hc.h b/sys/net/destiny/tcp_hc.h index 9482d3a45b20dc5bc6098ee76c1fe9cca377b1bd..f6b1731baaf47b13faa8339e69235f48008f7569 100644 --- a/sys/net/destiny/tcp_hc.h +++ b/sys/net/destiny/tcp_hc.h @@ -9,7 +9,7 @@ #define TCP_HC_H_ #include "tcp.h" -#include "../sixlowpan/sixlowip.h" +#include "sixlowpan.h" #include "socket.h" #ifdef TCP_HC diff --git a/sys/net/destiny/tcp_timer.c b/sys/net/destiny/tcp_timer.c index c3861c8c2bd0308a06a516eaf01f985cc7dc224b..098a9f09a85f91b8fc0ce65e44f881a04b42f87f 100644 --- a/sys/net/destiny/tcp_timer.c +++ b/sys/net/destiny/tcp_timer.c @@ -26,8 +26,8 @@ #include "thread.h" #include "destiny.h" #include "socket.h" -#include "net_help/msg_help.h" -#include "../sixlowpan/sixlowpan.h" +#include "../net_help/msg_help.h" +#include "sixlowpan.h" void handle_synchro_timeout(socket_internal_t *current_socket) { diff --git a/sys/net/destiny/udp.c b/sys/net/destiny/udp.c index f1c2618fddcee1b331bea286591db7b31f2f718f..6ba5f868a2642960d7d70065153330751db9bdcd 100644 --- a/sys/net/destiny/udp.c +++ b/sys/net/destiny/udp.c @@ -22,8 +22,8 @@ #include "udp.h" #include "msg.h" -#include "../sixlowpan/sixlowip.h" -#include "../sixlowpan/sixlowpan.h" +#include "ipv6.h" +#include "sixlowpan.h" #include "socket.h" #include "in.h" #include "../net_help/net_help.h" diff --git a/sys/net/destiny/udp.h b/sys/net/destiny/udp.h index 23efcade941d4a896f54a43aa5a5288999a8ff98..8767c0d6676c4f7078a824d16565fa5b495210a6 100644 --- a/sys/net/destiny/udp.h +++ b/sys/net/destiny/udp.h @@ -29,7 +29,7 @@ #define UDP_STACK_SIZE 512 -#include "../sixlowpan/sixlowip.h" +#include "ipv6.h" typedef struct __attribute__((packed)) udp_h_t { uint16_t src_port; diff --git a/sys/net/net_help/Makefile b/sys/net/net_help/Makefile index 93dfabd905ea4f1f6f6ea2dba9cc9ae5cc5ea84f..633d89730f42f357e443662a63641c0a4096996b 100644 --- a/sys/net/net_help/Makefile +++ b/sys/net/net_help/Makefile @@ -1,4 +1,4 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include +INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/sys/net/sixlowpan/include include $(RIOTBASE)/Makefile.base diff --git a/sys/net/rpl/etx_beaconing.c b/sys/net/rpl/etx_beaconing.c index b2f90f17ba82136d25469ecc85d115785295ab3f..0462d58d99c311c26d7c9d52c4c60021b512fe59 100644 --- a/sys/net/rpl/etx_beaconing.c +++ b/sys/net/rpl/etx_beaconing.c @@ -15,7 +15,7 @@ #include <thread.h> #include <transceiver.h> -#include "sixlowpan/sixlowmac.h" +#include "sixlowpan.h" #include "ieee802154/ieee802154_frame.h" //prototytpes diff --git a/sys/net/rpl/etx_beaconing.h b/sys/net/rpl/etx_beaconing.h index 4cdf762a3d0742356846899b0e4a0c3dd631090a..063190a5a606719a92efd58af3328bd50ce1a206 100644 --- a/sys/net/rpl/etx_beaconing.h +++ b/sys/net/rpl/etx_beaconing.h @@ -9,7 +9,7 @@ #ifndef ETX_BEACONING_H_ #define ETX_BEACONING_H_ -#include "sys/net/sixlowpan/sixlowip.h" +#include "ipv6.h" //For debugging purposes #define ENABLE_DEBUG (0) diff --git a/sys/net/rpl/rpl.c b/sys/net/rpl/rpl.c index d3b425e957aee9e3315a45e58d531443199821cf..49f76f26742e6c7e751f0069a4e50184b9832757 100644 --- a/sys/net/rpl/rpl.c +++ b/sys/net/rpl/rpl.c @@ -26,11 +26,8 @@ #include "of_mrhof.h" #include "trickle.h" -#include "sys/net/sixlowpan/sixlowmac.h" -#include "sys/net/sixlowpan/sixlowip.h" -#include "sys/net/sixlowpan/sixlowpan.h" -#include "sys/net/sixlowpan/sixlownd.h" -#include "sys/net/sixlowpan/sixlowerror.h" +#include "sixlowpan.h" +#include "ipv6.h" char rpl_process_buf[RPL_PROCESS_STACKSIZE]; /* global variables */ diff --git a/sys/net/rpl/rpl.h b/sys/net/rpl/rpl.h index c38a2bf2eab30509a516741a5027a4137280fac6..b15c35d668c29fcf72ab1398c5d280b58a3e3da5 100644 --- a/sys/net/rpl/rpl.h +++ b/sys/net/rpl/rpl.h @@ -20,7 +20,7 @@ #include <vtimer.h> #include <mutex.h> #include <transceiver.h> -#include "sixlowpan/sixlowip.h" +#include "ipv6.h" #include "rpl_dodag.h" #define CC1100_RADIO_MODE CC1100_MODE_WOR diff --git a/sys/net/rpl/rpl_structs.h b/sys/net/rpl/rpl_structs.h index b03c0d2bd768ee5be83d5453ed010131e1da4d99..2eec2bc649f26a65ad1714b96948c912ddd3b676 100644 --- a/sys/net/rpl/rpl_structs.h +++ b/sys/net/rpl/rpl_structs.h @@ -16,7 +16,7 @@ */ #include <string.h> -#include "sixlowpan/sixlowip.h" +#include "ipv6.h" #ifndef RPL_STRUCTS_H_INCLUDED #define RPL_STRUCTS_H_INCLUDED diff --git a/sys/net/sixlowpan/Makefile b/sys/net/sixlowpan/Makefile index c5dac39f000f1f4e58c56a890643c319b7b395bf..4e0b8e4cc207e6e2d765cfba307a1e074704c0dc 100644 --- a/sys/net/sixlowpan/Makefile +++ b/sys/net/sixlowpan/Makefile @@ -1,4 +1,4 @@ MODULE:=$(shell basename $(CURDIR)) -INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/net -I$(RIOTBASE)/cpu/arm_common/include/ +INCLUDES = -I$(RIOTBASE) -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/cpu/arm_common/include -I$(RIOTBASE)/sys/net/sixlowpan/include/ include $(RIOTBASE)/Makefile.base diff --git a/sys/net/sixlowpan/sixlowborder.c b/sys/net/sixlowpan/border.c similarity index 97% rename from sys/net/sixlowpan/sixlowborder.c rename to sys/net/sixlowpan/border.c index 51d41c5ed1791840a05c992e24847af936106561..67ecd75cdaefad7b86d09ec9e4f4599feee4ee60 100644 --- a/sys/net/sixlowpan/sixlowborder.c +++ b/sys/net/sixlowpan/border.c @@ -27,13 +27,13 @@ #include <board_uart0.h> #include "bordermultiplex.h" -#include "ieee802154/ieee802154_frame.h" #include "flowcontrol.h" -#include "sixlowborder.h" -#include "sixlowip.h" -#include "sixlownd.h" +#include "border.h" +#include "ip.h" +#include "icmp.h" #include "serialnumber.h" -#include "sixlowerror.h" +#include "error.h" +#include "sys/net/ieee802154/ieee802154_frame.h" #include "sys/net/net_help/net_help.h" #define READER_STACK_SIZE 512 diff --git a/sys/net/sixlowpan/sixlowborder.h b/sys/net/sixlowpan/border.h similarity index 90% rename from sys/net/sixlowpan/sixlowborder.h rename to sys/net/sixlowpan/border.h index 4d0729e35d55c84bb18eddb19d1c9d5972f79519..c3252660f637ae76ae67f4b56d06f619a3a8344d 100644 --- a/sys/net/sixlowpan/sixlowborder.h +++ b/sys/net/sixlowpan/border.h @@ -18,14 +18,14 @@ /* 6LoWPAN Border Router header file */ -#ifndef SIXLOWBORDER_H -#define SIXLOWBORDER_H +#ifndef _SIXLOWPAN_BORDER_H +#define _SIXLOWPAN_BORDER_H #include <stdint.h> #include <mutex.h> #include <transceiver.h> -#include "sixlowip.h" +#include "ip.h" #include "semaphore.h" extern ipv6_addr_t abr_addr; @@ -39,4 +39,4 @@ uint8_t border_initialize(transceiver_type_t trans, ipv6_addr_t *border_router_a void border_send_ipv6_over_lowpan(ipv6_hdr_t *packet, uint8_t aro_flag, uint8_t sixco_flag); void border_process_lowpan(void); -#endif /* SIXLOWBORDER_H*/ +#endif /* _SIXLOWPAN_BORDER_H*/ diff --git a/sys/net/sixlowpan/bordermultiplex.c b/sys/net/sixlowpan/bordermultiplex.c index af10ebdfb5eb68a138ebe4ca53f7e40cc18862d8..2dcaa1f5fe8af171423653854df168fe8af5b4e2 100644 --- a/sys/net/sixlowpan/bordermultiplex.c +++ b/sys/net/sixlowpan/bordermultiplex.c @@ -22,10 +22,10 @@ #include <board_uart0.h> #include "flowcontrol.h" -#include "sixlowpan.h" -#include "sixlownd.h" -#include "sixlowborder.h" -#include "sixlowerror.h" +#include "lowpan.h" +#include "icmp.h" +#include "border.h" +#include "error.h" #include "bordermultiplex.h" diff --git a/sys/net/sixlowpan/bordermultiplex.h b/sys/net/sixlowpan/bordermultiplex.h index 4d00f0c4e1b452ac405fbb01bac8f17bb66ee157..c5d5dc7068be9553d77f25caa0c3c82526cef5a5 100644 --- a/sys/net/sixlowpan/bordermultiplex.h +++ b/sys/net/sixlowpan/bordermultiplex.h @@ -16,13 +16,13 @@ * @} */ -#ifndef BORDERMULTIPLEX_H -#define BORDERMULTIPLEX_H +#ifndef _SIXLOWPAN_BORDERMULTIPLEX_H +#define _SIXLOWPAN_BORDERMULTIPLEX_H #include <stdint.h> #include <stdlib.h> -#include "sixlowip.h" +#include "ip.h" /* packet types of uart-packets */ #define BORDER_PACKET_RAW_TYPE 0 @@ -89,4 +89,4 @@ void multiplex_send_addr_over_uart(ipv6_addr_t *addr); int readpacket(uint8_t *packet_buf, size_t size); int writepacket(uint8_t *packet_buf, size_t size); -#endif /* BORDERMULTIPLEX_H*/ +#endif /* _SIXLOWPAN_BORDERMULTIPLEX_H*/ diff --git a/sys/net/sixlowpan/sixlowerror.h b/sys/net/sixlowpan/error.h similarity index 88% rename from sys/net/sixlowpan/sixlowerror.h rename to sys/net/sixlowpan/error.h index 90c2c4a5da4c4c123c13a03800bf02c1f2dedd65..9159cba85afbf7f619f6f0c3d95ca282b76cec7c 100644 --- a/sys/net/sixlowpan/sixlowerror.h +++ b/sys/net/sixlowpan/error.h @@ -1,5 +1,5 @@ -#ifndef SIXLOWERROR_H -#define SIXLOWERROR_H +#ifndef _SIXLOWPAN_ERROR_H +#define _SIXLOWPAN_ERROR_H #define SUCCESS 0 #define SIXLOWERROR_ARRAYFULL 132 // array is full @@ -13,4 +13,4 @@ #define SIXLOWERROR_DCI 140 // destination context not found #define SIXLOWERROR_CSUM 141 // wrong checksum -#endif /* SIXLOWERROR_H*/ +#endif /* _SIXLOWPAN_ERROR_H*/ diff --git a/sys/net/sixlowpan/flowcontrol.h b/sys/net/sixlowpan/flowcontrol.h index 61c1842afbf372324f6eedc5f46d7bdb403424c7..f4fb350ce3b33b367af49098657788a0a2e6dd1b 100644 --- a/sys/net/sixlowpan/flowcontrol.h +++ b/sys/net/sixlowpan/flowcontrol.h @@ -16,15 +16,15 @@ * @} */ -#ifndef FLOWCONTROL_H -#define FLOWCONTROL_H +#ifndef _SIXLOWPAN_FLOWCONTROL_H +#define _SIXLOWPAN_FLOWCONTROL_H #include <stdint.h> #include <vtimer.h> #include "semaphore.h" -#include "sixlowip.h" -#include "sixlowborder.h" +#include "ip.h" +#include "border.h" #include "bordermultiplex.h" /* packet types for flowcontrol */ @@ -73,4 +73,4 @@ ipv6_addr_t flowcontrol_init(void); void flowcontrol_send_over_uart(border_packet_t *packet, int len); void flowcontrol_deliver_from_uart(border_packet_t *packet, int len); -#endif /* FLOWCONTROL_H*/ +#endif /* _SIXLOWPAN_FLOWCONTROL_H*/ diff --git a/sys/net/sixlowpan/sixlownd.c b/sys/net/sixlowpan/icmp.c similarity index 99% rename from sys/net/sixlowpan/sixlownd.c rename to sys/net/sixlowpan/icmp.c index dfa97a5ee18ac58164ef90a6b006f0ac3e6af4b3..41447db2a5f4d6c7ff89e05f0e0a48352a18bf8c 100644 --- a/sys/net/sixlowpan/sixlownd.c +++ b/sys/net/sixlowpan/icmp.c @@ -20,11 +20,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "sixlowip.h" -#include "sixlownd.h" -#include "sixlowmac.h" -#include "sixlowpan.h" -#include "sixlowerror.h" +#include "ip.h" +#include "icmp.h" +#include "mac.h" +#include "lowpan.h" +#include "error.h" #include "serialnumber.h" #include "sys/net/net_help/net_help.h" #include "vtimer.h" diff --git a/sys/net/sixlowpan/sixlownd.h b/sys/net/sixlowpan/icmp.h similarity index 98% rename from sys/net/sixlowpan/sixlownd.h rename to sys/net/sixlowpan/icmp.h index 382c24db66487aee7e48639b1d4a804560fc24fe..9d906e9a5a36d5d0820f9f750728a53add69d435 100644 --- a/sys/net/sixlowpan/sixlownd.h +++ b/sys/net/sixlowpan/icmp.h @@ -17,13 +17,13 @@ * @} */ -#ifndef SIXLOWND_H -#define SIXLOWND_H +#ifndef _SIXLOWPAN_ICMP_H +#define _SIXLOWPAN_ICMP_H #include <stdint.h> #include "vtimer.h" -#include "sixlowpan.h" -#include "sixlowip.h" +#include "lowpan.h" +#include "ip.h" /* parameter problem [rfc4443] */ #define PARA_PROB_LEN (8) @@ -282,4 +282,4 @@ void init_nbr_adv(ipv6_addr_t *src, ipv6_addr_t *dst, ipv6_addr_t *tgt, uint8_t rso, uint8_t sllao, uint8_t aro, uint8_t aro_state); void recv_nbr_adv(void); void recv_nbr_sol(void); -#endif /* SIXLOWND_H*/ +#endif /* _SIXLOWPAN_ICMP_H*/ diff --git a/sys/net/sixlowpan/include/ipv6.h b/sys/net/sixlowpan/include/ipv6.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0dad0d380678402cdda7b6a13e3760b198dfdc8e 100644 --- a/sys/net/sixlowpan/include/ipv6.h +++ b/sys/net/sixlowpan/include/ipv6.h @@ -0,0 +1,30 @@ +/* + * 6LoWPAN - Wraps all API types, constants and functions of 6LoWPAN in Layer 3. + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file ipv6.h + * @brief IPv6 and ICMP functions + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @} + */ +#ifndef IPV6_H +#define IPV6_H + +#include "sixlowpan/error.h" +#include "sixlowpan/types.h" +#include "sixlowpan/ip.h" +#include "sixlowpan/icmp.h" +#include "sixlowpan/ndp.h" + +#include "../error.h" /* TODO: remove if not needed anymore */ +#include "../ip.h" /* TODO: remove if not needed anymore */ +#include "../icmp.h" /* TODO: remove if not needed anymore */ + +#endif /* IPV6_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan.h b/sys/net/sixlowpan/include/sixlowpan.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..03fa4faa55bcd52cea4376088167c79bfe490416 100644 --- a/sys/net/sixlowpan/include/sixlowpan.h +++ b/sys/net/sixlowpan/include/sixlowpan.h @@ -0,0 +1,32 @@ +/* + * 6LoWPAN - Wraps all API types, constants and functions of 6LoWPAN concerning + * Layers under 3. + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan.h + * @brief 6lowpan link layer and lowpan functions + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @} + */ +#ifndef SIXLOWPAN_H +#define SIXLOWPAN_H + +#include "sixlowpan/error.h" +#include "sixlowpan/types.h" +#include "sixlowpan/borderrouter.h" +#include "sixlowpan/lowpan.h" +#include "sixlowpan/mac.h" + +#include "../error.h" /* TODO: remove if not needed anymore */ +#include "../border.h" /* TODO: remove if not needed anymore */ +#include "../lowpan.h" /* TODO: remove if not needed anymore */ +#include "../mac.h" /* TODO: remove if not needed anymore */ + +#endif /* SIXLOWPAN_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/borderrouter.h b/sys/net/sixlowpan/include/sixlowpan/borderrouter.h new file mode 100644 index 0000000000000000000000000000000000000000..2f40ee84af419e0a559ee6b934c1e3df74edf4b9 --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/borderrouter.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes for 6LoWPAN border router + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/borderrouter.h + * @brief 6LoWPAN borderrouter header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_BORDERROUTER_H +#define SIXLOWPAN_BORDERROUTER_H + +#endif /* SIXLOWPAN_BORDERROUTER_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/error.h b/sys/net/sixlowpan/include/sixlowpan/error.h new file mode 100644 index 0000000000000000000000000000000000000000..ddecf540518d4d686b4eb5b96cfc0c7d5c1f9a89 --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/error.h @@ -0,0 +1,21 @@ +/** + * 6LoWPAN error codes + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/error.h + * @brief 6LoWPAN error codes + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @} + */ + +#ifndef SIXLOWPAN_ERROR_H +#define SIXLOWPAN_ERROR_H + +#endif /* SIXLOWPAN_ERROR_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/icmp.h b/sys/net/sixlowpan/include/sixlowpan/icmp.h new file mode 100644 index 0000000000000000000000000000000000000000..270091a0587e41bdc7cb298e22d1d0c835d393c5 --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/icmp.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes related to ICMP + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/icmp.h + * @brief 6LoWPAN ICMP related header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_ICMP_H +#define SIXLOWPAN_ICMP_H + +#endif /* SIXLOWPAN_ICMP_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/ip.h b/sys/net/sixlowpan/include/sixlowpan/ip.h new file mode 100644 index 0000000000000000000000000000000000000000..b1cfed66d0610dea6001d2f43fa2fd4670ba9320 --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/ip.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes for network layer + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/ip.h + * @brief 6LoWPAN network layer header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_IP_H +#define SIXLOWPAN_IP_H + +#endif /* SIXLOWPAN_IP_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/lowpan.h b/sys/net/sixlowpan/include/sixlowpan/lowpan.h new file mode 100644 index 0000000000000000000000000000000000000000..4b2d70e66d01b9818abe01fc9408d0bfdf19ff5e --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/lowpan.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes for 6LoWPAN layer + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/lowpan.h + * @brief 6LoWPAN LoWPAN layer header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_LOWPAN_H +#define SIXLOWPAN_LOWPAN_H + +#endif /* SIXLOWPAN_LOWPAN_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/mac.h b/sys/net/sixlowpan/include/sixlowpan/mac.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fa09dde87db12f3a2efd1f10cb0f659a625aa933 100644 --- a/sys/net/sixlowpan/include/sixlowpan/mac.h +++ b/sys/net/sixlowpan/include/sixlowpan/mac.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes for MAC layer + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/mac.h + * @brief 6LoWPAN MAC layer header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_MAC_H +#define SIXLOWPAN_MAC_H + +#endif /* SIXLOWPAN_MAC_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/ndp.h b/sys/net/sixlowpan/include/sixlowpan/ndp.h new file mode 100644 index 0000000000000000000000000000000000000000..888bdfdabe0f940e4fc4515f8598e5adf8befbcd --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/ndp.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN constants, data structs, and prototypes related to NDP + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/ndp.h + * @brief 6LoWPAN NDP related header + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_NDP_H +#define SIXLOWPAN_NDP_H + +#endif /* SIXLOWPAN_NDP_H */ diff --git a/sys/net/sixlowpan/include/sixlowpan/types.h b/sys/net/sixlowpan/include/sixlowpan/types.h new file mode 100644 index 0000000000000000000000000000000000000000..3ca6a1b4cdc8676e24ad880dbdd80e223beca0a1 --- /dev/null +++ b/sys/net/sixlowpan/include/sixlowpan/types.h @@ -0,0 +1,24 @@ +/** + * 6LoWPAN data types + * + * Copyright (C) 2013 INRIA. + * + * This file subject to the terms and conditions of the GNU Lesser General + * Public License. See the file LICENSE in the top level directory for more + * details. + * + * @ingroup sixlowpan + * @{ + * @file sixlowpan/types.h + * @brief 6LoWPAN data types + * @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de> + * @author Martin Lenders <mlenders@inf.fu-berlin.de> + * @author Eric Engel <eric.engel@fu-berlin.de> + * @author Oliver Gesch <oliver.gesch@googlemail.com> + * @} + */ + +#ifndef SIXLOWPAN_TYPES_H +#define SIXLOWPAN_TYPES_H + +#endif /* SIXLOWPAN_TYPES_H */ diff --git a/sys/net/sixlowpan/sixlowip.c b/sys/net/sixlowpan/ip.c similarity index 99% rename from sys/net/sixlowpan/sixlowip.c rename to sys/net/sixlowpan/ip.c index 8a6b58cc2d78f6c3f2390638a9cb0bd926ab5e45..8c70c4aa01ce56bf1d65e041494ac567e91ab2d0 100644 --- a/sys/net/sixlowpan/sixlowip.c +++ b/sys/net/sixlowpan/ip.c @@ -23,10 +23,10 @@ #include <vtimer.h> #include <mutex.h> #include "msg.h" -#include "sixlowip.h" -#include "sixlowmac.h" -#include "sixlownd.h" -#include "sixlowpan.h" +#include "ip.h" +#include "mac.h" +#include "icmp.h" +#include "lowpan.h" #include "sys/net/destiny/in.h" #include "sys/net/destiny/socket.h" #include "sys/net/net_help/net_help.h" diff --git a/sys/net/sixlowpan/sixlowip.h b/sys/net/sixlowpan/ip.h similarity index 98% rename from sys/net/sixlowpan/sixlowip.h rename to sys/net/sixlowpan/ip.h index 88746a6cbc5c10c5c7ab999b178b13ea3d0298c5..355c00dde88bf120b0911d560c4e827b0640c449 100644 --- a/sys/net/sixlowpan/sixlowip.h +++ b/sys/net/sixlowpan/ip.h @@ -20,8 +20,8 @@ /* 6LoWPAN IP header file */ -#ifndef SIXLOWIP_H -#define SIXLOWIP_H +#ifndef _SIXLOWPAN_IP_H +#define _SIXLOWPAN_IP_H #include <stdint.h> #include <timex.h> @@ -185,4 +185,4 @@ uint8_t ipv6_next_hdr_unrec(uint8_t next_hdr); void set_tcp_packet_handler_pid(int pid); void set_udp_packet_handler_pid(int pid); void set_rpl_process_pid(int pid); -#endif /* SIXLOWIP_H*/ +#endif /* _SIXLOWPAN_IP_H*/ diff --git a/sys/net/sixlowpan/sixlowpan.c b/sys/net/sixlowpan/lowpan.c similarity index 99% rename from sys/net/sixlowpan/sixlowpan.c rename to sys/net/sixlowpan/lowpan.c index 7c6ac128e243a0b8caca584efdf7eaf0ffbe4275..8d42d950b6766edacd0d24c3b9b6fa14a1d390ea 100644 --- a/sys/net/sixlowpan/sixlowpan.c +++ b/sys/net/sixlowpan/lowpan.c @@ -18,7 +18,7 @@ * @} */ -#include "sixlowip.h" +#include "ip.h" #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -31,13 +31,13 @@ #include "mutex.h" #include "hwtimer.h" #include "msg.h" -#include "sixlowmac.h" -#include "sixlowpan.h" -#include "sixlowborder.h" -#include "sixlowip.h" -#include "sixlownd.h" +#include "mac.h" +#include "lowpan.h" +#include "border.h" +#include "ip.h" +#include "icmp.h" #include "transceiver.h" -#include "ieee802154/ieee802154_frame.h" +#include "sys/net/ieee802154/ieee802154_frame.h" #include "sys/net/destiny/in.h" #include "sys/net/net_help/net_help.h" diff --git a/sys/net/sixlowpan/sixlowpan.h b/sys/net/sixlowpan/lowpan.h similarity index 97% rename from sys/net/sixlowpan/sixlowpan.h rename to sys/net/sixlowpan/lowpan.h index 0cbe075e8a115d4eb9dc376f392c59566c707fa1..58024ccf2d8abab4493b190ba320d28700c013b8 100644 --- a/sys/net/sixlowpan/sixlowpan.h +++ b/sys/net/sixlowpan/lowpan.h @@ -18,8 +18,8 @@ * @} */ -#ifndef SIXLOWPAN_H -#define SIXLOWPAN_H +#ifndef _SIXLOWPAN_LOWPAN_H +#define _SIXLOWPAN_LOWPAN_H #define IP_PROCESS_STACKSIZE (3072) #define NC_STACKSIZE (512) @@ -58,7 +58,7 @@ #define ICMP_RPL_CONTROL (155) #include "transceiver.h" -#include "sixlowip.h" +#include "ip.h" #include "vtimer.h" #include "mutex.h" @@ -143,4 +143,4 @@ void lowpan_ipv6_set_dispatch(uint8_t *data); void init_reas_bufs(lowpan_reas_buf_t *buf); void printReasBuffers(void); void printFIFOBuffers(void); -#endif +#endif /* _SIXLOWPAN_LOWPAN_H */ diff --git a/sys/net/sixlowpan/sixlowmac.c b/sys/net/sixlowpan/mac.c similarity index 97% rename from sys/net/sixlowpan/sixlowmac.c rename to sys/net/sixlowpan/mac.c index 40615dfda1df39d601196a493989de40984e1b02..507c214cc70947a865a1df80e70f0e06911b1296 100644 --- a/sys/net/sixlowpan/sixlowmac.c +++ b/sys/net/sixlowpan/mac.c @@ -24,10 +24,10 @@ #include <string.h> #include <inttypes.h> -#include "sixlowmac.h" -#include "sixlowip.h" -#include "sixlownd.h" -#include "sixlowpan.h" +#include "mac.h" +#include "ip.h" +#include "icmp.h" +#include "lowpan.h" #include <ltc4150.h> #include <hwtimer.h> #include "thread.h" @@ -35,8 +35,8 @@ #include "radio/radio.h" #include "transceiver.h" #include "vtimer.h" -#include "ieee802154/ieee802154_frame.h" -#include "net_help/net_help.h" +#include "sys/net/ieee802154/ieee802154_frame.h" +#include "sys/net/net_help/net_help.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/sys/net/sixlowpan/sixlowmac.h b/sys/net/sixlowpan/mac.h similarity index 92% rename from sys/net/sixlowpan/sixlowmac.h rename to sys/net/sixlowpan/mac.h index 553b1bab03a43de58601e2de373b6129526a2e0e..85f4a1fb935ba47903e7f6662e975db5b7261d06 100644 --- a/sys/net/sixlowpan/sixlowmac.h +++ b/sys/net/sixlowpan/mac.h @@ -18,12 +18,12 @@ * @} */ -#ifndef SIXLOWMAC_H -#define SIXLOWMAC_H +#ifndef _SIXLOWPAN_MAC_H +#define _SIXLOWPAN_MAC_H #include <stdio.h> #include <stdint.h> -#include "sixlowip.h" +#include "ip.h" #include "radio/radio.h" #include <transceiver.h> @@ -42,4 +42,4 @@ void init_802154_short_addr(ieee_802154_short_t *saddr); void sixlowmac_init(transceiver_type_t type); ieee_802154_long_t *mac_get_eui(ipv6_addr_t *ipaddr); -#endif /* SIXLOWMAC_H*/ +#endif /* _SIXLOWPAN_MAC_H*/ diff --git a/sys/net/sixlowpan/semaphore.h b/sys/net/sixlowpan/semaphore.h index b30b0e4d038994fd3c4d6de4b2ffad11e441d019..6394e603628df1edcab72c8ccb7af5786bb3afa8 100644 --- a/sys/net/sixlowpan/semaphore.h +++ b/sys/net/sixlowpan/semaphore.h @@ -16,8 +16,8 @@ * @} */ -#ifndef SEMAPHORE_H -#define SEMAPHORE_H +#ifndef _SIXLOWPAN_SEMAPHORE_H +#define _SIXLOWPAN_SEMAPHORE_H #include <stdint.h> #include <mutex.h> @@ -32,4 +32,4 @@ void sem_init(sem_t *sem, int8_t value); int sem_wait(sem_t *sem); int sem_signal(sem_t *sem); -#endif /* SEMAPHORE_H*/ +#endif /* _SIXLOWPAN_SEMAPHORE_H*/ diff --git a/sys/net/sixlowpan/serialnumber.h b/sys/net/sixlowpan/serialnumber.h index 66cc40502ff98887684aed10b589a416c7bb139d..d9bbc8ca0f384b2e03afeae31c964d708f3b215d 100644 --- a/sys/net/sixlowpan/serialnumber.h +++ b/sys/net/sixlowpan/serialnumber.h @@ -2,8 +2,8 @@ * Header file for serial number arithmetics [RFC1982] */ -#ifndef SERIALNUMBER_H -#define SERIALNUMBER_H +#ifndef _SIXLOWPAN_SERIALNUMBER_H +#define _SIXLOWPAN_SERIALNUMBER_H #include <stdint.h> typedef enum serial_comp_res_t { @@ -79,4 +79,4 @@ serial_comp_res_t serial_comp16(uint16_t s1, uint16_t s2); **/ serial_comp_res_t serial_comp32(uint32_t s1, uint32_t s2); -#endif /* SERIALNUMBER_H*/ +#endif /* _SIXLOWPAN_SERIALNUMBER_H*/