![Texas Instruments CC3220 Скачать руководство пользователя страница 180](http://html.mh-extra.com/html/texas-instruments/cc3220/cc3220_programmers-manual_1094609180.webp)
Filter Creation
180
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Rx Filters
filter is supported for few filter types, and the nonbinary filter lets the user set the rule argument as a
string instead of binary values. See
for the filters that support the nonbinary filter.
•
SL_WLAN_RX_FILTER_ENABLE – A filter can be enabled or disabled. A disabled filter is skipped
during the matcher process; for better performance for the filter creation, first create the set of the
required filters with the disable flag, and then, when all the filters have been created, enable all of them
with a single function call.
•
SL_WLAN_RX_FILTER_PERSISTENT – A filter set with a persistent flag is saved to the SFLASH and
loads on each device reset. The act of saving the persistent filters to the flash is executed by calling
the sl_WlanSet function with the store command SL_WLAN_RX_FILTER_STORE.
11.4.3 Rule Structure for Header Filters
The rule structure describes the match criteria. The rule is a combination of:
•
Field
•
Argument
•
Compare function
During the packet processing, the value of the frame field is compared with the value of the rule
arguments. For example:
•
Destination IP is equal to 123.44.55.66 means:
–
Field is destination IP.
–
Argument is 123.44.55.66.
–
Compare function is equal.
•
Source MAC is different from 0x34567899 means:
–
Field is source MAC.
–
Argument is 0x34567899.
–
Compare function is not equal.
•
Frame length is higher than 500 and lower than 900 means:
–
Field is frame length.
–
Arguments is 500, 900.
–
Compare function is in between.
The structure of the rule is a union which serves two type of rules: the header rule type and the
combination rule type. For rule of type SL_WLAN_RX_FILTER_HEADER, the structure used is
SlWlanRxFilterRuleHeader_t.
11.4.3.1 Field
The field value defines the field that is checked during the processing. The list of supported fields follows:
•
SL_WLAN_RX_FILTER_HFIELD_FRAME_TYPE
•
SL_WLAN_RX_FILTER_HFIELD_FRAME_SUBTYPE
•
SL_WLAN_RX_FILTER_HFIELD_BSSID
•
SL_WLAN_RX_FILTER_HFIELD_MAC_SRC_ ADDR
•
SL_WLAN_RX_FILTER_HFIELD_MAC_DST_ADDR
•
SL_WLAN_RX_FILTER_HFIELD_FRAME_LENGTH
•
SL_WLAN_RX_FILTER_HFIELD_ETHER_TYPE
•
SL_WLAN_RX_FILTER_HFIELD_IP_VERSION
•
SL_WLAN_RX_FILTER_HFIELD_IP_PROTOCOL
•
SL_WLAN_RX_FILTER_HFIELD_IPV4_SRC_ADDR
•
SL_WLAN_RX_FILTER_HFIELD_IPV4_DST_ADDR
•
SL_WLAN_RX_FILTER_HFIELD_IPV6_SRC_ADRR