46#if LLSEC802154_USES_AUX_HEADER && LLSEC802154_USES_FRAME_COUNTER
50get_extended_address(
const linkaddr_t *
addr)
54 static linkaddr_extended_t
template = { { 0x00 , 0x00 , 0x00 ,
55 0xFF , 0xFE , 0x00 , 0x00 , 0x00 } };
56 template.u16[3] = LLSEC802154_HTONS(
addr->u16);
67ccm_star_packetbuf_set_nonce(uint8_t *nonce,
int forward)
69 const linkaddr_t *source_addr;
72 memcpy(nonce, get_extended_address(source_addr), 8);
73 nonce[8] = packetbuf_attr(PACKETBUF_ATTR_FRAME_COUNTER_BYTES_2_3) >> 8;
74 nonce[9] = packetbuf_attr(PACKETBUF_ATTR_FRAME_COUNTER_BYTES_2_3) & 0xff;
75 nonce[10] = packetbuf_attr(PACKETBUF_ATTR_FRAME_COUNTER_BYTES_0_1) >> 8;
76 nonce[11] = packetbuf_attr(PACKETBUF_ATTR_FRAME_COUNTER_BYTES_0_1) & 0xff;
77 nonce[12] = packetbuf_attr(PACKETBUF_ATTR_SECURITY_LEVEL);
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
Header file for the link-layer address representation.
Common functionality of 802.15.4-compliant llsec_drivers.
Header file for the Packet buffer (packetbuf) management.
static uip_ds6_addr_t * addr
Pointer to a nbr cache entry.