MAC Address Filtering#
API and Callbacks for the MAC Address Filtering Component.
This plugin artificially limits what the stack hears by filtering the packets just above the lower MAC. The plugin can be configured on the fly via CLI with the short or long address of devices whose packets will be dropped or allowed. There are two lists, a short address list (2-byte node ID) and a long address list (8-byte IEEE address). Each list may be configured as either an allow list or block list. The default is a block list with no addresses configured (accept all packets normally). A separate option allows or drops packets with no address information (e.g., Beacon Requests). NOTE: The radio will still generate and process MAC ACKs for packets. This plugin cannot be used to effect the behavior of MAC ACKs, which are handled by the RAIL library and radio hardware.
Modules#
sli_802154_mac_address_filter_option_description_t
sli_zigbee_long_addres_filter_match_struct_t
sli_zigbee_short_addres_filter_match_struct_t
sli_802154_pan_id_filter_match_struct_t
sli_802154_mac_address_filter_globals_t
API#
Clear all lists for MAC address filtering.
Clears all packet counts for all modes.
Get stats for a short address.
Get MAC address filtering stats. Get the allowed, dropped and total packet counts.
Set the decision to manupulate the MAC address filtering tables.
Add the short address.
Add the long address.
Add the panID.
Set the short address list type.
Set the long address list type.
Set the list type of panId list.
Enumerations#
Typedefs#
Variables#
Macros#
API Documentation#
sl_zigbee_af_mac_address_filtering_clear_all#
void sl_zigbee_af_mac_address_filtering_clear_all (void )
Clear all lists for MAC address filtering.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sl_zigbee_af_mac_address_filtering_clear_stats#
void sl_zigbee_af_mac_address_filtering_clear_stats (void )
Clears all packet counts for all modes.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sl_zigbee_af_mac_address_filtering_get_stats_for_short_address#
sl_status_t sl_zigbee_af_mac_address_filtering_get_stats_for_short_address (uint8_t index, uint32_t * matchCountForIndexPtr)
Get stats for a short address.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | index | Ver.: always |
uint32_t * | N/A | matchCountForIndexPtr | Ver.: always |
Returns
sl_status_t status code
sl_zigbee_af_mac_address_filtering_get_stats#
void sl_zigbee_af_mac_address_filtering_get_stats (bool shortMode, uint32_t * allowedPacketCountPtr, uint32_t * droppedPacketCountPtr, uint32_t * totalPacketCountPtr)
Get MAC address filtering stats. Get the allowed, dropped and total packet counts.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | N/A | shortMode | Ver.: always |
uint32_t * | N/A | allowedPacketCountPtr | Ver.: always |
uint32_t * | N/A | droppedPacketCountPtr | Ver.: always |
uint32_t * | N/A | totalPacketCountPtr | Ver.: always |
sl_zigbee_af_mac_address_filtering_filter_no_address#
void sl_zigbee_af_mac_address_filtering_filter_no_address (bool filterNoAddress)
Set the decision to manupulate the MAC address filtering tables.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | N/A | filterNoAddress | Ver.:always |
sl_zigbee_af_mac_address_filtering_add_short_address#
void sl_zigbee_af_mac_address_filtering_add_short_address (sl_802154_short_addr_t nodeId)
Add the short address.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_802154_short_addr_t | N/A | nodeId | Ver.:always |
sl_zigbee_af_mac_address_filtering_add_long_address#
void sl_zigbee_af_mac_address_filtering_add_long_address (sl_802154_long_addr_t eui64)
Add the long address.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_802154_long_addr_t | N/A | eui64 | Ver.:always |
sl_zigbee_af_mac_address_filtering_add_pan_id#
void sl_zigbee_af_mac_address_filtering_add_pan_id (sl_802154_pan_id_t panId)
Add the panID.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_802154_pan_id_t | N/A | panId | Ver.:always |
sl_zigbee_af_mac_address_filtering_set_short_address_list_type#
void sl_zigbee_af_mac_address_filtering_set_short_address_list_type (uint8_t * listType)
Set the short address list type.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
sl_zigbee_af_mac_address_filtering_set_long_address_list_type#
void sl_zigbee_af_mac_address_filtering_set_long_address_list_type (uint8_t * listType)
Set the long address list type.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
sl_zigbee_af_mac_address_filtering_set_pan_id_list_type#
void sl_zigbee_af_mac_address_filtering_set_pan_id_list_type (uint8_t * listType)
Set the list type of panId list.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
Enumeration Documentation#
sli_802154_mac_address_mode_t#
sli_802154_mac_address_mode_t
Enumerator | |
---|---|
MAC_ADDRESS_MODE_NONE | |
MAC_ADDRESS_MODE_SHORT | |
MAC_ADDRESS_MODE_LONG |
sli_802154_mac_filter_type_t#
sli_802154_mac_filter_type_t
Enumerator | |
---|---|
MAC_FILTER_TYPE_NO_ADDRESS | |
MAC_FILTER_TYPE_SHORT_ADDRESS | |
MAC_FILTER_TYPE_LONG_ADDRESS | |
MAC_FILTER_TYPE_PAN_ID |