1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #1948 from OlegHahm/netif_byteorder

Netif fix byteorder
This commit is contained in:
Oleg Hahm 2014-11-06 20:06:12 +01:00
commit 8f93b5cee7

View File

@ -335,7 +335,8 @@ int net_if_send_packet(int if_id, uint16_t target, const void *payload,
p.frame.fcf.frame_pend = 0;
p.frame.dest_pan_id = net_if_get_pan_id(if_id);
memcpy(p.frame.dest_addr, &target, 2);
uint16_t target_h = NTOHS(target);
memcpy(p.frame.dest_addr, &target_h, 2);
response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p);
}
else {
@ -378,7 +379,8 @@ int net_if_send_packet_long(int if_id, net_if_eui64_t *target,
p.frame.fcf.frame_type = IEEE_802154_DATA_FRAME;
p.frame.fcf.frame_pend = 0;
p.frame.dest_pan_id = net_if_get_pan_id(if_id);
memcpy(p.frame.dest_addr, target, 8);
uint64_t target_h = NTOHLL(target->uint64);
memcpy(p.frame.dest_addr, &target_h, 8);
response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p);
}
else {