37 #ifndef LWIP_HDR_NETIF_IEEE802154_H
38 #define LWIP_HDR_NETIF_IEEE802154_H
46 #ifdef PACK_STRUCT_USE_INCLUDES
71 #ifdef PACK_STRUCT_USE_INCLUDES
76 #define IEEE_802154_ADDR_MODE_NO_ADDR 0x00
77 #define IEEE_802154_ADDR_MODE_RESERVED 0x01
78 #define IEEE_802154_ADDR_MODE_SHORT 0x02
79 #define IEEE_802154_ADDR_MODE_EXT 0x03
82 #define IEEE_802154_FC_FT_MASK 0x0007
83 #define IEEE_802154_FC_FT_BEACON 0x00
84 #define IEEE_802154_FC_FT_DATA 0x01
85 #define IEEE_802154_FC_FT_ACK 0x02
86 #define IEEE_802154_FC_FT_MAC_CMD 0x03
87 #define IEEE_802154_FC_FT_RESERVED 0x04
88 #define IEEE_802154_FC_FT_MULTIPURPOSE 0x05
89 #define IEEE_802154_FC_FT_FRAG 0x06
90 #define IEEE_802154_FC_FT_EXT 0x07
91 #define IEEE_802154_FC_SEC_EN 0x0008
92 #define IEEE_802154_FC_FRAME_PEND 0x0010
93 #define IEEE_802154_FC_ACK_REQ 0x0020
94 #define IEEE_802154_FC_PANID_COMPR 0x0040
95 #define IEEE_802154_FC_RESERVED 0x0080
96 #define IEEE_802154_FC_SEQNO_SUPPR 0x0100
97 #define IEEE_802154_FC_IE_PRESENT 0x0200
98 #define IEEE_802154_FC_DST_ADDR_MODE_MASK 0x0c00
99 #define IEEE_802154_FC_DST_ADDR_MODE_NO_ADDR (IEEE_802154_ADDR_MODE_NO_ADDR << 10)
100 #define IEEE_802154_FC_DST_ADDR_MODE_SHORT (IEEE_802154_ADDR_MODE_SHORT << 10)
101 #define IEEE_802154_FC_DST_ADDR_MODE_EXT (IEEE_802154_ADDR_MODE_EXT << 10)
102 #define IEEE_802154_FC_FRAME_VERSION_MASK 0x3000
103 #define IEEE_802154_FC_FRAME_VERSION_GET(x) (((x) & IEEE_802154_FC_FRAME_VERSION_MASK) >> 12)
104 #define IEEE_802154_FC_SRC_ADDR_MODE_MASK 0xc000
105 #define IEEE_802154_FC_SRC_ADDR_MODE_SHORT (IEEE_802154_ADDR_MODE_SHORT << 14)
106 #define IEEE_802154_FC_SRC_ADDR_MODE_EXT (IEEE_802154_ADDR_MODE_EXT << 14)
#define PACK_STRUCT_END
Definition: arch.h:316
uint8_t u8_t
Definition: arch.h:125
#define PACK_STRUCT_BEGIN
Definition: arch.h:307
uint16_t u16_t
Definition: arch.h:127
PACK_STRUCT_BEGIN struct ieee_802154_hdr PACK_STRUCT_STRUCT
Definition: ieee802154.h:54
PACK_STRUCT_FLD_8(u8_t source_address[8])
PACK_STRUCT_FLD_8(u8_t sequence_number)
PACK_STRUCT_FIELD(u16_t frame_control)
PACK_STRUCT_FIELD(u16_t destination_pan_id)
PACK_STRUCT_FIELD(u16_t source_pan_id)
PACK_STRUCT_FLD_8(u8_t destination_address[8])