1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/sixlowpan/sixlowmac.c

18 lines
466 B
C
Raw Normal View History

/* 6LoWPAN MAC - layer 2 implementations */
#include "sixlowmac.h"
#include "sixlownd.h"
#include "radio/radio.h"
#include "drivers/cc110x/cc1100.h"
#define ipv6_buf ((struct ipv6_hdr_t*)&buffer[LL_HDR_LEN])
/* TODO: payload pointer, payload length */
void send(void){
2010-11-09 22:20:26 +01:00
RADIO.send(get_radio_address(get_eui(&ipv6_buf->destaddr)),NULL,NULL,NULL,NULL);
}
uint16_t get_radio_address(ieee_802154_long_t *lla){
return ((lla->uint8[6] << 8) + lla->uint8[7]);
}