Loading...
Searching...
No Matches
hdr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Daniel Krebs
3 * 2016 INRIA
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef NET_GNRC_LWMAC_HDR_H
22#define NET_GNRC_LWMAC_HDR_H
23
24#include <stdint.h>
25#include <stdbool.h>
26
27#include "net/ieee802154.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36#define GNRC_LWMAC_FRAMETYPE_WR (0x01U)
37
41#define GNRC_LWMAC_FRAMETYPE_WA (0x02U)
42
46#define GNRC_LWMAC_FRAMETYPE_DATA (0x03U)
47
51#define GNRC_LWMAC_FRAMETYPE_DATA_PENDING (0x04U)
52
56#define GNRC_LWMAC_FRAMETYPE_BROADCAST (0x05U)
57
61typedef struct {
63 uint8_t len;
65
69#define GNRC_LWMAC_L2_ADDR_INITIAL { { 0 }, 0 }
70
74typedef struct {
75 uint8_t type;
77
85
89typedef struct __attribute__((packed)) {
92 uint32_t current_phase;
94
98typedef struct __attribute__((packed)) {
100 uint8_t seq_nr;
102
106typedef struct __attribute__((packed)) {
109
110#ifdef __cplusplus
111}
112#endif
113
114#endif /* NET_GNRC_LWMAC_HDR_H */
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
Definition ieee802154.h:45
LWMAC broadcast data frame.
Definition hdr.h:98
uint8_t seq_nr
Broadcast sequence.
Definition hdr.h:100
gnrc_lwmac_hdr_t header
Broadcast packet header type.
Definition hdr.h:99
LWMAC unicast data frame.
Definition hdr.h:106
gnrc_lwmac_hdr_t header
Data packet header type.
Definition hdr.h:107
LWMAC WA (wake-up answer packet, i.e., preamble-ACK packet) frame.
Definition hdr.h:89
uint32_t current_phase
Node's current phase value.
Definition hdr.h:92
gnrc_lwmac_l2_addr_t dst_addr
WA is broadcast, so destination address needed.
Definition hdr.h:91
gnrc_lwmac_hdr_t header
WA packet header type.
Definition hdr.h:90
LWMAC WR (wake-up request packet, i.e., preamble packet) frame.
Definition hdr.h:81
gnrc_lwmac_l2_addr_t dst_addr
WR is broadcast, so destination address needed.
Definition hdr.h:83
gnrc_lwmac_hdr_t header
WR packet header type.
Definition hdr.h:82
LWMAC header.
Definition hdr.h:74
uint8_t type
type of frame
Definition hdr.h:75
LWMAC internal L2 address structure.
Definition hdr.h:61
uint8_t len
address
Definition hdr.h:63
IEEE 802.15.4 header definitions.