Reference Documentation

IntelĀ® PAC
Napatech SmartNIC
Reference Information
Napatech Software Suite: ntpl


The ntpl tool is used to change filters on existing streams.


ntpl -f <filename> -e <expression> -u <ntplId> [-v | --validate] [-h | --help]

Mandatory Commands
Command Description
-f <filename> Specifies an input text file containing a number of NTPL expression strings
-e <expression> Specifies an NTPL expression string
-u <ntplId> Show filter resource usage for an NTPL expression. <ntplId> can be all or a specific NTPL identifier
Optional Commands
Command Description
-v, --validate Validate mode - the NTPL syntax is validated without changing anything
-h, --help Displays a help message describing the tool including syntax and parameters


  • ntpl -f filtersetup.txt
    Uploads the NTPL expressions in the filtersetup.txt file to the filter
  • ntpl -e "assign[streamid=4;color=2;Priority=1]=all"
    Uploads the NTPL expression to the filter
  • ntpl -v -f filtersetup.txt
    Validates the NTPL expressions in the filtersetup.txt file.
    Nothing is changed.
  • ntpl -v -e "assign[streamid=4;color=2;Priority=1]=all"
    Validates the NTPL expression.
    Nothing is changed.
  • Defining macros:
    ntpl -e 'DefineMacro("ABC", "($1..$2)")'
    ntpl -e 'assign[streamid=ABC(0,4)] = port == 0'

    Note: Observe the use of ' (single qoutes) and " (double qoutes) when defining the macro.

For additional information see NtplOverview in the driver documentation.