Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ieee802154.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
14#ifndef ZEPHYR_INCLUDE_NET_IEEE802154_H_
15#define ZEPHYR_INCLUDE_NET_IEEE802154_H_
16
17#include <limits.h>
18#include <zephyr/net/net_l2.h>
19#include <zephyr/net/net_mgmt.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
111#define IEEE802154_MAX_PHY_PACKET_SIZE 127
112
120#define IEEE802154_FCS_LENGTH 2
121
136#define IEEE802154_MTU (IEEE802154_MAX_PHY_PACKET_SIZE - IEEE802154_FCS_LENGTH)
137
138/* TODO: Support flexible MTU and FCS lengths for IEEE 802.15.4-2015ff */
139
141#define IEEE802154_SHORT_ADDR_LENGTH 2
142
144#define IEEE802154_EXT_ADDR_LENGTH 8
145
147#define IEEE802154_MAX_ADDR_LENGTH IEEE802154_EXT_ADDR_LENGTH
148
153#define IEEE802154_NO_CHANNEL USHRT_MAX
154
159#define IEEE802154_BROADCAST_ADDRESS 0xffff
160
166#define IEEE802154_NO_SHORT_ADDRESS_ASSIGNED 0xfffe
167
169#define IEEE802154_BROADCAST_PAN_ID 0xffff
170
175#define IEEE802154_SHORT_ADDRESS_NOT_ASSOCIATED IEEE802154_BROADCAST_ADDRESS
176
181#define IEEE802154_PAN_ID_NOT_ASSOCIATED IEEE802154_BROADCAST_PAN_ID
182
193
195 struct cipher_ctx enc;
196 struct cipher_ctx dec;
211
214
226
238
240 uint8_t _unused : 3;
242};
243
250
263
274
287
297
300
301#ifdef CONFIG_NET_L2_IEEE802154_SECURITY
304#endif
305
306#ifdef CONFIG_NET_L2_IEEE802154_MGMT
309
314 struct k_sem scan_ctx_lock;
315
329
344#endif
345
348
351
359
373
375 uint8_t _unused : 5;
382
385
387 struct k_sem ack_lock;
388
395 struct k_sem ctx_lock;
396};
397
400/* L2 context type to be used with NET_L2_GET_CTX_TYPE */
401#define IEEE802154_L2_CTX_TYPE struct ieee802154_context
402
405#ifdef __cplusplus
406}
407#endif
408
413#endif /* ZEPHYR_INCLUDE_NET_IEEE802154_H_ */
Crypto Cipher structure definitions.
ieee802154_device_role
IEEE 802.15.4 device role.
Definition ieee802154.h:245
#define IEEE802154_MAX_ADDR_LENGTH
IEEE 802.15.4 maximum address length.
Definition ieee802154.h:147
@ IEEE802154_DEVICE_ROLE_PAN_COORDINATOR
PAN coordinator.
Definition ieee802154.h:248
@ IEEE802154_DEVICE_ROLE_ENDDEVICE
End device.
Definition ieee802154.h:246
@ IEEE802154_DEVICE_ROLE_COORDINATOR
Coordinator.
Definition ieee802154.h:247
net_l2_flags
L2 flags.
Definition net_l2.h:37
Public IEEE 802.15.4 Driver API.
Public API for network L2 interface.
Network Management API public header.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT16_TYPE__ int16_t
Definition stdint.h:73
Structure encoding session parameters.
Definition cipher.h:110
IEEE 802.15.4 L2 context.
Definition ieee802154.h:252
struct ieee802154_req_params * scan_ctx
Pointer to scanning parameters and results, guarded by scan_ctx_lock.
Definition ieee802154.h:308
struct ieee802154_security_ctx sec_ctx
Security context.
Definition ieee802154.h:303
uint8_t ack_seq
ACK expected sequence number, guarded by ack_lock.
Definition ieee802154.h:384
struct k_sem scan_ctx_lock
Used to maintain integrity of data for all fields in this struct unless otherwise documented on field...
Definition ieee802154.h:314
uint8_t ext_addr[8]
Extended Address (in little endian)
Definition ieee802154.h:296
struct k_sem ctx_lock
Context lock.
Definition ieee802154.h:395
uint8_t ack_requested
ACK requested flag, guarded by ack_lock.
Definition ieee802154.h:381
uint8_t sequence
Data sequence number.
Definition ieee802154.h:358
struct k_sem ack_lock
ACK lock, guards ack_* fields.
Definition ieee802154.h:387
uint16_t short_addr
Short Address (in CPU byte order)
Definition ieee802154.h:286
uint8_t device_role
Device Role.
Definition ieee802154.h:372
struct net_linkaddr_storage linkaddr
Link layer address (in big endian)
Definition ieee802154.h:299
int16_t tx_power
Transmission power in dBm.
Definition ieee802154.h:347
uint8_t coord_ext_addr[8]
Coordinator extended address.
Definition ieee802154.h:328
uint16_t coord_short_addr
Coordinator short address.
Definition ieee802154.h:343
enum net_l2_flags flags
L2 flags.
Definition ieee802154.h:350
uint16_t channel
Channel Number.
Definition ieee802154.h:273
uint16_t pan_id
PAN ID.
Definition ieee802154.h:262
Scanning parameters.
Definition ieee802154_mgmt.h:311
Interface-level security attributes, see section 9.5.
Definition ieee802154.h:184
uint8_t key_len
Length in bytes of the interface-level security key material.
Definition ieee802154.h:213
uint8_t key[16]
Interface-level frame encryption security key material.
Definition ieee802154.h:210
uint8_t level
Frame security level, possible values are defined in section 9.4.2.2, table 9-6.
Definition ieee802154.h:225
uint32_t frame_counter
Interface-level outgoing frame counter, section 9.5, table 9-8, secFrameCounter.
Definition ieee802154.h:192
uint8_t key_mode
Frame security key mode.
Definition ieee802154.h:237
Hardware link address structure.
Definition net_linkaddr.h:90