From 6a317cdd1a03527bf06a33101b6426ce7bba89d2 Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Sat, 19 Oct 2013 21:09:36 +0200 Subject: [PATCH 1/2] add radio_packet_length_t --- sys/include/radio/types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/include/radio/types.h b/sys/include/radio/types.h index efb4facfc8..7610231892 100644 --- a/sys/include/radio/types.h +++ b/sys/include/radio/types.h @@ -27,7 +27,9 @@ #include #include -#include + +#include "board.h" +#include "timex.h" typedef uint8_t protocol_t; ///< Packet protocol type typedef uint16_t radio_address_t; ///< Radio layer address type @@ -71,7 +73,7 @@ typedef struct __attribute__((packed)) uint8_t rssi; ///< Radio Signal Strength Indication uint8_t lqi; ///< Link Quality Indicator timex_t toa; ///< Time of Arrival - uint8_t length; ///< Length of payload + radio_packet_length_t length; ///< Length of payload uint8_t *data; ///< Payload } radio_packet_t; From 4f4c4bfedd590da8ea4a99bc6ab1327b831cbf69 Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Fri, 25 Oct 2013 16:01:37 +0200 Subject: [PATCH 2/2] use radio_packet_length_t for native frames --- cpu/native/include/tap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu/native/include/tap.h b/cpu/native/include/tap.h index 0756332eaf..28d642233a 100644 --- a/cpu/native/include/tap.h +++ b/cpu/native/include/tap.h @@ -18,6 +18,7 @@ #include +#include "board.h" #include "radio/types.h" /** @@ -36,7 +37,7 @@ extern int _native_tap_fd; extern unsigned char _native_tap_mac[ETHER_ADDR_LEN]; struct nativenet_header { - uint16_t length; + radio_packet_length_t length; radio_address_t dst; radio_address_t src; } __attribute__((packed));