Go to the documentation of this file.
27 #ifndef NET_IEEE802154_H
28 #define NET_IEEE802154_H
30 #define IEEE802154_MTU 127
32 #define IEEE802154_FC_TYPE_BEACON 0x0
33 #define IEEE802154_FC_TYPE_DATA 0x1
34 #define IEEE802154_FC_TYPE_ACK 0x2
35 #define IEEE802154_FC_TYPE_MAC_CMD 0x3
37 #define IEEE802154_FC_TYPE_SHIFT 0
38 #define IEEE802154_FC_TYPE_MASK ((1 << 3) - 1)
39 #define IEEE802154_FC_TYPE(x) ((x & IEEE802154_FC_TYPE_MASK) >> IEEE802154_FC_TYPE_SHIFT)
40 #define IEEE802154_FC_SET_TYPE(v, x) do { \
41 v = (((v) & ~IEEE802154_FC_TYPE_MASK) | \
42 (((x) << IEEE802154_FC_TYPE_SHIFT) & IEEE802154_FC_TYPE_MASK)); \
45 #define IEEE802154_FC_SECEN (1 << 3)
46 #define IEEE802154_FC_FRPEND (1 << 4)
47 #define IEEE802154_FC_ACK_REQ (1 << 5)
48 #define IEEE802154_FC_INTRA_PAN (1 << 6)
50 #define IEEE802154_FC_SAMODE_SHIFT 14
51 #define IEEE802154_FC_SAMODE_MASK (3 << IEEE802154_FC_SAMODE_SHIFT)
52 #define IEEE802154_FC_DAMODE_SHIFT 10
53 #define IEEE802154_FC_DAMODE_MASK (3 << IEEE802154_FC_DAMODE_SHIFT)
55 #define IEEE802154_FC_SAMODE(x) \
56 (((x) & IEEE802154_FC_SAMODE_MASK) >> IEEE802154_FC_SAMODE_SHIFT)
58 #define IEEE802154_FC_DAMODE(x) \
59 (((x) & IEEE802154_FC_DAMODE_MASK) >> IEEE802154_FC_DAMODE_SHIFT)
63 #define IEEE802154_MFR_SIZE 2
66 #define IEEE802154_CMD_ASSOCIATION_REQ 0x01
67 #define IEEE802154_CMD_ASSOCIATION_RESP 0x02
68 #define IEEE802154_CMD_DISASSOCIATION_NOTIFY 0x03
69 #define IEEE802154_CMD_DATA_REQ 0x04
70 #define IEEE802154_CMD_PANID_CONFLICT_NOTIFY 0x05
71 #define IEEE802154_CMD_ORPHAN_NOTIFY 0x06
72 #define IEEE802154_CMD_BEACON_REQ 0x07
73 #define IEEE802154_CMD_COORD_REALIGN_NOTIFY 0x08
74 #define IEEE802154_CMD_GTS_REQ 0x09