diff --git a/sys/net/sixlowmac.c b/sys/net/sixlowmac.c deleted file mode 100644 index eff1ad2f9c..0000000000 --- a/sys/net/sixlowmac.c +++ /dev/null @@ -1,20 +0,0 @@ -/* 6LoWPAN MAC - layer 2 implementations */ - -#include "sixlowmac.h" -#include "drivers/cc110x/cc1100.h" -#include -#include - -static void init_msba2_mac(mac_addr addr){ - addr.oui1 = MSBA2_OUI >> 8; - addr.oui2 = 0x0 | MSBA2_OUI; - addr.ext_ident = MSBA2_R8BIT; - addr.ext_ident = cc1100_get_address(); -} - -static void init_mac_address(mac_addr addr){ - -#ifdef SIXLOWPAN_MSBA2 - init_msba2_mac(addr); -#endif -} diff --git a/sys/net/sixlowmac.h b/sys/net/sixlowmac.h deleted file mode 100644 index bb1c3e53a4..0000000000 --- a/sys/net/sixlowmac.h +++ /dev/null @@ -1,11 +0,0 @@ -/* 6LoWPAN MAC header file */ - -#define MSBA2_OUI 0x005BA2 // 24bit OUI -#define MSBA2_R8BIT 0xA2 // random 8bit - -typedef struct mac_addr{ - uint16_t oui_1; - uint8_t oui_2; - uint8_t ext_ident_1; // MSBA2_R8BIT - uint16_t ext_ident_2; // radio address -} mac_addr; diff --git a/sys/net/sixlowpan.c b/sys/net/sixlowpan.c deleted file mode 100644 index 7a099c0f69..0000000000 --- a/sys/net/sixlowpan.c +++ /dev/null @@ -1,41 +0,0 @@ -/* 6LoWPAN layer 3 implementation */ - -#include -#include "drivers/cc110x/cc1100.h" -#include "sixlowmac.h" - - -static void output(void){ - - // TODO - // 1. get dest addr from function param - // 2. get pointer to packet buffer - // 3. if dest is null send broadcast - // 4. hc1 or hc1x header compression - // 5. check if ip-packet is to large to fit into a single mac-packet - // if no, fragment the packet - // frag1 dispatch + header - // fragn dispatch - // set fragments into queue and send it -} - -/* convert 48-bit MAC address to IPv6 modified EUI-64 Identifier*/ -static eui64 get_eui64_from_mac(void){ - mac_addr maddr; - eui64 ident; - - init_mac_address(maddr); - - /* change bit 7 from oui1 to 1 */ - ident.oui1 = (maddr.oui_1 >> 8) | 0x2; - ident.oui2 = (maddr.oui_1 << 8) | maddr.oui_2; - ident.pattern = MAC_TO_EUI64_PTRN; - ident.ext_ident_1 = maddr.ext_ident_1; - ident.ext_ident_2 = maddr.ext_ident_1; - - return ident; -} - -static void set_6lowpan_address(uint64_t prefix){ - -} diff --git a/sys/net/sixlowpan.h b/sys/net/sixlowpan.h deleted file mode 100644 index 14cbca8f8c..0000000000 --- a/sys/net/sixlowpan.h +++ /dev/null @@ -1,21 +0,0 @@ -/* fragmentation defines */ -#define FRAG1_HDR_LEN 32 // in bit -#define FRAGN_HDR_LEN 40 // in bit -#define FRAG1_DISPATCH 0xC0 // 11000000 -#define FRAGN_DISPATCH 0xE0 // 11100000 - -/* 48-bit MAC to EUI64 pattern */ -#define MAC_TO_EUI64_PTRN 0xFFFE - -typedef struct eui64{ - uint8_t oui_1; - uint16_t oui_2; - uint16_t pattern; - uint8_t ext_ident_1; - uint16_t ext_ident_2; -} eui64; - -typedef struct ipv6_addr{ - uint16_t prefix[4]; - eui64 interface_id; -} ipv6_addr;