DST_MAC_ADDR !=
µ%52$'&$67¶
SRC_IP_ADDR == 192.168.x.x
DROP
SRC_MAC_ADDR ==
µ$$
:BB:CC:DD:EE:
))¶
C+
SRC_MAC_ADDR ==
µ**
:HH:II:JJ:KK:
//¶
C+
PROTOCOL ==
µ8'3¶
PORT !=
µ
5001
¶
DROP
DST_MAC_ADDR ==
µ%52$'&$67¶
FRAME_TYPE ==
µ'$7$¶
SRC_MAC_ADDR !=
µ$$
:BB:CC:DD:EE:
))¶
SRC_MAC_ADDR !=
µ**
:HH:II:JJ:KK:
//¶
DROP
Combined OR
Filter Creation
179
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Rx Filters
Figure 11-4. Example 2
11.4 Filter Creation
Application filters are created by the host application, and defined in a hierarchical way. The maximal
number of application filters is 50. Application filters can be created, removed, enabled, disabled, and
stored by the host application. During these operations, there are some transactional periods in which the
filters might behave differently than the final behavior (it is possible that some of the filters are disabled
and some enabled during these transactions). Therefore, TI recommends first creating each filter as
disabled, and then enabling all of them at once (one enable command).
Stored filters are created once, stored on the SFLASH, and then loaded by the device as part of the
device start-up.
Creating a basic Rx filter requires a definition for three attributes: trigger, rule, and actions. This
subsection describes these attributes and the additional parameters that are required by the creation
function (sl_WlanRxFilterAdd). The creation function requires the following parameters:
•
FilterType
•
Flags
•
pRule
•
pTrigger
•
pAction
•
pFilterId, return value of the function
11.4.1 Filter Type
There are two kinds of filters: the basic filter (header), and the combination filter.
•
For the basic filter, the field should be set to SL_WLAN_RX_FILTER_HEADER.
•
The SL_WLAN_RX_FILTER_COMBINATION filter type creates a combined filter, which defines the
compare function on one or two filters.
11.4.2 Filter Flags
The filter flag dictates the filter behavior, by a bit field, and the following flags are supported:
•
SL_WLAN_RX_FILTER_BINARY – For creating a basic filter, usually the binary flag is set; a nonbinary