Network Layer Or Ethertype Filter; Transport Layer/Ip Protocols; Applications Layer/Tcp And Udp Port Numbers - Infineon AIROC CYW43012 Manual

Low-power system design wi-fi & bluetooth combo chip and psoc 6 mcu
Table of Contents

Advertisement

Low-power system design with AIROC™ Wi-Fi & Bluetooth® combo
chip and PSoC™ 6 MCU
WLAN power optimization techniques
Note:
In the AIROC™ CYW43012 Wi-Fi & Bluetooth® combo chip, the number of discard packet filter
offload is limited to one, i.e., only one discard packet filter can be enabled in the design; enabling
more than one discard filter will let all packets to pass through (no filter).
3.3.2.1

Network layer or EtherType filter

The EtherType filter filters packets based on a 16-bit EtherType field present in Ethernet packets seen at the
network layer (see
Internet Assigned Numbers Authority
useful filters) are:
IP (EtherType = 0x800)
ARP (EtherType = 0x806)
IEEE 802.1X or EAP over LAN (EtherType = 0x888E)
Filtering on IP EtherType would match all IP packets coming from the network. This is a very coarse filter and
will include all ICMP, TCP, and UDP packets as shown in
only match respective packets. Filtering all IP packets will have an enormous impact due to the substantial
number of packets it will match and is generally not recommended for typical usage. Valid EtherType filters
consist of a 16-bit number greater or equal to 0x800.
3.3.2.2

Transport layer/IP protocols

The next layer up the stack is the Transport layer, which consists of various IP-based protocols such as TCP,
UDP, and ICMP. Discussions of the protocols themselves are outside the scope of the application note but are
widely available and a list of protocol numbers can be found in numerous sources such as IANA.
IP Protocol filters consist of a single 8-bit number. The filters do not perform any validation check on this 8-bit
number and simply filter the packets matching the number. This is because vendors can use proprietary
numbers and protocols at this layer. It should be noted that filtering on TCP/UDP protocols is still coarse and
will likely include most packets destined for the host processor (depending on the application). Application
layer filters that are based on port numbers are the next level of filter refinement providing finer control on the
majority of packets received in the network.
3.3.2.3

Applications layer/TCP and UDP port numbers

Application layer filters or simply port filters perform packet filtering based on the source or destination port of
a transport layer packet. These port numbers are well-known numbers used to identify various TCP- and UDP-
based protocols. (see IANA). These are 16-bit port numbers. For example, with a port filter, a user can filter on
only SSH packets (port 22) or only on FTP packets (port 20), or any other of the many applications
supported. Due to the large number and constantly changing port definitions, the filters do not validate the
port numbers against available applications.
Transport layer packets have both source and destination ports. Destination ports are the well-known port
numbers described in the IANA link and are generally the most useful. Source ports describe temporary,
ephemeral port numbers used by the host sending the packets and are generated on-the-fly and are not well
known. Because source ports are not known ahead of time, creating a source port filter is difficult. Filters can
be designed to filter a range of ports (between a start and end port) to match a wide range of source ports to
cover this case. Both TCP and UDP use port numbers; therefore, filters can be designed to select TCP or UDP. If
both TCP and UDP need to be filtered for a port, two filters can be created.
Application note
(IANA)). The most commonly used protocols (and most
Figure
7. Filtering on ARP or IEEE 802.1X is finer; it will
20
002-27910 Rev. *C
2023-05-29

Advertisement

Table of Contents
loading

Table of Contents