nrfxlib API 2.8.99
|
#include "nrf_802154_const.h"
#include "nrf_802154_utils_byteorder.h"
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | nrf_802154_frame_parser_data_t |
Macros | |
#define | NRF_802154_FRAME_PARSER_INVALID_OFFSET 0xff |
Module that contains frame parsing utilities for the 802.15.4 radio driver. | |
Enumerations | |
enum | nrf_802154_frame_parser_level_t { PARSE_LEVEL_NONE , PARSE_LEVEL_FCF_OFFSETS , PARSE_LEVEL_DST_ADDRESSING_END , PARSE_LEVEL_ADDRESSING_END , PARSE_LEVEL_SEC_CTRL_OFFSETS , PARSE_LEVEL_AUX_SEC_HDR_END , PARSE_LEVEL_FULL , PARSE_LEVEL_MAX = PARSE_LEVEL_FULL } |
Functions | |
bool | nrf_802154_frame_parser_data_init (const uint8_t *p_frame, uint8_t valid_data_len, nrf_802154_frame_parser_level_t requested_parse_level, nrf_802154_frame_parser_data_t *p_parser_data) |
Initializes the frame parse data and parses the frame. | |
bool | nrf_802154_frame_parser_valid_data_extend (nrf_802154_frame_parser_data_t *p_parser_data, uint8_t valid_data_len, nrf_802154_frame_parser_level_t requested_parse_level) |
Extends the valid data and parses the frame. | |
static nrf_802154_frame_parser_level_t | nrf_802154_frame_parser_parse_level_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets current parse level of the provided parser data. | |
static uint8_t | nrf_802154_frame_parser_frame_length_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the PSDU length of the frame. | |
static uint8_t | nrf_802154_frame_parser_psdu_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the PSDU start offset of the frame. | |
static const uint8_t * | nrf_802154_frame_parser_psdu_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the PSDU start address of the frame. | |
static uint8_t | nrf_802154_frame_parser_frame_version_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the MAC frame version value from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_dsn_suppress_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the DSN suppress bit from the Frame Control Field. | |
static uint8_t | nrf_802154_frame_parser_dst_addr_type_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the MAC frame destination address type from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_dst_addr_is_extended (const nrf_802154_frame_parser_data_t *p_parser_data) |
Determines if the destination address is extended. | |
static uint8_t | nrf_802154_frame_parser_src_addr_type_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the MAC frame source address type from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_src_addr_is_extended (const nrf_802154_frame_parser_data_t *p_parser_data) |
Determines if the source address is extended. | |
static bool | nrf_802154_frame_parser_src_addr_is_short (const nrf_802154_frame_parser_data_t *p_parser_data) |
Determines if the source address is short. | |
static bool | nrf_802154_frame_parser_security_enabled_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the Security Enabled bit from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_ie_present_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the IE present bit from the Frame Control Field. | |
static uint8_t | nrf_802154_frame_parser_frame_type_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the frame type field from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_panid_compression_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the PAN ID compressions bit from the Frame Control Field. | |
static bool | nrf_802154_frame_parser_ar_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the AR bit from the Frame Control Field. | |
static const uint8_t * | nrf_802154_frame_parser_dsn_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the DSN field. | |
static uint8_t | nrf_802154_frame_parser_dst_panid_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Destination PAN ID field. | |
static const uint8_t * | nrf_802154_frame_parser_dst_panid_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Destination PAN field. | |
static uint8_t | nrf_802154_frame_parser_dst_addr_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of frame Destination Address. | |
static const uint8_t * | nrf_802154_frame_parser_dst_addr_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Destination Address field. | |
static uint8_t | nrf_802154_frame_parser_src_panid_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of frame Source PAN ID. | |
static const uint8_t * | nrf_802154_frame_parser_src_panid_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Source PAN ID field. | |
static uint8_t | nrf_802154_frame_parser_src_addr_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of frame Source Address. | |
static const uint8_t * | nrf_802154_frame_parser_src_addr_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Source Address field. | |
static uint8_t | nrf_802154_frame_parser_src_addr_size_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the size of the source address. | |
static uint8_t | nrf_802154_frame_parser_dst_addr_size_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the size of the destination address. | |
static uint8_t | nrf_802154_frame_parser_sec_ctrl_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Security Control Field. | |
static uint8_t | nrf_802154_frame_parser_sec_ctrl_sec_lvl_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the Security Level field from the Security Control Field. | |
static bool | nrf_802154_frame_parser_sec_ctrl_fc_suppress_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the Frame Counter Suppress bit from the Security Control Field. | |
static uint8_t | nrf_802154_frame_parser_sec_ctrl_key_id_mode_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the Key ID Mode field from the Security Control Field. | |
static bool | nrf_802154_frame_parser_sec_ctrl_asn_in_nonce_bit_is_set (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the value of the ASN in Nonce bit from the Security Control Field. | |
static const uint8_t * | nrf_802154_frame_parser_sec_ctrl_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Security Control Field. | |
static uint8_t | nrf_802154_frame_parser_frame_counter_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Frame Counter field. | |
static const uint8_t * | nrf_802154_frame_parser_frame_counter_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Frame Counter field. | |
static uint8_t | nrf_802154_frame_parser_key_id_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Key ID field. | |
static const uint8_t * | nrf_802154_frame_parser_key_id_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Key ID field. | |
static uint8_t | nrf_802154_frame_parser_key_source_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Key Source field. | |
static const uint8_t * | nrf_802154_frame_parser_key_source_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Key Source field. | |
static uint8_t | nrf_802154_frame_parser_key_source_length_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the length of the Key Source field. | |
static uint8_t | nrf_802154_frame_parser_key_index_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the Key Index field. | |
static uint8_t | nrf_802154_frame_parser_key_index_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the Key Index field. | |
static uint8_t | nrf_802154_frame_parser_ie_header_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the IE header. | |
static const uint8_t * | nrf_802154_frame_parser_ie_header_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the IE header. | |
static uint8_t | nrf_802154_frame_parser_mac_payload_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the MAC payload. | |
static const uint8_t * | nrf_802154_frame_parser_mac_payload_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the MAC payload. | |
static uint8_t | nrf_802154_frame_parser_mac_command_id_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the MAC Command ID field. | |
static const uint8_t * | nrf_802154_frame_parser_mac_command_id_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the MAC Command ID field. | |
static uint8_t | nrf_802154_frame_parser_mfr_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the offset of the MFR field. | |
static const uint8_t * | nrf_802154_frame_parser_mfr_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the address of the MFR field. | |
static uint8_t | nrf_802154_frame_parser_mac_payload_length_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the length of the MAC payload. | |
static uint8_t | nrf_802154_frame_parser_mac_header_length_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the length of the MAC header. | |
static uint8_t | nrf_802154_frame_parser_mic_size_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the length of the MIC field. | |
static uint8_t | nrf_802154_frame_parser_dst_addressing_end_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the end offset of the destination addressing section. | |
static const uint8_t * | nrf_802154_frame_parser_dst_addressing_end_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the end address of the destination addressing section. | |
static uint8_t | nrf_802154_frame_parser_addressing_end_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the end offset of the addressing section. | |
static const uint8_t * | nrf_802154_frame_parser_addressing_end_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the end address of the addressing section. | |
static uint8_t | nrf_802154_frame_parser_aux_sec_hdr_end_offset_get (const nrf_802154_frame_parser_data_t *p_parser_data) |
Gets the end offset of the security header section. | |
static const uint8_t * | nrf_802154_frame_parser_header_ie_iterator_begin (const uint8_t *p_ie_header) |
Initializes the IE iterator with given IE header address. | |
static const uint8_t * | nrf_802154_frame_parser_ie_content_address_get (const uint8_t *p_ie_iterator) |
Gets payload address of currently iterated IE. | |
static uint8_t | nrf_802154_frame_parser_ie_length_get (const uint8_t *p_ie_iterator) |
Gets length of currently iterated IE. | |
static const uint8_t * | nrf_802154_frame_parser_ie_iterator_next (const uint8_t *p_ie_iterator) |
Gets next information element iterator. | |
static uint8_t | nrf_802154_frame_parser_ie_id_get (const uint8_t *p_ie_iterator) |
Gets identifier of currently iterated IE. | |
static bool | nrf_802154_frame_parser_ie_iterator_end (const uint8_t *p_ie_iterator, const uint8_t *p_end_addr) |
Checks if the current IE is a terminator. | |
static uint32_t | nrf_802154_frame_parser_ie_vendor_oui_get (const uint8_t *p_ie_iterator) |
Gets vendor-specific OUI (organizationally unique identifier) of currently iterated IE. | |
static uint8_t | nrf_802154_frame_parser_ie_vendor_thread_subtype_get (const uint8_t *p_ie_iterator) |
Gets subtype of Thread vendor-specific IE. | |
static const uint8_t * | nrf_802154_frame_parser_ie_vendor_thread_data_addr_get (const uint8_t *p_ie_iterator) |
Gets vendor-specific IE thread data address of currently iterated IE. | |