Format of the ntpcap.ini File

libpcap Installation

product_line_custom
IntelĀ® PAC
Napatech SmartNIC
category
Software Installation Guide

Description

The configuration file ntpcap.ini uses the INI file format.

The configuration file consists of a [Common] section (only version 1.7.3 or later) and a section for each libpcap device. For each device section, a number of optional keys specify additional parameters.

Note: If a device is configured erroneously, it is not created. However, no error message is shown.

Syntax

The syntax for defining one device is as shown below.

['[Common]']
{'Ntpl'<n> '=' '"'<NTPL command>'"'}
'['<device name>']'
{'RX'<n> '=' '"'<NTPL command>'"'}
['StreamId' '=' <ID>]
['HBAllowance' '=' <percentage>]
['TX' '=' <port No.>]
['TXNumaNode' '=' <node No.>]
['TXMinHostBuffer' '=' <minimum buffer size>]
['NTInterface' '=' 'Segment' | 'Packet']
['WithCRC' '=' 'TRUE' | 'FALSE']

Semantics

The semantics of ntpcap.ini is described below.

Key Description
[Common]

A section which may hold NTPL commands for common use, for example NTPL macros and NTPL setup commands. If the [Common] section is present, then "Delete=All" is executed implicitly on entry. libpcap makes sure this is only executed once when multiple devices are opened. After all devices have been closed, opening any device will re-initiate the execution of the NTPL commands in the [Common] section.

Note: This section is only supported in version 1.7.3 or later.
Ntpl<n>

Optional. Must be specified in the [Common] section.

<n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence.

Note: This section is only supported in version 1.7.3 or later.
<device name>

A user-defined libpcap device name. If the name clashes with an existing device name, this section of ntpcap.ini is ignored.

Note: Streams that are already created on the SmartNIC, for instance by using the ntpl tool, are automatically available for libpcap. They are named nt3g<x>, where <x> is the stream ID. To avoid naming clashes, do not use these device names in ntpcap.ini.
Rx<n>

Optional. NTPL commands for setting up this libpcap device.

<n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence. A break in the sequence stops loading commands.

If at least Rx1, and optionally more NTPL commands, assigns or refers to the same single stream ID (not a range), the libpcap device is assigned to this stream ID. Make sure to use the same stream ID in these NTPL commands; otherwise this section of ntpcap.ini is ignored, and the libpcap device is not created.

If a stream with this stream ID has already been created on a SmartNIC, for instance by a previous section in ntpcap.ini or by using the ntpl tool, the NTPL commands are not loaded. Make sure to use a stream ID that is not already in use.

If no NTPL command assigns or refers to a single stream ID, use the key StreamID to assign an existing stream, created for instance in a previous section of ntpcap.ini or by using the ntpl tool.

StreamId

Optional. Assigns the libpcap device to a stream ID. The stream must already have been created.

If set, Rx<n> NTPL commands are not searched for a stream ID.

Use the StreamID key if no NTPL commands assign or refer to a specific stream ID (see the load-balancing example in Examples of ntpcap.ini Files).

Use the StreamID key to assign the libpcap device to a stream created in a previous section of ntpcap.ini or, for instance, by using the ntpl tool (see the host buffer allowance example in Examples of ntpcap.ini Files).

HBAllowance

Optional. Specifies the host buffer allowance in percent for this device. Range: 1..100. Default: 100.

All applications opening this libpcap device will have the same host buffer allowance value. Create more devices assigned to the same stream ID if different host buffer allowance values are needed.

See the host buffer allowance example in Examples of ntpcap.ini Files

TX

Optional. If specified, determines the port used to transmit on. Default: No TX port is assigned.

TXNumaNode

Optional. Specifies from which NUMA node pool of host buffers the TX buffer is taken. Only relevant if a TX port is specified. Default: 0.

TXMinHostBuffer

Optional. Specifies the minimum size in MB of the TX host buffer needed.

NTInterface

Optional. Selects between segment-based interface and packet-based interface. Default: Segment.

Segment-based interface is faster and supports the PCAP descriptor (PacketDescriptor=PCAP in ntservice.ini). However, segment-based interface does not support merging of packets between SmartNICs.

Packet-based interface supports merging of packets between SmartNICs, but does not support the PCAP descriptor.

WithCRC

Optional. If set to TRUE, frames are delivered with CRC. Default: FALSE, that is frames are delivered without CRC.