Examples of ntpcap.ini Files

libpcap Installation

Platform
Napatech SmartNIC
Content Type
Software Installation Guide
Capture Software Version
Link™ Capture Software 12.1

Load-balancing example

In this load-balancing example, ntpcap.ini creates 4 libpcap devices, named napa_lb0, napa_lb1, napa_lb2, and napa_lb3. All received frames are distributed to streams 20 to 23 using a 2-tuple hash key algorithm. Hash2Tuple uses IP address information for specifying the flow. For the device napa_lb0, the stream ID must specified by a StreamId key, because the NTPL Assign command that creates the streams does not specify a single stream ID value.

[napa_lb0]
Rx1="Assign[streamid=(20..23);txport=0;txignore=true]=All"
Rx2="HashMode=Hash2Tuple"
StreamId=20
Tx=0

[napa_lb1]
StreamId=21
Tx=1

[napa_lb2]
StreamId=22

[napa_lb3]
StreamId=23

Host buffer allowance example

In this host buffer allowance example, ntpcap.ini creates 4 libpcap devices, named napa_hba, napa_hba25, napa_hba50 and napa_hba75. They share the same stream, but have different host buffer allowance values. A slow application that uses napa_hba25 will loose packets to give way for a faster application that uses napa_hba75. For the first libpcap device, the host buffer allowance is 100% (default value).

[napa_hba]
Rx1="Assign[streamid=10;txport=0;txignore=true]=All"

[napa_hba25]
StreamId=10
HBAllowance=25

[napa_hba50]
StreamId=10
HBAllowance=50

[napa_hba75]
StreamId=10
HBAllowance=75

[Common] section example

This example is very similar to the default ntpcap.ini file, except that the NTPL commands that assigns ports to streams are collected in the [Common] section.

Note: The [Common] section is only supported in version 1.7.3 or later.
[Common]
Ntpl1 = "Assign[streamid=0;txport=0;txignore=true]=port==0"
Ntpl2 = "Assign[streamid=1;txport=0;txignore=true]=port==1"
Ntpl3 = "Assign[streamid=2;txport=0;txignore=true]=port==2"
Ntpl4 = "Assign[streamid=3;txport=0;txignore=true]=port==3"

[napa0]
StreamId = 0
Tx = 0

[napa1]
StreamId = 1
Tx = 1

[napa2]
StreamId = 2
Tx = 2

[napa3]
StreamId = 3
Tx = 3