Low Power Assistant Middleware Library 5.6.0
cy_pf_port_t Struct Reference

Description

Usually a single port is filtered but port ranges are also supported, where the range is from portnum thru portnum + range.

Port ranges are expected to be used with short lived ephemeral source port numbers. Port numbers are described in numerous places such https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Data Fields

uint16_t portnum
 Port number. More...
 
uint16_t range
 Range: Allows a block of portnumbers to be filtered. More...
 
cy_pn_direction_t direction
 Source or Destination port. More...
 

Field Documentation

◆ portnum

uint16_t cy_pf_port_t::portnum

Port number.

Any 16 bit port number can be specified. For a description and list of port numbers see: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

◆ range

uint16_t cy_pf_port_t::range

Range: Allows a block of portnumbers to be filtered.

Range must be of the form 2^y - 1 (511, 1023, etc) and must be less than portnum. When using range, portnum must be of the form 2^x (256, 512, etc). Example: portnum == 16384, range = 1023 will filter ports 16384-17407

If any of these checks for using ranges fails, fallback to filtering for just 'portnum'.

◆ direction

cy_pn_direction_t cy_pf_port_t::direction

Source or Destination port.

Dest is default unless source port override is on