WICED Wi-Fi functions for manipulating packet filters.
◆ wiced_wifi_add_packet_filter()
Adds an ethernet packet filter which causes the WLAN chip to drop all packets that do NOT match the filter
When a packet filter(s) is installed, incoming packets received by the WLAN chip are run through the pre-installed filter(s). Filter criteria are added using this API function. If the WLAN chip receives a packet that matches one of the currently installed filters, the host MCU is notified, and the packet is forwarded to the MCU. Packets that do not match any of the installed filters are dropped by the WLAN chip. If there are no packet filters installed, all received packets are passed from the WLAN chip to the host MCU
- Parameters
-
- Returns
- wiced_result_t
◆ wiced_wifi_clear_packet_filter_stats()
| wiced_result_t wiced_wifi_clear_packet_filter_stats |
( |
uint32_t | filter_id | ) |
|
|
extern |
Clear all packet filter statistics
- Parameters
-
| [in] | filter_id | : The unique user assigned ID for the filter |
- Returns
- wiced_result_t
◆ wiced_wifi_disable_packet_filter()
Disables a previously installed packet filter
- Parameters
-
| [in] | filter_id | : The unique user assigned ID for the filter |
- Returns
- wiced_result_t
◆ wiced_wifi_enable_packet_filter()
Enables a previously installed packet filter
- Parameters
-
| [in] | filter_id | : The unique user assigned ID for the filter |
- Returns
- wiced_result_t
◆ wiced_wifi_get_packet_filter_mask_and_pattern()
| wiced_result_t wiced_wifi_get_packet_filter_mask_and_pattern |
( |
uint32_t | filter_id, |
|
|
uint32_t | max_size, |
|
|
uint8_t * | mask, |
|
|
uint8_t * | pattern, |
|
|
uint32_t * | size_out ) |
|
extern |
Get the filter pattern and mask for a packet filters
- Parameters
-
| [in] | filter_id | : The id used to create the packet filter |
| [in] | max_size | : Size of the supplied pattern and mask buffers in bytes |
| [out] | mask | : Byte array that will receive the packet filter mask |
| [out] | pattern | : Byte array that will receive the packet filter pattern |
| [out] | size_out | : The number bytes returned in each of pattern and filter buffers |
- Returns
- wiced_result_t
◆ wiced_wifi_get_packet_filter_stats()
| wiced_result_t wiced_wifi_get_packet_filter_stats |
( |
uint8_t | filter_id, |
|
|
wiced_packet_filter_stats_t * | stats ) |
|
extern |
Gets packet filter statistics including packets matched, packets forwarded and packets discarded.
- Parameters
-
| [in] | filter_id | : The unique user assigned ID for the filter |
| [out] | wiced_packet_filter_stats_t | : A pointer to a structure that will be populated with filter statistics |
- Returns
- wiced_result_t
◆ wiced_wifi_get_packet_filters()
Get details of packet filters
Note: does not retrieve the Filter mask and pattern. use wiced_wifi_get_packet_filter_mask_and_pattern to retreive those.
- Parameters
-
| [in] | max_count | : The maximum number of filters to return details for. |
| [in] | offset | : The location (count) of the first filter to retrieve (0=beginning) |
| [out] | list | : An array which will receive the filter descriptors - must be able to fit max_count items |
| [out] | count_out | The number of filter descriptors retrieved |
- Returns
- wiced_result_t
◆ wiced_wifi_remove_packet_filter()
Removes (un-install's) a previously installed packet filter
- Parameters
-
| [in] | filter_id | : The unique user assigned ID for the filter |
- Returns
- wiced_result_t
◆ wiced_wifi_set_packet_filter_mode()
Sets the packet filter mode (or rule) to either forward or discard packets on a match
- Parameters
-
| [in] | wiced_packet_filter_mode_t | : Packet filter mode |
- Returns
- wiced_result_t