diff --git a/sys/net/destiny/destiny.c b/sys/net/destiny/destiny.c index 04589e6770..d61d992cef 100644 --- a/sys/net/destiny/destiny.c +++ b/sys/net/destiny/destiny.c @@ -19,13 +19,14 @@ #include #include #include -#include -#include "udp.h" -#include "tcp.h" -#include "tcp_timer.h" + #include "destiny.h" +#include "vtimer.h" #include "socket.h" +#include "tcp.h" +#include "tcp_timer.h" +#include "udp.h" char tcp_stack_buffer[TCP_STACK_SIZE]; char udp_stack_buffer[UDP_STACK_SIZE]; diff --git a/sys/net/destiny/include/destiny/socket.h b/sys/net/destiny/include/destiny/socket.h index f68d931bb6..b0009dd7b0 100644 --- a/sys/net/destiny/include/destiny/socket.h +++ b/sys/net/destiny/include/destiny/socket.h @@ -23,7 +23,9 @@ #define DESTINY_SOCKET_H #include + #include "ipv6.h" + #include "destiny/in.h" typedef uint8_t sa_family_t; ///< POSIX compatible type for address family. diff --git a/sys/net/destiny/msg_help.c b/sys/net/destiny/msg_help.c index e12840d466..74888b83f2 100644 --- a/sys/net/destiny/msg_help.c +++ b/sys/net/destiny/msg_help.c @@ -7,9 +7,13 @@ #include #include -#include "msg_help.h" + +#include "thread.h" + #include "tcp_timer.h" +#include "msg_help.h" + void block_continue_thread(void) { // msg_t recv_m; diff --git a/sys/net/destiny/msg_help.h b/sys/net/destiny/msg_help.h index 37993d2435..6068dbbd29 100644 --- a/sys/net/destiny/msg_help.h +++ b/sys/net/destiny/msg_help.h @@ -8,6 +8,8 @@ #ifndef MSG_HELP_H_ #define MSG_HELP_H_ +#include + // Function IDs #define FID_SIXLOWIP_TCP 0 #define FID_SIXLOWIP_UDP 1 diff --git a/sys/net/destiny/socket.c b/sys/net/destiny/socket.c index c4a983dfa2..f479e82405 100644 --- a/sys/net/destiny/socket.c +++ b/sys/net/destiny/socket.c @@ -15,22 +15,25 @@ * @} */ -#include -#include -#include -#include #include #include -#include "ipv6.h" -#include "udp.h" -#include "tcp.h" -#include "vtimer.h" +#include +#include +#include + #include "hwtimer.h" -#include "msg_help.h" -#include "tcp_timer.h" -#include "tcp_hc.h" +#include "ipv6.h" +#include "thread.h" +#include "vtimer.h" + #include "../net_help/net_help.h" +#include "msg_help.h" +#include "tcp.h" +#include "tcp_hc.h" +#include "tcp_timer.h" +#include "udp.h" + #include "socket.h" #define EPHEMERAL_PORTS 49152 diff --git a/sys/net/destiny/socket.h b/sys/net/destiny/socket.h index 978eb76a40..7bd639f918 100644 --- a/sys/net/destiny/socket.h +++ b/sys/net/destiny/socket.h @@ -1,8 +1,10 @@ #ifndef _DESTINY_SOCKET #define _DESTINY_SOCKET -#include "destiny/socket.h" + #include "cpu.h" +#include "destiny/socket.h" + #include "tcp.h" #include "udp.h" diff --git a/sys/net/destiny/tcp.c b/sys/net/destiny/tcp.c index a91892ed86..881408f324 100644 --- a/sys/net/destiny/tcp.c +++ b/sys/net/destiny/tcp.c @@ -15,23 +15,25 @@ * @} */ - -#include -#include -#include -#include #include +#include +#include +#include -#include "vtimer.h" -#include "tcp_timer.h" -#include "tcp_hc.h" -#include "tcp.h" -#include "destiny/in.h" -#include "msg_help.h" -#include "../net_help/net_help.h" #include "sixlowpan.h" +#include "thread.h" +#include "vtimer.h" +#include "destiny/in.h" + +#include "../net_help/net_help.h" + +#include "msg_help.h" #include "socket.h" +#include "tcp_hc.h" +#include "tcp_timer.h" + +#include "tcp.h" void printTCPHeader(tcp_hdr_t *tcp_header) { diff --git a/sys/net/destiny/tcp.h b/sys/net/destiny/tcp.h index 0a1fe5a6db..0980011d03 100644 --- a/sys/net/destiny/tcp.h +++ b/sys/net/destiny/tcp.h @@ -18,6 +18,8 @@ #ifndef TCP_H_ #define TCP_H_ +#include "ipv6.h" + #define TCP_HDR_LEN 20 #define TCP_EOO_OPTION 0x00 // End of option list @@ -78,8 +80,6 @@ enum tcp_codes { #define TCP_STACK_SIZE KERNEL_CONF_STACKSIZE_DEFAULT -#include "ipv6.h" - typedef struct __attribute__((packed)) tcp_mms_o_t { uint8_t kind; uint8_t len; diff --git a/sys/net/destiny/tcp_hc.c b/sys/net/destiny/tcp_hc.c index 1af76d38ff..1a6bbbd444 100644 --- a/sys/net/destiny/tcp_hc.c +++ b/sys/net/destiny/tcp_hc.c @@ -16,16 +16,18 @@ */ +#include #include #include -#include -#include "tcp_hc.h" -#include "tcp.h" #include "ipv6.h" + #include "../net_help/net_help.h" #include "socket.h" +#include "tcp.h" + +#include "tcp_hc.h" #ifdef TCP_HC diff --git a/sys/net/destiny/tcp_hc.h b/sys/net/destiny/tcp_hc.h index e7a26782c0..606b04c07b 100644 --- a/sys/net/destiny/tcp_hc.h +++ b/sys/net/destiny/tcp_hc.h @@ -8,10 +8,12 @@ #ifndef TCP_HC_H_ #define TCP_HC_H_ -#include "tcp.h" #include "sixlowpan.h" + #include "destiny/socket.h" +#include "tcp.h" + #ifdef TCP_HC #define FULL_HEADER 1 diff --git a/sys/net/destiny/tcp_timer.c b/sys/net/destiny/tcp_timer.c index 35178f5053..2b32278356 100644 --- a/sys/net/destiny/tcp_timer.c +++ b/sys/net/destiny/tcp_timer.c @@ -15,21 +15,23 @@ * @} */ - -#include -#include -#include -#include #include -#include "tcp_timer.h" -#include "msg_help.h" -#include "vtimer.h" -#include "thread.h" -#include "destiny.h" -#include "sixlowpan.h" +#include +#include +#include +#include "sixlowpan.h" +#include "thread.h" +#include "vtimer.h" + +#include "destiny.h" + +#include "msg_help.h" #include "socket.h" +#include "tcp_timer.h" + + void handle_synchro_timeout(socket_internal_t *current_socket) { msg_t send; diff --git a/sys/net/destiny/udp.c b/sys/net/destiny/udp.c index b1f78e7c9c..017aec49e9 100644 --- a/sys/net/destiny/udp.c +++ b/sys/net/destiny/udp.c @@ -15,21 +15,23 @@ * @} */ - #include -#include #include -#include "udp.h" -#include "msg.h" #include "ipv6.h" +#include "msg.h" #include "sixlowpan.h" -#include "destiny/in.h" -#include "../net_help/net_help.h" -#include "msg_help.h" +#include "thread.h" +#include "destiny/in.h" + +#include "../net_help/net_help.h" + +#include "msg_help.h" #include "socket.h" +#include "udp.h" + uint16_t udp_csum(ipv6_hdr_t *ipv6_header, udp_hdr_t *udp_header) { uint16_t sum; diff --git a/sys/net/destiny/udp.h b/sys/net/destiny/udp.h index e92ee266f7..df70a037fe 100644 --- a/sys/net/destiny/udp.h +++ b/sys/net/destiny/udp.h @@ -25,12 +25,12 @@ #ifndef UDP_H_ #define UDP_H_ +#include "ipv6.h" + #define UDP_HDR_LEN 8 #define UDP_STACK_SIZE KERNEL_CONF_STACKSIZE_DEFAULT -#include "ipv6.h" - typedef struct __attribute__((packed)) udp_h_t { uint16_t src_port; uint16_t dst_port;