Merge pull request #547 from adamdunkels/push/rimeaddr-linkaddr

Rename the rimeaddr module to linkaddr
This commit is contained in:
Nicolas Tsiftes 2014-01-29 12:57:44 -08:00
commit 4e6bed24f9
180 changed files with 930 additions and 930 deletions

View file

@ -256,8 +256,8 @@ sicslowmac_dataIndication(void)
byte_reverse((uint8_t *)dest_reversed, UIP_LLADDR_LEN);
byte_reverse((uint8_t *)src_reversed, UIP_LLADDR_LEN);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const rimeaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const rimeaddr_t *)src_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const linkaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const linkaddr_t *)src_reversed);
#elif UIP_CONF_USE_RUM
/* Finally, get the stuff into the rime buffer.... */
@ -297,8 +297,8 @@ sicslowmac_dataIndication(void)
src_reversed[4] = MSB(parsed_frame->src_addr->addr16);
src_reversed[5] = LSB(parsed_frame->src_addr->addr16);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const rimeaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const rimeaddr_t *)src_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const linkaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const linkaddr_t *)src_reversed);
#endif
@ -325,8 +325,8 @@ sicslowmac_unknownIndication(void)
byte_reverse((uint8_t *)dest_reversed, UIP_LLADDR_LEN);
byte_reverse((uint8_t *)src_reversed, UIP_LLADDR_LEN);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const rimeaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const rimeaddr_t *)src_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const linkaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const linkaddr_t *)src_reversed);
#elif UIP_CONF_USE_RUM
@ -360,8 +360,8 @@ sicslowmac_unknownIndication(void)
src_reversed[4] = MSB(parsed_frame->src_addr->addr16);
src_reversed[5] = LSB(parsed_frame->src_addr->addr16);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const rimeaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const rimeaddr_t *)src_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const linkaddr_t *)dest_reversed);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const linkaddr_t *)src_reversed);
#endif
@ -430,7 +430,7 @@ sicslowmac_dataRequest(void)
* If the output address is NULL in the Rime buf, then it is broadcast
* on the 802.15.4 network.
*/
if(rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), &rimeaddr_null) ) {
if(linkaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), &linkaddr_null) ) {
/* Broadcast requires short address mode. */
params.fcf.destAddrMode = SHORTADDRMODE;
params.dest_pid = BROADCASTPANDID;

View file

@ -41,7 +41,7 @@
#include "sys/rtimer.h"
#include "net/packetbuf.h"
#include "net/rime/rimestats.h"
#include "net/rimeaddr.h"
#include "net/linkaddr.h"
#include "net/netstack.h"
#include "sys/energest.h"
#include "dev/cc2538-rf.h"
@ -169,21 +169,21 @@ cc2538_rf_power_set(uint8_t new_power)
void
cc2538_rf_set_addr(uint16_t pan)
{
#if RIMEADDR_SIZE==8
#if LINKADDR_SIZE==8
/* EXT_ADDR[7:0] is ignored when using short addresses */
int i;
for(i = (RIMEADDR_SIZE - 1); i >= 0; --i) {
for(i = (LINKADDR_SIZE - 1); i >= 0; --i) {
((uint32_t *)RFCORE_FFSM_EXT_ADDR0)[i] =
rimeaddr_node_addr.u8[RIMEADDR_SIZE - 1 - i];
linkaddr_node_addr.u8[LINKADDR_SIZE - 1 - i];
}
#endif
REG(RFCORE_FFSM_PAN_ID0) = pan & 0xFF;
REG(RFCORE_FFSM_PAN_ID1) = pan >> 8;
REG(RFCORE_FFSM_SHORT_ADDR0) = rimeaddr_node_addr.u8[RIMEADDR_SIZE - 1];
REG(RFCORE_FFSM_SHORT_ADDR1) = rimeaddr_node_addr.u8[RIMEADDR_SIZE - 2];
REG(RFCORE_FFSM_SHORT_ADDR0) = linkaddr_node_addr.u8[LINKADDR_SIZE - 1];
REG(RFCORE_FFSM_SHORT_ADDR1) = linkaddr_node_addr.u8[LINKADDR_SIZE - 2];
}
/*---------------------------------------------------------------------------*/
int

View file

@ -163,7 +163,7 @@ uint8_t cc2538_rf_power_set(uint8_t new_power);
* \param pan The PAN Identifier
*
* Values for short and extended addresses are not needed as parameters
* since they exist in the rimeaddr buffer in the contiki core. They
* since they exist in the linkaddr buffer in the contiki core. They
* are thus simply copied over from there.
*/
void cc2538_rf_set_addr(uint16_t pan);

View file

@ -36,7 +36,7 @@
* Driver for the cc2538 IEEE addresses
*/
#include "contiki-conf.h"
#include "net/rimeaddr.h"
#include "net/linkaddr.h"
#include "ieee-addr.h"
#include <stdint.h>

View file

@ -46,7 +46,7 @@
*/
#include "contiki.h"
#include "sys/process.h"
#include "net/rimeaddr.h"
#include "net/linkaddr.h"
#include "usb-api.h"
#include "usb.h"
#include "usb-arch.h"

View file

@ -46,7 +46,7 @@
#include "net/packetbuf.h"
#include "net/rime/rimestats.h"
#include "net/rimeaddr.h"
#include "net/linkaddr.h"
#include "net/netstack.h"
#include <string.h>
@ -146,18 +146,18 @@ cc2530_rf_power_set(uint8_t new_power)
void
cc2530_rf_set_addr(uint16_t pan)
{
#if RIMEADDR_SIZE==8 /* EXT_ADDR[7:0] is ignored when using short addresses */
#if LINKADDR_SIZE==8 /* EXT_ADDR[7:0] is ignored when using short addresses */
int i;
for(i = (RIMEADDR_SIZE - 1); i >= 0; --i) {
((uint8_t *)&EXT_ADDR0)[i] = rimeaddr_node_addr.u8[RIMEADDR_SIZE - 1 - i];
for(i = (LINKADDR_SIZE - 1); i >= 0; --i) {
((uint8_t *)&EXT_ADDR0)[i] = linkaddr_node_addr.u8[LINKADDR_SIZE - 1 - i];
}
#endif
PAN_ID0 = pan & 0xFF;
PAN_ID1 = pan >> 8;
SHORT_ADDR0 = rimeaddr_node_addr.u8[RIMEADDR_SIZE - 1];
SHORT_ADDR1 = rimeaddr_node_addr.u8[RIMEADDR_SIZE - 2];
SHORT_ADDR0 = linkaddr_node_addr.u8[LINKADDR_SIZE - 1];
SHORT_ADDR1 = linkaddr_node_addr.u8[LINKADDR_SIZE - 2];
}
/*---------------------------------------------------------------------------*/
/* Netstack API radio driver functions */

View file

@ -101,7 +101,7 @@ static process_event_t event_data_ready;
static volatile packet_t prepped_p;
void contiki_maca_set_mac_address(uint64_t eui) {
rimeaddr_t addr;
linkaddr_t addr;
uint8_t i;
/* setup mac address registers in maca hardware */
@ -116,14 +116,14 @@ void contiki_maca_set_mac_address(uint64_t eui) {
ANNOTATE("setting long mac 0x%08x_%08x\n\r", *MACA_MAC64HI, *MACA_MAC64LO);
/* setup mac addresses in Contiki (RIME) */
rimeaddr_copy(&addr, &rimeaddr_null);
linkaddr_copy(&addr, &linkaddr_null);
for(i=0; i < RIMEADDR_CONF_SIZE; i++) {
addr.u8[RIMEADDR_CONF_SIZE - 1 - i] = (mc1322x_config.eui >> (i * 8)) & 0xff;
for(i=0; i < LINKADDR_CONF_SIZE; i++) {
addr.u8[LINKADDR_CONF_SIZE - 1 - i] = (mc1322x_config.eui >> (i * 8)) & 0xff;
}
node_id = (addr.u8[6] << 8 | addr.u8[7]);
rimeaddr_set_node_addr(&addr);
linkaddr_set_node_addr(&addr);
#if DEBUG_ANNOTATE
ANNOTATE("Rime configured with address ");

View file

@ -294,7 +294,7 @@ stm32w_radio_init(void)
CLEAN_RXBUFS();
CLEAN_TXBUF();
#if ST_RADIO_AUTOACK && !(UIP_CONF_LL_802154 && RIMEADDR_CONF_SIZE==8)
#if ST_RADIO_AUTOACK && !(UIP_CONF_LL_802154 && LINKADDR_CONF_SIZE==8)
#error "Autoack and address filtering can only be used with EUI 64"
#endif
ST_RadioEnableAutoAck(ST_RADIO_AUTOACK);