drivers/include/net/netdev/ieee802154.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef NET_NETDEV_IEEE802154_H
20 #define NET_NETDEV_IEEE802154_H
21 
22 #include "net/ieee802154.h"
23 #include "net/gnrc/nettype.h"
24 #include "net/netopt.h"
25 #include "net/netdev.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
41 #define NETDEV_IEEE802154_SEND_MASK (0x0028)
42 #define NETDEV_IEEE802154_RAW (0x0002)
46 #define NETDEV_IEEE802154_SRC_MODE_LONG (0x0004)
47 
50 #define NETDEV_IEEE802154_SECURITY_EN (IEEE802154_FCF_SECURITY_EN)
51 
55 #define NETDEV_IEEE802154_ACK_REQ (IEEE802154_FCF_ACK_REQ)
56 
65 typedef enum {
74 
83 typedef struct {
89 #ifdef MODULE_GNRC
90  gnrc_nettype_t proto;
91 #endif
92 
96  uint16_t pan;
97 
101  uint8_t short_addr[IEEE802154_SHORT_ADDRESS_LEN];
102 
106  uint8_t long_addr[IEEE802154_LONG_ADDRESS_LEN];
107  uint8_t seq;
108  uint8_t chan;
109  uint16_t flags;
112 
117 
131 int netdev_ieee802154_get(netdev_ieee802154_t *dev, netopt_t opt, void *value,
132  size_t max_len);
133 
160 int netdev_ieee802154_set(netdev_ieee802154_t *dev, netopt_t opt, const void *value,
161  size_t value_len);
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* NET_NETDEV_IEEE802154_H */
168 
Carrier sense with energy above threshold.
uint16_t flags
flags as defined above
Definitions low-level network driver interface.
netdev_t netdev
netdev_t base class
IEEE 802.15.4 header definitions.
Received packet status information for most radios.
netopt_t
Global list of configuration options available throughout the network stack, e.g. ...
Definition: netopt.h:36
UWB preamble sense based on the packet with the multiplexed preamble.
uint16_t pan
IEEE 802.15.4 specific fields.
UWB preamble sense based on the SHR of a frame.
int netdev_ieee802154_set(netdev_ieee802154_t *dev, netopt_t opt, const void *value, size_t value_len)
Fallback function for netdev IEEE 802.15.4 devices' _set function.
netdev_ieee802154_cca_mode_t
Option parameter to be used with NETOPT_CCA_MODE to set the mode of the clear channel assessment (CCA...
Structure to hold driver state.
int netdev_ieee802154_get(netdev_ieee802154_t *dev, netopt_t opt, void *value, size_t max_len)
Fallback function for netdev IEEE 802.15.4 devices' _get function.
Definition of global configuration options.
gnrc_nettype_t
Definition of protocol types in the network stack.
Definition: nettype.h:42
#define IEEE802154_SHORT_ADDRESS_LEN
IEEE 802.15.4 address lengths.
Extended structure to hold IEEE 802.15.4 driver state.
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
Protocol type definitions.