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.
N/A |
220
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A |
223
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | index | Ver.: always |
N/A | matchCountForIndexPtr | Ver.: always |
Returns
sl_status_t status code
233
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | shortMode | Ver.: always |
N/A | allowedPacketCountPtr | Ver.: always |
N/A | droppedPacketCountPtr | Ver.: always |
N/A | totalPacketCountPtr | Ver.: always |
243
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | filterNoAddress | Ver.:always |
252
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | nodeId | Ver.:always |
258
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | eui64 | Ver.:always |
264
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | panId | Ver.:always |
270
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
276
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
282
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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.
N/A | listType | Ver.:always, listType can be "set-whitelist" or "set-blacklist". |
288
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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 |
132
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
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 |
144
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
sli_zigbee_filter_result_t#
sli_zigbee_filter_result_t
Enumerator | |
---|---|
ALLOW_PACKET | |
DROP_PACKET |
203
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
Typedef Documentation#
MacAddressFilterOptions#
typedef uint8_t MacAddressFilterOptions
150
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
Variable Documentation#
macAddressFilterData#
sli_802154_mac_address_filter_globals_t macAddressFilterData
210
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
zeroEui64#
const sl_802154_long_addr_t zeroEui64
212
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
Macro Definition Documentation#
expectCheckpoint#
#define expectCheckpoint
51
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
debug#
#define debug
52
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
SL_ZIGBEE_TEST_ASSERT#
#define SL_ZIGBEE_TEST_ASSERT
69
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_NO_ADDRESS_MASK#
#define MAC_FILTER_OPTIONS_NO_ADDRESS_MASKValue:
(1 << MAC_FILTER_TYPE_NO_ADDRESS)
72
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_SHORT_ADDRESS_LIST_MASK#
#define MAC_FILTER_OPTIONS_SHORT_ADDRESS_LIST_MASKValue:
(1 << MAC_FILTER_TYPE_SHORT_ADDRESS)
74
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_LONG_ADDRESS_LIST_MASK#
#define MAC_FILTER_OPTIONS_LONG_ADDRESS_LIST_MASKValue:
(1 << MAC_FILTER_TYPE_LONG_ADDRESS)
76
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_DEST_PAN_ID_LIST_MASK#
#define MAC_FILTER_OPTIONS_DEST_PAN_ID_LIST_MASKValue:
(1 << MAC_FILTER_TYPE_PAN_ID)
78
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_COUNT#
#define MAC_FILTER_OPTIONS_COUNTValue:
4
82
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_DROP_NO_ADDRESS#
#define MAC_FILTER_OPTIONS_DROP_NO_ADDRESSValue:
0x00
84
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_SHORT_ADDRESS_BLACKLIST#
#define MAC_FILTER_OPTIONS_SHORT_ADDRESS_BLACKLISTValue:
0x00
85
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_LONG_ADDRESS_BLACKLIST#
#define MAC_FILTER_OPTIONS_LONG_ADDRESS_BLACKLISTValue:
0x00
86
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_ALLOW_NO_ADDRESS#
#define MAC_FILTER_OPTIONS_ALLOW_NO_ADDRESSValue:
0x01
88
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_SHORT_ADDRESS_WHITELIST#
#define MAC_FILTER_OPTIONS_SHORT_ADDRESS_WHITELISTValue:
0x02
89
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_LONG_ADDRESS_WHITELIST#
#define MAC_FILTER_OPTIONS_LONG_ADDRESS_WHITELISTValue:
0x04
90
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_DEST_PAN_ID_WHITELIST#
#define MAC_FILTER_OPTIONS_DEST_PAN_ID_WHITELISTValue:
0x08
92
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_DEST_PAN_ID_BLACKLIST#
#define MAC_FILTER_OPTIONS_DEST_PAN_ID_BLACKLISTValue:
0x00
93
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
BROADCAST_PAN_ID#
#define BROADCAST_PAN_IDValue:
0xFFFF
95
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FILTER_OPTIONS_DEFAULTS#
#define MAC_FILTER_OPTIONS_DEFAULTSValue:
99
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_FRAME_TYPE_MASK#
#define MAC_FRAME_CONTROL_FRAME_TYPE_MASKValue:
0x0007
104
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_FRAME_TYPE_BEACON#
#define MAC_FRAME_CONTROL_FRAME_TYPE_BEACONValue:
0x0000
105
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_FRAME_TYPE_DATA#
#define MAC_FRAME_CONTROL_FRAME_TYPE_DATAValue:
0x0001
106
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_FRAME_TYPE_ACK#
#define MAC_FRAME_CONTROL_FRAME_TYPE_ACKValue:
0x0002
107
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_FRAME_TYPE_COMMAND#
#define MAC_FRAME_CONTROL_FRAME_TYPE_COMMANDValue:
0x0003
108
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_VERSION_MASK#
#define MAC_FRAME_CONTROL_VERSION_MASKValue:
0x3000
110
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_VERSION_SHIFT#
#define MAC_FRAME_CONTROL_VERSION_SHIFTValue:
12
111
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_VERSION_2003#
#define MAC_FRAME_CONTROL_VERSION_2003Value:
0x0000
112
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_VERSION_2012#
#define MAC_FRAME_CONTROL_VERSION_2012Value:
0x0002
113
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_SOURCE_ADDRESS_MODE_SHIFT#
#define MAC_FRAME_CONTROL_SOURCE_ADDRESS_MODE_SHIFTValue:
14
115
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_ADDRESS_MODE_MASK#
#define MAC_FRAME_CONTROL_ADDRESS_MODE_MASKValue:
0x0003
117
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_ADDRESS_MODE_NONE#
#define MAC_FRAME_CONTROL_ADDRESS_MODE_NONEValue:
0x0000
118
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_ADDRESS_MODE_RESERVED#
#define MAC_FRAME_CONTROL_ADDRESS_MODE_RESERVEDValue:
0x0001
119
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_ADDRESS_MODE_SHORT#
#define MAC_FRAME_CONTROL_ADDRESS_MODE_SHORTValue:
0x0002
120
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_ADDRESS_MODE_LONG#
#define MAC_FRAME_CONTROL_ADDRESS_MODE_LONGValue:
0x0003
121
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_DEST_ADDRESS_MODE_SHIFT#
#define MAC_FRAME_CONTROL_DEST_ADDRESS_MODE_SHIFTValue:
10
123
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_DEST_ADDRESS_MODE_NONE#
#define MAC_FRAME_CONTROL_DEST_ADDRESS_MODE_NONEValue:
0x0000
125
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
MAC_FRAME_CONTROL_PANID_COMPRESSION#
#define MAC_FRAME_CONTROL_PANID_COMPRESSIONValue:
0x0040
127
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h
WHITELIST_CHARACTER_INDEX#
#define WHITELIST_CHARACTER_INDEXValue:
4
129
of file app/framework/plugin-soc/mac-address-filtering/mac-address-filtering.h