Port Tests

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: Port Tests

This section specifies the syntax and semantics for the port tests. Supported for all feature sets.
The syntax for the port tests is shown below.

<PortTest>              ::= 'Port' ( ( <CompareOperator> <PortNumber> ) | ( '==' <PortNumberSpec> ) )

Using a port test it is possible to set up a filter, filtering frames from specific ports. The port(s) can be specified as:

  • Equal to:
    • A range of port numbers
    • A list of port numbers
  • Equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to a specific port number.

Port Test Examples

This section describes some examples of filter for port testing.

The filter NTPL example is shown below.

Assign[StreamId = 1] = Port == 2 # Capture all packets from port 2
Assign[StreamId = 1] = Port == 2,3 # Capture all packets from port 2,3
Assign[StreamId = 1] = Port == (0..3) # Capture all packets from port 0,1,2,3
Assign[StreamId = 1] = Port < 4 # Capture all packets from port 0,1,2,3