Filter Creation
183
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Rx Filters
Table 11-5. Rule Types (continued)
Field
Argument
Size
Values
SL_WLAN_RX_FILTER_HFIELD_ETH
ER_TYPE
Rule.Args.Value.EtherType
4
SL_WLAN_RX_FILTER_HFIELD_IP_
VERSION
Rule.Args.Value.IpVersion
1
Rule.Args.Value.IpVersionAscii
4
“IPV4”
“IPV6”
SL_WLAN_RX_FILTER_HFIELD_IP_
PROTOCOL
Rule.Args.Value.IpProtocol
1
1 – ICMP (IPV4 Only)
2 - IGMP (IPV4 only)
6 – TCP
17 – UDP
58 – ICMPV6
Rule.Args.Value.IpProtocolAscii
5
“ICMP”
“ICMP6”
“IGMP”
“TCP”
“UDP
SL_WLAN_RX_FILTER_HFIELD_IPV
4_SRC_ADDR
Rule.Args.Value.Ipv4
4
SL_WLAN_RX_FILTER_HFIELD_IPV
4_DST_ADDR
Rule.Args.Value.Ipv4
4
SL_WLAN_RX_FILTER_HFIELD_IPV
6_SRC_ADRR
Rule.Args.Value.Ipv6
16
SL_WLAN_RX_FILTER_HFIELD_IPV
6_DST_ADDR
Rule.Args.Value.Ipv6
16
SL_WLAN_RX_FILTER_HFIELD_PO
RT_SRC
Rule.Args.Value.Port
4
1–65535
SL_WLAN_RX_FILTER_HFIELD_PO
RT_DST
Rule.Args.Value.Port
4
1–65535
SL_WLAN_RX_FILTER_HFIELD_L1_
PAYLOAD_PATTERN
Rule.Args.Value.Pattern.Offset
2
Rule.Args.Value.Pattern.Length
1
Rule.Args.Value.Pattern.Value
16
SL_WLAN_RX_FILTER_HFIELD_L4_
PAYLOAD_PATTERN
Rule.Args.Value.Pattern.Offset
2
Rule.Args.Value.Pattern.Length
1
Rule.Args.Value.Pattern.Value
16
11.4.3.4 Pattern-Matching Rule Fields
Pattern matching can be used to look for a specific payload on the frame. The SimpleLink Wi-Fi device
currently supports two types of pattern matching:
•
L1 payload matching (L1_PAYLOAD_EXACT_PATTERN_FIELD). The offset is counted from the
beginning of the 802.11 MAC headers (that is, the frame control field). This is useful in transceiver
mode, but can also be used while connected.
•
L4 payload matching (L4_PAYLOAD_EXACT_PATTERN_FIELD). The offset is counted from the
beginning of the TCP or UDP payload.
The inputs to this field header rule are as follows:
•
Offset, or where to start checking for the requested pattern (offset can be set between 0x0 to 0x5ff)
•
Length, or how many bytes: can be 1 to 16
•
Pattern to compare with: can be up to 16 bytes
•
Masking: bit masking on the pattern