Examples of ntpcap.ini Files

libpcap Installation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Software Installation Guide
Capture Software Version
Link™ Capture Software 12.8

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.

[Common]
Ntpl1="Assign[StreamId=(20..23);TxPort=0;TxIgnore=True]=All"
Ntpl2="HashMode=Hash2Tuple"
 
[napa_lb0]
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).

[Common]
Ntpl1="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.

[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