mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ccnl: use correct packet type
This commit is contained in:
parent
a48ab81229
commit
6973ee2f81
@ -29,7 +29,12 @@
|
||||
#include "ccnl-pdu.h"
|
||||
#include "ccnl-riot-compat.h"
|
||||
|
||||
#if MODULE_AT86RF231 || MODULE_CC2420 || MODULE_MC1322X
|
||||
ieee802154_packet_t p;
|
||||
#else
|
||||
radio_packet_t p;
|
||||
#endif
|
||||
|
||||
transceiver_command_t tcmd;
|
||||
msg_t mesg, rep;
|
||||
|
||||
@ -45,9 +50,17 @@ int riot_send_transceiver(uint8_t *buf, uint16_t size, uint16_t to)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if MODULE_AT86RF231 || MODULE_CC2420 || MODULE_MC1322X
|
||||
p.frame.payload_len = size;
|
||||
p.frame.fcf.dest_addr_m = IEEE_802154_SHORT_ADDR_M;
|
||||
memset(p.frame.dest_addr, 0, sizeof(p.frame.dest_addr));
|
||||
memcpy(&(p.frame.dest_addr[6]), &to, sizeof(uint16_t));
|
||||
p.frame.payload = buf;
|
||||
#else
|
||||
p.length = size;
|
||||
p.dst = (to == RIOT_BROADCAST) ? 0 : to;
|
||||
p.data = buf;
|
||||
#endif
|
||||
|
||||
tcmd.transceivers = TRANSCEIVER;
|
||||
tcmd.data = &p;
|
||||
|
Loading…
Reference in New Issue
Block a user