struct frame802154_t: make sure dest_addr and src_addr are aligned
This commit is contained in:
parent
6ca95ebc0c
commit
df6a435d42
1 changed files with 5 additions and 2 deletions
|
@ -169,12 +169,15 @@ typedef struct {
|
||||||
* specification for details.
|
* specification for details.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
/* The fields dest_addr and src_addr must come first to ensure they are aligned to the
|
||||||
|
* CPU word size. Needed as they are accessed directly as linkaddr_t*. Note we cannot use
|
||||||
|
* the type linkaddr_t directly here, as we always need 8 bytes, not LINKADDR_SIZE bytes. */
|
||||||
|
uint8_t dest_addr[8]; /**< Destination address */
|
||||||
|
uint8_t src_addr[8]; /**< Source address */
|
||||||
frame802154_fcf_t fcf; /**< Frame control field */
|
frame802154_fcf_t fcf; /**< Frame control field */
|
||||||
uint8_t seq; /**< Sequence number */
|
uint8_t seq; /**< Sequence number */
|
||||||
uint16_t dest_pid; /**< Destination PAN ID */
|
uint16_t dest_pid; /**< Destination PAN ID */
|
||||||
uint8_t dest_addr[8]; /**< Destination address */
|
|
||||||
uint16_t src_pid; /**< Source PAN ID */
|
uint16_t src_pid; /**< Source PAN ID */
|
||||||
uint8_t src_addr[8]; /**< Source address */
|
|
||||||
frame802154_aux_hdr_t aux_hdr; /**< Aux security header */
|
frame802154_aux_hdr_t aux_hdr; /**< Aux security header */
|
||||||
uint8_t *payload; /**< Pointer to 802.15.4 payload */
|
uint8_t *payload; /**< Pointer to 802.15.4 payload */
|
||||||
int payload_len; /**< Length of payload field */
|
int payload_len; /**< Length of payload field */
|
||||||
|
|
Loading…
Add table
Reference in a new issue